From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id B5A427ED34 for ; Wed, 4 Jul 2012 19:56:51 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=pra; client-ip=131.159.0.8; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of markus.weissmann@in.tum.de) identity=mailfrom; client-ip=131.159.0.8; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="markus.weissmann@in.tum.de"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-out1.informatik.tu-muenchen.de) identity=helo; client-ip=131.159.0.8; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="markus.weissmann@in.tum.de"; x-sender="postmaster@mail-out1.informatik.tu-muenchen.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArAHABSD9E+DnwAIf2dsb2JhbABFDgimDZEKIgEBCQ0KCBQnghgBAQQBbgsFCwslIUUSBiWHawMGBQQHsGkDiViLOYVXYAOWSYREjFM7 X-IronPort-AV: E=Sophos;i="4.77,524,1336341600"; d="scan'208";a="165614324" Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 04 Jul 2012 19:56:51 +0200 Received: from [172.16.1.4] (178-27-32-88-dynip.superkabel.de [178.27.32.88]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.in.tum.de (Postfix) with ESMTPSA id 29B532405E8; Wed, 4 Jul 2012 19:56:50 +0200 (CEST) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: =?iso-8859-1?Q?=22Markus_W=2E_Wei=DFmann=22?= In-Reply-To: Date: Wed, 4 Jul 2012 19:56:50 +0200 Cc: OCaml List Content-Transfer-Encoding: quoted-printable Message-Id: <91B9F38E-6553-42A5-AA63-F715983C3136@in.tum.de> References: To: Aaron Bohannon X-Mailer: Apple Mail (2.1278) Subject: Re: [Caml-list] ocaml top-level line editing script rlwrap? [1] Its probably already available through your favorite package ma= nger. -Markus [1] http://utopia.knoware.nl/~hlub/uck/rlwrap/ On 4 Jul 2012, at 19:06, Aaron Bohannon wrote: > Hi, >=20 > One thing that is missing from the OCaml top level loop is line > editing features. I used to use a wrapper program called "ledit" that > added readline support, but I never seem to have it installed on my > machine when I need it, and moreover, I have started to get used to > the more flexible line editing of zsh. >=20 > After some poking around, I found that it's fairly straightforward to > wrap any REPL with a zsh script and get zsh line editing capabilities, > which includes multi-line support (e.g., so you can fix a typo you > made three lines back). >=20 > I'm attaching the script I hacked together, in case it is useful to > anyone else. It works great for me, but it was not written to be > generic and robust, so YMMV. You must use ctrl-D to exit cleanly -- I > didn't bother adding support for "#quit". I'm sure someone could make > many improvements to it if they had more patience for zsh scripting > than I do. >=20 > - Aaron >=20 > --=20 > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >=20 > --=20 Markus Wei=DFmann, M.Sc. Technische Universit=E4t M=FCnchen Institut f=FCr Informatik Boltzmannstr. 3 D-85748 Garching Germany http://wwwknoll.in.tum.de/