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?

  • 1
    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. – adiles Mar 21 '13 at 18:12

@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.

  • doing which cd also gives the same.. infact it's more accurate. – JigarGandhi Dec 12 '14 at 8:47

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.