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

How to complete commands on a different/generated PATH ?


I installed zsh3 on our systems, and therefore went through
the new compctl examples. I am missing a special kind of completion
which might be trivial, but I could not (yet :-) find out:

We use a set of macros 'x11x' 'ow3x' '...some_other_s', which
manipulate the environment to start a program in the 'correct world'.
('x11x' starts original X11-Progs under Openwin, 'ow3x' the other way...
 all those reorder the PATH to 'prefer' the given environment).

Now if you do NOT have X11 in YOUR PATH and run a completion on the
partial command 'x11x x<tab>'  completion does not search in the correct
place. I would need to 'pre-evaluate' the 'x11x' macro to get it's new
PATH and glob THEREIN! OK, getting that PATH might be done simply by
'x11x echo "$path"' as I asume there is an evaluate in 'x11x'.

BUT HOW TO  'first change the PATH, then glob on the new PATH' ?

 Thanks for a HINT , your's Stucki

Christoph von Stuckrad       * *  | talk to  | <stucki@xxxxxxxxxxxxxxxxx> \
Freie Universitaet Berlin    |/_* | nickname | ...!unido!fub!leibniz!stucki|
Fachbereich Mathematik, EDV  |\ * | 'stucki' | Tel:+49 30 838-7545{9|8}    |
Arnimallee 2-6/14195 Berlin  * *  |  on IRC  | Fax:+49 30 838-5913        /

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