Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

paths for filename arguments



Is there a way to specify a path in arguments (a bit like with RISC OS,
for those who know -- but this would be done here at the shell level)?

For instance,

$ lesspath=(~/text ~/doc)
$ less less:blah

should make zsh search for file "blah" in the working directory, and
if it is not there, it should be searched in ~/text, then ~/doc. Before
executing less, zsh should replace "less:" by nothing or the correct
path element.

Perhaps this can already be done with variable expansion, but with a
more complicated syntax, I suppose...

One could also define compctl-like commands to avoid writing "less:",
so that

$ less --option blah

would add a correct path to "blah", but do nothing with "--option".

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - PhD student in Computer Science
Web: <http://www.vinc17.org/> or <http://www.ens-lyon.fr/~vlefevre/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.



Messages sorted by: Reverse Date, Date, Thread, Author