Date:        Wed, 9 Jan 2019 05:57:35 +0000 (UTC)
    From:        Shware Systems <shwares...@aol.com>
    Message-ID:  <1198029183.8548140.1547013455...@mail.yahoo.com>

  | Yes, the uses that were discussed are corner cases, but the consensus was,
  | and pretty strongly, not having it would lead to data loss with some 
operators

I am confused, the comment of mine was related to whether if the final
space in an alias definition is quoted, that would mean that the following
word would (or would not) be a target for alias expansion.    I fail to see
how any operators could be affected in any way at all by this - operators
are never alias expanded.

Further, if a shell wants a literal (ie: quoted) space to end a built in alias,
(or if a user wants to define an alias like that) and does not desire that the
next word be subject to alias expansion, all that is needed is to define it
like
        alias foo="whatever ' '"
and then the last character is not a space (it is a single quote) so no
alias expansion of the next word happens.

Expressly making it defined that
        alias foo='whatever \ '
which does end in a space (but otherwise is the exact same thing as
the previous one) also does not expand aliases in the following word
seems redundant to me.   Since several shells (but not all) do expand
aliases in this case, it seems to me the best thing to do is to leave
this as unspecified, such that no-one sane will ever use it (if something
is needed, just use the previous form -- but better is not to use aliases
at all.)

If anyone knows of anything real (specific, not just a rumour that there
might be something) then this would break, now would be the time to
reveal it.

kre

Reply via email to