~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/fish/.config/fish/functions/nnn.fish -rw-r--r-- 345 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 3 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