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

Re: [PATCH] Document echo \c behaviour



On 2017-01-10 at 03:52 +0000, Daniel Shahaf wrote:
> Thanks; I pushed the first hunk.  I didn't push the second one because
> I don't think it's required.  If you disagree then make your case ;-).

The behaviour is bug-ass crazy nuts and needs justification.  Every
other escape sequence is a character which is inserted; \c was always
a special case for "suppress the following newline", but "truncate
_everything_ else" from an _escape_ sequence is ... face-palm worthy.

It warrants explanation as to why it's so counter-intuitive.

> P.S. Overly-literal-reading corner: doesn't "All characters following...
> will be ignored" mean that «echo 'foo\cbar' 'baz' 'qux'» should be
> equivalent to «echo 'foo\cbar' '' ''»?  I.e., print «foo» followed by
> two trailing spaces?

Sounds right.  Take it up with the Austin Group.  I believe that Bart is
masochistic enough to pay attention in those arenas and might be willing
to raise it as a spec bug.

(I tried following AG for a while, and ran away)



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