How to autocomplete at the KornShell command line with the vi editor How to autocomplete at the KornShell command line with the vi editor unix unix

How to autocomplete at the KornShell command line with the vi editor


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>\                x1                     x1<ESC>\                x171g<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.