fzfmenu-run: POSIX executable listing
This commit is contained in:
parent
d2368de881
commit
e929c6fe7d
|
@ -1,8 +1,7 @@
|
|||
#!/bin/sh
|
||||
set -euf
|
||||
|
||||
# GNU find only
|
||||
cmd="$(IFS=':'; find $PATH \( -type f -o -type l \) -printf '%f\n' | sort | uniq | fzfmenu --layout reverse --prompt 'run > ' "$@")"
|
||||
cmd="$(IFS=':'; find $PATH \( -type f -o -type l \) | awk -F '/' '{print $NF}' | sort | uniq | fzfmenu --layout reverse --prompt 'run > ' "$@")"
|
||||
|
||||
# this menu will act as if you typed the command in a shell, hence eval and -e sh -c
|
||||
# this runs in userspace, so no eval security risk should be present
|
||||
|
|
Loading…
Reference in New Issue