-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.nnn_variables
45 lines (40 loc) · 1.57 KB
/
.nnn_variables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export NNN_COLORS="1234"
export NNN_BMS="S:$HOME/Scripts;D:$HOME/Downloads;B:$HOME/Documents/Books"
# export NNN_TMPFILE="$HOME/.cache/nnn-lastd"
export NNN_PLUG='f:finder;o:fzopen;p:preview-tui;t:nmount;v:imgview;d:dragdrop'
export NNN_FIFO=/tmp/nnn.fifo
export NNN_OPTS="Cde"
export NNN_COLORS="2346"
export NNN_BMS="S:$HOME/Scripts;D:$HOME/Downloads;B:$HOME/Documents/Books"
export NNN_PLUG='g:git-changes;f:finder;o:fzopen;p:preview-tui;t:nmount;v:imgview;d:dragdrop'
# export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
export NNN_FIFO=/tmp/nnn.fifo
n ()
{
# Block nesting of nnn in subshells
[ "${NNNLVL:-0}" -eq 0 ] || {
echo "nnn is already running"
return
}
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
# see. To cd on quit only on ^G, remove the "export" and make sure not to
# use a custom path, i.e. set NNN_TMPFILE *exactly* as follows:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
# The command builtin allows one to alias nnn to n, if desired, without
# making an infinitely recursive alias
command nnn "$@"
[ ! -f "$NNN_TMPFILE" ] || {
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
}
}
# export NNN_OPENER=nuke
# }
alias nnn="n"