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

Respect hidden flag on Windows #766

Merged
merged 5 commits into from
Nov 13, 2022
Merged

Respect hidden flag on Windows #766

merged 5 commits into from
Nov 13, 2022

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Nov 10, 2022

This PR adds the functionality to ignore hidden and system files on Windows.

  • hidden files can be shown by --all and --almost-all
  • system files can be shown using new cli flag --system-protected
  • --system-protected behaves the same as --all on non-Windows platforms
  • --system-protected is hidden from the help on non-Windows platforms, since it has no added value there

Fixes #752


TODO

  • Use cargo fmt
  • Add necessary tests
  • Add changelog entry
  • Update default config/theme in README (if applicable)
  • Update man page at lsd/doc/lsd.md (if applicable)

since interaction with these files is rare. Introduce --system-protected
flag to include these files.
@zwpaper
Copy link
Member

zwpaper commented Nov 12, 2022

hi @Icxolu thanks for contributing!

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2022

Codecov Report

Merging #766 (e25a120) into master (f014138) will decrease coverage by 0.12%.
The diff coverage is 60.86%.

@@            Coverage Diff             @@
##           master     #766      +/-   ##
==========================================
- Coverage   86.78%   86.66%   -0.13%     
==========================================
  Files          43       44       +1     
  Lines        4313     4333      +20     
==========================================
+ Hits         3743     3755      +12     
- Misses        570      578       +8     
Impacted Files Coverage Δ
src/main.rs 26.31% <ø> (ø)
src/meta/windows_utils.rs 0.00% <0.00%> (ø)
src/meta/mod.rs 43.47% <63.63%> (+1.17%) ⬆️
src/flags/display.rs 98.11% <85.71%> (-1.89%) ⬇️
src/app.rs 75.71% <100.00%> (+0.35%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@meain
Copy link
Member

meain commented Nov 13, 2022

Looks like the CI is failing because we need a newer version of Rust. Feel free to bump up the version. You can see a similar commit here. Looks good to me otherwise. :D

@Icxolu
Copy link
Contributor Author

Icxolu commented Nov 13, 2022

I bumped the minimum rust version to 1.64. This should make CI happy again.

@meain meain merged commit 907214c into lsd-rs:master Nov 13, 2022
@meain
Copy link
Member

meain commented Nov 13, 2022

Thanks for the PR

@Icxolu Icxolu deleted the fix-752 branch November 14, 2022 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect hidden flag in Windows
4 participants