Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Comparison of command shells
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Completions === {{main article|Command-line completion}} [[Image:Command-line-completion-example.gif|right|thumb|402px|Command-line completion in [[Bash (Unix shell)|Bash]].]]Completion features assist the user in typing commands at the command line, by looking for and suggesting matching words for incomplete ones. Completion is generally requested by pressing the completion key (often the {{keypress|TAB}} key). ''Command name completion'' is the completion of the name of a command. In most shells, a command can be a program in the command path (usually <code>$PATH</code>), a builtin command, a function or alias. ''Path completion'' is the completion of the path to a file, relative or absolute. ''Wildcard completion'' is a generalization of path completion, where an expression matches any number of files, using any supported syntax for [[#String processing and filename matching|file matching]]. ''Variable completion'' is the completion of the name of a variable name ([[environment variable]] or shell variable). Bash, zsh, and fish have completion for all variable names. PowerShell has completions for environment variable names, shell variable names and β from within user-defined functions β parameter names. ''Command argument completion'' is the completion of a specific command's arguments. There are two types of arguments, [[Named parameter|named]] and positional: Named arguments, often called ''options'', are identified by their name or letter preceding a value, whereas positional arguments consist only of the value. Some shells allow completion of argument names, but few support completing values. Bash, zsh and fish offer parameter name completion through a definition external to the command, distributed in a separate completion definition file. For command parameter name/value completions, these shells assume path/filename completion if no completion is defined for the command. Completion can be set up to dynamically suggest completions by calling a shell function.<ref>{{cite web |url=https://zsh.sourceforge.io/Doc/Release/Completion-System.html |title=zsh: 20. Completion System |publisher=Zsh.sourceforge.io |date=2013-03-06 |access-date=2013-08-18}}</ref> The fish shell additionally supports parsing of [[man page]]s to extract parameter information that can be used to improve completions/suggestions. In PowerShell, all types of commands (cmdlets, functions, script files) inherently expose data about the names, types and valid value ranges/lists for each argument. This metadata is used by PowerShell to automatically support argument name and value completion for built-in commands/functions, user-defined commands/functions as well as for script files. Individual cmdlets can also define dynamic completion of argument values where the completion values are computed dynamically on the running system.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)