Skip to content

Commit dc19fca

Browse files
committed
improve git f alias
1 parent b583252 commit dc19fca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

home/git.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
# files from index or from commits
6666
f = "!f() {
6767
if [ -z \"$1\" ]; then
68-
git ls-files -dmo
68+
git ls-files --modified --others --exclude-standard | grep -Ev '^(vendor/|go.(mod|sum)$)'
6969
else
70-
git show -m --pretty=tformat: --name-only $1
70+
git show -m --pretty=tformat: --name-only @ | grep -Ev '^(vendor/|go.(mod|sum)$)'
7171
fi
7272
}; f";
7373

0 commit comments

Comments
 (0)