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:
Michael Forney 2022-01-01 22:51:39 +00:00 committed by Ori Bernstein
parent 60adc40118
commit 4db9bebede

View file

@ -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)