Short Bash prompt – export PS1=”\W\$ “

You can have a nice, deep directory stucture – and still keep your prompt short and tidy.

The problem

I like nice, deep, meaningful directory structures. I don’t like a prompt like this:

tkarvinen@somehost:~/foocompany/internal/projects/alpha/clientx/internal/config/puppet/modules/somehotframework/manifests/ $


tkarvine...$ export PS1="\W\$ "

Now the prompt shows only the last folder in the directory tree. I can type ‘pwd’ when I want to see it all.

Posted in Uncategorized | Tagged , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Recent Posts

  • Picks

  • Boxing Clock for AndroidOcton8 Diving T-ShirtsShaking Tower Panda Android GameLearn Chinese with Android
  • Student projects