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

Re: Attempt to document aliasing more fully



On Sat, 14 Mar 2015 13:54:06 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> So here is what I have (see diff below).  This describes the situation
> prior to workers/34641.  To keep 34641, we'd just have to add another
> itemiz() calling out command separators as a separate class of "word",
> though I still think that if included, those should (a) still exclude
> newline and (b) require "alias -g".

Thanks, that looks reasonable.  I'd sort of vaguely be inclined to point
out a bit more actively that if you're aliasing quoted stuff the quotes
form part of the alias (which is kind of weird if your use to shells written by normal people) and maybe hint what therefore doesn't get aliased (though I entirely agree with the basic logic, i.e. spelling out what does), but that's very minor.

I've got no very strong feelings about keeping the new feature since
it's been the way it has for decades and it only got noticed as a side
issue.  However, the limitations above sound sane, since using "alias
-g" is already for hotheads, so maybe that's a good compromise.

> Either way I rather suspect that POSIX_ALIASES should prohibit more
> than just the reserved words, e.g., I doubt that parameter references
> and quoted strings are meant to be allowed in aliases by POSIX.  That
> should get fixed, along with the bug(s) mentioned in 34668 and 34682.

Yes, I agree with that.

pws



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