Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle to show only items in current directory #670

Open
jtourlamain opened this issue Feb 15, 2023 · 6 comments
Open

Toggle to show only items in current directory #670

jtourlamain opened this issue Feb 15, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@jtourlamain
Copy link

Is there a toggle to show only items in the current directory (folders and files)? Showing content of all sub-directories can produce to much info. Having a toggle to only show the current items in the directory and search for them would be great.

@jtourlamain jtourlamain added the enhancement New feature or request label Feb 15, 2023
@usama8800
Copy link

All sorts except sort by type do what you want https://dystroy.org/broot/tree_view/#sort:~:text=There%20are%204%20kinds%20of%20sort%3A

@jtourlamain
Copy link
Author

@usama8800 the problem with the sort is that is slow (it needs to calculate counts or dates or ... and on windows takes a second or 2, but that is to slow when navigating around). If there is a sort_by_name (which seems to be the default) but without displaying the sub directories, it would be fast and without the sub directories.

@yusuphgammut
Copy link

Just want to upvote the :sort_by_name suggestion. It'll be an explicit way of showing only the files and folders on the current directory. If this sounds redundant, maybe adding a :toogle_tree command to just hiding or showing the tree can be an alternative solution.

@eldad
Copy link
Contributor

eldad commented Nov 17, 2023

Same here. It bothers me so much I implemented it in my private fork:
main...eldad:broot:toggle_tree

It's quite a simple toggle, and I would be happy to contribute as a PR if you're open for this feature.

@Canop
Copy link
Owner

Canop commented Nov 17, 2023

@eldad This seems good and I think a PR would be welcome (please make the formatting consistent in panel_state).

I'm not quite convinced by the toggle_tree name but I don't have any better one at the moment.

@eldad
Copy link
Contributor

eldad commented Nov 17, 2023

@Canop Thanks for the quick feedback! I'll brush up the changes, fix the formatting as you pointed out, and open a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants