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 4131C7ED34 for ; Thu, 5 Jul 2012 03:46:47 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of aaron678@gmail.com) identity=pra; client-ip=209.85.214.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="aaron678@gmail.com"; x-sender="aaron678@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of aaron678@gmail.com designates 209.85.214.182 as permitted sender) identity=mailfrom; client-ip=209.85.214.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="aaron678@gmail.com"; x-sender="aaron678@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f182.google.com) identity=helo; client-ip=209.85.214.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="aaron678@gmail.com"; x-sender="postmaster@mail-ob0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwBAIDx9E/RVda2kGdsb2JhbABFFqYKB5B7CCIBAQEBBwsNBxQEI4IYAQEBBBICLAEtCwEDDAEFBQsNDSEiEgEFAQoSBhMSEIdbAwsLmy8JA48UhTgnAwpKiH4BBQyLLYY+A5U3gRKNFD6BVIJG X-IronPort-AV: E=Sophos;i="4.77,526,1336341600"; d="scan'208";a="165643046" Received: from mail-ob0-f182.google.com ([209.85.214.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Jul 2012 03:46:46 +0200 Received: by obbun3 with SMTP id un3so22081746obb.27 for ; Wed, 04 Jul 2012 18:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=HVrr9KWVb4TK7Q9l7uQtXUetJtSpNPNiK4I1PFwtZCY=; b=kW+UXuICS93dD0tNf4DxzG0bXtWFmIkD7gVTJQ0TaO7goF1/IQZMppTMJHzrBPzo5q 46k5BEvRBqR4bakFepNPztS3xKQTO+RhdTwl3yh96EVOqYxvpR7WY1YxFPAGhx/jzPkv 62YXb7Kydz1PwDAvee8mrAp02/tzgboaYk9owC7CYzvv8wkbwVBmYlSoFnknD6p3qVwn CFdRuCbtL9Szr+FO5QrE3GnSCV7VOWQG4QktGRClYjal6wgpfMAWMOZvhVgZC2jw9VQi wb7cEbLptlptjpbRCzTBRagTFJPkPuBvWzrUVI7qQeeFkNeXj+dknkD9EMOFXvZQMhJ+ 2UrA== Received: by 10.182.207.106 with SMTP id lv10mr16336395obc.48.1341452805126; Wed, 04 Jul 2012 18:46:45 -0700 (PDT) MIME-Version: 1.0 Sender: aaron678@gmail.com Received: by 10.76.114.133 with HTTP; Wed, 4 Jul 2012 18:46:25 -0700 (PDT) In-Reply-To: <91B9F38E-6553-42A5-AA63-F715983C3136@in.tum.de> References: <91B9F38E-6553-42A5-AA63-F715983C3136@in.tum.de> From: Aaron Bohannon Date: Wed, 4 Jul 2012 21:46:25 -0400 X-Google-Sender-Auth: smIZRzWisws4pJzg3oSAPITgqCM Message-ID: To: =?ISO-8859-1?Q?Markus_W=2E_Wei=DFmann?= Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml top-level line editing script Ah. Thanks for the tip. I figured there must have been a more well-engineered way to do what I wanted to do.... - Aaron On Wed, Jul 4, 2012 at 1:56 PM, "Markus W. Wei=DFmann" wrote: > rlwrap? [1] Its probably already available through your favorite package = manger. > > > -Markus > > [1] http://utopia.knoware.nl/~hlub/uck/rlwrap/ > > On 4 Jul 2012, at 19:06, Aaron Bohannon wrote: > >> Hi, >> >> One thing that is missing from the OCaml top level loop is line >> editing features. =A0I 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. >> >> 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). >> >> I'm attaching the script I hacked together, in case it is useful to >> anyone else. =A0It works great for me, but it was not written to be >> generic and robust, so YMMV. =A0You must use ctrl-D to exit cleanly -- I >> didn't bother adding support for "#quit". =A0I'm sure someone could make >> many improvements to it if they had more patience for zsh scripting >> than I do. >> >> - Aaron >> >> -- >> Caml-list mailing list. =A0Subscription 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 >> >> > > -- > 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/ >