eza icon indicating copy to clipboard operation
eza copied to clipboard

feat: Add option to not show folder contents when using `stdin`

Open Myzel394 opened this issue 10 months ago • 1 comments

Sometimes I give some folder names over to eza using stdin and I don't want it to show the contents of the folder, but rather the folder itself.

Example:

echo '.git' | eza --stdin 

currently, this will result in something like this:

branches  COMMIT_EDITMSG  config  description  FETCH_HEAD  filter-repo  HEAD  hooks  index  info  logs  modules  objects  ORIG_HEAD  packed-refs  refs

However, I'd like to pass an option like: --stdin-no-dir-contents that will then show the folder itself like:

.git

To give you a more real life example; I'm using fselect to select files in a very easy way. fselect itself doesn't have support for icons, colors, etc. I'll then pipe the contents over to eza and then receive a nice output. Here's an example:

fselect path FROM ./ WHERE name = '.*' AND directory = "." | la --stdin

Myzel394 avatar Apr 05 '24 18:04 Myzel394

Hey, have you tried using the -d option ? If yes then this is a bug and not expected.

MartinFillon avatar Apr 06 '24 21:04 MartinFillon