Peter Stephenson wrote: > On Fri, 13 Feb 2015 15:41:38 +0000 > Peter Stephenson 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