diff options
author | Ori Bernstein <ori@eigenstate.org> | 2022-08-05 22:57:36 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2022-08-05 22:57:36 +0000 |
commit | dd029bddc853eebb5aa96fc2d35c29792e9ad15e (patch) | |
tree | 15f7ca567714ec251d764f63a917c5886f7a2881 /rc | |
parent | 53f2b41ec64895a1d8bcebeeb7824c59e854eb13 (diff) |
src: 'test -x' instead of 'test -f'
while we're here, remove spare curly braces.
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/bin/src | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rc/bin/src b/rc/bin/src index 175800bfb..db02fa2ac 100755 --- a/rc/bin/src +++ b/rc/bin/src @@ -48,12 +48,10 @@ while(~ $1 -*) if(~ $#* 0) usage for(i in $*){ - if(~ $i /*){ + if(~ $i /*) test -f $i && go $i && exit - } - if not{ + if not for(f in $path^/^$i) - test -f $f && go $f && exit - } + test -x $f && go $f && exit echo 'src: can''t find '$i } |