Questions tagged [ledit]

Ledit is a line editor, allowing to interact with a read-eval loop with control characters and history.

Ledit is a line editor, allowing to use shell commands with control characters like in emacs and history.

It is written in OCaml. It was originally intended to ease the use of the OCaml interaction loop (the toplevel), but is acutally language agnostic.

8 questions
26
votes
4 answers

Is there an enhanced interpreter toploop for OCaml?

Python has IPython.. does OCaml have anything similar? I'd very much like to have command history, although other features would be nice too. I've read that I could get command history by running it in Emacs, but I don't use Emacs..
int3
  • 12,861
  • 8
  • 51
  • 80
25
votes
2 answers

Is it possible to use arrow keys in OCaml interpreter?

Everytime I use these keys in the interpreter I keep getting symbols like this appearing: [[D^[[C I'm using Linux Mint 12 in ZSH, however I'm getting the same result in Ubuntu with bash. Also, same thing in ssh.
Pacane
  • 20,273
  • 18
  • 60
  • 97
6
votes
3 answers

Standard ML repeat last command, left arrow?

I am learning standard ML using its interpreter. Sometimes I make typo and just want to repeat the previous command like in Linux shell. However, up arrow will end up with printing special characters on the screen. Sometimes I want to go back left…
Alfred Zhong
  • 6,773
  • 11
  • 47
  • 59
5
votes
2 answers

Why does irb insert control characters into my reverse-interactive-search buffer?

If I do a reverse interactive search in irb and then enter a control character (arrow keys are the only ones I've seen this with actually). So I start with this session: $ irb >> print "hello" hello then enter ^r, h $ irb >> print…
John Bachir
  • 22,495
  • 29
  • 154
  • 227
4
votes
3 answers

How should I do clear screen on ocaml toplevel?

I am using ocaml toplevel with ledit (ledit -l 100 ocaml) on Ubuntu 14.04. Since there is no way to do clear screen, all the time, I keep dwelling at the bottom of the screen. I would like to know if there is a way to do clear screen at…
UnSat
  • 1,347
  • 2
  • 14
  • 28
3
votes
5 answers

Adding command recall to a Unix command line application

I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc). Is there…
Andrew
  • 11,894
  • 12
  • 69
  • 85
1
vote
1 answer

Odd Behavior With Copy/Paste Into FSI On Mac

I've sort of got Fsi.exe working as expected on a Mac OS X (Snow Leopard) with Mono. I just noticed a little bit of odd behavior with cut and paste and I was wondering if anyone had seen this. I've defined the following alias for fsi: alias…
Onorio Catenacci
  • 14,928
  • 14
  • 81
  • 132
1
vote
2 answers

How do I run an interpreter with command history support?

I know there is a way to run an interactive console with command history support (even though the program does not inherently support it). However, I don't remember the command. Can anyone help me?
August Karlstrom
  • 10,773
  • 7
  • 38
  • 60