Created
February 28, 2015 12:14
-
-
Save OzTamir/552fb4d6b913801fea67 to your computer and use it in GitHub Desktop.
Aliases to count lines and get statistics about a git project (requires CLOC: http://cloc.sourceforge.net)
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
| # Set aliases | |
| # Count lines in a git repository | |
| alias git_lines='git ls-files | xargs wc -l' | |
| # Count lines of code using CLOC | |
| alias cloc='/Applications/CLI/cloc' | |
| # Lines in a project | |
| alias lines="echo 'Total Lines:' ; git_lines | tail -1 ; echo ''; echo 'Statistics:' ; cloc . | tail -8" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming that the CLOC binary is at /Applications/CLI/cloc (on an OS X platform)