Re: shift "fatal error"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> That may have been the intention (considering that it matches the real
> Bourne shell in addition to various flavours of Korn shell), but that is
> not how I would interpret it. A too high shift count still seems
> syntactically valid to me.

After reading the other part of the spec (about syntax errors in
utilities), I reached the conclusion that dash has just enough excuses
in the spec and in history to behave as it currently does -- so
presumably nothing will change (especially since the current behavior
*reduces* usability).

> A statement about the exit status in a particular error situation also
> usually indicates that the shell shall not abort.

Yes, that was the main point, but it's true that specs can be
self-contradictory.

> Examples of shift commands that I think shall cause the shell to abort:
> shift -S  # unless a -S option is supported as an extension
> shift x   # unless arithmetic expressions are accepted as an extension
> shift @   # unless there is some strange extension

That's how I would have thought any reasonable person would interpret
the blurb about syntax errors in special built-ins, but apparently
there are other ways to see it, rooted in historical precedent even.

-- Dan
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux