17. Bash Shell - Completion Commands
Contents
Most of the time, we can use commands efficiently with the help of Linux’s automatic completion capability.
TAB Completion
Variable Tab
|
|

before completing

after completing
Command Tab
|
|

before completing

after completing
File Tab
|
|

before completing

after completing
Possible Completions
Can we use Alt+Shift+? keys to print out possible completion options.
Variable Alt+Shift+?
|
|

before printing possible variables

after printing possible variables
Command Alt+Shift+?
|
|

before printing possible commands

after printing possible commands
File Alt+Shift+?
|
|

before printing possible files

after printing possible files
Specific Completion
We can also get the corresponding completion through a specific combination of keys.
File Alt+Shift+/
|
|

before completing a nearest filename

after completing a nearest filename
Username Alt+Shift+~
|
|

before completing a nearest username

after completing a nearest username
Variable Alt+Shift+$
|
|

before completing a nearest variable

after completing a nearest variable
Hostname Alt+Shift+@
|
|

before completing a nearest hostname

after completing a nearest hostname
Command Alt+Shift+!
|
|

before completing a nearest hostname

after completing a nearest hostname
References 8.4.6 Letting Readline Type For You
Author Dong Chen
LastMod Mon Feb 18 2019