ref: 4db9bebede2bc066a74231cb28c8828509759683
parent: 60adc40118dda2edf2a238d22d050a7bae5e0d66
author: Michael Forney <[email protected]>
date: Sat Jan 1 17:51:39 EST 2022
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.
--- a/rc/bin/g
+++ b/rc/bin/g
@@ -29,7 +29,7 @@
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)