Using Python 3.7
Doesn't work in bash either.
quitcd.mp4.zip
Looks cool otherwise - good job 👍
I watched the video. Do you have the following exported?
export NNN_TMPFILE="/tmp/nnn"
If yes, I think somehow the file /tmp/nnn is not created. Can you remove the following line from the script:
rm $NNN_TMPFILE
and see if it is present after pressing ^G?
I believe it's an env issue as we have users who are using nnn on OS X. Please feel free to revert if you have any additional info.
We confirmed it works on both bash and zsh. Please make sure you are pressing Q (it's capital).
Basically, NNN_TMPFILE="/tmp/nnn" nnn should write /tmp/nnn on quit? It is written when pressing Q or ^G to quit. I suspect the user is pressing lowercase q, as I first did with a glance of the description.
On Oct 21, 2018, at 8:53 PM, Arun Prakash Jana notifications@github.com wrote:
@zmwangx are you seeing this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I am pressing uppercase Q and have export NNN_TMPFILE="/tmp/nnn" exported and still cannot cd on close. I'm on macOS 10.13.6 using ZSH. The temp file is written to on quit (via Q or ^G) but my terminal stays in the previous directory instead of moving to the new one.
setopt xtrace; n; unsetopt xtrace
@zmwangx Am I meant to run that in my terminal? This is the output from when I tried to cd to ~/Desktop via Q:
~ > setopt xtrace; nnn; unsetopt xtrace 130
+-zsh:1> nnn
+-zsh:1> unsetopt xtrace
Of course, running a command wouldn't cd you anywhere. You need to source the tempfile generated by the command (somewhat questionable if you ask me, but if you want the feature then that's what you have to do), which means using a wrapper function like https://github.com/jarun/nnn/blob/master/scripts/quitcd/quitcd.zsh/.
Please actually read the docs [1] rather than just the title of a feature...
[1] https://github.com/jarun/nnn#cd-on-quit