3 ms·
Not strictly equivalent, but shorter (and should work with multiple shells): $ cd() { builtin cd $* && ls; } $ cd / bin boot cdrom dev etc home lib
by mbivert 2y ago
Not strictly equivalent, but shorter (and should work with multiple shells):
$ cd() { builtin cd $* && ls; }
$ cd /
bin boot cdrom dev etc home lib lib64 [...]
- oxygen_crisis 2y ago$* will break on directory names containing spaces and other bash "word" delimiters, use "$@": cd() { builtin cd "$@" && ls; }