Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tilde (%~) prompt expansion inconsistent with named directories?
- X-seq: zsh-users 13051
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: dackz <dackze@xxxxxxxxx>
- Subject: Re: Tilde (%~) prompt expansion inconsistent with named directories?
- Date: Mon, 21 Jul 2008 17:00:39 -0700
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=d200807; d=spodhuis.org; h=Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=atZ/Y7CCb3tzDxNHZ4KGVRy5M4NXaPv0RTPmd7W79nu5NBV1dBiVOh6xkg1yzm8OPpoHsQJQpHDBIjhe9k/86wMsjQQYFn+pL87yMFnBQGvnfGsP3QiXQ2kugSCf9t561JFAaLpg7HOUxjGii/+tvgy9MmDBly89oV32R0Oifx4=;
- In-reply-to: <27A15BA8-38F5-4757-8E40-0FFCBD9ADA17@xxxxxxxxx>
- Mail-followup-to: dackz <dackze@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <C40BEC83-7722-4379-894C-71B9D210C635@xxxxxxxxx> <20080721224103.GA38508@xxxxxxxxxxxxxxxxxxxx> <27A15BA8-38F5-4757-8E40-0FFCBD9ADA17@xxxxxxxxx>
On 2008-07-21 at 19:18 -0400, dackz wrote:
> I think what I really meant to say is that I think it should be
> consistent. I.e., it should either never do it, or always do it
> (perhaps through a setting/option).
>
> At least in my case I had been using my own custom prompt function
In your init function for setting the prompt:
zmodload -i zsh/parameter
print ${(k)userdirs} >/dev/null
> and is there a way to disable named directory expansion
> for %~? Though I suppose I could just as well use "${PWD/$HOME/~}" in
> the latter case.
I think ${PWD/$HOME/~} is your best bet.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author