Re: truncating the path in the bash prompt?

2009-01-15 Thread Matthew Woehlke
Paul Jarc wrote: Matthew Woehlke wrote: Actually, a feature that would be REALLY helpful is a way to specify certain directory strings that should be abbreviated. PS1='...$(mypath)...' mypath() { case $PWD/ in /usr/local/src/kde/svn/trunk/*) printf %s "${PWD/#\/usr\/local\/src\/kd

Re: truncating the path in the bash prompt?

2009-01-14 Thread Paul Jarc
Matthew Woehlke wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated. PS1='...$(mypath)...' mypath() { case $PWD/ in /usr/local/src/kde/svn/trunk/*) printf %s "${PWD/#\/usr\/local\/src\/kde\/svn\/trunk/\$s

Re: truncating the path in the bash prompt?

2009-01-14 Thread Chet Ramey
Matthew Woehlke wrote: > Actually, a feature that would be REALLY helpful is a way to specify > certain directory strings that should be abbreviated. For example, I > build KDE from sources, with source in /usr/local/src/kde/svn/trunk and > build objects in /var/local/build/kde/svn/trunk. It would

Re: truncating the path in the bash prompt?

2009-01-14 Thread Matthew Woehlke
Dan Nicolaescu wrote: Dan Nicolaescu writes: > 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: > > /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/ > > the promp

Re: truncating the path in the bash prompt?

2009-01-14 Thread Pierre Gaston
On Wed, Jan 14, 2009 at 9:56 AM, Dan Nicolaescu wrote: > Dan Nicolaescu writes: > > > 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: > > > > /lib/modules/2.6.21-1.3194.fc7/kernel/drive

Re: truncating the path in the bash prompt?

2009-01-13 Thread Dan Nicolaescu
Dan Nicolaescu writes: > 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: > > /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/ > > the prompt can look like this:

Re: truncating the path in the bash prompt?

2007-11-01 Thread Dan Nicolaescu
Stephane Chazelas <[EMAIL PROTECTED]> writes: > On Thu, Nov 01, 2007 at 08:01:58AM -0700, Dan Nicolaescu wrote: > > > > 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: > >

Re: truncating the path in the bash prompt?

2007-11-01 Thread Stephane Chazelas
On Thu, Nov 01, 2007 at 08:01:58AM -0700, Dan Nicolaescu wrote: > > 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: > > /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/ > > the pro

truncating the path in the bash prompt?

2007-11-01 Thread Dan Nicolaescu
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: /lib/modules/2.6.21-1.3194.fc7/kernel/drivers/char/hw_random/ the prompt can look like this: [EMAIL PROTECTED]:...drivers/char/hw_random> when using