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

Re: Does zsh have an equivalent to the shopt command ?



Sean wrote:
> I can run sed from the command line ok, and all of the other sed stuff
> in the script works.
> 
> It seems to be something to do with processing these text blocks:
> 
> <<EndVersion
> EndVersion

I have no idea what could be causing that and it doesn't happen on
anyway of the Cygwin versions I've tried.

Is it still the case that

>I am running the windows port of zsh (ver 3.0.5) supplied with unixkit-tiny.

?  I suspect there might be something wrong with this port.  (3.0.5 is
now rather old, but I still don't remember any problem of this kind
in any version I've seen.)

If you don't mind exploring other avenues, you can change

version() { sed -e 's/^	//' <<EndVersion
	TODO.TXT Manager
	Version 1.6.3
	Author:  Gina Trapani (ginatrapani@xxxxxxxxx)
	Release date:  5/11/2006
	Last updated:  7/6/2006
	License:  GPL, http://www.gnu.org/copyleft/gpl.html
	More information and mailing list at http://todotxt.com
EndVersion
    exit 1
}

to

version() { sed -e 's/^	//' <<<"\
	TODO.TXT Manager
	Version 1.6.3
	Author:  Gina Trapani (ginatrapani@xxxxxxxxx)
	Release date:  5/11/2006
	Last updated:  7/6/2006
	License:  GPL, http://www.gnu.org/copyleft/gpl.html
	More information and mailing list at http://todotxt.com";
    exit 1
}

This ought to work, since it relies on basic shell parsing rather
than a special chunk of I/O.  Note, however, that it's non-standard.

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


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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