Date: Thu, 3 May 2001 15:31:15 +0200 From: Nicolas GEORGE To: Sven LUTHER Cc: lablgtk at kaba.or.jp Subject: Re: lablgtk and pipes ... Message-ID: <20010503153115.A9616 at clipper.ens.fr> References: <20010503150545.A10308 at lambda.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20010503150545.A10308 at lambda.u-strasbg.fr>; from luther at dpt-info.u-strasbg.fr on Thu, May 03, 2001 at 03:05:45PM +0200 Le quartidi 14 floréal, an CCIX, Sven LUTHER a écrit : > $ gunzip -c testgtk.ml.gz | lablgtk -labels Here, the toplevel is in interactive mode, so it requires the ;; before it runs the statements. { gunzip -c testgtk.ml.gz; echo ';;' } | lablgtk -labels should work (depending on your shell) but there are dirty things on stdout. > $ gunzip -c testgtk.ml.gz | lablgtk -labels - The OCaml toplevel does not recognize - to be stdin. gunzip -c testgtk.ml.gz | lablgtk -labels /dev/fd/0 should work, but it is very dirty. It is also possible to submit a feature wish/patch to the development team : in toplevel/toploop.ml, let filename = find_in_path !Config.load_path name in let ic = open_in_bin filename in could become let (filename, ic) = if name = "-" then (name, stdin) else let filename = find_in_path !Config.load_path name in (filename, open_in_bin_filename) in But this may cause lots of problems (if the script uses stdin, or if the user tries tu #use "-" when he is already using stdin).