Browse Source

Merge pull request #303 from fokinpv/forgotten-export

Add forgotten export for quitcd scripts
master
Mischievous Meerkat GitHub 5 years ago
parent
commit
74a7d2245c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions
  1. +1
    -1
      misc/quitcd/quitcd.bash
  2. +7
    -4
      misc/quitcd/quitcd.fish
  3. +1
    -1
      misc/quitcd/quitcd.zsh

+ 1
- 1
misc/quitcd/quitcd.bash View File

@@ -1,6 +1,6 @@
n()
{
NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
export NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd

nnn "$@"



+ 7
- 4
misc/quitcd/quitcd.fish View File

@@ -3,13 +3,16 @@
# or, add the lines to the 'config.fish' file.

function n --description 'support nnn quit and change directory'
# NOTE: set NNN_TMPFILE correctly if you use 'XDG_CONFIG_HOME'
set NNN_TMPFILE ~/.config/nnn/.lastd
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end

nnn $argv

if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
source $NNN_TMPFILE
rm $NNN_TMPFILE
end
end

+ 1
- 1
misc/quitcd/quitcd.zsh View File

@@ -1,6 +1,6 @@
n()
{
NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
export NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd

nnn "$@"



Loading…
Cancel
Save