Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: parse error in process substitution



On Mon, 10 Nov 2008 14:28:50 +0000
Peter Stephenson <pws@xxxxxxx> wrote:
> On Mon, 10 Nov 2008 09:21:52 +0100
> Louis-David Mitterrand <vindex+lists-zsh-users@xxxxxxxxxxx> wrote:
> > So how would you convert that working bash command to zsh?
> > 
> > 	root-tail <(ssh root@xxxxxxxxxxxx tail -F /var/log/kern.log),red,
>...
> It would be good to fix the underlying problem; it will work a little
> differently from the way it is now, but that's so confusing if the <(...)
> isn't in a separate word that I don't think there's a good reason to keep
> it.

(Moved to zsh-workers.)

I'm working on that elsewhere.  Just to make quite sure I don't screw up
parsing of ordinary redirections in the process here's an extra test.
The fiddly bit is ensuring that normal redirection operators don't
require a space before them but are still parsed as a separate word.

Index: Test/A04redirect.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/A04redirect.ztst,v
retrieving revision 1.13
diff -u -r1.13 A04redirect.ztst
--- Test/A04redirect.ztst	14 Mar 2008 11:40:59 -0000	1.13
+++ Test/A04redirect.ztst	12 Nov 2008 10:48:03 -0000
@@ -344,3 +344,21 @@
 0:Optimised here-string to filename
 >This string has been replaced
 >by a file containing it.
+
+  print This f$'\x69'le contains d$'\x61'ta. >redirfile
+  print redirection:
+  cat<redirfile>outfile
+  print output:
+  cat outfile
+  print append:
+  cat>>outfile<redirfile
+  print more output:
+  cat outfile
+0:Parsing of redirection operators (no space required before operators)
+>redirection:
+>output:
+>This file contains data.
+>append:
+>more output:
+>This file contains data.
+>This file contains data.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author