1
1
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:
juan 2021-10-17 23:11:38 +08:00
parent 830d65ce53
commit 24c82b8e2d

4
.zshrc
View File

@ -71,16 +71,14 @@ zz () {
}
alias zc="z -c"
n ()
{
# Block nesting of nnn in subshells
if [ -n $NNNLVL ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
nnn "$@" "-G"
nnn "$@"
if [ -f "$NNN_TMPFILE" ]; then
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null