Reputation: 55
I am trying to get tab completion on the second atom of a command.
I.e. man do<tab complete>
In bash this can be done with complete -cf <command>
but I am not sure if this is possible in ksh. Any Ideas?
Upvotes: 0
Views: 387
Reputation: 5327
It depends on which ksh
flavour you are using.
In AT&T ksh88
as well as pdksh
and derivatives (mksh
, NetBSD ksh
, OpenBSD ksh
/ oksh
), this is not possible (asides from really weird hacks. They (I can say that for guaranteed for mksh
as I am its developer) complete the second (and follow-up, except after a closing parenthesis )
) word of a command consistently as cwd-relative pathname (“file” simplified).
AT&T ksh93
in the last version from AT&T 93u+20120801
does not have programmable tab completion; however, the new development under situ
from Red Hat introduced it, as indicated in the manpage. You will not likely find this in any stable distro yet, however, they have recently issued their first stable post-fork release.
Upvotes: 1