Tip: show the last 3 directories in the shell prompt

tcsh: have the following in .cshrc (or .tcshrc)

set prompt="[%C3]: "

zsh: have the following in .zshrc

PS1="[%3C]%# "

bash: have the following in .bashrc

PS1='[${PWD#${PWD%/*/*/*}/}]\$ '

Lacking direct support this is a good approximation.

2 Likes