My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 lines
664 B

  1. #!/usr/bin/env sh
  2. # Description: Fuzzy find executables in $PATH and launch an application.
  3. # stdin, stdout, stderr are suppressed so CLI utilities exit silently.
  4. # Works as an independent app launcher.
  5. #
  6. # Requires fzy.
  7. #
  8. # Usage: nlaunch [delay]
  9. # delay is in seconds, if omitted nlaunch waits for 1 sec
  10. #
  11. # Shell: POSIX compliant
  12. # Author: Arun Prakash Jana
  13. IFS=':'
  14. get_selection() {
  15. ls -H $PATH | sort | fzy
  16. }
  17. if selection=$( get_selection ); then
  18. setsid "$selection" 2>/dev/null 1>/dev/null &
  19. if ! [ -z "$1" ]; then
  20. sleep "$1"
  21. else
  22. sleep 1
  23. fi
  24. fi