Subject: Re: ksh and tab completion
To: None <wojtek@wojtek.from.pl>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-users
Date: 03/20/2001 18:59:41
> does not work.
> i've tried yours.
> bind just does not work
> tab is tab nothing more

That surprised me, so I created a new account:

# useradd -s /bin/ksh -d /home/wojtek -m wojtek
# su - wojtek
...
$ bind "^I=complete"
$ ls .log	<-- cursor moved to here

... so it didn't work. Perusing my .kshrc found a "set -o emacs" so I
tried that next:

$ set -o emacs
$ ls .log^I # this now expanded to the following line
$ ls .login <-- cursor here

So, bind does work. :-)

I checked Frederick's method too:

$ set -o vi
$ set -o vi-tabcomplete
$ ls .log^I # expanded to the following line
$ ls .login <-- cursor here

So tab filename completion works for ksh in both vi and emacs modes.
This is tested on a 1.5/i386 system:

$ uname -a
NetBSD nemeton.com.au 1.5 NetBSD 1.5 (NEMETON) #1: Mon Mar 19 08:16:06 EST 2001     giles@nemeton.com.au:/usr/src/sys/arch/i386/compile/NEMETON i386

In emacs mode ^V shows the ksh version to be:

PD KSH v5.2.14 99/07/13.2

Regards,

Giles