For me, there are two principal cases of sorting in `ls` output: alphabetical when I'm trying to find something I don't know/ remember exactly, and mtime-based when I want to see the latest (or oldest) in a group of related files. I don't see how it could work with one shortcut.
Another thing is `ls -l` that's important when I need to understand file sizes and especially how symlinks are set up. Yet another is `ls -ld` which explains details about directories.
All these cases could be made more ergonomic, and maybe partly merged. But I don't see how I could compress them into one type of output that fits all purposes.
(My current fancy version of `ls` is `lsd`, but I still use the built-in `ls` a lot.)
I know you're showing a rough example, but others might want to throw a `-d` in there so that folders don't get expanded. And put `$@` in quotations so spaced file names don't get interpreted as separate arguments.
i.e.:
ls -ltd "$@" | head
edit: `-d` may be a bad choice. It also results in directories being listed first on my system, even with `-t` passed.
edit 2: That was an alias I had setup. Carry on with the `-d`.
Another thing is `ls -l` that's important when I need to understand file sizes and especially how symlinks are set up. Yet another is `ls -ld` which explains details about directories.
All these cases could be made more ergonomic, and maybe partly merged. But I don't see how I could compress them into one type of output that fits all purposes.
(My current fancy version of `ls` is `lsd`, but I still use the built-in `ls` a lot.)