Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: directory specific functions and aliases
- X-seq: zsh-workers 34542
- From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: directory specific functions and aliases
- Date: Sat, 14 Feb 2015 17:43:21 +0100
- In-reply-to: <20150213211159.GB12771__23092.9831196137$1423863146$gmane$org@neroon.zhar.net> (John Eikenberry's message of "Fri, 13 Feb 2015 13:11:59 -0800")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAH_OBicY5yU-qWELH1Qd6Mx=KZfKdhgnoagA_TurjXo5sCAp5w@mail.gmail.com> <20150213154138.118cf396@pwslap01u.europe.root.pri> <20150213155212.49ed641f@pwslap01u.europe.root.pri> <20150213211159.GB12771__23092.9831196137$1423863146$gmane$org@neroon.zhar.net>
John Eikenberry <jae@xxxxxxxx> writes:
> Peter Stephenson wrote:
>
>> On Fri, 13 Feb 2015 15:41:38 +0000
>> Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
>> > You can easily search backward for a
>> > file of the same name in a parent directory if you have EXTENDED_GLOB
>> > set: (../)#.thatdotfilename which will allow you to put in the top level
>> > of a repository.
>>
>> Come to think of it, that can produce multiple matches.
>>
>> (../)#foo(oL[1])
>>
>> gets you the first one you encounter going up (the one with the shortest
>> name).
>
> I also use this for a local history and have found it made more sense to get
> the one with the longest name, the one 'closer' to you in the tree. I also
> found expanding the name useful (the :a). I use this...
>
> (../)#.zsh_history(oL[-1]:a))
I think you want (Od[1]:a) really?
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author