zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: Glob problem
Date: Wed, 23 Oct 2013 14:47:00 +0100	[thread overview]
Message-ID: <20131023144700.43a7849a@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <91F9ED9F-B198-403B-9FE1-FF40DE960C1C@gmail.com>

On Wed, 23 Oct 2013 08:27:22 -0400
Brent Briggs <brent.briggs@gmail.com> wrote:
> This did the job. I still have one question. I can't find any
> documentation for the "--" option. What does it do exactly?

It's documented for shell invocation in the zsh manual page, but I don't
see anything about option handling for builtins.  There probably should
be something.  Some of the regulars can tell me if the following looks
right.

diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index 1d9fe68..e9fc7bf 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -28,6 +28,33 @@ See ifzman(the section `Zle Builtins' in zmanref(zshzle))\
 ifnzman(noderef(Zle Builtins)).
 )\
 )\
+
+Some shell builtin commands take options as given in invidiual entries.
+Typically options are single letters preceded by a hyphen (tt(-)).
+Options that take an argument accept it either immediately following the
+option letter or after white space, for example `tt(print -C3 *)' or
+`tt(print -C 3 *)' are equivalent.  Arguments to options are not the
+same as arguments to the command; the documentation indicates which is
+which.  Options that do not take an argument may be combined in a single
+word, for example `tt(print -ca *)' and `tt(print -c -a *)' are
+equivalent.
+
+Some shell builtin commands also take options that begin with `tt(+)'
+instead of `tt(-)'.  These commands are indicated in the list below.
+
+Options must appear in a group before any non-option arguments;
+once the first non-option argument has been found, option processing is
+terminated.
+
+All builtin commands other than precommand modifiers, even those that
+have no options, can be given the argument `tt(--)' 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 `tt(-)'.  For historical
+reasons, most builtin commands also recognize a single `tt(-)' in a
+separate word for this purpose; note that this is less standard and
+use of `tt(--) is recommended.
+
 startitem()
 prefix(-)
 findex(.)

pws


  parent reply	other threads:[~2013-10-23 13:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 16:45 Brent Briggs
2013-10-22 16:58 ` Jérémie Roquet
2013-10-22 16:59 ` Peter Stephenson
2013-10-22 17:05 ` Philippe Troin
2013-10-22 18:02   ` Brent Briggs
2013-10-22 18:12     ` Peter Miller
2013-10-22 18:49       ` Brent Briggs
2013-10-22 19:30         ` Peter Miller
2013-10-22 20:11         ` Yuya Amemiya
2013-10-23 12:27           ` Brent Briggs
2013-10-23 12:37             ` Jérémie Roquet
2013-10-23 13:47             ` Peter Stephenson [this message]
2013-10-23 14:29             ` Yuya Amemiya
2013-10-22 17:11 ` Matt Garriott

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=20131023144700.43a7849a@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).