Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG]builtin echo error doing arguments parsing
- X-seq: zsh-workers 42380
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: wumingxwk@xxxxxxxxx, zsh-workers@xxxxxxx
- Subject: Re: [BUG]builtin echo error doing arguments parsing
- Date: Thu, 22 Feb 2018 09:37:11 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180222093716euoutp01b87f5f91f76181a905b69b7156dff047~VnD01reR11772217722euoutp01S
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519292236; bh=gB/TFm8maT091nvzT6LkAy6JboQMkw+ys4BPuVWhuRc=; h=Date:From:To:Subject:In-reply-to:References:From; b=lr5U9SLVyagDua405pzEJYD/gVUk0/pPoVzoQvVtZiQd7o6Zne26ECoDt3nWPsPi/ TCwh8UI2uEvFsFBsHbsBOMLYv9zDoazQRFK0AsDaZM5NV5u06OC6edKjM58aujfQVV YmKSpSHapBKQA3ArNmvXhcPEZtCEPhSuBy2zwAts=
- In-reply-to: <CAGobuLee=R-FsgX=8XBg9Q2XHm17yLU6q3QzPWCiryCeTX7Kfg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20180222072350epcas2p3185ca17f5f0e3ad69b0a41dbf743f145@epcas2p3.samsung.com> <CAGobuLee=R-FsgX=8XBg9Q2XHm17yLU6q3QzPWCiryCeTX7Kfg@mail.gmail.com>
On Wed, 21 Feb 2018 23:23:09 -0800
wumingxwk@xxxxxxxxx wrote:
> if there is only a '-' as argument,builtin echo won't print it
It's entirely deliberate and documented, but you're quite right that it
plays merry hell with compatibility.
You might have thought it should at least be turned off in some or most
of the emulation modes...
pws
SHELL BUILTIN COMMANDS
...
All builtin commands other than precommand modifiers, even those that
have no options, can be given the argument `--' to terminate option
processing. This indicates that the following words are non-option
arguments, but is otherwise ignored. This is useful in cases where
arguments to the command may begin with `-'. For historical reasons,
most builtin commands also recognize a single `-' in a separate word
for this purpose; note that this is less standard and use of `--' is
recommended.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author