Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: possibly useful zsh_directory_name implementation



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