News for hackers. Stuff that matters.
Re:Exa: An alternative to Ls by kbd on Wednesday October 27, 2021 @01:08PM (#29016060)
The main thing I use Exa for is as a better "tree":

    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 is great for this because it shows file details along with the tree hierarchy.

(I have to manually specify a bunch of git-ignores because Exa's git ignore support doesn't work properly.)

Re:Exa: An alternative to Ls by kbd on Wednesday October 27, 2021 @07:20PM (#29020302)
Wanted to add:

I realized that my function above doesn't fully show how I use it. I recommend setting your $LESS to include -F so that by default it doesn't leave pages of output in your scrollback. That way you can get a quick tree, scrollable/searchable in your pager, and then don't lose your shell context. FWIW, my $LESS is:

    export LESS='-iMFx4 --mouse' # smart-case, status bar, quit 1 screen, 4sp tabs
Also should mention https://github.com/Canop/broot as a good directory explorer tool.
Re:Exa: An alternative to Ls by hiyer on Wednesday October 27, 2021 @10:28PM (#29021644)
Thanks for the "less -F" tip! I didn't know we could do that, and I'll definitely find it useful.
Re:Exa: An alternative to Ls by baumy on Wednesday October 27, 2021 @04:18PM (#29018584)
Love this! Stole it and added a bit of bash-fu to it to avoid needing to define the extra aliases:

et() { exa -alT --git -I'.git|node_modules|.mypy_cache|.pytest_cache|.venv' --color=always "-L${1:-1}" | less -R }

commands would now be, e.g. "et 2" instead of "et2", but will work with any number. defaults to 1 if just "et" is run with no argument.

Re:Exa: An alternative to Ls by aisamu on Wednesday October 27, 2021 @08:25PM (#29020841)
Combine it with fzf and you can choose the depth level dynamically:

  tree: aliased to echo '2\n3\n4\n5' | fzf --preview='exa -l -T -L {} --git-ignore' --reverse --preview-window down:99% --bind 'j:down,k:up,q:cancel,enter:cancel'
Re:Exa: An alternative to Ls by zamadatix on Wednesday October 27, 2021 @01:24PM (#29016241)
Tree does have some options for file details as well, -p is the same as ls -l or and/or you can use options like -hug individually. -hugDC for dates and some coloring too.

Maybe not as great as exa but not bad for the classic option.