commit 590ad7d062e4fdd11d89879439e1b16facf5b182 parent b81109d117ebc5c35cdff2229c4feead55d6e832 Author: Arun Prakash Jana <engineerarun@gmail.com> Date: Mon, 13 Oct 2025 20:46:18 +0530 Merge pull request #2072 from dertuxmalwieder/master quitcd support for the rc shell Diffstat:
| A | misc/quitcd/quitcd.rc | | | 11 | +++++++++++ |
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/misc/quitcd/quitcd.rc b/misc/quitcd/quitcd.rc @@ -0,0 +1,11 @@ +# 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, set NNN_TMPFILE after the nnn invocation, and make +# sure not to use a custom path. +NNN_TMPFILE='$HOME/.config/nnn/.lastd' + +fn n { + command nnn + eval `( cat $NNN_TEMPFILE ) + rm -f -- $NNN_TMPFILE +}