mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-23 02:41:14 -03:00
Add --escape option to complete -C
An example use case is an external completion pager:
bind \cg "commandline -rt (complete -C --escape|fzf|cut -d\t -f1)\ "
Fixes #3469
This commit is contained in:
committed by
Johannes Altmanninger
parent
d1d9f147ec
commit
9e0f74eb6c
@@ -9,7 +9,7 @@ Synopsis
|
||||
.. synopsis::
|
||||
|
||||
complete ((-c | --command) | (-p | --path)) COMMAND [OPTIONS]
|
||||
complete ((-C | --do-complete)) STRING
|
||||
complete ((-C | --do-complete)) [STRING] [--escape]
|
||||
|
||||
Description
|
||||
-----------
|
||||
@@ -49,6 +49,8 @@ the fish manual.
|
||||
|
||||
- ``-C STRING`` or ``--do-complete=STRING`` makes complete try to find all possible completions for the specified string. If there is no STRING, the current commandline is used instead.
|
||||
|
||||
- When using ``-C``, specify ``--escape`` to escape special characters in completions.
|
||||
|
||||
Command specific tab-completions in ``fish`` are based on the notion of options and arguments. An option is a parameter which begins with a hyphen, such as ``-h``, ``-help`` or ``--help``. Arguments are parameters that do not begin with a hyphen. Fish recognizes three styles of options, the same styles as the GNU getopt library. These styles are:
|
||||
|
||||
- Short options, like ``-a``. Short options are a single character long, are preceded by a single hyphen and can be grouped together (like ``-la``, which is equivalent to ``-l -a``). Option arguments may be specified by appending the option with the value (``-w32``), or, if ``--require-parameter`` is given, in the following parameter (``-w 32``).
|
||||
|
||||
Reference in New Issue
Block a user