aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar Kevin Ballard <kevin@sb.org>2016-01-01 18:29:39 -0800
committerGravatar Kevin Ballard <kevin@sb.org>2016-01-01 19:54:21 -0800
commit23fabf81d7041bf9941f4db72aed7c62d656c7b7 (patch)
tree190786d428997f08325fe4e68e7ed2d1c1bcfa1c /doc_src
parent19112980ee5c3703e50f42a9e05781e5a32f1e88 (diff)
Tweak `complete` docs again
* Add a note to the `--wrap` docs saying that wrapping only works when specifying completions for commands, not for paths. * Add more info about how `--arguments` is handled.
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/complete.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc_src/complete.txt b/doc_src/complete.txt
index 745b207c..5c1a1877 100644
--- a/doc_src/complete.txt
+++ b/doc_src/complete.txt
@@ -75,7 +75,11 @@ The options for specifying command switches and wrapped commands may be used mul
Invoking `complete` multiple times for the same command adds the new definitions on top of any existing completions defined for the command.
-The `-w` or `--wraps` options causes the specified command to inherit completions from another command. The inheriting command is said to "wrap" the inherited command. The wrapping command may have its own completions in addition to inherited ones. A command may wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. Wrapping can be removed using the `-e` or `--erase` options.
+When `-a` or `--arguments` is specified in conjunction with long, short, or old style options, the specified arguments are only used as completions when attempting to complete an argument for any of the specified options. If `-a` or `--arguments` is specified without any long, short, or old style options, the specified arguments are used when completing any argument to the command (except when completing an option argument that was specified with `-r` or `--require-parameter`).
+
+Command substitutions found in `OPTION_ARGUMENTS` are not expected to return a space-separated list of arguments. Instead they must return a newline-separated list of arguments, and each argument may optionally have a tab character followed by the argument description. Any description provided in this way overrides a description given with `-d` or `--description`.
+
+The `-w` or `--wraps` options causes the specified command to inherit completions from another command. The inheriting command is said to "wrap" the inherited command. The wrapping command may have its own completions in addition to inherited ones. A command may wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. Wrapping can be removed using the `-e` or `--erase` options. Note that wrapping only works for completions specified with `-c` or `--command` and are ignored when specifying completions with `-p` or `--path`.
When erasing completions, it is possible to either erase all completions for a specific command by specifying `complete -c COMMAND -e`, or by specifying a specific completion option to delete by specifying either a long, short or old style option.