utop
utop copied to clipboard
~/.lambda-term-inputrc is not working
Hi,
I installed utop by running opam install utop
and it runs correctly. But I did not find a file named .lambda-term-inputrc
in my home directory so I manually created such a file and wrote:
[read-line]
M-left: complete-bar-prev
M-right: complete-bar-next
M-down: complete-bar
Then I restarted utop but found them not working at all (the cursor of completion bar dis not move).
I tried running ocaml print_sequences.ml
within lambda-term, and ensured these 3 key combinations available:
press 'q' to quit
\027b
\027f
\027[B
What could the problem be?
What does ocaml print_sequences.ml
reports when you press just Left
, Right
and Down
? Also what's your terminal application?
\027[D
\027[C
\027[B
Thanks. Well I can do something for M-left
and M-right
. For M-down
unfortunately I can't do anything: as you can see your terminal reports the same thing for Down
and M-down
, so there is no way to distinguish them.
What terminal and OS are you using BTW?
Mac OS X 10.9 terminal
same problem here. i can add that M-down actually prints
\027
\027[B
(both of these) neither M-left, M-right nor C-left C-right work.
@BYVoid @nilsbecker FYI, you might try these settings which worked for me:
$ cat ~/.lambda-term-inputrc
[read-line]
M-b: complete-bar-prev
M-f: complete-bar-next
The above enables using Alt + arrow keys to move backward/forward.
Also, in the preferences for Mac's Terminal App, I selected "Use Option as Meta key". This additionally enables Alt+down-arrow to select the currently highlighted item.