`ls` first means `ls` would almost always win, short of non-existent files or a permission issue Since making the video, I've been thinking about renaming the command as 'catls' whereby I just give cat the ability to do ls on dirs... I took off the `abbr la/ls` and now just expand `cat` => `lscat`/`catls`... plenty of times I wanna look at file permissions and not dump file contents, but if I am dumping a path then if its a dir I absolutely want to list the contents.
cant you just do "ls | cat"
maybe `cat /path/to || ls /path/to` ?
but I'm too lazy to type that out ;) ... sweep it under the function rug
`ls` first means `ls` would almost always win, short of non-existent files or a permission issue
Since making the video, I've been thinking about renaming the command as 'catls' whereby I just give cat the ability to do ls on dirs... I took off the `abbr la/ls` and now just expand `cat` => `lscat`/`catls`... plenty of times I wanna look at file permissions and not dump file contents, but if I am dumping a path then if its a dir I absolutely want to list the contents.