My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

28 lignes
588 B

  1. #!/usr/bin/env sh
  2. # Description: Fuzzy find a file in directory subtree with fzy
  3. # Opens in $VISUAL or $EDITOR if text
  4. # Opens other type of files with xdg-open
  5. #
  6. # Requires: fzf/fzy, xdg-open
  7. #
  8. # Shell: POSIX compliant
  9. # Author: Arun Prakash Jana
  10. if which fzf >/dev/null 2>&1; then
  11. fuzzy=fzf
  12. elif which fzy >/dev/null 2>&1; then
  13. fuzzy=fzy
  14. else
  15. exit 1
  16. fi
  17. entry="$(find . -type f 2>/dev/null | "$fuzzy")"
  18. case "$(file -biL "$entry")" in
  19. *text*)
  20. "${VISUAL:-$EDITOR}" "$entry" ;;
  21. *)
  22. xdg-open "$entry" >/dev/null 2>&1 ;;
  23. esac