diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-07 18:59:08 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-08-07 18:59:08 +0200 |
commit | cb110575144beb4125fd1d8204c8204e6bca280f (patch) | |
tree | 980a73128d24b6a5d5901db8d2835168fac1b2b0 /bin | |
parent | c849427d901c54531aa070ec25273e938e771c77 (diff) |
[goo] added option to give search query as second paramater
I noticed by mistake sometimes I would type the query already.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common/goo | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/common/goo b/bin/common/goo index cfd03ec..2a5faad 100755 --- a/bin/common/goo +++ b/bin/common/goo @@ -15,9 +15,14 @@ VisualParadigm intellij arduino15" +if [ -n "$2" ] +then + [ -d "$2" ] && dest="$2" || opt="-q $2" +fi + for dir in $exclude; do dirs="$dirs -name \"$dir\" -o " done -cmd="find ${2:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" +cmd="find ${dest:-$HOME} \(${dirs} -false \) -prune -o -type ${1:-f} -mindepth 1 -print" -eval "$cmd" 2>/dev/null +eval "$cmd" 2>/dev/null | fzf $opt |