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)
- feat: change the color of .pem files depending on permissions HOT 1
- Build v0.18.4 on NetBSD10RC4 HOT 6
- bug: usernames are not resolving correctly for users not listed in /etc/passwd HOT 5
- Bug: Not Ignoring Subdirectories in directories HOT 4
- How Use
- feat: add --group-files-first or --group-directories-last HOT 2
- bug: Cannot use paths with spaces in PowerShell 5.1 HOT 7
- bug: segmentation fault with `-l` HOT 6
- feat: show the last commit message for git files HOT 4
- bug: Nerd Fonts icons not rendering correctly HOT 2
- Code for `di`(rectory) Not Working HOT 2
- bug: `--hyperlink` doesn't work when using patterns/wildcard HOT 3
- feat: permissions only as numbers HOT 4
- feat: Common conventions on units
- bug: icons missing HOT 2
- Config file? HOT 2
- Is it possible to install eza on CentOS 7? HOT 1
- ci: Test failing in openSUSE package for 0.18.0
- feat: linux like permissions for windows HOT 3
- feat: `LS_ICONS` for icon overrides HOT 4
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.