up vote 4 down vote favorite
share [g+] share [fb]

The default cygwin prompt of "user@computer path \n $" is too long for me. I would like to keep the path.

I want it to become:

path $

Is there a config file I can modify to do this?

link|improve this question
feedback

1 Answer

up vote 7 down vote accepted

The PS1 environment variable controls the prompt:

PS1='\w $ '

For more information on this and other prompt configuration topics, type man bash (assuming bash is your shell) and see the "PROMPTING" section.

To make this change permanent, edit your ~/.bashrc file to add the above line.

link|improve this answer
~/.bashrc does not get executed for a login shell. update ~/.bash_profile instead. I use the following prompt string, which has some other useful information, not just the path: PS1='[\e[32m]\t [\e[33m]\w [\e[31m]\! [\e[0m]\$ ' – bobmcn Aug 26 '09 at 20:16
feedback

Your Answer

 
or
required, but never shown

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