From patchwork Tue Oct 6 22:06:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Karszniewicz X-Patchwork-Id: 11819299 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AB8713B2 for ; Tue, 6 Oct 2020 22:07:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D7145208C3 for ; Tue, 6 Oct 2020 22:06:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="GcKMmJtP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbgJFWG4 (ORCPT ); Tue, 6 Oct 2020 18:06:56 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43588 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgJFWG4 (ORCPT ); Tue, 6 Oct 2020 18:06:56 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 30BBB16005C for ; Wed, 7 Oct 2020 00:06:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1602022014; bh=0aXwF90O6LTDKd/nksGD6DluXj7JFY2UgyG9JpxlnBM=; h=From:To:Subject:Date:From; b=GcKMmJtPO0MRdP1H6BWY+fVv1JJwj2st9VhubH1HepE/PIt1ATaKIDT7gHSicIWEp /HRheRFODX1VAIyE4UTNWZlVmE5EnvP23Mh+vlgbD4SOlB0C66WjJ3eawQFMuR8XPU 0sy567z2n04ZNEuKsjOtYHBhqe59KTGHfnPs2YHm28jUiGRARzVEyBORSj631YRgZY /nEG3/5/RzQZtbEzmPGnCaozI9pRasRwmeLh3NvzR5Gb7cOkexk+kPi5pxuD+YzR2a PVFE5UDA8LHxh58B2OlZC/S5uxa/WCesFxd9hCrJ6I+MHn1vSLNtbbaKjwXrF3sFG7 MlyhYMn/lweBg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C5Wld4jBbz6tm5 for ; Wed, 7 Oct 2020 00:06:53 +0200 (CEST) From: Robert Karszniewicz To: git@vger.kernel.org Subject: [PATCH 1/2] git-completion.bash: __git_diff_common_options: add --[no-]patch Date: Wed, 7 Oct 2020 00:06:36 +0200 Message-Id: <20201006220637.28139-1-avoidr@posteo.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org At the same time also deduplicate those options from command completions which use $__git_diff_common_options. Signed-off-by: Robert Karszniewicz --- contrib/completion/git-completion.bash | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0a96ad87e7..f363554996 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1688,6 +1688,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary --submodule --submodule= --ignore-submodules --indent-heuristic --no-indent-heuristic --textconv --no-textconv + --patch --no-patch " _git_diff () @@ -2031,11 +2032,9 @@ _git_log () --no-walk --no-walk= --do-walk --parents --children --expand-tabs --expand-tabs= --no-expand-tabs - --patch $merge $__git_diff_common_options --pickaxe-all --pickaxe-regex - --patch --no-patch " return ;; @@ -2938,7 +2937,7 @@ _git_show () ;; --*) __gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit - --oneline --show-signature --patch + --oneline --show-signature --expand-tabs --expand-tabs= --no-expand-tabs $__git_diff_common_options " From patchwork Tue Oct 6 22:06:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Karszniewicz X-Patchwork-Id: 11819301 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA7C213B2 for ; Tue, 6 Oct 2020 22:07:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B066C208B8 for ; Tue, 6 Oct 2020 22:07:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=posteo.de header.i=@posteo.de header.b="YGIuR/1X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbgJFWHB (ORCPT ); Tue, 6 Oct 2020 18:07:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]:42441 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgJFWHB (ORCPT ); Tue, 6 Oct 2020 18:07:01 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id EC13716005F for ; Wed, 7 Oct 2020 00:06:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1602022020; bh=Nv+Loi+P+VsnJl8raISMfWBdB4HY2n4tVLAYyUVec8A=; h=From:To:Subject:Date:From; b=YGIuR/1X49iE2i+cOK0yt5stS3e3JbeHHGVUrKeEIjohPHmJlkpa6PFcTC8c5ajss zb96SLzyTwMgOwNdiam0alojgXaM3NHbNaI10vgXk5K05PGBePNgmxOoVI2togfSkI vGcuX1Mek8bsFl5tk4j0L89/zWghzo6bOVvzt/SnlPn9cAK6UmMU2UCVQKIjo0ya9e ZcNxeU8S6bTWNJSlIvARkwAweFo1xFtyI5ZTe4FB5SrPZqv6Q0aLgESq7L0y3HEP7B eK1Scbsf+UaVNNoDBJcV1IYhYO7BgwaKCzP1MqDhwUkpiYrfbGxHShu/HRkTVk6wD3 ZjFxH6IwVvmgQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C5Wll42sHz6tm8 for ; Wed, 7 Oct 2020 00:06:59 +0200 (CEST) From: Robert Karszniewicz To: git@vger.kernel.org Subject: [PATCH 2/2] git-completion.bash: stash-show: complete $__git_diff_common_options Date: Wed, 7 Oct 2020 00:06:37 +0200 Message-Id: <20201006220637.28139-2-avoidr@posteo.de> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201006220637.28139-1-avoidr@posteo.de> References: <20201006220637.28139-1-avoidr@posteo.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Robert Karszniewicz --- contrib/completion/git-completion.bash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index f363554996..83bc64607b 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3020,7 +3020,10 @@ _git_stash () list,--*) __gitcomp "--name-status --oneline --patch-with-stat" ;; - show,--*|branch,--*) + show,--*) + __gitcomp "$__git_diff_common_options" + ;; + branch,--*) ;; branch,*) if [ $cword -eq 3 ]; then