Skip to content

Astro0mar/NNNFunction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

NNNFunction

This function is made to keep you in the place you left after using NNN, put it in your shell configration file

#triple backquote
n ()
{

if [ -n "$NNNLVL" ] && ["${NNNLVL:-0}" -ge 1]; then 
echo "nnn is already running"
return
fi 

export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"

nnn -Rd "$@"

if [ -f "$NNN_TMPFILE" ]; then 
      . "$NNN_TMPFILE"
      rm -f "$NNN_TMPFILE" > /dev/null

fi 

}

About

This function is made to keep you in the place you left after using NNN, put it in your shell configration file

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors