zsh-users
 help / color / mirror / code / Atom feed
From: John Eikenberry <jae@zhar.net>
To: zsh-users@zsh.org
Subject: Re: directory specific functions and aliases
Date: Fri, 13 Feb 2015 13:11:59 -0800	[thread overview]
Message-ID: <20150213211159.GB12771@neroon.zhar.net> (raw)
In-Reply-To: <20150213155212.49ed641f@pwslap01u.europe.root.pri>

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]

Peter Stephenson wrote:

> On Fri, 13 Feb 2015 15:41:38 +0000
> Peter Stephenson <p.stephenson@samsung.com> 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))

-- 

John Eikenberry
[ jae@zhar.net - http://zhar.net ]
[ PGP public key @ http://zhar.net/jae_at_zhar_net.gpg ]
________________________________________________________________________
"Perfection is attained, not when no more can be added, but when no more
 can be removed." -- Antoine de Saint-Exupery

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-02-13 21:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13 15:05 shawn wilson
2015-02-13 15:41 ` Peter Stephenson
2015-02-13 15:52   ` Peter Stephenson
2015-02-13 21:11     ` John Eikenberry [this message]
2015-02-13 22:17   ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150213211159.GB12771@neroon.zhar.net \
    --to=jae@zhar.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).