Skip to content

Commit

Permalink
refactor: replace git grep with POSIX grep
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Larson <[email protected]>
  • Loading branch information
LucasLarson committed May 4, 2024
1 parent db09c84 commit ffabf12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ find_shell_scripts() {
-path '*/test*' -prune -o \
-path '*vscode*' -prune -o \
-type f \
-exec sh -c 'command sed -e "1q" -- "{}" | command git grep --files-with-matches -e "^#\!.*bin.*sh" -- "{}" 2>/dev/null | command sed -e "s/^/.\//"' ';'
-exec sh -c 'command sed -e "1q" -- "{}" | command grep -l -e "^#\!.*bin.*sh" -- "{}" 2>/dev/null | command sed -e "s/^/.\//"' ';'

# shfmt also knows how to find shell scripts
command shfmt --find -- . 2>/dev/null |
Expand Down

0 comments on commit ffabf12

Please sign in to comment.