From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: compadd --
Date: Tue, 25 Oct 2011 09:04:45 -0700 [thread overview]
Message-ID: <111025090445.ZM1600@torch.brasslantern.com> (raw)
In-Reply-To: <j86h78$rcj$1@dough.gmane.org>
On Oct 25, 4:33pm, foudfou wrote:
}
} It looks like '-' and '--' don't have the same effect in compadd.
}
} For example, the following completion function produces "_systemctl_test:compadd:2: bad option: -.":
}
} _systemctl_test()
} {
} compadd -- -.mount boot.mount
} }
}
} Whereas it works well with '-'.
Hmm. This is a relatively new problem; here's zsh 4.2.0:
schaefer[505] compdef _systemctl_test foo
schaefer[506] foo <TAB>
-.mount boot.mount
Here's 4.3.12-dev-1 1.5473:
torch% foo
_systemctl_test:compadd:2: bad option: -.
The problem seems to be that the generic option parser has already
removed the "--" option before bin_compadd is even called, even though
the declaration
BUILTIN("compadd", 0, bin_compadd, 0, -1, 0, NULL, NULL)
says that compadd is going to do all its own option parsing.
This probably affects some other builtins as well.
next prev parent reply other threads:[~2011-10-25 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 14:33 foudfou
2011-10-25 16:04 ` Bart Schaefer [this message]
2011-10-25 16:29 ` Peter Stephenson
2011-10-26 2:44 ` Bart Schaefer
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=111025090445.ZM1600@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@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).