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

Re: Issue with string slices



On Mon, 2019-06-17 at 08:36 +0000, joão marcos pereira bezerra wrote:
> Zsh is not printing the character "-"

With echo, you mean --- I don't think this has got anything to do
with string slices.

Correct, this is documented as very long-standing behaviour.

       Note that for standards compliance a double dash does not termi-
       nate option processing; instead, it is printed  directly.   How-
       ever,  a  single  dash  does terminate option processing, so the
       first dash, possibly following  options,  is  not  printed,  but
       everything  following  it is printed as an argument.  The single
       dash behaviour is different from other shells.  For a more  por-
       table  way of printing text, see printf, and for a more control-
       lable way of printing text within zsh, see print.

pws



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