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

Re: grammar triviality with '&&'

On 03/01/2015 07:53 PM, Kurtis Rader wrote:
How often would such a feature be useful? Very infrequently in my opinion. Furthermore, it is almost guaranteed to cause anyone reading the statement to wonder if the author made a mistake as the idiom is unlike anything else I can think of in Bourne style shells. I believe the benefits don't justify the costs of the feature.

Well, what would the costs be? It looks to me that the error is an arbitrary restriction and if it didn't break something I'd remove it even if for no other reason that that it is arbitrary. Of course if there were any complications, then it shouldn't be touched. Oh, and of course no one has to use it if they think it would ruffle anyone's feathers as far as tradition, but I'd use it for sure. Things should only be limited where it is necessary that they be limited. I'd not be surprised if the code was actually simpler, '&&' would just grab the errorlevel of the previous command as always and there'd just be one less error to handle.

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