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
Bash (Unix shell)
(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!
=== Programmable Completion === Bash supports programmable [[Command-line completion|completion]] via built-in <code>complete</code>, {{Code|compopt}}, and <code>compgen</code> commands.<ref>{{Cite web |title=Bash Reference Manual |url=https://tiswww.case.edu/php/chet/bash/bashref.html#Programmable-Completion |website=tiswww.case.edu }}</ref> The feature has been available since the beta version of 2.04 released in 2000.<ref name="auto1"/><ref>{{Cite web |title=Index of /gnu/bash |url=https://ftp.swin.edu.au/gnu/bash/ |url-status=live |archive-url=https://web.archive.org/web/20200308104032/http://ftp.swin.edu.au/gnu/bash/ |archive-date=March 8, 2020 |access-date=September 15, 2019 |website=ftp.swin.edu.au }}</ref> These commands enable complex and intelligent completion specification for commands (i.e. installed programs), functions, variables, and filenames.<ref name=":1">{{Cite web |title=An Introduction to Programmable Completion |url=https://tldp.org/LDP/abs/html/tabexpansion.html |access-date=2022-01-21 |website=tldp.org }}</ref> The <code>complete</code> and {{Code|compopt}} two commands specify how arguments of some available commands or options are going to be listed in the [[readline]] input. As of version 5.1 completion of the command or the option is usually activated by the {{Key|tab}} keystroke after typing its name.<ref name=":1" /> <!-- === Shell-native Pattern Matching === '''+++ Wildcards (a.k.a., "Globs"): <code>*</code> <code>[...]</code> and <code>?</code>''' '''+++ Pattern Matching Contexts''' --><!-- === Regular Expressions === '''+++ The Regex Operator (<code>=~</code>) of the Double Bracket Keyword (<code>[[</code>)''' '''+++ <code>BASH_REMATCH</code>''' --><!-- === Coprocesses === -->
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)