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

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



Sean <schliden@xxxxxxxxx> writes:

> The message fails to print and the shell hangs !

Could you post your entire script?


> On 7/24/06, Peter Stephenson <pws@xxxxxxx> wrote:
>> Sean wrote:
>> > On futher investigation, it appears that it is not actually choking on
>> > that line, rather this code which appears in many of the case option
>> > function calls:
>> >
>> > 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
>> > }
>>
>> Hmmm... again, that should work fine and does on my machine; the
>> shell isn't asked to do anything much beyond parsing a here document.
>> When you say "chokes", what do you mean?  Obviously calling the
>> function will cause the shell to exit, because of the "exit 1" at the
>> end ; is it failing to print the message, exiting in some odd way,
>> hanging...?  Or are you saying the options to the parent function (with
>> the getopts) are such that this function shouldn't be called?  In which
>> case, what combination of options to that function is causing unexpected
>> behaviour?  (I could believe getopts behaved differently from bash but I
>> need to see the command line being passed.)
>>
>> I'm guessing a lot of the spaces in that function were actually
>> tabs, but I've put those back and not had any problem.
>>
>> --
>> 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
>>
>

-- 
 Lloyd Zusman
 ljz@xxxxxxxxxx
 God bless you.



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