Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: possibly useful zsh_directory_name implementation
- X-seq: zsh-users 15861
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- Subject: Re: possibly useful zsh_directory_name implementation
- Date: Fri, 11 Mar 2011 13:06:13 +0100
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=mKXpW3xfpowaxNrswy+As5f/nhAVy5YPPxW0aFdpMgU=; b=ZUvI9VC3dR/K2IL7/ts609OjBIYrwJsps2P7FeDsWjpi4aRM3wrDr/DvBLjuZUxzdX Rd5QeBmeS//NmKaGcRxXttLTa77DGL/5ovwyX+Tbc9FSozazvSDRktUzXLwuPfcXzvtm DNseZPyJ8AjvySnf7LQ9Z5/R1jl9xPrMLFOks=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wA/EkJQidShT8+TOBWbKF/RSPGBZr1B6tLBdB18yZnPwbrH8MHZKsMRWm5yikagG2z YA8OZ7jIV2FhA8GuEZ4zlwkKINhMLgbDfq8Hup2LVrLhr+pdwBNrghHcSyHdPS/jN6T3 6EK4OoU7bPNF3upAb1/yXGeNmlYUA0bJOUW+I=
- In-reply-to: <20110311104402.6a411b10@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AANLkTin+cCxFRYtwZXGSUWyLjfe7NV-eDx1mcS9sSau0@mail.gmail.com> <20110311104402.6a411b10@pwslap01u.europe.root.pri>
On 11 March 2011 11:44, Peter Stephenson <Peter.Stephenson@xxxxxxx> wrote:
> On Fri, 11 Mar 2011 02:06:45 +0100
> Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>> function zsh_directory_name () {
>>...
>> }
>>
>> With this, /home/mikachu/some/directory/somewhere% cd ~[/some], will
>> take you to /home/mikachu/some/, and cd ~[.foo] will take you to foo/
>> in whatever parent directory has a subdirectory foo, for example it
>> could be /home/foo/.
>
> I've been meaning to add a zsh_directory_name hook, so you can have
> multiple functions implementing this and the function here would
> interact nicely with other functions that implemented naming without the
> "/" or "." at the start. However, I need to think about the
> consequences --- it's more complicated than the existing hooks.
If you don't have a prefix, how do you specify which of the functions
should handle the argument?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author