News for hackers. Stuff that matters.
Re:Exa Is Deprecated by kbd on Thursday September 07, 2023 @06:46AM (#37417079)
I never used exa as a general `ls` replacement, but I did use it as a `tree` replacement. Its tree view that gives you file stats from ls alongside a `tree`-like view I haven't found replicated in any other tool.

Here are the aliases I use:

    et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "$@" | less -R; }
    alias et1='et -L1'
    alias et2='et -L2'
    alias et3='et -L3'
exa never handled git ignores correctly so I had to manually provide common ignores with -I. But the above alias provides a scrollable tree view, with files colorized according to LS_COLORS, with file stats like `ls -l`, that I haven't found provided by any other tool. Suggestions for replacements welcome.
Re:Exa Is Deprecated by dystroy on Thursday September 07, 2023 @07:04AM (#37417204)
Maybe use broot ? Its tree view is its main feature and it handles gitignore and shows many stats including dir sizes. https://dystroy.org/broot/

You can use it just like the original tree tool too: https://dystroy.org/broot/tricks/#replace-tree

(disclaimer: broot author)

Re:Exa Is Deprecated by cb321 on Thursday September 07, 2023 @07:10AM (#37417252)
This kind of thing should probably be generalized so that any new parameter can be seamlessly woven into your `ls-like` reports.

https://github.com/c-blake/lc/blob/master/extensions/fe1 does `du` (like your example) as a f)ormat e)xtension, but you could use `ffprobe` to do the run-time in hours:minutes:seconds for media files (or maybe 0sec for non-media) or numerous other things.

Re:Exa Is Deprecated by stavros on Thursday September 07, 2023 @07:06AM (#37417221)
That seems great, thanks!
Re:Exa Is Deprecated by kbd on Thursday September 07, 2023 @07:56AM (#37417638)
Thanks for your comment. I have broot installed, but it never sticks in my workflow. I didn't know you could use it as a tree replacement like that, adding file stats & exiting.

It almost works to replace the way I use exa tree, with these caveats:

- I want to not have it elide files ("7 unlisted") at each level. I have my et1, et2, etc. aliases to customize how many levels of detail I get with exa's tree replacement, and then I scroll that with my pager.

- I want it to support LS_COLORS so the files look the same as they do in `ls`

- I want the git status display that exa gives (eg. it shows I if the file is ignored).

- is it possible to customize the order in which the stats are shown? It'd be nice if they match ls more closely. Exa feels like `ls` with extra colors and a tree, broot feels different.

Re:Exa Is Deprecated by dystroy on Thursday September 07, 2023 @08:08AM (#37417751)
The ability to have broot immediately exit is based on its ability to receive commands, either at start or through sockets. So in this case we're just doing `br --cmd :print_tree`. The same strategy can be used to add searches, filters, toggles, etc. before printing the tree (or printing a path).

To not elide files, the easiest solution is to provide a max height: `tree --height 5000`

No support of LS_COLORS exactly.

No option today to show on a file whether it is gitignored (never considered this: my users either show gitignored files or don't).

You can completely customize file properties order: https://dystroy.org/broot/conf_file/#columns-order

(it's hard to answer complex questions and rfc here, maybe come to the chat for an interactive discussion ?)

Re:Exa Is Deprecated by Macha on Thursday September 07, 2023 @07:13AM (#37417279)
I have an alias that I use as a git status replacement that gives an actual tree of the changes

    exa --long --no-permissions --no-user --no-time --no-filesize --git --tree --color=always | rg -v -- '--' $argv
Looks like for eza, I need to add a '--git-ignore'. I guess exa used to imply that from --git.
Re:Exa Is Deprecated by grantcarthew on Thursday September 07, 2023 @07:46PM (#37427280)
I discovered lsd because of this thread. It has a great tree output:

lsd --tree