Wrapping can be removed using the -e or -erase options. A command can wrap multiple commands, and wrapping is transitive: if A wraps B, and B wraps C, then A automatically inherits all of C's completions. The wrapping command can also have additional completions. The -w or -wraps options causes the specified command to inherit completions from another command, "wrapping" the other command.
![mac command tab delay mac command tab delay](https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2021/06/cheatsheet-settings.png)
Description given this way override a description given with -d or -description. If -a or -arguments is specified without any long, short, or old style options, the specified arguments are used when completing non-option arguments to the command (except when completing an option argument that was specified with -r or -require-parameter).Ĭommand substitutions found in ARGUMENTS should return a newline-separated list of arguments, and each argument may optionally have a tab character followed by the argument description. When -a or -arguments is specified in conjunction with long, short, or old style options, the specified arguments are only completed as arguments for any of the specified options. Invoking complete multiple times for the same command adds the new definitions on top of any existing completions defined for the command. Multiple command switches and wrapped commands can also be given to define multiple completions in one call. Multiple commands and paths can be given in one call to define the same completions for multiple commands.
![mac command tab delay mac command tab delay](https://i.stack.imgur.com/nA7qz.png)
Option arguments may be specified in the following parameter ( -quoting-style shell) or after a = ( -quoting-style=shell). GNU style long options can be more than one character long, are preceded by two hyphens, and can't be grouped together. Option arguments are specified in the following parameter ( -ao null). Old style long options can be more than one character long, are preceded by a single hyphen and may not be grouped together. Old style long options, like -Wall or -name. Option arguments may be specified in the following parameter ( -w 32) or by appending the option with the value ( -w32). 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). Fish recognizes three styles of options, the same styles as the GNU getopt library. Arguments are parameters that do not begin with a hyphen. An option is a parameter which begins with a hyphen, such as -h, -help or -help. If there is no STRING, the current commandline is used instead.Ĭommand specific tab-completions in fish are based on the notion of options and arguments. C STRING or -do-complete=STRING makes complete try to find all possible completions for the specified string. This makes it possible to specify completions that should only be used in some cases. n CONDITION or -condition CONDITION specifies that this completion should only be used if the CONDITION (a shell command) returns 0. w WRAPPED_COMMAND or -wraps=WRAPPED_COMMAND causes the specified command to inherit completions from the wrapped command (See below for details). r or -require-parameter says that this completion must have an option argument, i.e. F or -force-files says that this completion may be followed by a filename, even if another applicable complete specified -no-files. f or -no-files says that this completion may not be followed by a filename.
![mac command tab delay mac command tab delay](https://cdn.mos.cms.futurecdn.net/GPkEopJJZ8dApntYxBLx7i-1200-80.png)
Multiple complete calls with -k result in arguments of the later ones displayed first.
![mac command tab delay mac command tab delay](https://www.howtogeek.com/wp-content/uploads/2014/02/gaming-keyboard2.jpg)
k or -keep-order keeps the order of ARGUMENTS instead of sorting alphabetically. a ARGUMENTS or -arguments=ARGUMENTS adds the specified option arguments to the completions list. o LONG_OPTION or -old-option=LONG_OPTION adds an old style long option to the completions list (See below for details). l LONG_OPTION or -long-option=LONG_OPTION adds a GNU style long option to the completions list. s SHORT_OPTION or -short-option=SHORT_OPTION adds a short option to the completions list. e or -erase deletes the specified completion. p COMMAND or -path COMMAND specifies that COMMAND is the absolute path of the command (optionally containing wildcards). If there is no -c or -p, one non-option argument will be used as the command. c COMMAND or -command COMMAND specifies that COMMAND is the name of the command. Complete defines, removes or lists completions for a command.įor an introduction to writing your own completions, see Writing your own completions in