ksh - VI tab completion

If you are used to bash shell in Linux, you will use tab completion very often. Tab completion basically is a in-build bash script that will complete your current command, file path, etc... when you press one the tab key on the keyboard.

ksh (Korn Shell) is a Unix shell and does not come with tab completion by default.

If you want to use tab completion, you can use the following command at the ksh prompt

For VI editor mode, do the following

1. set -o vi
2. set -o vi-tabcomplete

For EMACS editor mode, do the following

1. set -o emacs
2. bind ^I=complete

In addition, if you want to have complete listing, you can bind another key with the following

bind ^I=complete-list 

or use the default binding

bind ^X^Y=list-file

to list file

^ is Ctrl key on the keyboard. So, ^I is bind to tab key by default. Or, you can press and hold Ctrl then press I for the same effect.


Comments

Popular Posts