nnn/user-scripts/nlaunch

19 lines
429 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
2019-03-23 15:30:16 +00:00
# Description: Fuzzy find executables in $PATH and launch an application.
# stdin, stdout, stderr are suppressed so CLI utilities exit silently.
# Works as an independent app launcher.
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
IFS=':'
get_selection() {
ls -H $PATH | sort | fzy
}
if selection=$( get_selection ); then
2019-03-12 12:44:50 +00:00
"$selection" 2>/dev/null 1>/dev/null &
fi