4 ms·
Why doesn't nnn remember where you are in a directory? It seems natural to me that "hl" should preserve your state, e.g. "hhll" should take you back to the sam
by zestyping 8y ago
Why doesn't nnn remember where you are in a directory? It seems natural to me that "hl" should preserve your state, e.g. "hhll" should take you back to the same place you were in.
Was it an intentional design choice to make "l" put you back on the first entry in the directory? Why?
- apjana 8y agoYes, we didn't want to remember the last file selected in every directory visited. In other words, it's like remembering the state of every directory visited. `nnn` selects the parent dir when you come out of a child dir.
- nemetroid 8y agoYou don't need to remember the state of every directory visited. The functionality GP is asking for is similar to the forward button in the web browser. I.e., if you're starting in `/a/b/c/d`, to be able to go /a/b/c/d -> /a/b/c -> /a/b -> /a/b/c -> /a/b/c/d However, if you instead go into `/a/b/x` after the first two steps, the "forward history" would be lost.
- apjana 8y agoAh, OK! I thought every file in every dir. To do this you would have to remember each absolute path which is 4K max per path (or allocate dynamically and free every time when changed). We try to keep `nnn` light on memory. I must admit this is the first time I am hearing it's a problem. Probably because of the abundance of other navigation options available in `nnn`.