From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22667 invoked by alias); 19 May 2015 06:27:59 -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: X-Seq: 35211 Received: (qmail 16960 invoked from network); 19 May 2015 06:27:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= x-mailer:message-id:date:date:subject:subject:from:from:received :received:received; s=postfix2; t=1432016876; bh=WlJJ9y8ZxAP6eG7 M2sVJB+o3Sv7hOdQSW/ThEC+OyM4=; b=iA7Hkm+ReRtRvc+YlMHodI+tHV5zXbn G8dXG/RB7uxppEK74JwYCbiw4BUxIqY2oIk168yqZM61EHJ9Zh+vjV4JJpDLptVE luRjUeYLb2UwYsRKpv0Ttp3ApQt7OzyLnCWiSa5whDX6jpORZia3Uo78AJ5VDJGg NwhJlvu3xcvQ= From: Daniel Hahler To: zsh-workers@zsh.org Subject: [PATCH] __git_commit_objects: do not use _guard, but a pattern Date: Tue, 19 May 2015 08:27:53 +0200 Message-Id: <1432016873-8187-1-git-send-email-genml+zsh-workers@thequod.de> X-Mailer: git-send-email 2.4.0.dirty From: Daniel Hahler With using `_guard` there like it's been done, the completion could not be selected, probably because of the call to `_message` there. This changes it to use only the logic/check from `_guard` that we want here. --- Completion/Unix/Command/_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a0ec343..fb9cae1 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5657,7 +5657,7 @@ __git_commit_objects () { declare -a commits # Abort if the argument does not match a commit hash (including empty). - _guard '[[:xdigit:]](#c,40)' || return 1 + [[ "$PREFIX$SUFFIX" == [[:xdigit:]](#c1,40) ]] || return 1 # Note: the after-the-colon part must be unique across the entire array; # see workers/34768 -- 2.4.0.dirty