~gpanders/dotfiles

ref: 5629911cfe9a2fc4e566bab14373aec451244000 dotfiles/fish/.config/fish/functions/nnn.fish -rw-r--r-- 345 bytes
5629911cGreg Anders Fix bash syntax error in 'note' command 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function nnn --description "Support nnn quit and change directory"
    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

    command nnn $argv

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