utop icon indicating copy to clipboard operation
utop copied to clipboard

~/.lambda-term-inputrc is not working

Open BYVoid opened this issue 10 years ago • 6 comments

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?

BYVoid avatar Nov 19 '13 21:11 BYVoid

What does ocaml print_sequences.ml reports when you press just Left, Right and Down? Also what's your terminal application?

ghost avatar Nov 20 '13 09:11 ghost

\027[D
\027[C
\027[B

BYVoid avatar Nov 20 '13 12:11 BYVoid

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?

ghost avatar Nov 20 '13 13:11 ghost

Mac OS X 10.9 terminal

BYVoid avatar Nov 20 '13 20:11 BYVoid

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.

nilsbecker avatar Jan 26 '14 23:01 nilsbecker

@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.

agarwal avatar Oct 23 '14 18:10 agarwal