I have command prompt in tcsh that shows the current working directory. The problem is that the command prompt becomes very big once I am in a deep hierarchy of folders. How do I set the command prompt to show, let's say, only the last 3 directory names?
According to this question, you can achieve that by setting:
set prompt = "%C3 %"
This should show you last three directory names of your CWD, followed by a space and a percent sign.