Autocomplete
In this lesson, you will cover how autocomplete works in bash, the bash 'shift' builtin, and changing case in variables.
How Important is this Lesson?
In this lesson you will build on what you learned previously about:
-
Bash arrays
-
Terminal escape codes
-
Built-ins
-
Bash functions
-
Bash startup scripts
to comprehend more deeply a feature you will probably use almost every time you use bash.
Autocompleting Commands
If you hit the TAB
key on your keyboard twice at the default prompt, then
you should see something like this:
Display all 2266 possibilities (y or n)?
If you’re brave enough to hit y
then you will see a list of all the commands
available in your path.
To escape that list, hit q
.
Now if you try typing z
on a fresh shell command line, and then hit TAB
twice, you will likely immediately see the commands available that begin with
z
.
That’s autocomplete in bash - by default, you get the commands available that match the letters you’ve typed in so far. ...