3 ms·
This is quite neat so I feel slightly embarrassed to share my low-tech solution. Just run a "dir" after each "cd" (which is my alias for "ls -l --si ..."). It
by mixmastamyk 4y ago
This is quite neat so I feel slightly embarrassed to share my low-tech solution. Just run a "dir" after each "cd" (which is my alias for "ls -l --si ...").
It's written for fish, but could be ported to bash easily:
# cat ~/.config/fish/functions/cd.fish
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
end
end
There's probably a way to optimize out the "test " call as well, but I haven't got around to it.