update
This commit is contained in:
parent
330c97d24d
commit
1ac268ecc9
|
@ -237,15 +237,21 @@ _regex_arguments _cmd OTHER_ARGS..
|
||||||
_cmd "$@"
|
_cmd "$@"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
The OTHER_ARGS should be sequences of specifications for matching & completing sequences of words on the command line.
|
The OTHER_ARGS should be sequences of specifications for matching & completing words on the command line.
|
||||||
These sequences can be separated by '|' to represent alternative command line specifications, and you can use
|
These sequences can be separated by '|' to represent alternative sequences of words.
|
||||||
bracketing to arbitrary depth to specify alternate subsequences.
|
You can use bracketing to arbitrary depth to specify alternate subsequences.
|
||||||
For example:
|
For example:
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
_regex_arguments SEQ1 '|' SEQ2 \( SEQ2a '|' SEQ2b \)
|
_regex_arguments SEQ1 '|' SEQ2 \( SEQ2a '|' SEQ2b \)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
this specifies a command line matching either SEQ1, or SEQ2 followed by SEQ2a or SEQ2b.
|
this specifies a command line matching either SEQ1, or SEQ2 followed by SEQ2a or SEQ2b.
|
||||||
|
|
||||||
|
A specification in a sequence can take the form: /PATTERN/ ':TAG:DESCR:ACTION'
|
||||||
|
The ':TAG:DESCR:ACTION' part is the same as for the _alternative function (see above), and specifies how to complete
|
||||||
|
the word on the command line corresponding to that position.
|
||||||
|
The PATTERN is a regular expression to match the word after it has been completed.
|
||||||
|
The start of the command line matching PATTERN is then removed before moving on to the next specification (which will
|
||||||
|
then be matched against the remaining command line).
|
||||||
|
|
||||||
*** Patterns
|
*** Patterns
|
||||||
* Testing & debugging
|
* Testing & debugging
|
||||||
|
|
Loading…
Reference in New Issue