This commit is contained in:
Joe Bloggs 2014-03-25 23:24:55 +00:00
parent 390e7b169f
commit fb42f33c02
1 changed files with 3 additions and 2 deletions

View File

@ -144,9 +144,10 @@ _alternative 'args:custom args:(a b c)' 'interfaces:network interfaces:_net_inte
The first specification adds completion candidates a, b & c with description 'custom args', and the second specification The first specification adds completion candidates a, b & c with description 'custom args', and the second specification
calls the _net_interfaces command which adds network interfaces as completion candidates. calls the _net_interfaces command which adds network interfaces as completion candidates.
We could add descriptions to each of the custom args like this: We could split the specifications over several lines and add descriptions to each of the custom args like this:
#+BEGIN_SRC sh #+BEGIN_SRC sh
_alternative 'args:custom args:((a\:"description a" b\:"description b" c\:"description c"))' 'interfaces:network interfaces:_net_interfaces' _alternative 'args:custom args:((a\:"description a" b\:"description b" c\:"description c"))'\
'interfaces:network interfaces:_net_interfaces'
#+END_SRC #+END_SRC
** Writing completion functions using _arguments ** Writing completion functions using _arguments