From: Roman Neuhauser <neuhauser@sigpipe.cz>
To: Akihiko Hohji <akhst7@me.com>
Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: newbie rm --^file question
Date: Tue, 27 Dec 2016 21:23:55 +0100 [thread overview]
Message-ID: <20161227202355.GD4330@isis.sigpipe.cz> (raw)
In-Reply-To: <4D563652-4349-4AEA-B92E-D5F0F1018C59@me.com>
# akhst7@me.com / 2016-12-25 18:02:16 -0500:
> Got it. Putting a space between â--â and â-â did it. I really
> appreciate your explanation of the different usage of the â--â
> argument for rm. I though it was specific to zsh like â^â.
"--" is a POSIX thing.
XCU 12.2 Utility Syntax Guidelines:
Guideline 10:
The first -- argument that is not an option-argument should be
accepted as a delimiter indicating the end of options. Any following
arguments should be treated as operands, even if they begin with the
'-' character.
(http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html)
XCU 1.4 Utility Description Defaults:
OPTIONS:
[...]
Default Behavior: When this section is listed as "None.", it means that
the implementation need not support any options. Standard utilities that
do not accept options, but that do accept operands, shall recognize "--"
as a first argument to be discarded.
The requirement for recognizing "--" is because conforming applications
need a way to shield their operands from any arbitrary options that the
implementation may provide as an extension. For example, if the standard
utility foo is listed as taking no options, and the application needed
to give it a pathname with a leading <hyphen-minus>, it could safely do
it as:
foo -- -myfile
and avoid any problems with -m used as an extension.
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap01.html#tag_17_04)
--
roman
prev parent reply other threads:[~2016-12-27 20:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-25 19:22 Hoji, Akihiko
2016-12-25 20:45 ` Gabor Maghera
2016-12-25 20:49 ` Hoji, Akihiko
2016-12-25 20:51 ` Gabor Maghera
2016-12-25 21:10 ` Bart Schaefer
2016-12-25 21:49 ` Akihiko Hohji
2016-12-25 22:47 ` Gabor Maghera
2016-12-25 23:02 ` Akihiko Hohji
2016-12-27 20:23 ` Roman Neuhauser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161227202355.GD4330@isis.sigpipe.cz \
--to=neuhauser@sigpipe.cz \
--cc=akhst7@me.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).