Re:Show HN: Nnn – unorthodox terminal file manager
by apjana on Tuesday November 17, 2020 @01:03PM
(#25127160)
> With ranger, I can even use it as an alternative to cd
cd on quit works in nnn as well... and many other file managers.
Re:Show HN: Nnn – unorthodox terminal file manager
by vngzs on Tuesday November 17, 2020 @01:06PM
(#25127220)
Thanks for pointing this out - here's the link, for anyone interested:
https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-...
Re:Show HN: Nnn – unorthodox terminal file manager
by apjana on Sunday November 22, 2020 @08:18AM
(#25177218)
> but it (like ranger) doesn't seem to support this out of the box
No utility can support cd-on-quit out of the box because a spawned process can't send the $PWD to the parent directly when it quits. It needs tweaks in your shell's rc file. nnn also needs the same instrumentation.
With ranger[0], I can even use it as an alternative to cd, which is often the most convenient (I usually want a terminal in the last directory I browsed to, not the place where I opened the file manager[1]).
I hope to find a way to use nnn similarly, but it (like ranger) doesn't seem to support this out of the box.
[0]: https://github.com/ranger/ranger
[1]: https://unix.stackexchange.com/questions/342064/ranger-cd-in...