My build of nnn with minor changes
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

21 linhas
628 B

  1. # Rename this file to match the name of the function
  2. # e.g. ~/.config/fish/functions/n.fish
  3. # or, add the lines to the 'config.fish' file.
  4. function n --description 'support nnn quit and change directory'
  5. # The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
  6. # To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn
  7. if test -n "$XDG_CONFIG_HOME"
  8. set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
  9. else
  10. set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
  11. end
  12. nnn $argv
  13. if test -e $NNN_TMPFILE
  14. source $NNN_TMPFILE
  15. rm $NNN_TMPFILE
  16. end
  17. end