eza
eza copied to clipboard
default -t to modified -r to be backward compatible with ls
Hi,
Is there any way I can change the default behaviour of eza -t
to eza -t modified -r
to support backwards-compatibility with ls commands
I was going over some old scripts which stopped working and I was digging into why
It broke when I switched from ls to eza, the reason being is that ls -t defaulted to modified -r, whereas eza defaults to error
eza: Flag -t needs a value (choices: modified, changed, accessed, created)
To sort newest files last, try "--sort newest", or just "-snew"
I believe the -t
flag is used to select which field to display rather than for sorting. Additionally, I agree that it should maintain backward compatibility. I really hope that the argument design can be revised accordingly.
I have the same issue. I often have to switch back to ls because of that
fwiw eza
isn't backwards compatible or a replacement for ls in legacy scripts. we may make a strict compatabilty mode one day, but currently we have a lot of things on our plate to deal with first
in general, ls
in scripts can be an anti-pattern to be aware of, unless it's just to show e.g. output to users https://mywiki.wooledge.org/ParsingLs
this is not so much a scripting issue, it affects anyone looking to alias ls=eza
for interactive use
i have decades of muscle memory for commands like ls -alrt
so this issue makes eza
unsuitable for me personally
imo an env flag for a compatibility mode would resolve the issue
imo an env flag for a compatibility mode would resolve the issue
We've discussed this several times, as well as a compatability flag (if feasible), however, while it's very much planned, it's gonna be after the parser is moved, and in general I just think this wont happen soon.
But long term, yea, we want compatibility (optionally, because we (or at least me) do think the ls flags aren't the most intuitive (-h not being help!), muscle memory aside)