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.

quitcd.fish 475 B

7 years ago
123456789101112131415161718
  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. if test -n "$XDG_CONFIG_HOME"
  6. set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
  7. else
  8. set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
  9. end
  10. nnn $argv
  11. if test -e $NNN_TMPFILE
  12. source $NNN_TMPFILE
  13. rm $NNN_TMPFILE
  14. end
  15. end