You can't use rlwrap
's line editing/history and your repl's TAB completion at the same time.
rlwrap
provides line editing, history and (very simple) completion for commands that don't have it. A command that has something as fancy as TAB completion shouldn't need rlwrap
to do its line editing, should it?
The -a
(--always-readline
) option is a rather crude way to substitute rlwrap's line editing behaviour for that of your command. It is primarily meant for commands that have a very simple line editor, without e.g. command history
If you want to use the -a
option because you prefer rlwrap
's fanciness (like persistent history, or coloured prompts) to your command's (like TAB completion), go ahead, but it is impossible to pick some fanciness of one and keep some of the other.
This is the (small) price programs (and their users) have to pay for avoiding the readline
library and the GPL license that comes with it.
Hans (rlwrap
author)
Edit (April 2017):
In many cases it will be possible to use a filter to restore completion. See A node shell based on readline for an example of this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…