Comments (8)
@notAxion the PR that resolves this treats dotfiles and hidden files as the same thing, because before that there was no way to hide hidden files at all & that seemed like sensible default behaviour (it's how the -a flag is "supposed" to work in my mind anyway)
Unless someone has built on this since I last looked at it I think what you're asking for requires a feature request.
from eza.
I may take a look into this at the weekend if I get the chance & no one has any complaints with this change.
That would be cool to see, I'm assuming this makes sense, but if people disagree they should feel free to voice concerns in this issue.
from eza.
Little bit more complicated than I'd imagined. The actual dot filter happens in the Iterator impl on Files
, before the File
is created. main.rs line 236 inside of print_dirs
is the first time we unwrap the Result<File>
so I opted to just skip pushing into children
but I don't know if I'm a fan of this approach.
I could maybe move the error checking into these methods so Item = Result<File ...>
becomes Item = File
& next_visible_file
can filter on attributes().hidden during the dot file check
for reference next_visible_file is where it feels like the hidden file check 'belongs'
I'll give the Iterator refactoring a go tomorrow and get a PR up to get some eyes on it
from eza.
Or this could work, rather than return Some(File::from_args(...))
match on the result of from_args & skip the Windows hidden files or wrap it back up in the Option<Result<>> for the calling code to handle
from eza.
I have been playing with this myself for the last half hour. I do agree that this seems like the most idiomatic place for this check...
How does that perform? I tried various other options but never that exact one
from eza.
Default behaviour with eza -l
(my alias is just ls -> eza.exe)
It does hide symlinks which differs from default ls behaviour, but in my experience symlinks aren't as important or widely used in Windows so I think I prefer this (they're also hidden in the file system by default). It does a bit better better than PowerShell's Get-ChildItem which hides hidden files and symlinks but not dot files.
Running with -a or -A gives the following:
Symlinks + Windows hidden files & folders now appear (as well as dot files).
So it doesn't behave exactly the same way as a Linux ls with the symlinks, but it behaves in a way that makes more sense inside of Windows IMO
from eza.
I was wrong, it doesn't hide symlinks, it just hides Window's "file junctions" because these are marked as hidden by the system
Anyway the PR is up #225, I opted to put the whole match in the Windows block so the non-windows behaviour is hopefully a bit clearer.
from eza.
@cafkafk sorry for the ping
but I don't understand how can I actually get it to show only the dotfiles and not the hidden and symlinks ?
from eza.
Related Issues (20)
- bug: -X/--dereference was broken and no longer working for filenames HOT 7
- bug: does not follows `.gitignore` HOT 1
- feat: XDG_USER_DIR based icons HOT 1
- Warnings went building eza v0.18.11 with cargo HOT 3
- feat: Truncate file names for a better looking grid list
- feat: option to ignore directories with CACHEDIR.TAG HOT 1
- ci: mangen step doesn't substitute version in manpages
- feat: SELinux support HOT 7
- bug: eza installation fails - winget HOT 3
- bug: archlinux installation eza error HOT 6
- Tab Does Not Show Autocomplete with ls Command
- feat: make web versions of man page more easily discoverable HOT 1
- bug: pr template isn't auto-populated HOT 2
- Bug: `idump` give different output even without any modification, on Debian
- feat: Allow abbreviations for long option names HOT 1
- Wessss up on
- How to default -t to modified -r
- bug: Problems with man pages HOT 2
- feat: In tree view, the branch child contents should line up with the parent's first symbol
- bug: eza ignores LC_TIME and always shows dates in English (deb.gierens.de build only) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eza.