On Fri, 07 Sep 2001 at 09:30:51 -0500, Craig S. Cottingham wrote:
> On Friday, September 7, 2001, at 03:48 , Simon Cozens wrote:
> > If I could assume I was using zsh:
> On Friday, September 7, 2001, at 04:39 , Ian Phillipps wrote:
>
> > Well, this requires a zero-length perl program.
> > Zsh supports this feature directly, and it's part of my standard setup,
> Well, shoot boys, any game's easy when you change the rules. :-)
There's more than one way to do it :-)
I never did understand why bash is so popular. Zsh is much more capable,
smaller and the same price.
OK, OK: (Improving on Tim Ayers' shot):
> export PROMPT_COMMAND="perl
> -e'(\$_=qx[pwd])=~s!/.*((/[^/]+){2}).\$!...\$1!s;print'"
This is shorter, and *much* more efficient:
export PROMPT_COMMAND="perl
-e'\$_=\$ENV{PWD};s!/.*(?=/.*/)!...!s;print'"
.... or use zsh, of course :-)
Ian
----- End forwarded message -----
--
I am confident this explanation will dispell any feelings
of certainty that may have been troubling you.
- [EMAIL PROTECTED] (Cabbage) in <9601221753.AA27669@spock>