On Fri, 7 Sep 2001 10:52:04 +0200 , Newton, Philip wrote:
>> export PROMPT_COMMAND="pwd|perl -pe
>> 'chop;s#^.*(/.+/.+)\$#...\1#;\$_=qq(\e]0;\$_\a)'"
> ^
> (ouch)
>
>You should be able to get rid of '^.*' since you're not capturing that bit
>-- *every* string begins with beginning-of-string and
>zero-or-more-characters, so adding them doesn't make a difference to what
>gets matched.
No but it does make a difference to what gets replaced.
And I would make it ".+" since I wouldn't want to replace "/a/b" with
".../a/b".
--
Bart.