Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Bash (Unix shell)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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 === -->
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Bash (Unix shell)
(section)
Add topic