From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 04229cbc for ; Sun, 12 Jan 2020 22:30:51 +0000 (UTC) Received: (qmail 2617 invoked by alias); 12 Jan 2020 22:30:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45289 Received: (qmail 4671 invoked by uid 1010); 12 Jan 2020 22:30:11 -0000 X-Qmail-Scanner-Diagnostics: from wout1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25691. spamassassin: 3.4.2. Clear:RC:0(64.147.123.24):SA:0(-1.9/5.0):. Processed in 3.114371 secs); 12 Jan 2020 22:30:11 -0000 X-Envelope-From: danielsh@apache.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: softfail (ns1.primenet.com.au: transitioning SPF record at amazonses.com does not designate 64.147.123.24 as permitted sender) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdeiledgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfeguddtqddvjeculdegtddmnecujfgurhephf fvufffkffojghfgggtgfesthekredtredtjeenucfhrhhomhepffgrnhhivghlucfuhhgr hhgrfhcuoegurghnihgvlhhshhesrghprggthhgvrdhorhhgqeenucfkphepjeelrdduke dtrdehjedrudduleenucfrrghrrghmpehmrghilhhfrhhomhepuggrnhhivghlshhhsegr phgrtghhvgdrohhrghenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH 3/3] _git: Complete --contains after -r (--remotes). Date: Sun, 12 Jan 2020 22:29:28 +0000 Message-Id: <20200112222928.25546-3-danielsh@apache.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200112222928.25546-1-danielsh@apache.org> References: <20200112222928.25546-1-danielsh@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- This one I'm not so sure about. I wanted to make «git branch -r --cont» complete the option name and arguments to it, and that part works, but the way in which those single-letter variable names are used in the _arguments specs is pretty undecipherable. Does this patch seem obviously right, or obviously wrong, to anyone? If not, I'll test it for a while and commit it to the 5.9 branch if I don't find any obvious showstopper. (But I don't use «git branch» that frequently, so perhaps it'll be better if I committed this to 5.9 directly…?) Cheers, Daniel Completion/Unix/Command/_git | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 8e0d57789..d503b1134 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -282,9 +282,13 @@ _git-bisect () { _git-branch () { declare l c m d e + # listing branches - l='--color --no-color -r --remotes -a -v --verbose --abbrev --no-abbrev -l --list --points-at --sort' + l='--color --no-color -r --remotes -a -v --verbose --abbrev --no-abbrev -l --list --points-at --sort --contains --no-contains' + # creating branches - c='--create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --contains --no-contains --merged --no-merged' + c='--create-reflog -f --force -t --track --no-track -u --set-upstream --set-upstream-to --unset-upstream --merged --no-merged' + # modifying branches m='-c --copy -C -m --move -M --edit-description --show-current' + # deleting branches d='-d --delete -D' declare -a dependent_creation_args