mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-24 11:51:50 +08:00
update nnn config
This commit is contained in:
parent
830d65ce53
commit
24c82b8e2d
4
.zshrc
4
.zshrc
@ -71,16 +71,14 @@ zz () {
|
|||||||
}
|
}
|
||||||
alias zc="z -c"
|
alias zc="z -c"
|
||||||
|
|
||||||
|
|
||||||
n ()
|
n ()
|
||||||
{
|
{
|
||||||
# Block nesting of nnn in subshells
|
|
||||||
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
|
||||||
echo "nnn is already running"
|
echo "nnn is already running"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||||
nnn "$@" "-G"
|
nnn "$@"
|
||||||
if [ -f "$NNN_TMPFILE" ]; then
|
if [ -f "$NNN_TMPFILE" ]; then
|
||||||
. "$NNN_TMPFILE"
|
. "$NNN_TMPFILE"
|
||||||
rm -f "$NNN_TMPFILE" > /dev/null
|
rm -f "$NNN_TMPFILE" > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user