diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-09 10:39:37 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-09 10:39:37 +0000 |
commit | 726e1f5545e35b2cc589d1e43202ae6c04fbffca (patch) | |
tree | 691efed5d248e10a35fb9c6f2d55e835f8d5c814 /Etc | |
parent | 837ee86a60421d19ad00cac1204bc94d0a96bc56 (diff) | |
download | zsh-726e1f5545e35b2cc589d1e43202ae6c04fbffca.tar.gz zsh-726e1f5545e35b2cc589d1e43202ae6c04fbffca.tar.xz zsh-726e1f5545e35b2cc589d1e43202ae6c04fbffca.zip |
zsh-workers/8965
Diffstat (limited to 'Etc')
-rw-r--r-- | Etc/completion-style-guide | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Etc/completion-style-guide b/Etc/completion-style-guide index 62792eada..fcb992123 100644 --- a/Etc/completion-style-guide +++ b/Etc/completion-style-guide @@ -81,9 +81,9 @@ matches should be added. So the example becomes: _wanted names expl 'name' && compadd "$expl[@]" alice bob Note that you can also give the `-J' and `-V' options with the -optional `1' or `2' following them supported by `_description': +optional `1' or `2' preceding them supported by `_description': - _wanted -V2 names expl 'name' && compadd ... + _wanted -2V names expl 'name' && compadd ... The more complicated case is where you can offer multiple types of matches. In this case the user should be able to say which types he @@ -284,16 +284,16 @@ throughout the completion system) and do: compadd "$expl@]" - <matches ...> Note that this function also accepts `-V' und `-J', optionally (in the -same word) followed by `1' or `2' to describe the type of group you +same word) preceded by `1' or `2' to describe the type of group you want to use. For example: _description tag expl '...' - compadd "$expl[@]" -V1 foo - ... # THIS IS WRONG!!! + compadd "$expl[@]" -1V foo - ... # THIS IS WRONG!!! is *not* the right way to use a unsorted group. Instead do the simpler: - _description -V1 tag expl '...' + _description -1V tag expl '...' compadd "$expl[@]" - ... and everything will work fine. @@ -308,11 +308,11 @@ often be using the tags function that allow you to give the explanation to the same function that is used to test if the tags are requested (again: see above). Just as a reminder: - _wanted [ -V[1,2] | -J[1,2] ] <tag> expl <descr> + _wanted [ -[1,2]V | -[1,2]J ] <tag> expl <descr> and - _requested [ -V[1,2] | -J[1,2] ] <tag> expl <descr> + _requested [ -[1,2]V | -[1,2]J ] <tag> expl <descr> is all you need to make your function work correctly with both tags and description at the same time. |