From: "Dominik Vogt" <dominik.vogt@gmx.de>
To: zsh-users@sunsite.dk
Cc: dominik.vogt@gmx.de
Subject: searching upwards from cwd
Date: Mon, 19 Jun 2006 10:15:05 +0200 [thread overview]
Message-ID: <20060619081505.151910@gmx.net> (raw)
The EQUALS option is very handy, and I'd like to have something similary,
but with a different search path. My working directory, is structured like this:
work/
adresses.txt
cvs/
projectx/
src/
foo/
projecty/
...
I'd like to be able to open addresses.txt in a single command without knowing
about the working directory. At the moment, the command depends on cwd:
work/ => less addresses.txt
work/cvs/ => less ../addresses.txt
work/cvs/projectx/ => less ../../addresses.txt
work/cvs/projectx/src/ => less ../../../addresses.txt
It would be very helpful to have an alternative syntax similar to
'**/<filename>' and '=<filename>' that looks upwards in the path. Maybe
**/adresses.txt => look in all subdirs
=addresses.txt => look in the PATH
.=addresses.txt => successively look in ., .., ../.., ../../.. and so on
**.=addresses.txt => works like .=, and if that fails works like **/
(or whatever the syntax would be).
I'd be happy to have it as a zsh function, but I think it could be done
much more efficient in the source code.
Ciao
Dominik ^_^ ^_^
P.S.: Please CC me for fast replies.
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
next reply other threads:[~2006-06-19 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-19 8:15 Dominik Vogt [this message]
2006-06-19 9:13 ` Marc Chantreux
2006-06-19 21:03 ` Dominik Vogt
2006-06-20 18:28 ` Dominik Vogt
2006-06-21 1:53 ` Bart Schaefer
2006-06-19 16:11 ` Bart Schaefer
2006-06-20 5:32 ` Sami Samhuri
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=20060619081505.151910@gmx.net \
--to=dominik.vogt@gmx.de \
--cc=zsh-users@sunsite.dk \
/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).