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.
This commit is contained in:
parent
60adc40118
commit
4db9bebede
1 changed files with 1 additions and 1 deletions
2
rc/bin/g
2
rc/bin/g
|
@ -29,7 +29,7 @@ case *
|
||||||
shift
|
shift
|
||||||
for(f in $*){
|
for(f in $*){
|
||||||
if(test -d $f)
|
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})
|
| grep -e $fullnames -e $suffixes >[2]/dev/null})
|
||||||
if not
|
if not
|
||||||
files=($files $f)
|
files=($files $f)
|
||||||
|
|
Loading…
Reference in a new issue