How to program ksh93 to use bash autocomplete?

In a comment in response to a shell question, user tinkertim said it was easy to hack kshin order to use the autocomplete library bash. I would not like anything better than to use AutoComplete bashwith the T & the AT ksh93. How can I do that?

ksh93has a new version several times a year, so I'm looking for a solution that does not require changing the source code. ksh93can bind new C-modules dynamically, as well as very programmably (I execute the ksh function every time I press a key), so changing the source should not be really necessary.

Note. I'm not talking about autocomplete file name, which is easy to do in ksh. I'm talking about all the other autocomplete products that bash does, for example, for autocomplete options for commands nmhor for autocompletion Mercurial commmands. Such things.

+3
source share
5 answers

There is a Readline shell, rlwrap. You may already have a software package for your system.

It is located above the standard input of the program being launched, a bit is configured and programmed, it saves history.

I usually use it for things like Oracle SQL * Plus.

This may or may not be the tool you are looking for, you should check.

0
source

, , ( , -), emacs set -o emacs, ESC (ESC -ESC).

, , , - .profile , , .

0

set -o emacs set -o vi, ESC-\ . (ESC ,\ , .) set -o vi , , vi .

, bash - ksh, , , , ksh .

ksh, ESC- =, :

0

Try pressing ESC, then the "\" key. It should mimic the bash autocomplete function.

0
source

Source: https://habr.com/ru/post/1709640/


All Articles