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

Nested completion of arguments



Sorry, I could not follow recent changes closely, so may be this question is
trivial.

I'd like to have completion for mount and share commands. On our system (SVR4
based) the general syntax of mount is

mount [-F FSType] [-Vr] [-o specific_options] special mount_point

where specific_options are in the form

option[=value],...

The same is for share, 'course.

The question is, is it currently possible to complete this `specific_options'
part (with autoremoved `,' and all this completion sugar). Note, that values of
options may itself be completed as list; the trivial example is

share -o root=host1:host2

Also, the possible values for specific options depends on FSType.

I don't ask for a complete function :-) but just for a hint what can be used.

Note, that this form is officially blessed by UNIX specs as getsubopt()
function. So, it may be nice to have a general way to parse such option string.
(Not that I can name other commands that use it offhead).

/andrej



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