Created
November 15, 2017 16:32
-
-
Save codekiln/a8ecfd7c087eb9bccd72e5c75a154b49 to your computer and use it in GitHub Desktop.
list all sorted django management commands using git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# after running this command, the list of management commands will be in | |
# `sorted_management_commands.txt`, which you can `cat` out. | |
rm -f management_commands.txt | |
touch management_commands.txt | |
for i in **/management/commands/*.py | |
do echo "$(git log -1 --format='%ad | %C(green)%ae%Creset |' --date=short -- $i) $i" >> management_commands.txt | |
done | |
cat management_commands.txt | sort >! sorted_management_commands.txt | |
cat sorted_management_commands.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment