Making bash zsh-like!

view story

https://bbs.archlinux.org – Trilby wrote:Exit code in the prompt is easy, just put $? in your PS1.Already figured that out, thanks.To hide output of the path to which I do "cd" (one from $CDPATH) this function helps:cd () { builtin cd $1 >/dev/null }With "shopt -s autocd" situation is a bit different: according to "strace bash" what it does if I enter just name of a path is:write(2, "cd /\n", 5cd / ) = 5 chdir("/") = 0So it uses built-in cd. Can we tell bash not to say "cd /" in this situation (at least without (HowTos)