3 ms·
I realized most of my ls runs come right after `cd`, so I added these to my startup files. Now almost every `cd` does `ls` automatically: # bash, simple
by mixmastamyk 2y ago
I realized most of my ls runs come right after `cd`, so I added these to my startup files. Now almost every `cd` does `ls` automatically:
# bash, simple
function cd() {
builtin cd "$@" && ls -l
}
# fish, a bit more sophisticated
function cd
builtin cd $argv;
if test $status -gt 0 # there was an error, stop
return
end
# auto print dir info
if test "$argv" != "" # not home though
dir # aka ls -l ...
end
end