Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
searching upwards from cwd
- X-seq: zsh-users 10389
- From: "Dominik Vogt" <dominik.vogt@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: searching upwards from cwd
- Date: Mon, 19 Jun 2006 10:15:05 +0200
- Cc: dominik.vogt@xxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author