diff options
author | dana <dana@dana.is> | 2017-12-01 01:12:15 -0600 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-12-01 09:19:13 +0000 |
commit | 755f8571d49a07e85dc77d01f6ccb3944a3abdcb (patch) | |
tree | e6c6847a04ec463ce99bb6daacc8d6073f58b8b4 /Src | |
parent | 77a39b57bf467812b9219ae6a84f2f71e6a50065 (diff) | |
download | zsh-755f8571d49a07e85dc77d01f6ccb3944a3abdcb.tar.gz zsh-755f8571d49a07e85dc77d01f6ccb3944a3abdcb.tar.xz zsh-755f8571d49a07e85dc77d01f6ccb3944a3abdcb.zip |
42063: getopts errors now report "+" in front of option where appropriate
Diffstat (limited to 'Src')
-rw-r--r-- | Src/builtin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 0ff9e4f16..f002b9912 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5442,8 +5442,9 @@ bin_getopts(UNUSED(char *name), char **argv, UNUSED(Options ops), UNUSED(int fun if(quiet) { zoptarg = metafy(optbuf, lenoptbuf, META_DUP); } else { - zwarn(*p == '?' ? "bad option: -%c" : - "argument expected after -%c option", opch); + zwarn(*p == '?' ? "bad option: %c%c" : + "argument expected after %c%c option", + "?-+"[lenoptbuf], opch); zoptarg=ztrdup(""); } return 0; |