[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

truncating the path in the bash prompt?

From: Dan Nicolaescu
Subject: truncating the path in the bash prompt?
Date: Thu, 01 Nov 2007 08:01:58 -0700

In tcsh  %c can be used to only show the last few directory names in a
path (also see the ellipsis variable). 

For example for this directory: 


the prompt can look like this:


when using: set prompt = "address@hidden:%c03%# "

Given the tendency of directory hierarchies to get deeper, it is very
useful to be able to see some more context, so it would be great if
bash also supported something similar.
Sure, this can be implemented by using shell commands to set the
prompt, but it would be much nicer if it was built in.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]