-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Hidden files feature is not functional #274
Comments
This is a strange one. Any idea of anything specific which could explain the problem ? Are hidden files visible if you launch broot with Could you join a screenshot ? |
Okay, I was looking through the code and it seemed that git integration was important here. When I run ":toggle_git_ignore" and ":toggle_git_status", then the hidden files show up. Furthermore, I can run ":toggle_git_status" again and they still stay visible. So it seems that if ":toggle_git_status" is run at least once, and ":toggle_git_ignore" is off, then the hidden files show up. It does not work if I just run ":toggle_git_ignore" - ":toggle_git_status" must be run at least once, but it doesn't matter how many times it is toggled as long as it is toggled once. Also, starting with "br -ig", "br -iG", "br -Ig", and "br -IG" do not fix the problem, but "br -i --git-status" does. |
(Also, to clarify, neither the folder I am running this from nor any of its parent folders are a git repo.) |
Can you check you have the same problem if you directly launch broot as |
@mwshinn I've built a special version with more logs. Could you please try it (and show me the debug log f |
Yes, the same problem happens when I just launch broot, not as br. With the new binary, I did the following steps:
This produced the attached log. |
This isn't the version I just built but the standard version. You can check the new one is called 1.0.0-dev in the help screen |
Oops, sorry, you're right. Here's the correct log: Also, I see that broot looks for a global .gitignore. I have hidden files hidden in my global .gitignore (in .config/git/ignore). I just commented out that line and it appears this makes broot work as normal. This is unexpected, since I am not operating within a git repo. |
Yes broot respects the global gititignore. But... is your global gitignore hiding .test_hidden ? |
(maybe broot shouldn't use the global gitignore out of git repositories) |
My global .gitignore hides anything which starts with a dot, yes. It also hides files which I would never want committed to a repo, but which I sometimes need to see, e.g. backup files, hidden files, latex debug files, etc. If I ever need to add one of these, I add it manually, which by default overrides the gitignore. I agree that broot should not hide global gitignore files outside of a git repo. In addition, I think there still might be a bug here: even when I disable hiding gitignore from within broot and enable hidden files, broot still hides files from my global gitignore until I run the :toggle_git_status command at least once. |
But... what about all the files with a dot you should commit (for example the .gitignore) ?
Yes, I think I'll change that |
Thanks for making the change and for your work on broot. I just discovered it through a thread on lobste.rs and it is a really exciting new way to interact with the filesystem on the terminal! |
Is everything clear?
I don't want to sign in with github/google/etc credentials on this chat website, so I did not try the chat.
Describe the bug
Toggling hidden files does not seem to work.
To Reproduce
This problem persists when invoking using "br --hidden"
It is also not possible to find hidden files with search. E.g. start by searching ".config" or "config" does not display the .config directory. This also applies to files: doing the same for .emacs does not return any hits for the relevant file.
Expected behavior
Hidden files should be displayed when the appropriate flag is turned on.
Configuration (please complete the following information):
Additional context
dev.log file is given below for the procedure described in "to reproduce":
The text was updated successfully, but these errors were encountered: