From 8cca44482481eb4a91d2cae60f9c207a296a7d50 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 5 Jun 2016 17:37:08 -0700 Subject: 38622: consistent handling of "--" in "kill" builtin --- ChangeLog | 5 +++++ Src/jobs.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 24d46a482..d79ebc235 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ +2016-06-05 Barton E. Schaefer + + * 38622: Src/jobs.c: consistent handling of "--" in "kill" builtin + 2016-06-04 Eric Cook + * 38547: Completion/compdump: only autoload functions when they exist in fpath. diff --git a/Src/jobs.c b/Src/jobs.c index 2a9dbe7d6..04cb6b344 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -2527,6 +2527,10 @@ bin_kill(char *nam, char **argv, UNUSED(Options ops), UNUSED(int func)) argv++; } + /* Discard the standard "-" and "--" option breaks */ + if (*argv && (*argv)[0] == '-' && (!(*argv)[1] || (*argv)[1] == '-')) + argv++; + if (!*argv) { zwarnnam(nam, "not enough arguments"); return 1; -- cgit 1.4.1