eza-community / eza

A modern alternative to ls
https://eza.rocks
European Union Public License 1.2
11.36k stars 204 forks source link

feat: add --no-|show-symlinks flags for filtering output #1028

Closed PThorpe92 closed 3 months ago

PThorpe92 commented 3 months ago

Currently you can use --only-dirs and get only directory output, or you can use --only-files and get only files.

Someone requested the ability to hide symlinks (for some MacOS feature where they use symlinks to make their directory structure more unix-like), but I think it makes more sense to also be able to filter and get all directories or all files (symlinks or otherwise), as well as hide symlinks in normal output.

MartinFillon commented 3 months ago

Hey thats kinda a duplicate of #518

PThorpe92 commented 3 months ago

Ah I didn't notice that previously.

We need to decide whether only-links is a flag people would use, and if it's worth the breaking changes introduced there. This PR allows for links to be shown when using --only-dirs or --only-files (when the link points to a dir or file, respectively), which seems to be what the original issue was about.

MartinFillon commented 3 months ago

Yes clearly. I think that for the moment only-links might not be necessary, it was just an idea i had as we were talking about this bug in issues

PThorpe92 commented 3 months ago

@cafkafk this is ready :+1: