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

Re: Q: _regex_arguments problem



On Dec 2,  9:37pm, Alexey I. Froloff wrote:
}
} I've found so far, that the only utility function, that can
} complete anything-but-space-separated list of values is _values.
} And it accepts only predefined values.  My list of ids is not
} static, it is fetched from remote server via executing special
} ssh command, so I guess this problem is not related to _regex_*
} completion, this is just not possible...

The typical way you'd do this with the plain _arguments function
is with the ->state mechanism:  use _arguments to figure out the
context and set a state, then in a 'case' or the like on the state
value you call your ssh command to get the list of values and then
call _values with that.

I'm not familiar enough with _regex_arguments to know if it can be
used in a similar two-stage manner.



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