In the KornShell (ksh) on AIX UNIX Version 5.3 with the editor mode set to vi using:
set -o vi
What are the key-strokes at the shell command line to autocomplete a file or directory name?
Command auto-completion is available when using the CLI shell. You can set up CLI command auto-completion in your operating system using the kollacli command command. This command generates a script you can save to the operating system. Copy and paste the output to a file, for example a file named /etc/bash_completion.
Using autocomplete is as simple as pressing the [TAB] and the active command line options will fill-in.
When at the MS-DOS, Windows command line or a Linux or Unix shell, typing in long file names or directories can become a burden. Use the Tab to autocomplete the names of directories and files while in the command line.
ESC\ works fine on AIX4.2 at least. One thing I noticed is that it only autocompletes to the unique part of the file name.
So if you have the files x.txt, x171go and x171stop, the following will happen:
Press keys: Command line is:
x x
<ESC>\ x
1 x1
<ESC>\ x171
g<ESC>\ x171go
Extending the other answers: <ESC>* will list all matching files on the command line. Then you can use the standard vi editing commands to remove the ones you don't care about. So to add to the above table:
<ESC><shift-8> x.txt x171 x171go
Then use backspace to go get rid of the last two, or hit <ESC> again and use the h or b to go backwards and dw to delete the ones you don't want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With