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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.