diff --git a/doc_src/cmds/complete.rst b/doc_src/cmds/complete.rst index 5c5784a3a..b72221faf 100644 --- a/doc_src/cmds/complete.rst +++ b/doc_src/cmds/complete.rst @@ -63,7 +63,9 @@ The following options are available: Add a description for this completion, to be shown in the completion pager. **-w** or **--wraps** *WRAPPED_COMMAND* - Causes the specified command to inherit completions from *WRAPPED_COMMAND* (see below for details). + Causes the specified command to inherit completions from *WRAPPED_COMMAND*. + This is used for "this command completes like that other command" kinds of relationships. + See below for details. **-n** or **--condition** *CONDITION* This completion should only be used if the *CONDITION* (a shell command) returns 0. This makes it possible to specify completions that should only be used in some cases. If multiple conditions are specified, fish will try them in the order they are specified until one fails or all succeeded. diff --git a/doc_src/cmds/function.rst b/doc_src/cmds/function.rst index 0bcbd6df6..c2be34719 100644 --- a/doc_src/cmds/function.rst +++ b/doc_src/cmds/function.rst @@ -27,7 +27,11 @@ The following options are available: A description of what the function does, suitable as a completion description. **-w** *WRAPPED_COMMAND* or **--wraps** *WRAPPED_COMMAND* - Inherit completions from the given *WRAPPED_COMMAND*. See the documentation for :doc:`complete ` for more information. + Inherit completions from the given *WRAPPED_COMMAND*. + This is used to say that this function completes like that command, + for example if you're creating an alias. + See the documentation for :doc:`complete ` for more information. + If the wrapped command is the same as the function name, this will be ignored. **-e** *EVENT_NAME* or **--on-event** *EVENT_NAME* Run this function when the specified named event is emitted. Fish internally generates named events, for example, when showing the prompt. Custom events can be emitted using the :doc:`emit ` command.