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.
 
 
 
 
 
 

24 lignes
777 B

  1. #!/usr/bin/env sh
  2. # Description: cd to any dir in the z database using an fzf pane
  3. #
  4. # Shell: POSIX compliant
  5. # Author: Nick Waywood
  6. . "$(dirname "$0")"/.nnn-plugin-helper
  7. if [ "$(cmd_exists fzf)" -eq "0" ]; then
  8. if [ -f "$HOME/.z" ]; then
  9. # I read the data from z's file instead of calling the z command so that the data doesn't need to be processed twice
  10. sel=$(awk -F "|" '{print $1}' "$HOME/.z" | fzf | awk '{$1=$1};1')
  11. # NOTE: Uncomment this line and comment out the line above if you want to see the weightings of the dir's in the fzf pane
  12. # sel=$(awk -F "|" '{printf "%s %s\n", $2, $1}' "$HOME/.z" | fzf | sed 's/^[0-9,.]* *//' | awk '{$1=$1};1')
  13. else
  14. exit 1
  15. fi
  16. else
  17. exit 1
  18. fi
  19. printf "%s" "0$sel" > "$NNN_PIPE"