summaryrefslogtreecommitdiff
path: root/rc/bin/g
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-01-01 22:51:39 +0000
committerOri Bernstein <ori@eigenstate.org>2022-01-01 22:51:39 +0000
commit4db9bebede2bc066a74231cb28c8828509759683 (patch)
tree6e0f022c7eafac38721809d7996763835ad2443b /rc/bin/g
parent60adc40118dda2edf2a238d22d050a7bae5e0d66 (diff)
g: fix duplicate files with directory argument
When we encounter a directory in the argument list, we don't want to walk every argument, just that directory.
Diffstat (limited to 'rc/bin/g')
-rwxr-xr-xrc/bin/g2
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/bin/g b/rc/bin/g
index 3c2cb63c2..0a13c6125 100755
--- a/rc/bin/g
+++ b/rc/bin/g
@@ -29,7 +29,7 @@ case *
shift
for(f in $*){
if(test -d $f)
- files=($files `$nl{walk -f $recurse -- $* \
+ files=($files `$nl{walk -f $recurse -- $f \
| grep -e $fullnames -e $suffixes >[2]/dev/null})
if not
files=($files $f)