Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My .cshrc file contains the following:

set prompt = "%{\033[0;32m%}%S%B\! <%~> :%b%s %{\033[0m%}"

Each time I cd out of my home directory, the prompt formatting resets to display:

33 /~/newdirectory/ : 

What am I doing wrong?

share|improve this question
Are the precmd and/or postcmd special aliases set? Is there an alias with the name cd? – manatwork Mar 21 '13 at 10:09
Thanks. That feedback worked. I searched my .aliasrc file and found an alias for cd that sets to a new prompt. – skylake Mar 21 '13 at 18:12
up vote 0 down vote accepted

@manatwork's suggestion to check any aliases was correct. I found an alias for cd in one of my .aliasrc files. For anyone who encounters this problem try grepping your home directory for:

egrep "alias cd" *

find . -maxdepth 1 -type f | xargs grep 'alias *cd'

If you find an alias cd followed by a set prompt =, that's the culprit.

share|improve this answer
doing which cd also gives the same.. infact it's more accurate. – JigarGandhi Dec 12 '14 at 8:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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