Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.7k stars 236 forks source link

Back to root folder (top level directory) #601

Open theowenyoung opened 2 years ago

theowenyoung commented 2 years ago

Hi, Thanks for the great tool.

I tried to find a back-to-root command, but I can't.

Is there any way to back to the root directory?

Canop commented 2 years ago

Not sure about what you need. Most usually the escape key does what you want.

There's also :select_first which selects the root line in the tree.

theowenyoung commented 2 years ago

Thanks! For example:

I started broot from ~/foo

then I navigated to ~/foo/bar/hello/world.txt

Now I want to navigate to ~/foo

what should I do? except <left><left> or <esc><esc>

Canop commented 2 years ago

This remembers me a project I had, which was to keep a "background work directory" which would be initially the first root, but with verbs to change it, and which would be used to cd to when quitting broot. This would allow for example to set the directory to cd to but not to cd to it immediately (i.e. not quit broot on the verb action), and it would be usable as work directory for programs launched from broot. This would be like doing a cd in the hidden shell behind (but with actions deferred in reality). This is related to your issue because there would obviously be a verb to change the root to that work directory.

theowenyoung commented 2 years ago

Yeah. but it sounds a little heavy, maybe we can simplify it, like remember the start directory, and offer a verb :select-start, this sounds easier to do and understand.