broot icon indicating copy to clipboard operation
broot copied to clipboard

Back to root folder (top level directory)

Open theowenyoung opened this issue 3 years ago • 4 comments

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?

theowenyoung avatar Sep 14 '22 05:09 theowenyoung

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.

Canop avatar Sep 14 '22 05:09 Canop

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>

theowenyoung avatar Sep 14 '22 06:09 theowenyoung

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.

Canop avatar Sep 14 '22 07:09 Canop

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.

theowenyoung avatar Sep 14 '22 10:09 theowenyoung