diff --git a/dot_zsh_functions b/dot_zsh_functions index b7addbb..68df639 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -164,12 +164,14 @@ cmd_loc="find . -type f \( \ -o -name '*.c' -o -name '*.h' \ -o -name '*.js' \ -o -name '*.tsx' \ + -o -name '*.sh' \ -o -name '*.md' \ -o -name '*.xml' \ + -o -name '*.yaml' -o -name '*.yml' \ -o -name '*.groovy' \ -o -name '*.gradle' \ -o -name '*.properties' \ - \) -exec \cat \{\} \; | LANG=C LC_CTYPE=C sed -e 's/^[ \t]*//;s/[ \t]*$//'" + \) -exec \cat \{\} \; | LANG=C LC_CTYPE=C sed -e 's/^[ \t]*//;s/[ \t]*$//'" # Unique lines of code # Via https://text.causal.agency/004-uloc.txt @@ -179,7 +181,7 @@ function uloc { # Top lines of code function toploc { - eval "$cmd_loc | LANG=C LC_CTYPE=C cut -c 1-100 | LANG=C LC_CTYPE=C sort | uniq -c | LANG=C LC_CTYPE=C sort -nr" + eval "$cmd_loc | LANG=C LC_CTYPE=C cut -c 1-100 | LANG=C LC_CTYPE=C sort | uniq -c | LANG=C LC_CTYPE=C sort -nr | head -50" } # Find files bigger than X size and sort them by size