-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Support for Windows Hidden Files #225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit summary needs to conform to conventional commits. See this for more info.
Alternative to unpacking & repacking: #[cfg(windows)]
if !self.dotfiles && file.as_ref().is_ok_and(|f| f.attributes().hidden) {
continue;
}
return Some(file); May close this PR so I can start again with commits that adhere to the guidelines above |
That is an option but shouldn't be nescesarry, you can |
8d81aed
to
b615d04
Compare
Rebased & edited the commit to follow guidelines. Also implemented the change suggested by cfxegbert |
@cafkafk I let GitHub merge the latest changes in, would you rather I rebase again so it's just the one commit? |
No worries, on merge, github gives you an option to remove it from commit history 👍 pretty sure automatically |
51eecb3
to
844c0bf
Compare
6b99d99
to
34875bf
Compare
I marked this as draft. Feel free to make it "ready for review" when you want us to take a look at it again. |
Hey @cafkafk I'm ready for the code to be reviewed, it looks like it's just blocked by the comment about commit messages, which has been addressed |
Has this been tested on windows? @daviessm sorry to keep pinging you for windows stuff but you kinda brought that on yourself by being the only one with a windows box 😅 it is super appreciated tho ❤️ cuz having to deal with windows just isn't any fun Otherwise, LGTM 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested working on Windows, code looks sensible. Just one minor spelling nit in comments.
Adds an extra check on attributes().hidden on Windows This hides Windows hidden files whenever dot files are also filtered out Resolves eza-community#212
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI and Integration tests pass, and local testing confirms this doesn't break linux so LGTM 👍
as pointed out by @cfxegbert on element, |
@alamb3142 could you make a new pull request with the changes, then we can look into changing |
@cafkafk Yeah I'm happy to start a new PR, but is there any real risk with |
I mean, currently we specify MSRV as 1.65, and any windows user that below 1.70 will experience this right? But also, we're discussing bumping the MSRV on element right now, maybe this isn't an issue after all, but to be determined. |
Ah yeah that is a good point. I know most Windows users would prefer Scoop over Cargo for an install, but that's still potentially breaking it for some Windows users. Maybe I could commit the version that unpacks the result & repacks it, then submit a PR with this version for later when the MSRV is bumped? |
That sounds like a good idea, I'll await it |
This PR adds a step into
Files::next_visible_file
to check for the hidden attribute on Windows systems. This causes it to behave more like a Windows user would expect it to.Previously eza only hid dot files when not specifying -a or -A, it now hides dot files and all hidden files. Some types of links are hidden (file junctions are, not sure about hard links) because they're marked as hidden, but symlinks still display with or without the all flag.