Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I like using terminal file managers for quickly traversing many nested directories, where I'm not sure where I want to go. I can use it to browse around and hjkl is familiar as a vim user.

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...



> 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.


Thanks for pointing this out - here's the link, for anyone interested:

https://github.com/jarun/nnn/wiki/Basic-use-cases#configure-...


> 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: