From patchwork Wed Oct 28 02:06:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D32DDC4363A for ; Wed, 28 Oct 2020 23:46:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B6BD207CD for ; Wed, 28 Oct 2020 23:46:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jnQNrHvP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730640AbgJ1Xp7 (ORCPT ); Wed, 28 Oct 2020 19:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728405AbgJ1Xp6 (ORCPT ); Wed, 28 Oct 2020 19:45:58 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD22C0613CF for ; Wed, 28 Oct 2020 16:45:58 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id y186so1435625oia.3 for ; Wed, 28 Oct 2020 16:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nZ+FG+1Hi7umcZDm3yFJ7TGD+Ohtdv4wbLuBKS06dO8=; b=jnQNrHvP94Lu0jRVFUlFMXVK9GIMsKjEzcftwcy6vLlu9Pbh41IBrm98Xj1tTsbM2H dNeKlFqC5orB80BCK4pIcnot0HBFunMzYVDIC9b7gCDG10k2McPUE6oN1FC74bTjp+ow 6D5iS+1/yhUYtFU2kvlxqejCzn/Set0GimnL1+4/B5uXeC+j4iff7Q7YaNP9eEfnl7mR O+KgoAfvRBLvCt3D1Dt6k4aIKJZX46IqZttVjcfH2qWY5g14+kQKDhNUPZXjrP+moIH9 DkX0mJEBCqvHRXP9/GFUB8ZZzqFZc+JMZkwv+WxK4pykSvo7gaBUTJhHB0dPGLnWYauT VyuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nZ+FG+1Hi7umcZDm3yFJ7TGD+Ohtdv4wbLuBKS06dO8=; b=PxXrXT3NdSQ/dAw9eEvYPPXh9sMn3TQkV9MV+3WQGQc6qmaBI2smIEF9kDuS4jugdz 0HhLmrxuadS6hkVWkvQQ3iTbEzSYlLxzkRMTx+p57BJBiR5WKgmJhoTCG9Gjhglj1LMc I7hhzwswKkNT+LcThBOGwDJPvK55xF/DpUCQQ0z7UdPnin0fB2QVNysNpGoJXM2UcVTG DvjSQR9W97xhOXNFXsAzcKwEViADhfoqh7L0H6ikolPrJFm6i0XVVS1/UZTjD8AR1t6e TKMenQdM57tvyAbze9a97eO98yCKtVPGkQc/RbKQQZibaiIBSXidcxpe5z6yduWRU86n KiOg== X-Gm-Message-State: AOAM533csyfCUpb//e1SQT4wiyH0GXv3WbigIpLePP2MRk6ReimOt/A7 36Jh19scZk4+twAC7MiWn0yV5kE2tWWsjX52 X-Google-Smtp-Source: ABdhPJxTGCrDrPejK22/xx2HJX+dnm7b9kpxdO8rihkrNOLs0kx9wjNGcuuCGM5SPWXfl3u/PAT7cg== X-Received: by 2002:aca:b1c2:: with SMTP id a185mr3655547oif.83.1603850836230; Tue, 27 Oct 2020 19:07:16 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id m6sm1871353otm.76.2020.10.27.19.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:15 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 01/29] completion: zsh: fix __gitcomp_direct() Date: Tue, 27 Oct 2020 20:06:44 -0600 Message-Id: <20201028020712.442623-2-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Many callers append a space suffix, but zsh automatically appends a space, making the completion add two spaces, for example: git log ma Will complete 'master '. Let's remove that extra space. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 2 +- contrib/completion/git-completion.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 0a96ad87e7..ec7dd12a41 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3498,7 +3498,7 @@ if [[ -n ${ZSH_VERSION-} ]] && local IFS=$'\n' compset -P '*[=:]' - compadd -Q -- ${=1} && _ret=0 + compadd -Q -- ${${=1}% } && _ret=0 } __gitcomp_nl () diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index ce47e86b60..2cefae943a 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -74,7 +74,7 @@ __gitcomp_direct () local IFS=$'\n' compset -P '*[=:]' - compadd -Q -- ${=1} && _ret=0 + compadd -Q -- ${${=1}% } && _ret=0 } __gitcomp_nl () From patchwork Wed Oct 28 02:06:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90EFEC388F7 for ; Wed, 28 Oct 2020 23:23:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A3AC207BC for ; Wed, 28 Oct 2020 23:23:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o8Ko7Ypv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390288AbgJ1XXZ (ORCPT ); Wed, 28 Oct 2020 19:23:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388357AbgJ1XWg (ORCPT ); Wed, 28 Oct 2020 19:22:36 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92622C0613CF for ; Wed, 28 Oct 2020 16:22:36 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id k27so1337407oij.11 for ; Wed, 28 Oct 2020 16:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gtKsqvBSqtI3+LgcFhs5y8i9t+eI5b5AGedx/7CvjVw=; b=o8Ko7YpvjlCKOldpT6eaq8JhG2stBUGdZ7MI9k7PaPUYt3ORV+1Kt3IRg+uGhpvljr IPEKSHz0GuEbUYgjRsewByTvrV/Lolly7dNhRFPSSqs7beELrW7MWSu5/xvgWgFn/pDJ UWnf5BQ2M2+rj1uKb62DcYwWt9NBjXR3WUX5tZQKdKNeEe1rrmZHgQgucZ+2Z52yCOTR t9Yzo9QETRh2Be/6lYW4gAgug1uRcPaj9uF3BVktg0v1q90DyACAIol0ZJF8cdhRMxWq jiJyX3OcJByHoWRIVMD58uX+ZqSURYNzBJ82Lq4q2QX2rpALnEcwM/cO+GCF6UQstQR0 n8tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gtKsqvBSqtI3+LgcFhs5y8i9t+eI5b5AGedx/7CvjVw=; b=dGxksJXynTwcyn2bSRbQ63F5r/S7SIQtnNQ1yfnAFqRkskw7hQafO4A9WubyxotpWn IPpoteFhlJ/Cuf9/jo/JIWWX5xehysd4IPcZKNXDna77DLAJYvWp2pkMJAmax7jrpcet 44SCfmGPwOPjkPBaLw47xaJy8PvDTuY+zWOksatUG4qoFEt0LHrTgVPIbNAWCPlB1BN8 HB96ztQD+ck57/h6Pp7Nsp7S4PSEXuC5lXDKk/mmuB4Xzz9mX3idgjV7xKLMx9hzlwYY ORUSU1yHHXFo9TtNRh6D09fNdGtGJIjLnSRsimb4KhasBMe94Pu48HSez0ed44oAgIIj gT8g== X-Gm-Message-State: AOAM533mCb51UKpHQR1GU82gB9BFctF4F4Wjxf2tHbA5q53I3BP0okvv tm+fyM+Bk6SvAl0BKsi31ZOjU3/KYWArveg0 X-Google-Smtp-Source: ABdhPJwHXHLMQcZHFDtMCgfvXYXqObCOoawl2bFryzu/NMuepw8mU1vC3AilBPld8XdBaSN+sFhLgA== X-Received: by 2002:aca:7210:: with SMTP id p16mr3706762oic.77.1603850838067; Tue, 27 Oct 2020 19:07:18 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id f13sm2159651oij.0.2020.10.27.19.07.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:17 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras , Maxim Belsky , Johannes Schindelin Subject: [PATCH v3 02/29] completion: zsh: fix name due to broken autoloading Date: Tue, 27 Oct 2020 20:06:45 -0600 Message-Id: <20201028020712.442623-3-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Commit 176f5adfdb wrongly changed the installation path to '~/.zsh/git-completion.zsh', this ensures the script is not automatically loaded. The whole point of adding the script to the fpath variable is that it's autoloaded after typing 'git', which won't happen unless it's named _git. I've changed the wording so it's crystal clear the name of the file *must* be '_git'. http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Autoloaded-files Cc: Maxim Belsky Cc: Johannes Schindelin Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 2cefae943a..6d451355fd 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -11,9 +11,11 @@ # # zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh # -# The recommended way to install this script is to make a copy of it in -# ~/.zsh/ directory as ~/.zsh/git-completion.zsh and then add the following -# to your ~/.zshrc file: +# The recommended way to install this script is to make a copy of it as a +# file named '_git' inside any directory in your fpath. +# +# For example, create a directory '~/.zsh/', copy this file to '~/.zsh/_git', +# and then add the following to your ~/.zshrc file: # # fpath=(~/.zsh $fpath) From patchwork Wed Oct 28 02:06:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B44AC388F7 for ; Thu, 29 Oct 2020 00:09:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB0CA20754 for ; Thu, 29 Oct 2020 00:09:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AOyq1H67" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732298AbgJ2AJj (ORCPT ); Wed, 28 Oct 2020 20:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbgJ2AIb (ORCPT ); Wed, 28 Oct 2020 20:08:31 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E06C0613CF for ; Wed, 28 Oct 2020 17:08:31 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id j7so1435887oie.12 for ; Wed, 28 Oct 2020 17:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jaitsVdltlfxnCrmXDrXV4Fy/0lAltTGxZvgLb+i2SI=; b=AOyq1H67MsnVi7uvdhGy5nzKb5kit36g1JEyraL3IVlK5QQt1ElMT/fAGpWhsgC7uC 7Qg+a83wqvx/VK+IY9wg+cx3bNmaPUa+5DHiMxpol9z5liKuA58xS3q1TYHZ0f8Tl8YY kItiOk5shIrpoPFdze7w3aYU4voLm08JCwhweBU9JgFERkqelKyyWvegDPy8efUP1l4q D/KaDPz+ysMkiwHR2s07g2r8Iw487f3k+SfjTuUz92ENTSswjoMEYbCaFNyjYdxmiuvx Hr0QjrY+7Fr7bWEIn0BOg3bWX3LTIS1V2ACXWIq4Fzpy5jJWrrPvSzf7qIK0X7t/8wTK qiIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jaitsVdltlfxnCrmXDrXV4Fy/0lAltTGxZvgLb+i2SI=; b=jD7DhLY1uODM+1AdGFdOb1/Vj9oIQ8d0mfZUpsA31Kmtj8JXmjJsao7Rq6TFKubhXZ PwIVBb1C1vIXuUrY8IIHUP2XGgzIV9pmepe8+dlIyk4D1AmJ7JcTsLqIdbIQEdlFZsJv WRWQd+9W9INm4buhSrzi5neleAq7XE7rpKfal/74UN0TO8iQbIwYEvCGy29d6zpowGzN ITQ4e6DRSamtLWjxZwt6g3ER1YAexTwYjqSg7gTWTwbtT03ImkXZ051xMOEsCH2N/Xr8 8Xyp5+oZKgmf822/9Wd5EklJuFrizjIzsPA0L2N55djYBJiWYy1PQHvzibIeX6eA0YEm jyRg== X-Gm-Message-State: AOAM531pga0HCsgxfHq3tYwzaS0nBBTHbU3Ia7iq6Qx2sQZv81S+TRgE hl9IpS0p4oEE2lPmLw2vrnzcFD0Z+w3shK3b X-Google-Smtp-Source: ABdhPJx95jsQlS6jf8iaAemrdhlfjLw/Iexx4XPKhoKvQaRIWtxHKdAkN8qSDid2ghbC7cVK0qduWg== X-Received: by 2002:aca:5090:: with SMTP id e138mr3428844oib.37.1603850839747; Tue, 27 Oct 2020 19:07:19 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id q139sm2324218oic.38.2020.10.27.19.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:19 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras , Peter van der Does Subject: [PATCH v3 03/29] completion: zsh: fix bash script extension Date: Tue, 27 Oct 2020 20:06:46 -0600 Message-Id: <20201028020712.442623-4-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Commit 0e5ed7cca3 wrongly changed the extension of the bash script to .zsh; the zstyle configuration is for the slave script (bash), not the master one (zsh). For example it could be: zstyle ':completion:*:*:git:*' script ~/.git-completion.bash The extension doesn't really matter, but it confuses people into thinking it's a zsh script; it's not. Cc: Peter van der Does Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 6d451355fd..712ce2f4d1 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -9,7 +9,7 @@ # # If your script is somewhere else, you can configure it on your ~/.zshrc: # -# zstyle ':completion:*:*:git:*' script ~/.git-completion.zsh +# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash # # The recommended way to install this script is to make a copy of it as a # file named '_git' inside any directory in your fpath. From patchwork Wed Oct 28 02:06:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 585D1C4363A for ; Thu, 29 Oct 2020 01:17:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D518120731 for ; Thu, 29 Oct 2020 01:17:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="abNWlI+X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730980AbgJ2BPs (ORCPT ); Wed, 28 Oct 2020 21:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730069AbgJ2BOj (ORCPT ); Wed, 28 Oct 2020 21:14:39 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AE6BC0613CF for ; Wed, 28 Oct 2020 18:14:38 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id y186so1623955oia.3 for ; Wed, 28 Oct 2020 18:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dv52nRheChDNGKOvMtjbP5h01dKNuSVIXNv1lknaF+M=; b=abNWlI+XGzx7eldP3N03LUqwEt0Q30TvF7a/UE0w8NPWgSEl0TyXqqN0WN62UXA3fz dBHcuVrlL2mbwvPLopTfyqnGGrkEZFxNh2BB0Ka9M+zjyxnPhI5/JNokvpL8GsEJ0yeJ A0MRYmHbh/8sM60FrTuDAIz8ROHyk3vFxiHd4d9Iebm3c/vesQFO1GRmh5r3BnE7PPhH rTuDJAZB0Max5JtfpDAt6qfoJYp97RYxO6dVwDvMmjtMh/FewuCVGugqZ7XLfVyiZR1b UQx25ZoQul5IwjyjD+Swo5jFPT7W3+2JYh9t3TNOFyMV3aEmYrRxJEYgBiyv5kAZRAvi UR7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dv52nRheChDNGKOvMtjbP5h01dKNuSVIXNv1lknaF+M=; b=mJXvKZyGCePo8iugUPtpfr7U4HbiiZAyfHaNgtSbARrrji7k4u/FMM8hSbYw6vvdOI C9XvJJnHZkHn48hbHIy+g4NkL4r6ugzFFpAlEPAMMMCtpzmWc1L72YVNuRqmYGQaIARs qqh5lRbWJBV+4AAtUBS7Z3tmJ+7aEidAvjkEMLsjnyC4aoZcLL3rJiDgyhW1nJEVx3XB ELYIjaJ+5Z+6iM/LeJpHHgiWlYP03Ww3XQTVApW0TtDe3/EIRtATqBFyi+0toGGTJ2iA H0xy6f1xWDq0lCqBNgi9rhCA3eNRVK1MPl3RasYj0vGdokeJvorq9c0LvjY+B25GmZ63 QVIA== X-Gm-Message-State: AOAM533ju1fjYFdf5scLnnmhgRnHMVFltnVb+gq/r8N0mh4ln4z974pb 01pqeFVCoCNuap30SgND8XYS0RVsgbRXdtGY X-Google-Smtp-Source: ABdhPJyCamPQuEhCNOeN+gyrAN4hgVwQTm7/M0pdRX5uv4c1UuOkJtL5e+q/X74fOMvYW8YZfy2SNA== X-Received: by 2002:aca:3806:: with SMTP id f6mr3553987oia.66.1603850841360; Tue, 27 Oct 2020 19:07:21 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id f124sm2192164oia.27.2020.10.27.19.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:20 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 04/29] completion: zsh: reorganize install instructions Date: Tue, 27 Oct 2020 20:06:47 -0600 Message-Id: <20201028020712.442623-5-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Start with the most important thing; the proper location of this script, then follow with the location of the slave script (git-completion.bash). Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 712ce2f4d1..05ccaac194 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -4,13 +4,6 @@ # # Copyright (c) 2012-2013 Felipe Contreras # -# You need git's bash completion script installed somewhere, by default it -# would be the location bash-completion uses. -# -# If your script is somewhere else, you can configure it on your ~/.zshrc: -# -# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash -# # The recommended way to install this script is to make a copy of it as a # file named '_git' inside any directory in your fpath. # @@ -18,6 +11,15 @@ # and then add the following to your ~/.zshrc file: # # fpath=(~/.zsh $fpath) +# +# You need git's bash completion script installed. By default bash-completion's +# location will be used (e.g. /usr/share/bash-completion/completions/git). +# +# If your bash completion script is somewhere else, you can specify the +# location in your ~/.zshrc: +# +# zstyle ':completion:*:*:git:*' script ~/.git-completion.bash +# complete () { From patchwork Wed Oct 28 02:06:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864385 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D86EBC4363A for ; Thu, 29 Oct 2020 00:34:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7991F20790 for ; Thu, 29 Oct 2020 00:34:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OGCO8OUq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729319AbgJ2AeG (ORCPT ); Wed, 28 Oct 2020 20:34:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728515AbgJ2AeF (ORCPT ); Wed, 28 Oct 2020 20:34:05 -0400 Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10179C0613CF for ; Wed, 28 Oct 2020 17:34:05 -0700 (PDT) Received: by mail-yb1-xb33.google.com with SMTP id a12so717218ybg.9 for ; Wed, 28 Oct 2020 17:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9JnY+ffYpgMJwnKFB1jFqfH1MtJgwwd9mufms2ZlSyA=; b=OGCO8OUqv3N9c3Ym1PywfOof5LFfFRswOiAoKHlQEfsAWv9WPa+oANvhqamVNdolXd XXupqFUE3JJxNR6zV/fN9+vJXbBGnC1fos+ATZIt0sHxWOaM2ev3zObkzm4pfLFYpIuh 0aEqaPFFkLrRaFFoufW0iWFqf+Z1HZtPbwUkjyN3QsgALaYNhwlohEcpIBmdt8FYAA+B 5PE2IMQfWuoxgwZBKDSyFe8eOxDIii5Zf6r1id3itJr5Lc/nqv9M3E1rqVyDWTfo+rb8 BssPBFUYSWvvtC6+acY61VGrjiFtJTwbJOMkVp91LVCmzWm4wP8g7U+knX/NdR1zWt1B I8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9JnY+ffYpgMJwnKFB1jFqfH1MtJgwwd9mufms2ZlSyA=; b=a0g/JUsLgCUKFxRw+to1cUSYHZdPoxT8vmIwQljpnK/UhKCAU5zwNfbYuL3Ip2gLM3 6tPMOE1Bwca8cxtt3obcL22qEnOivmfxfttAcPVtogKR/z0aFZ0DBZXw+nnw2eumVJpD 9QkxgKjr71dajF6Sy4PvAjDGf0Z0IBAqHHhJr2WeNzn0lVu4ks6CHGVQkiYLV/YMox9t ttIQyEYe7t7yaQLYHN5wuo/J9D0aIsRUY+M89pNXrIA0VwNdRCd4qluJ1nEvygfy9nnx nriO5vznTev78yvjX2HOiQ0LnPXrSeeYVgPuMs6uqK4LW1LVL6yCp4Gdx+MgPFozzqdr yJzQ== X-Gm-Message-State: AOAM532RN64XqY9XcbKsZ5H+tXPE1Vi3Yoab9893La1UvTH/UKJTaM1W V2TkBRjYHWoUab1ruxoQfICVcxcmJGB3wG12 X-Google-Smtp-Source: ABdhPJze/dhLok66p2vXSyGdG7FiRHlyjVRCrthX+BeGR+BBjBgv4euNkb4hoCLVDG8kS5khlMuALQ== X-Received: by 2002:a9d:eca:: with SMTP id 68mr3391872otj.141.1603850842903; Tue, 27 Oct 2020 19:07:22 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id 4sm2136056oij.40.2020.10.27.19.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:22 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 05/29] completion: zsh: fix for directories with spaces Date: Tue, 27 Oct 2020 20:06:48 -0600 Message-Id: <20201028020712.442623-6-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 05ccaac194..5d6740c6ff 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -35,7 +35,7 @@ if [ -z "$script" ]; then local -a locations local e locations=( - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + "$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash '/etc/bash_completion.d/git' # fedora, old debian '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian '/usr/share/bash-completion/git' # gentoo From patchwork Wed Oct 28 02:06:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2969C55179 for ; Thu, 29 Oct 2020 00:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7040F2080C for ; Thu, 29 Oct 2020 00:28:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mhr7qLsi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbgJ2A2J (ORCPT ); Wed, 28 Oct 2020 20:28:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbgJ2A05 (ORCPT ); Wed, 28 Oct 2020 20:26:57 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E28C0613CF for ; Wed, 28 Oct 2020 17:26:57 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id k65so1497911oih.8 for ; Wed, 28 Oct 2020 17:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dQKFHbInSiggBScwIApf2pGGdtnWYZabxgcVQ5pNzT4=; b=Mhr7qLsiewJpIT/NxowHsq1JKY2l0cEjsvfLaVGoCEVsdljsJ5dbEskXWK1vv95dT1 UMRHkA6F2ywaHBluykutUj7HKeJAv130Osejb3K2hpRQb3BthzUXikIR6Ano6S1emfOl T47S3WDbIVA3tqLsOzlVgC2F/9PzXAU7akWJ8aMnSQXSvVFqgtOV3so45Q03E+Xlyak8 5ay/TRZT8+Im9JsBdvwyxHUgN9Qp+GdlR1/gbsI7Oy0tUIB1ZiDs3wHo3g4bUiq0UEIi PJPXMQWcHH+hwc50od3tvUIEuiwuP5a0fhgWHeDMg7dKGP14tX/RkGdNShxzYQNL7PSd H5Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dQKFHbInSiggBScwIApf2pGGdtnWYZabxgcVQ5pNzT4=; b=KfIQC5iQd4gnSdRNbKvZSawRcx+GeaSUCVIi9S9JHM2GPhxv3bDKzPqhrzuSfukrxc ihNG7po1otslND49NgKDNX06+0kXLPg0+HOdSfSxvCJy6McFCgl5Q4a5E913Kf2989zi 2HA2QMglArAm/BdoTt5MTxblsBnpaVbgzXIjKwa9clC1r3kAqUV4znIOuCmjwNI8iOiw Zarw981XJoIIj4DZVT/3Ll3M7DM7MtXeZkBA+oeGCunzZ3oIiLCG7TxqMmuhrDYqdXei +gOCkseTuDmKM00HgH5yNLsJ16ViGMYFE5as8gNaP0I7yEzcnuLsKWGQYqyc9v5/M7EH GG2w== X-Gm-Message-State: AOAM530ExPKAtIjBr1tQ6MtGb9EMLmMBayaLp7qM1IS5/p//1FrPhI/s BGvMCPWAEGTy69d9LUu8fw2CZW7BdLHeJ/wA X-Google-Smtp-Source: ABdhPJz89eb+bHGWlzFZYHq7EbrF0SYm9dJuJCLCI2AAejdRq58rTWMhyLifRvMJ0/KRSixzVJHPew== X-Received: by 2002:aca:750b:: with SMTP id q11mr3643873oic.163.1603850844552; Tue, 27 Oct 2020 19:07:24 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id h15sm2248982ooe.42.2020.10.27.19.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:24 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 06/29] completion: zsh: update slave script locations Date: Tue, 27 Oct 2020 20:06:49 -0600 Message-Id: <20201028020712.442623-7-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Update the default locations of typical system bash-completion, including the default bash-completion location for user scripts, and the recommended way to find the system location (with pkg-config). Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 5d6740c6ff..ccf384ba35 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -13,7 +13,7 @@ # fpath=(~/.zsh $fpath) # # You need git's bash completion script installed. By default bash-completion's -# location will be used (e.g. /usr/share/bash-completion/completions/git). +# location will be used (e.g. pkg-config --variable=completionsdir bash-completion). # # If your bash completion script is somewhere else, you can specify the # location in your ~/.zshrc: @@ -33,12 +33,16 @@ zstyle -T ':completion:*:*:git:*' tag-order && \ zstyle -s ":completion:*:*:git:*" script script if [ -z "$script" ]; then local -a locations - local e + local e bash_completion + + bash_completion=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null) || + bash_completion='/usr/share/bash-completion/completions/' + locations=( "$(dirname ${funcsourcetrace[1]%:*})"/git-completion.bash - '/etc/bash_completion.d/git' # fedora, old debian - '/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian - '/usr/share/bash-completion/git' # gentoo + "$HOME/.local/share/bash-completion/completions/git" + "$bash_completion/git" + '/etc/bash_completion.d/git' # old debian ) for e in $locations; do test -f $e && script="$e" && break From patchwork Wed Oct 28 02:06:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4545C388F7 for ; Wed, 28 Oct 2020 23:43:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7621B208C3 for ; Wed, 28 Oct 2020 23:43:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NlpmiLPW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729259AbgJ1XnB (ORCPT ); Wed, 28 Oct 2020 19:43:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731284AbgJ1Xm5 (ORCPT ); Wed, 28 Oct 2020 19:42:57 -0400 Received: from mail-yb1-xb43.google.com (mail-yb1-xb43.google.com [IPv6:2607:f8b0:4864:20::b43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D6D4C0613CF for ; Wed, 28 Oct 2020 16:42:57 -0700 (PDT) Received: by mail-yb1-xb43.google.com with SMTP id f6so677533ybr.0 for ; Wed, 28 Oct 2020 16:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bL9A0ctwM0NOOtDJnh0ADyDBe3oEvtROJugj/TC5yiA=; b=NlpmiLPWAkZOU1Ax4dSxCX0G5E6iE6A1aOByPxAJ0Y9y2mnhbbFZyx3mvllgcOyMz0 RHN7OZ3Iqp7R4T97HsDHyZAsFPMXAB/pKvUTyHO9itu0HKX8zlz/5qJmrsdZVbtQhHFG mHN5ok47Ms64SQgI9NC64gWNZPw5FOVmYDqhR02so0gvMVdALZizBXIvselfq2TFV9OF 7jCID0WjUtrf5+VcoTpzXKIAgiZe3oaPLBSsTvFqeevK9FDtXNETN4jU9bF5iahVhoS8 WjCL13ubtMDEIMOz59OPf99h0myqBck83hXWN6wIUpnam+cHeAZ/vSptag0gS3MsOEdO 2VgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bL9A0ctwM0NOOtDJnh0ADyDBe3oEvtROJugj/TC5yiA=; b=g0z9K1IEQqW5fAZkJYLXEr3bEFEnpSQZe87yhVqZHD6Y+dl2H4g6xWKB38bRaEJC4c opTN532+IROv+HHpLWteXocLHVoaHWlLwU/Ei+4rRl0C4nVWic4T4BtH9uPZydKBsgoS jLSYQW8+lEeJnsiDUKR6y2ZkzQm8iBL7KUgVDW8zolBDWwFPLUb/+krvrIDce1zOKd44 gCu2Qpb0NQhh2kTm5DQnqsvahThot9+ouT/evD6OtX7zUTNpDLL2AgmEwxqPBKueD45d qnYpN97DAziKrtznCA0rNe3FBP1TPtEc8zxMwXD/nvUzbj7RPBGWih5SzCyuPGo/9C+g ojEQ== X-Gm-Message-State: AOAM531LWhPFHkKtuAV0/1rqu6nhTbAQ4tOUCZ66stURP8UCVBgCkenS 3G4hhHta2yh6rN9+/fHrMuc2RfO5DTnWmbaJ X-Google-Smtp-Source: ABdhPJw7ZIcVl3bkC7HZ3h73jAXqKLhbomA+zwJwOZh+l1V5E1QkoR5ztLZnBMixVfzsN+5cs1iWYg== X-Received: by 2002:a9d:6d19:: with SMTP id o25mr3618857otp.85.1603850846154; Tue, 27 Oct 2020 19:07:26 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id y8sm2341762oon.16.2020.10.27.19.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:25 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 07/29] completion: prompt: fix color for Zsh Date: Tue, 27 Oct 2020 20:06:50 -0600 Message-Id: <20201028020712.442623-8-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We don't need PROMPT_COMMAND in Zsh; we are already using %F{color} %f, which in turn use %{ and %}, which are the equivalent of Bash's \[ and \]. We can use as many colors as we want and output directly into PS1 (or RPS1) without the risk of buffer wrapping issues. Signed-off-by: Felipe Contreras --- contrib/completion/git-prompt.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 16260bab73..54e123d632 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -97,7 +97,8 @@ # If you would like a colored hint about the current dirty state, set # GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on # the colored output of "git status -sb" and are available only when -# using __git_ps1 for PROMPT_COMMAND or precmd. +# using __git_ps1 for PROMPT_COMMAND or precmd in Bash, +# but always available in Zsh. # # If you would like __git_ps1 to do nothing in the case when the current # directory is set up to be ignored by git, then set @@ -553,9 +554,11 @@ __git_ps1 () local z="${GIT_PS1_STATESEPARATOR-" "}" - # NO color option unless in PROMPT_COMMAND mode - if [ $pcmode = yes ] && [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then - __git_ps1_colorize_gitstring + # NO color option unless in PROMPT_COMMAND mode or it's Zsh + if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then + if [ $pcmode = yes ] || [ -n "${ZSH_VERSION-}" ]; then + __git_ps1_colorize_gitstring + fi fi b=${b##refs/heads/} From patchwork Wed Oct 28 02:06:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84ED8C388F7 for ; Thu, 29 Oct 2020 00:01:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D93420EDD for ; Thu, 29 Oct 2020 00:01:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BDN8SXjT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389402AbgJ2ABu (ORCPT ); Wed, 28 Oct 2020 20:01:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgJ2AAU (ORCPT ); Wed, 28 Oct 2020 20:00:20 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E608C0613CF for ; Wed, 28 Oct 2020 17:00:19 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id k65so1438435oih.8 for ; Wed, 28 Oct 2020 17:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nBLZkEPbAWGcnMfTgFmqkFmvEuSgjQtn3OVicrRnUl4=; b=BDN8SXjTQ4gF5ZlIJQSVgJyx9+wfBxxE5NpCLByt0/kH12dAwy73TsasATFQ8tI3fv 763osr6PPGWE75HqNXCoS43doGNnYMwT4vSiE3pO2N/bXOoww89nzW8DJQTY6gxwAke7 2y9aLVfwsItwpqo7riQjQP3oJK8/mJC7B4TBb3SNYmLNYUf1lMvTGF9sgOymHfMbXV26 ABvxS15+y7RJfYui+SGMkhsjz8ZsYTzFppMRfPeOMJyxVIZnCi9/ysy8pjzNF/WQByQE xZr0TPl35dw2NxjixSuj9t6vhGGq/84RiSVIXWL5yrOBc4M5r+Rdr5NU6HJKv1f0e+5w YEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nBLZkEPbAWGcnMfTgFmqkFmvEuSgjQtn3OVicrRnUl4=; b=hEsPWcMuk2VLJotimn3m3tpxIHlzZ6VDAVKyuLiTkgcJYyKVgWV2ZtwHcy62aevEmJ lSgssKqKR9geVWZH4DUoqAJFU/Pgb9PfcX7IBGqbntVhqLhUR32Pr4F0FvOh32JyQ7Ng mJ/SVNSXDuYpI9zr/VC1PKEpsWAu4WvymTohaTQTjezMJ0CdorRZH7OJo1JAhGcvKzVa 7b1491BrmWXyXPZyyuvNhVLXD8q2ZWY1PNVrANvyjr4x/FlF6l7BMY/p3y9TTVZuxe2C X+/CzRQCx4TVYY8ERwa6XeFvVPsliz95NIQWnMBBBI8fZsQXI3UUvXn9WBF+oPhkbDdM ngVw== X-Gm-Message-State: AOAM530jQLk8J1WBKugRUrK+Q2Krk/Ig+8Os1E9k6ceQxtpVqxB7vFWg o3yM0qliS6KG63JBCZsFbESIxtWlbmVBKilO X-Google-Smtp-Source: ABdhPJyD3JL4yg5iVQZui5AN5Ce/vZILciVyNy+jNgKHDpKhOnvKt1nhzjQPW9B+3Afw2E1XuqSzQQ== X-Received: by 2002:aca:54c2:: with SMTP id i185mr3347268oib.169.1603850847711; Tue, 27 Oct 2020 19:07:27 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id b17sm2348640oog.25.2020.10.27.19.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:27 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 08/29] completion: zsh: fix for command aliasing Date: Tue, 27 Oct 2020 20:06:51 -0600 Message-Id: <20201028020712.442623-9-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org A lot of people want to define aliases like gc='git commit', and zsh allows that (when not using 'complete_aliases'), but we need to handle services that call a function other than the main one. With this patch we can do: compdef _git gc=git_commit Additionally, add compatibility for Zsh Git functions which have the form git-commit (with dash, not underscore). Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index ccf384ba35..f524c6042a 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -243,8 +243,12 @@ _git () if (( $+functions[__${service}_zsh_main] )); then __${service}_zsh_main - else + elif (( $+functions[__${service}_main] )); then emulate ksh -c __${service}_main + elif (( $+functions[_${service}] )); then + emulate ksh -c _${service} + elif (( $+functions[_${service//-/_}] )); then + emulate ksh -c _${service//-/_} fi let _ret && _default && _ret=0 From patchwork Wed Oct 28 02:06:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863657 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03FCCC388F7 for ; Wed, 28 Oct 2020 22:26:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DEE020735 for ; Wed, 28 Oct 2020 22:26:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FHM+qpsw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733102AbgJ1W0j (ORCPT ); Wed, 28 Oct 2020 18:26:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733095AbgJ1W0i (ORCPT ); Wed, 28 Oct 2020 18:26:38 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0F24C0613D2 for ; Wed, 28 Oct 2020 15:26:38 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id k27so1203971oij.11 for ; Wed, 28 Oct 2020 15:26:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FG7FXF9wj48YwmCiAl3FlaWFFXvBKUu0BFy5BtTNucE=; b=FHM+qpswa8JsDBtbOSXiSgGw32ghLl/fXNPdDv3VcET+UluyTVaokMDkG0N2i1A0We 8lrhiFDb1THXEyVlyTL+6JgELwijchLyV8bWaEOWX+qbhrMo7e2n2CmRb66ZmwDDkW47 OPvmOd6xhWLkbjZl2XDVfDFUMGIwfbVYB5apCSdkxY4Tvnp+sC9sldUFar2tIilbX/Sc krLYwiaRpPFl3e5RA2e/61l+zaAchdAHDOgFURmpxjH0LAoSDdVa7j4swyybaGqxZZCQ YC8IAuqLUcg97y2hQhxfZKz6vwSHUb2wh35f9a6IygMSjHDkPUHspIkt34jHZQH1ZoKU sM7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FG7FXF9wj48YwmCiAl3FlaWFFXvBKUu0BFy5BtTNucE=; b=Oe7Pf0iU0I6aBvgYdCS+wzVJq4Im+lFiMVHdjqeg37GOC5Pfq77Cfj+eUHfWIp1F2H HNkIG00oHaO23cn7KMXQFJkUh0ASrj+NAYgbPtJtzC/UJsQVds/U4vxiL0af5aVwEYFc KhBfCDwKsMcpP8GXYjj5kwKsl/8wKukoN1LNWc8xcGmfF3d+vKq+XixxXyrFC4Xlhplk /yJlu6zcDk3at+doLS1z2Z7olxZsPsw91Qo9MlwHrCkCDBOUTHMEQ+N/XuCKUHRUbZS+ OtEZTSuZZFv11QLCmkzfy+A5Z+7n/bM1Zshvd6crABcEWOr6tFaohND1vIUbnyjJVB1B yRwg== X-Gm-Message-State: AOAM532LoKGl93FMb15pI8/eJz979CE+ishXl2HnMc+PlL5ChwhzO8U8 NrHsMs2rNu4MKhM/t/AEz47MXAOUjqqWIQ== X-Google-Smtp-Source: ABdhPJzAG2xQKZzmhArf5taa0kSvpOf9bjEPWcpYsS6AaoZqkEGvZHD5bkX/aAwfGwflboYABwtObg== X-Received: by 2002:a05:6808:198:: with SMTP id w24mr3577390oic.69.1603850849297; Tue, 27 Oct 2020 19:07:29 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id h7sm2290930ool.34.2020.10.27.19.07.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:28 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 09/29] completion: bash: synchronize zsh wrapper Date: Tue, 27 Oct 2020 20:06:52 -0600 Message-Id: <20201028020712.442623-10-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org A function was missing. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ec7dd12a41..40affd40e2 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3510,6 +3510,14 @@ if [[ -n ${ZSH_VERSION-} ]] && compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 } + __gitcomp_nl_append () + { + emulate -L zsh + + local IFS=$'\n' + compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 + } + __gitcomp_file_direct () { emulate -L zsh From patchwork Wed Oct 28 02:06:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863367 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 153F2C56201 for ; Wed, 28 Oct 2020 21:53:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE80224743 for ; Wed, 28 Oct 2020 21:53:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XMupN3nW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728443AbgJ1Vx1 (ORCPT ); Wed, 28 Oct 2020 17:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbgJ1VxZ (ORCPT ); Wed, 28 Oct 2020 17:53:25 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0356AC0613CF for ; Wed, 28 Oct 2020 14:53:25 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id 67so449972ybt.6 for ; Wed, 28 Oct 2020 14:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0H9uZpX0/8EIo7oODNuFjuc/FWLJP7hXtW5dF7KWI3k=; b=XMupN3nWh5b2KJ3x8u3H0DFpnsrzazd3kAn/PPLFlQhhPG0ht5AEFExNmGg/z8GsW0 k87scWrAK/MAXLAogFGaS74e5yaWfdv1FJ+a4hnSNNnza2eaubXXGUwa4QBqNdUr7m82 7DwA6OxM79m++BVA5ytriXnhlFnrPVm+z+ouNCou8cZgELVSLgZ4jlAMik2e7X//nuW+ Kx5/vkixlJS0Auk8QNAmE8D5XW4FMU0uvLxbqUVYwTlxKJ8P3owXuUpSJZiqk4H+22gf LnFZPcG3Deyac1jT0NlyRhqyA54acJ44GmZVPiwc6bXaZ2h+mbzPbUO3lTOFaq39dowA Wtyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0H9uZpX0/8EIo7oODNuFjuc/FWLJP7hXtW5dF7KWI3k=; b=Jh8TU32vzFQkcVyM1djypfKX27I52KB/i00EqSTmBgjqo6fNt2CDHJqP4ea5GliY+0 c9SH1le/ObsR+WQe9jg389AoweAnjfhL9sMNOv9bcED/IvIKQMfifQMdKxbCuTqy0AIu +QueQT3kZZu/bafCOONxJKWLFdXsQoZPVozm/HEFIktiZDZpoipUaogLFTbKPtLYwliC 749yP9p2p2vhaN5niIZ6hPVYldUCu6R82tT9mYq1TZMrgmyIoryOdkeVDK08GshVYeyl YWbM1fEgaBOdDWLUj334ygNoxz8XJmtJv4tiTFrGE47equ0a+G/gMCUpmGD+7/88Gp5d xvOg== X-Gm-Message-State: AOAM531MYC4lpQw44IvEpg8kXMhqHyr0GZAf1/KT64X8KW4LyGAJR6X+ bHJQRemLYRqO/NvvavyVqn/hyeaJJN87gA== X-Google-Smtp-Source: ABdhPJxbyWsJ8TuwZra0Ib9OWKDCt1pPozEk9BcERXAPGvjFLV1Mq0i8swvXze6SSlBEsIO7uJWrgA== X-Received: by 2002:a9d:600e:: with SMTP id h14mr3535267otj.8.1603850850875; Tue, 27 Oct 2020 19:07:30 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id q10sm2165869oih.56.2020.10.27.19.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:30 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 10/29] completion: bash: remove zsh wrapper Date: Tue, 27 Oct 2020 20:06:53 -0600 Message-Id: <20201028020712.442623-11-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It has been deprecated for more than eight years now, it's never up to date, and it's a hassle to maintain. It's time to move on. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 92 +------------------------- 1 file changed, 2 insertions(+), 90 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 40affd40e2..26d6ee20b0 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3458,96 +3458,8 @@ __gitk_main () __git_complete_revlist } -if [[ -n ${ZSH_VERSION-} ]] && - # Don't define these functions when sourced from 'git-completion.zsh', - # it has its own implementations. - [[ -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then - echo "WARNING: this script is deprecated, please see git-completion.zsh" 1>&2 - - autoload -U +X compinit && compinit - - __gitcomp () - { - emulate -L zsh - - local cur_="${3-$cur}" - - case "$cur_" in - --*=) - ;; - *) - local c IFS=$' \t\n' - local -a array - for c in ${=1}; do - c="$c${4-}" - case $c in - --*=*|*.) ;; - *) c="$c " ;; - esac - array[${#array[@]}+1]="$c" - done - compset -P '*[=:]' - compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 - ;; - esac - } - - __gitcomp_direct () - { - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -Q -- ${${=1}% } && _ret=0 - } - - __gitcomp_nl () - { - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 - } - - __gitcomp_nl_append () - { - emulate -L zsh - - local IFS=$'\n' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 - } - - __gitcomp_file_direct () - { - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -f -- ${=1} && _ret=0 - } - - __gitcomp_file () - { - emulate -L zsh - - local IFS=$'\n' - compset -P '*[=:]' - compadd -p "${2-}" -f -- ${=1} && _ret=0 - } - - _git () - { - local _ret=1 cur cword prev - cur=${words[CURRENT]} - prev=${words[CURRENT-1]} - let cword=CURRENT-1 - emulate ksh -c __${service}_main - let _ret && _default && _ret=0 - return _ret - } - - compdef _git git gitk +if [[ -n ${ZSH_VERSION-} && -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then + echo "ERROR: this script is obsolete, please see git-completion.zsh" 1>&2 return fi From patchwork Wed Oct 28 02:06:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A74EDC4363A for ; Wed, 28 Oct 2020 23:28:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E92420796 for ; Wed, 28 Oct 2020 23:28:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IOUWnSBh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390466AbgJ1X26 (ORCPT ); Wed, 28 Oct 2020 19:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726133AbgJ1X13 (ORCPT ); Wed, 28 Oct 2020 19:27:29 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0A39C0613CF for ; Wed, 28 Oct 2020 16:27:29 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id n15so729327otl.8 for ; Wed, 28 Oct 2020 16:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T4gV3y6febuEWDZFQZRkrTTArWNaQf9nYjFaOt7OV2w=; b=IOUWnSBhxznANct6CRUli1XBSwKxXJKnBudkiqGULeh3wzKRfehDPurbbs+5ega6ag KmRvLsBsNXYDAzEuUlV76OcFHahQVFk1iaxJRKxg/rI7/5ZZD5vj8cPm8HYaUY3Qlsgy dBbKyQn49f0uh1gYvFH4ezZf2tGwJIM7s/kXbu6FzUaE0YuhwIocQvv+B4OkmOJbQTDg xl1k1AG8yRsfqdpCmFnntXqqCtaGr5oD4PGj+qIeYJ86oL+F/gq4CbKkTq3+Q/VYLpqW 0eE/PiXFN43zXj7fg1xhkG1VstrlnDya9W+zFjc9Ps5DuGmksG7Ds9sq8LJUA4THvPuQ wYKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T4gV3y6febuEWDZFQZRkrTTArWNaQf9nYjFaOt7OV2w=; b=TjAjmyvGpEWHFo1bl59ZzEs7OhraoFcCxjoG+4NSDUEqywquu1VStltSViE9J6le43 Zi+qayzvqbzoZVEo2boU56p5XjgTt3vX3eT7GvpbVNVNji6uLHNL0Zk4tRuLIDPvWA3g Za7YbC4PU2xa/ZRfxA8bv2Kot2pvv+zugS+VJkca+czY1UqIEZVU3RXUmXUHVQDi925l j/zTjY/nUQVaHYnF7m/54v/Yl6EdpdRa7wpfSdc0yRLY+dRvLjdBBP0AR+4fBE1bSA/z Jp/iR4/aOvKK8qd8ed/ZGplYNkWj44CGgWmHi1opSohkBHL1d0yTGT3KIkmlDIwZPwXF MYFg== X-Gm-Message-State: AOAM533DArrL7T+Vd0melbB1bEjHRmRqK/dtULpOEIUgB2Y+ZOfOlLr6 1RExzjiQLbwjBqOuRQDclGK0tTfv+tSQZ2z3 X-Google-Smtp-Source: ABdhPJwUaU5kWeHSczCRBH1AojeXhXgUPL6PaCJ+X7QKBEZHfTL5XXOXbZ0ICCPY8GJ4A1ZqAeUcxQ== X-Received: by 2002:a05:6830:1c3c:: with SMTP id f28mr3793021ote.188.1603850852515; Tue, 27 Oct 2020 19:07:32 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id p21sm1738283oto.21.2020.10.27.19.07.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:32 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 11/29] completion: zsh: fix completion for --no-.. options Date: Tue, 27 Oct 2020 20:06:54 -0600 Message-Id: <20201028020712.442623-12-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This was introduced in upstream's bash script, but never in zsh's: b221b5ab9b (completion: collapse extra --no-.. options) It has been failing since v2.19. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index f524c6042a..e567062505 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -59,10 +59,32 @@ __gitcomp () case "$cur_" in --*=) ;; + --no-*) + local c IFS=$' \t\n' + local -a array + for c in ${=1}; do + if [[ $c == "--" ]]; then + continue + fi + c="$c${4-}" + case $c in + --*=|*.) ;; + *) c="$c " ;; + esac + array+=("$c") + done + compset -P '*[=:]' + compadd -Q -S '' -p "${2-}" -a -- array && _ret=0 + ;; *) local c IFS=$' \t\n' local -a array for c in ${=1}; do + if [[ $c == "--" ]]; then + c="--no-...${4-}" + array+=("$c ") + break + fi c="$c${4-}" case $c in --*=*|*.) ;; From patchwork Wed Oct 28 02:06:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 961D1C55179 for ; Wed, 28 Oct 2020 23:29:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35E85207BC for ; Wed, 28 Oct 2020 23:29:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nvvVMuns" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390472AbgJ1X27 (ORCPT ); Wed, 28 Oct 2020 19:28:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390455AbgJ1X1B (ORCPT ); Wed, 28 Oct 2020 19:27:01 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52719C0613D1 for ; Wed, 28 Oct 2020 16:27:00 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id k27so1346991oij.11 for ; Wed, 28 Oct 2020 16:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NTB0EwlSLfn8A9nFm3XXpQgab7oYL7nI26zwYjOrHZM=; b=nvvVMunsdAlfmnDBDGVrpLNSy9CFW5JoUUVQZnAS+q086R71NIPQ4Mzdhjuqo+G/Ay ljtLszvP0vYD/QxpB3lCNlp95zk3litNEXb6RUUBl5aKRXHvtwIc4cBeikJaKTqJW9hk zEOc2N+fJRhgrJ1razG2Bt5i+fnuj4SSJzsYb9BgEdZrzDb4mbfdv6XxTMb1o60/RmF8 9Ss8e9+FX9z7rcVn+o7RT6C/jF4lbMmBJ/bvZkv+t/t5A3GkTQ/NucTCK7X0vkofoKGi Wq97M012GJXBi48mmgigsNS8PG62zoStL9FnXK/3yIJzNwdvqqwEm693nsAs9OM4v0HJ lL5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NTB0EwlSLfn8A9nFm3XXpQgab7oYL7nI26zwYjOrHZM=; b=N1tN5y59o+iIBcNoo2K7YVImZEIZcJXJcc1FoiEIrrJd44zfVmnCArz4NYfMIX71xL hAngejLOZms17mRIeG70/BLwueXtK5PEk9qbzWTeANpM3tzjeA3ZEr/7rm9PqC4PLDUB lWI3NhKKaDqFu2idS3Lne78o5gbpeFXEBw6CupwX7XrwAJtCpYsAIfW81XxBRQXQCTyK wd4SfPW5EDhSkQa1WDsRyIcjQztZSO0i5xEkhWNVV7AEO2qtHIzeXNHYzNsPzkJ0EkGg 3rtN4MJ0u5I+nftr1+TEVJK9uPZJYBTgYurmy+9gi0UnbOFy58BF2P586ZD0TP3W3Lho Ql8g== X-Gm-Message-State: AOAM533BV+6Y1xdqirO84OzETVk4Vmop2x99Lt5BMtERUgM0XepDRU/Y 7167WFiGjOsJUU/AltfU/6H5E1LEZ3YFPrYS X-Google-Smtp-Source: ABdhPJwe1xx/4swczZucZrUDWp6IQDhKoD5luXbRfDI19wunVUw4/zpVKSjl3vP8SSvWRpxBaE6bgA== X-Received: by 2002:aca:1a07:: with SMTP id a7mr3415164oia.169.1603850854102; Tue, 27 Oct 2020 19:07:34 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id z126sm2347847oiz.41.2020.10.27.19.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:33 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras , Mark Lodato Subject: [PATCH v3 12/29] completion: fix conflict with bashcomp Date: Tue, 27 Oct 2020 20:06:55 -0600 Message-Id: <20201028020712.442623-13-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We don't want to override the 'complete()' function in zsh, which can be used by bashcomp. Reported-by: Mark Lodato Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index e567062505..b894cb52db 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -21,12 +21,6 @@ # zstyle ':completion:*:*:git:*' script ~/.git-completion.bash # -complete () -{ - # do nothing - return 0 -} - zstyle -T ':completion:*:*:git:*' tag-order && \ zstyle ':completion:*:*:git:*' tag-order 'common-commands' @@ -48,7 +42,11 @@ if [ -z "$script" ]; then test -f $e && script="$e" && break done fi + +local old_complete="$functions[complete]" +functions[complete]=: GIT_SOURCING_ZSH_COMPLETION=y . "$script" +functions[complete]="$old_complete" __gitcomp () { From patchwork Wed Oct 28 02:06:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863279 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DFBAC388F7 for ; Wed, 28 Oct 2020 21:44:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2EC2246CD for ; Wed, 28 Oct 2020 21:44:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nK1L3J4L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725379AbgJ1Voc (ORCPT ); Wed, 28 Oct 2020 17:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725771AbgJ1Voa (ORCPT ); Wed, 28 Oct 2020 17:44:30 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC89BC0613CF for ; Wed, 28 Oct 2020 14:44:29 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id n15so518634otl.8 for ; Wed, 28 Oct 2020 14:44:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gZLHrZn3wqO8aKNK7DfXXL9LqsubEiDp+vV6x+I0qCU=; b=nK1L3J4Ldp8aU1JPrIiPMe8ihHIbgYjwrRMw6P0qqqg+3qy548AF1LpqPrcfXZxNZ2 fwpLJJzOnxryHSnenTTL9G3THXuMz1GJTPdFq7haZLYqnocrKhjJaYHmCe2WiPGQfJ7+ j3r1869XjaowN9jWTki1HmYRmO2MYVp/lvtNwfU0jregElBrVm5OFEkbVlEawMAWXJlT ALOxFRnCHM14GIUQHgWP3m/Abyqkl81XFBHVTiq4hYWNKg5Xa/Orb/9uHjZgVsrpHrqb GFkDxXtfFHMNhCOjx4ALB3wSyaIAuEzCpCWQPRBiqyApFWYy2tDnLuybRCj8KJPzoYmp lUsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gZLHrZn3wqO8aKNK7DfXXL9LqsubEiDp+vV6x+I0qCU=; b=KabsLrr1d4uC+W5BFtVxdh5MYBLiGb/bfUWndspTM5h4uxgzP0g21ajsVHPwqpY3L2 CwTAEUckB+Zqbn7Dq9A0Lnw+rl+TUfhcS4zMrriVWhYzI694RTSUAm/xIVlo0Kl98/fa GBMNus358gCpbAS6OfnuNmsmmAm0E/J3o7OL1+EJiWOaeE7cS6wk6LxQMuCFLl+6Uapc q5Cgg1zBmB/Qxqq/2eTjvFYDipkx92+ErorzizuFDfxIaM2evdnwmgiz+kB+MFAMBPSI qDbDGvPpwio8pco+yDIhU7H0X8txBVBcLQnulAkuEMECTgXeOGTfZDbmgO2wPp6aClzE FIWQ== X-Gm-Message-State: AOAM533ev/tmUNkX+oJC4kD9vd04i34Qq+bEFB7OeUp9CkiJ0SA7VGIG 32Riqzxe+Kk3sA+vYv8C9mPU+pAgyZpviw== X-Google-Smtp-Source: ABdhPJwqtKaL20WfPzOiHkL8F1rmj4TLqWAAYQbzjC/1BpgW8q+U2lTSAgOB/chti7sq+JeqS9MwKA== X-Received: by 2002:a05:6830:2434:: with SMTP id k20mr3434075ots.205.1603850855683; Tue, 27 Oct 2020 19:07:35 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id 81sm1840156oti.79.2020.10.27.19.07.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:35 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 13/29] completion: zsh: add missing direct_append Date: Tue, 27 Oct 2020 20:06:56 -0600 Message-Id: <20201028020712.442623-14-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Commit 688077910b forgot to add the corresponding zsh function. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index b894cb52db..c5b875993f 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -105,6 +105,11 @@ __gitcomp_direct () compadd -Q -- ${${=1}% } && _ret=0 } +__gitcomp_direct_append () +{ + __gitcomp_direct "$@" +} + __gitcomp_nl () { emulate -L zsh From patchwork Wed Oct 28 02:06:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61E58C55179 for ; Wed, 28 Oct 2020 22:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12F832072E for ; Wed, 28 Oct 2020 22:36:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="imq2qJz2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388440AbgJ1Wgn (ORCPT ); Wed, 28 Oct 2020 18:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388336AbgJ1WgW (ORCPT ); Wed, 28 Oct 2020 18:36:22 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45788C0613CF for ; Wed, 28 Oct 2020 15:36:22 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id y186so1271805oia.3 for ; Wed, 28 Oct 2020 15:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E3WpVsMKwdvTGTVNOo2nmf7Caeji6tbc/0LH/FZybMw=; b=imq2qJz2X9OH/bkC/v2x8kBPtCLqWPwipwsBMdZHWmA8XuYrd/c5XBD/wxq8YdKyEZ vzqEHMnuHbCWt0eDgUWN7xmkN9Op2rFY/yUD83z1OGoDPtcdhTo7YRrOCB00zEpYVhBv ACe079yse8pPkL1S0GKNqIQAnh0BxsotQzjcJS1iIoX8QKNMLHzD92DpyWrvaC9tA7Uj w5doM7xMPSMFjkKBVruJfDGOqtpGbFh9qvUKbQl1+NTLy31T1daCL1KAWZyNF/RWQebS F8LH1BYnrxLtzfobHQNgYDZZawT9mx+2YcBhFmGY7FJQg3TdDmc1IWoVSEuRotiUOjJS 1KbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E3WpVsMKwdvTGTVNOo2nmf7Caeji6tbc/0LH/FZybMw=; b=I+2Aum10WoG8ncjfSQJp4JDmJPRvLpF7IQZyORbZ3y5w5UwDSLqGXb90BfybciEuyN 1RmLFtdOTcm6OVYVFxDV8C81EUowkh4RFmdH0jDhkXYxi44iyOJzBhQLxPk7jFN8yToQ RKHCBYmAn0wgoX0tHh+n52yQ9fKVDb78dVfYUnObsztVkHaa1y3y1gVbmDwksMjJThxG O22R+v31PKuU4Q/F4h1sVy93e/FiqLZmC5oepLUBtQFiDQtEAdZuVsTou1zbmC+TNACd nzOR2vcVg6LHMQeS2/op6pqe4/hxhKCFpi6zqKRxGEdvnvx23ym15QKxtuIfL0IWR+fD pmyg== X-Gm-Message-State: AOAM531BE1OC8H06CTp42pilA9CO+Q7l0D+MWikKLMaiw2IzbRluAdj7 N7+OKmICDkNEGqnYSB60UVST7sTGMSETUw== X-Google-Smtp-Source: ABdhPJyqp8M4l7lqXE054RAIkcSprpgxqtIhrLzRJGCUUmLkOCZQXwSHEqFAkNuwILJKKB+UKeiwPA== X-Received: by 2002:aca:d987:: with SMTP id q129mr3719678oig.5.1603850857471; Tue, 27 Oct 2020 19:07:37 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id h6sm2293210oia.51.2020.10.27.19.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:36 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 14/29] completion: zsh: fix splitting of words Date: Tue, 27 Oct 2020 20:06:57 -0600 Message-Id: <20201028020712.442623-15-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Files don't need to be split by '=:', words do. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index c5b875993f..d9ce5e1742 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -124,6 +124,7 @@ __gitcomp_nl_append () emulate -L zsh local IFS=$'\n' + compset -P '*[=:]' compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 } @@ -132,7 +133,6 @@ __gitcomp_file_direct () emulate -L zsh local IFS=$'\n' - compset -P '*[=:]' compadd -f -- ${=1} && _ret=0 } @@ -141,7 +141,6 @@ __gitcomp_file () emulate -L zsh local IFS=$'\n' - compset -P '*[=:]' compadd -p "${2-}" -f -- ${=1} && _ret=0 } From patchwork Wed Oct 28 02:06:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864809 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72183C388F7 for ; Thu, 29 Oct 2020 01:22:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17C9E20796 for ; Thu, 29 Oct 2020 01:22:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WX4VaXoN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729639AbgJ1WEz (ORCPT ); Wed, 28 Oct 2020 18:04:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729734AbgJ1WCz (ORCPT ); Wed, 28 Oct 2020 18:02:55 -0400 Received: from mail-yb1-xb41.google.com (mail-yb1-xb41.google.com [IPv6:2607:f8b0:4864:20::b41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD3B6C0613CF for ; Wed, 28 Oct 2020 15:02:55 -0700 (PDT) Received: by mail-yb1-xb41.google.com with SMTP id f6so501172ybr.0 for ; Wed, 28 Oct 2020 15:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7hwCA3YFTq6TjHiuN65eyHursT5ELlCF6ON6OVTi3NU=; b=WX4VaXoNaLEIwXnxlmls8OeFv3rPBvecEhevBcmu762vKNeBaEaYa3MVpUZ00o+50+ Km97L67EGQGvT7JnkFlejM/PVQA/Xm9E2NqlhalSoQFUtVDKJRkpQXRkoil9FFAwNom3 c8UDDwSUCamCUvEqSBN8fdyHcg1m6+FU+qJfsmdV3R110eOtu1wVSQNODfDDqaBnlsrI lHVHRgTlgoR/WO2wbszKElcdYiCJlE3NuWn8cVLe18c/5MgWcCxY3QZIl1sls1a1n2yf fJhr/okrxtlpPDw0Xjah+M2FEsZ/gDNQgZ/6DGiMuuq7DKWbrFxErKVAVjJVCSZWNekf QCMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7hwCA3YFTq6TjHiuN65eyHursT5ELlCF6ON6OVTi3NU=; b=kPBngm6omESSbDhaZE0Ncby5O/ntQBw1DQ9YIJIjM73mQujCCRgTreLSmJP0C2Y6hl QErsCLzowqafXPc3qEwygXO6w+SErXxrOntkcigPcHa/F9B0S5OMB38O75+UsiILrdcU Gn53V6VIaktHpqh7VI8AN1Rps6xipABU0e+45oDEva5hiZJtzCcKtFnLkJgCTfb1MKzM lhYfbT+s3s7p6QjL5WwC2/BsQjh4P4Zi8SeYlOaxxouF0AgjArbj4WCykXdmDYZ9Xrf8 yGSKmmPJRTjHb0XXE7SlkCgpzQ//R4fLUiWncB4+/70EBf/kI5Bj81bQbBNYQn6Ba4lW F3zg== X-Gm-Message-State: AOAM531QZB6i00Fd43YndyR2HiyZUIZTDWs0QknsTid0jCTKs+I09ff9 r+P3+GwDDOsbimFgn3Su5FzzdJ5CZ5HG/w== X-Google-Smtp-Source: ABdhPJytG+dlL85hiAOOB6UcMDTWzbDOTM5GfUqeNplHVDFhYeT9w0moh/6U9cYay7hG3SVpAv/PJA== X-Received: by 2002:a9d:57c3:: with SMTP id q3mr3328575oti.326.1603850859071; Tue, 27 Oct 2020 19:07:39 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id r8sm1709180otq.43.2020.10.27.19.07.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:38 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 15/29] completion: zsh: simplify compadd functions Date: Tue, 27 Oct 2020 20:06:58 -0600 Message-Id: <20201028020712.442623-16-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org We don't need to override IFS, zsh has a native way of splitting by new lines: the expansion flag (f). Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index d9ce5e1742..1ef02f936c 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -100,9 +100,8 @@ __gitcomp_direct () { emulate -L zsh - local IFS=$'\n' compset -P '*[=:]' - compadd -Q -- ${${=1}% } && _ret=0 + compadd -Q -- ${${(f)1}% } && _ret=0 } __gitcomp_direct_append () @@ -114,34 +113,30 @@ __gitcomp_nl () { emulate -L zsh - local IFS=$'\n' compset -P '*[=:]' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 + compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0 } __gitcomp_nl_append () { emulate -L zsh - local IFS=$'\n' compset -P '*[=:]' - compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0 + compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0 } __gitcomp_file_direct () { emulate -L zsh - local IFS=$'\n' - compadd -f -- ${=1} && _ret=0 + compadd -f -- ${(f)1} && _ret=0 } __gitcomp_file () { emulate -L zsh - local IFS=$'\n' - compadd -p "${2-}" -f -- ${=1} && _ret=0 + compadd -p "${2-}" -f -- ${(f)1} && _ret=0 } __git_zsh_bash_func () From patchwork Wed Oct 28 02:06:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9A7C388F7 for ; Wed, 28 Oct 2020 23:42:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9186A207DE for ; Wed, 28 Oct 2020 23:42:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ON+nVa5b" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbgJ1XmW (ORCPT ); Wed, 28 Oct 2020 19:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgJ1XmI (ORCPT ); Wed, 28 Oct 2020 19:42:08 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E14BCC0613CF for ; Wed, 28 Oct 2020 16:42:07 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id m128so1402539oig.7 for ; Wed, 28 Oct 2020 16:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FlI5dTB+2BF5Pix/aEApvsuecEutz3CEZHIgNmZ9BM8=; b=ON+nVa5bcgDYFrO9APFVkRkFPCfH+yaf/0L8ASNBqcTZKL+h3dvJDUl/LaOdgGz/fd t/JiKxkWvw9KZdFmVlg39p6L9DpYzAVWPwnrEEEQYqLe/nMnkVKPMw1kVI+UK6CUxtxl 12XV4cbzzCUcxq3KWWh1dGzdCmq7miLVR8VtpUkDVFpx44ugd3PFg5EeVnAfZuhicUYs i6DTcbrMfjPWKRbgfH6ES5D11etK3lm9D/nT+DpxQQ+LNiPZ27mRqVajirV9XUgjq0cN 6N1aMXw0ykxTxduqZjG+eoBfP1IF9WCbFgmBY4L+oHdlXVmIdTIWhfdp/NV0JGHpyMgf JPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FlI5dTB+2BF5Pix/aEApvsuecEutz3CEZHIgNmZ9BM8=; b=KEL1H/emag6ZIyQ8hYEFQnazoYcB740GZgKZeqFDPmeFvNN8C3RMymD77fYmlgCkBc oMnn4S8IcJGY2BXLoFDRBKcdeMkGJ4qMuRhYCqL9iiqcR2ITEYfy4DlaQeuB3Mobj64V EdBykes87NyScp8Bo5ixAgLX2z9iZXe21Hs5a8pjLhyPa+w8c+9bzDc74FGTY2O1aJ2V 3+piKhZvxIDHKa1qqNdPXSBQ3+eovsKQ8wBDxlbk/WQMi9mPag2l/lsV7UdItUYsFyzn z3UQZZ7LMEA5bHo7yhFivOfSXaHGQPDdY9VDaeiJ430A4atlJu7/BPQhs5y8gh5vr31F +tQA== X-Gm-Message-State: AOAM532zuEGMUNVQp4U87ZgS8FFuLa1/WvLVtoMjDefZgipwlN76XWqK Thtm8a5hBcOj5X1e3PoOMlu9vTfeSSRx0WUQ X-Google-Smtp-Source: ABdhPJwyn8rduqQDw19OdnbgaQPyJYfuwr/AL8WLX2QX6OhSzYryIWaY/UfxVcuoo2T+h+MaDHxmlg== X-Received: by 2002:aca:52c3:: with SMTP id g186mr3363596oib.122.1603850860722; Tue, 27 Oct 2020 19:07:40 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id q4sm1870177ots.34.2020.10.27.19.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:40 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 16/29] completion: zsh: simplify direct compadd Date: Tue, 27 Oct 2020 20:06:59 -0600 Message-Id: <20201028020712.442623-17-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Instead of manually removing the suffix so zsh can add its own, we can tell zsh to add no suffix, so we don't have to remove it. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 1ef02f936c..3689bcbd6c 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -101,7 +101,7 @@ __gitcomp_direct () emulate -L zsh compset -P '*[=:]' - compadd -Q -- ${${(f)1}% } && _ret=0 + compadd -Q -S '' -- ${(f)1} && _ret=0 } __gitcomp_direct_append () From patchwork Wed Oct 28 02:07:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ABBCC56201 for ; Wed, 28 Oct 2020 23:36:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDF1C207DE for ; Wed, 28 Oct 2020 23:36:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T1AAtTjA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390548AbgJ1Xgx (ORCPT ); Wed, 28 Oct 2020 19:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390288AbgJ1Xgx (ORCPT ); Wed, 28 Oct 2020 19:36:53 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD7E0C0613CF for ; Wed, 28 Oct 2020 16:36:52 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id f6so667365ybr.0 for ; Wed, 28 Oct 2020 16:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G6NS/tgl44RBz5qaxl4GSsC/HY/YUYK+BGZzF5no6is=; b=T1AAtTjADZEUP71vNxX980UaCoQzznrVegfSwTxhrQW1g2z1e+GYSrC2rLdwbxxJms knAHgzwKvvjARCyBoAVyDsCSCH8XsNJ3OnSYoU3+vOIC1Uo+KP2XXK/7mHKm+/WmHVRY KSQS2G480SXi8aaG+OFetPNJjsjSQ6CgcHOdLhkssku+UsP+T9UEFapFb/I/Iuh7ot+f Yp6noBX5Y/Am12t84i5t1O1a3lSzdz1nI6VAwaxCLooHpFWlRiwp1q23+o+Z+3GZ79b2 lh7uFc1AvZUdSsEGzDUkVZzu6F91Mp/wwMOzS9UufWGc3iGXJdW3JCWjnkK6vzrRwEzB RVNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G6NS/tgl44RBz5qaxl4GSsC/HY/YUYK+BGZzF5no6is=; b=kzwkWfnhqQl/1qmXMnnLgwVZhdIQK+NVf1pZi51QAsR+zRBgrwI35F1TcFJVB9vHhT 0YX0gngvMaN3jDbKHy0RuPpC1VI6F9pqTZmOrbVWMSQAtg54vGlhEJR5LN1m1BugYJeD 5f60RK+KN13ukqJg1Zhx1TaGS8zU16C3wLkeRT6WqFY+uyPUrqppvIgC87K6Sk9ubokh pkauONu9/doJHYro6OoYd8Mp4FT17CQrTdeCQr8IobCp6oipOvtIAk2joKZJl4bkuoUr chgGPHX1zm2N+1ciupeX0WlHB4FSwiEiKcaS6Qr6oLA54ci4S43vf29lZ+jj/XHOo/br bqLw== X-Gm-Message-State: AOAM530kDS+/WEKlCjyUg4Xxm6CAYoPYGizE8i8PdbwIt+8I+uFPMXfz ZBXY4CEatvVhsW+tryCsz7nDr3uuKsv5ULHA X-Google-Smtp-Source: ABdhPJwxyzH0aKXepjeBWYpGYm2E+GX43DdvCZ7gaMla4Jn6fYuIYHu/ebYyAus8NSP7vTvSX9C32A== X-Received: by 2002:a9d:685a:: with SMTP id c26mr3669960oto.40.1603850862340; Tue, 27 Oct 2020 19:07:42 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id 7sm2199891ois.3.2020.10.27.19.07.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:41 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 17/29] completion: zsh: trivial cleanup Date: Tue, 27 Oct 2020 20:07:00 -0600 Message-Id: <20201028020712.442623-18-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 3689bcbd6c..234e4278a2 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -136,7 +136,7 @@ __gitcomp_file () { emulate -L zsh - compadd -p "${2-}" -f -- ${(f)1} && _ret=0 + compadd -f -p "${2-}" -- ${(f)1} && _ret=0 } __git_zsh_bash_func () From patchwork Wed Oct 28 02:07:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62598C4363A for ; Thu, 29 Oct 2020 00:18:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9608207E8 for ; Thu, 29 Oct 2020 00:17:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g2F2JGKC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390721AbgJ2ARn (ORCPT ); Wed, 28 Oct 2020 20:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389649AbgJ2AQz (ORCPT ); Wed, 28 Oct 2020 20:16:55 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B9DAC0613CF for ; Wed, 28 Oct 2020 17:16:55 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id u127so1483977oib.6 for ; Wed, 28 Oct 2020 17:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lrts7Ycg5LZkyIZ+7Ws7x99eIq3Wf2zXjxlrT6SjHAo=; b=g2F2JGKCNmY/+4UqtSUY8uDhELoNUV82FewyetaJkGT5tiu4a7g7UDkb7qd42WATlx 5gXczQmefWrkKp1OqpRt+6iEfzi3roB6OaZYGyPxF9qbDplFG+KUh4wHL8d9ggGSOrgj gevcGwAPaWuj2fsSYKv1W8Jqm/pVbkyNYN/TmfP6CIA391ZosrfjTCSk4SGDA6teCj2V KdrmiXRsqSf0BfsgBI9Tp/D7PEhpol9hWcpVz/cCIaqTSwXT81+fq5MU1rE0PJgrUKP7 jKx1+vt2gFZAI+Nf+vmMPvD7jdxF1JJCHuUm/Ue+m1rX1KjdO5x08UlFbJWtrU1kPR7K 31iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lrts7Ycg5LZkyIZ+7Ws7x99eIq3Wf2zXjxlrT6SjHAo=; b=TDmHD679S+v1OY3b6ieZWgW/iqgoVOZJEZzq2pGmU8RwTaVT5rE5aPJNSTjg7e94to plfcxTubYuqDHGwKkQrmWw5GoxJWL01WN1EqEjO58b4dxQ3XNW2zGbkHDdQ89n6PTM+T jjrrN7I7LU1SUnRWVGFRKNdG8bx56EyqhZXHsF62qW53f4lP3ufCs8aKj7A+HV3yVob1 FOyi+OScNwSmqTzaQE404SelwZ7CUDO6YzihKcH4m/uU8cY12D+hSyUZZNzGECZ4os8O 6BVcARv70br+P8G+PwWm6ysFz7ziSsjtW2pLimfYU7/qjzsb9a1us5IhbqC22jFQ/Rlg zugg== X-Gm-Message-State: AOAM532bvPfeHVdFM0hvRNZbtpuvWP+Wg8wltd0saZdc5Zu0h5RnKyKg 8G8QIYWjiBIBA+vdJOdfQHNEMbv4U+HUoeY3 X-Google-Smtp-Source: ABdhPJxuzQgLrgy+1VK+5BHBtAQXrHINaBdlcQm2pfg7uAo2At/LTi//mOTBoEfHSZ5EzCxLVXE4nA== X-Received: by 2002:aca:5608:: with SMTP id k8mr3463000oib.118.1603850864155; Tue, 27 Oct 2020 19:07:44 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id b7sm2150504oic.36.2020.10.27.19.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:43 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 18/29] completion: zsh: simplify nl_append Date: Tue, 27 Oct 2020 20:07:01 -0600 Message-Id: <20201028020712.442623-19-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It's exactly the same as __gitcomp_nl(), no need to duplicate code. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 234e4278a2..7126c75001 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -119,10 +119,7 @@ __gitcomp_nl () __gitcomp_nl_append () { - emulate -L zsh - - compset -P '*[=:]' - compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0 + __gitcomp_nl "$@" } __gitcomp_file_direct () From patchwork Wed Oct 28 02:07:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11865009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5BA3C55179 for ; Thu, 29 Oct 2020 02:14:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85F3A20738 for ; Thu, 29 Oct 2020 02:14:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uRTD7U5x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404338AbgJ2COW (ORCPT ); Wed, 28 Oct 2020 22:14:22 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:34670 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726777AbgJ1Vfr (ORCPT ); Wed, 28 Oct 2020 17:35:47 -0400 Received: by mail-oi1-f194.google.com with SMTP id z23so1130954oic.1 for ; Wed, 28 Oct 2020 14:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oaPxypgvAa8C9LKBaA2PdQDmPILjY+4WEWIl8qkq+dc=; b=uRTD7U5x59EeESKSjUGB7uSi2AIzSsvlyieJDS99LZsj5SrASW/Q+9shOJ3WaLShWS oHK4mGN+ACBIV5PVFqG9TxVGYlHAhVUqJUn7h7AZiYA8YOYJ+IXGN2/9fgpDvh9lhAvK KsG2uBP02PT7ZO6/Euykq18WXYNiCvCoEH73yuzdweNM+35/1U3G/BfT5Y1FXHOqK5X6 aDWDGk/yCFiGMS78DOS4NCX0mg4VsQXUeFXEYIC0If7cDj7oLYwvmZqL5EelHPmD3vpS ROh83TUjxz9EOcm2Eem9AiAVQ9iGwHvqnpPurGsNDOZoseAiQ+Q96AaMf2GPeTt2/p2C GLkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oaPxypgvAa8C9LKBaA2PdQDmPILjY+4WEWIl8qkq+dc=; b=D59ciqLkYVQWNbTcEnk9R5dLTyfVLpp0xWP28KJPBawDjcZhl0svC/vFPai3XEmdQ5 ycrjFPp+8dYln3fH1lAqNMFIyNOHO6FkRTHbGggUxg2xOP18Ia8kO75EScfxWwBbS777 q/46sj1U+ljZzTd9OmzpYDixivnoLk8KoRs8UVBL3UoTzDlQMKtcFw6Z6s/t2ceQ4wZg WBMsXi6Y1XW7ojnQMkRwTwLa0iriFLkSPeQHCizBLJxA30SeLTN1n48q8JrS5QddqA5u zo2mEFLczUxI4ttILZk1zOlpOZ38yNM9OEMcJw3X5jIsYq2Tk0TUeQXWR2J9x5AkIsTA DN7g== X-Gm-Message-State: AOAM533IrFsYQYsu7XVqxsURFOZO/GJXo//vnzLdJb6gprRgm1SZU7J9 dIBmI6PEp+4FcfZihgD18XQHzc1vhAeSyQ== X-Google-Smtp-Source: ABdhPJzYwOPFvUUwU737puINSNWewxnb1AFXMtsgJWuTrmW170zDjGz7hhO3DxuE19dsmJs9BBlrUQ== X-Received: by 2002:aca:f0c5:: with SMTP id o188mr3447996oih.95.1603850865828; Tue, 27 Oct 2020 19:07:45 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id i16sm1763566otc.71.2020.10.27.19.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:45 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 19/29] completion: zsh: simplify file_direct Date: Tue, 27 Oct 2020 20:07:02 -0600 Message-Id: <20201028020712.442623-20-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It's exactly the same as __gitcomp_file() with no prefix. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 7126c75001..4834ebc889 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -124,9 +124,7 @@ __gitcomp_nl_append () __gitcomp_file_direct () { - emulate -L zsh - - compadd -f -- ${(f)1} && _ret=0 + __gitcomp_file "$1" '' } __gitcomp_file () From patchwork Wed Oct 28 02:07:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF314C388F7 for ; Wed, 28 Oct 2020 23:56:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FAE2207DE for ; Wed, 28 Oct 2020 23:56:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iGFNFNnv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730715AbgJ1X4E (ORCPT ); Wed, 28 Oct 2020 19:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbgJ1Xyw (ORCPT ); Wed, 28 Oct 2020 19:54:52 -0400 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A1F1C0613CF for ; Wed, 28 Oct 2020 16:54:51 -0700 (PDT) Received: by mail-oi1-x22b.google.com with SMTP id f7so1450425oib.4 for ; Wed, 28 Oct 2020 16:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5mePBrMGRgp0Wh8E/chfjKY6sN4E7a9SZMG/bdRZI1s=; b=iGFNFNnvAo0z+hPTHPlGszFvey1RVbjJMuh6NTTUIWeH7Vs4D7BcaEjjMbpZ1AUIuZ QTHpcxMwVU+RHS8Ir6MtFm2SOsI1AUvbxBEoytGfyNoNZvYamTCi+bmkGkK9qAParCHo QTiJRBRhs2E6wIjSPKE1r+IeVFhz86NSKqDQUCHvh/mPiqD02Lczh5ziX8YRpJ4UBMvT Mmoga939u+hJR0JLi7/rXBwXH5+2Mo7LPGlC0KimhZvLrss1tOyG5+WjxRlxHJaxN4+f nnfYMxA6LVz4ygKLZEDWEpOS+AQZ66y8utkwnAcTOnyLid/rI0ktzaaqeY3V6E7tKtWX zh9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5mePBrMGRgp0Wh8E/chfjKY6sN4E7a9SZMG/bdRZI1s=; b=L+aEOEWn+N3uk/6nLALydSEfiu/HlLXn3OIfQu9qa28G9gFmarL2uA5Z29LOvhk374 40IeDkpbKLmbdjeT1jgGTrtj0ljGK4wuO5rud4IVLOp0W3T6IuKaze7MsGXgMfGF7FHS Lf1NV/3gOevmNEfpi5nHAyGhMSsDORGzJV+X/cK88hiPUYBULvEkFoA2yIYxwZa5emTt Th6kiR9+zaSJvRJz+DbhWA7o6xDU5DaawyQ6YP8z1Bhne/irp65JFli9yuDNcu5mn4iE 9t1ENFgAiPPaEiTT5d0RVf7xQVevSi0GDtX/FQX0PGEKnRChEDo3FnzF6L9XFCoy9g4V ZK8g== X-Gm-Message-State: AOAM533VH+ENlqL8gZTL3wTp/bh62WJuMytHbRtRgHjmDg67jlVanLTA Kn52Kpsg+oLEW5H4g7qpQUxSq5UAPYWuYW8C X-Google-Smtp-Source: ABdhPJyZUFk3SMN7moVAbVodGubClUvByK1JGck19cPc2f/k87NeBD1jqiTRCOwrLtVeA8VEO1iD6w== X-Received: by 2002:aca:ac06:: with SMTP id v6mr3492687oie.97.1603850867566; Tue, 27 Oct 2020 19:07:47 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id v123sm2311622oif.29.2020.10.27.19.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:46 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 20/29] completion: zsh: shuffle functions around Date: Tue, 27 Oct 2020 20:07:03 -0600 Message-Id: <20201028020712.442623-21-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Just to have a nice order. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 4834ebc889..60efddb4a9 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -104,11 +104,6 @@ __gitcomp_direct () compadd -Q -S '' -- ${(f)1} && _ret=0 } -__gitcomp_direct_append () -{ - __gitcomp_direct "$@" -} - __gitcomp_nl () { emulate -L zsh @@ -117,21 +112,26 @@ __gitcomp_nl () compadd -Q -S "${4- }" -p "${2-}" -- ${(f)1} && _ret=0 } -__gitcomp_nl_append () +__gitcomp_file () { - __gitcomp_nl "$@" + emulate -L zsh + + compadd -f -p "${2-}" -- ${(f)1} && _ret=0 } -__gitcomp_file_direct () +__gitcomp_direct_append () { - __gitcomp_file "$1" '' + __gitcomp_direct "$@" } -__gitcomp_file () +__gitcomp_nl_append () { - emulate -L zsh + __gitcomp_nl "$@" +} - compadd -f -p "${2-}" -- ${(f)1} && _ret=0 +__gitcomp_file_direct () +{ + __gitcomp_file "$1" "" } __git_zsh_bash_func () From patchwork Wed Oct 28 02:07:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE1CDC388F7 for ; Thu, 29 Oct 2020 00:00:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 576712072E for ; Thu, 29 Oct 2020 00:00:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="udDowu5F" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731056AbgJ1X7y (ORCPT ); Wed, 28 Oct 2020 19:59:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbgJ1X7C (ORCPT ); Wed, 28 Oct 2020 19:59:02 -0400 Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5475BC0613CF for ; Wed, 28 Oct 2020 16:59:02 -0700 (PDT) Received: by mail-oi1-x235.google.com with SMTP id z23so1474943oic.1 for ; Wed, 28 Oct 2020 16:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q0+ROmKMSrlKNqnxSB8Zax10o0/ar5SuTTHYlNbgkJM=; b=udDowu5Fs9Elf04b/i0CVAeCA7+qsV2EAj2yVoiJTONG0e9g0wB66fGLl27YCcJyej bEexNPmjUSZhqxeWbQ/xQIPQ9yV/quI2UmHSY6eK41mSAL6zO6VMsDBEOitZFTjJlRXN 9UmGtCHc4y51m/2qB1tLtGqdEfB/Cm1vdCMvpCrnvWalvsyroEWOkAVs2jfA5gU2mGMr H/4V/9HIaFujk265oUVF81VOG7JNm5T5gqtkqQ33zELYOEDSlCb/aLLj/nrL8ZESUdDx rVl9rIoJCy2KvlfWIL9iGwx/ZPIGbGJ/24oF/TNvfqTMwHt2RBpwgTH/MTo6//goI72q qTNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q0+ROmKMSrlKNqnxSB8Zax10o0/ar5SuTTHYlNbgkJM=; b=hZBv+JN84325LDEN06SAu2fdpXQLYlMW/eNW/QPc1CTey6TG5Tecc+XFCZKMTgzATA RUqQQv7HXD6vBfe5qvhxV67vmA7CYhceBPupvl17oqTU9eFSWW1U46o+2Rv2ZGapqkL8 kdxIdL87Gb5dDLQb0ODaM2WI6hJrg2OGtBU/W2fIVCLmTXZhWattLm0y1kCMUOwctAaA keX9tKliOnSTI47xYeeZV/hdbejCwPfcH+YZ9XOjXId+SurWE0erbFD/tWrDxgB5BrHB a9Xq08ppQQonApLdb6cftfGA792x0sZO40I/luw7GU3GWSPKdODMdiDw8tjRqn9Zhbri 65vg== X-Gm-Message-State: AOAM5315ZEiMYo0VG0J7rT2XhnKTsKYoqwgv/iw2mH9wU0B7P8EHYsuj SaaJ4TWm/WvB8oIhfTv8kxyMTH+aa1eonqUq X-Google-Smtp-Source: ABdhPJx1CRlkLiiXztAsgouyl/lKn3z7bOOMsxdG+GdZ+XhQ+opcqLnTuo5z5IBN2XzYjoFAJf2PRA== X-Received: by 2002:aca:5f85:: with SMTP id t127mr3652854oib.18.1603850869096; Tue, 27 Oct 2020 19:07:49 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id 105sm1734775otf.52.2020.10.27.19.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:48 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 21/29] completion: zsh: refactor command completion Date: Tue, 27 Oct 2020 20:07:04 -0600 Message-Id: <20201028020712.442623-22-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 60efddb4a9..858864f3fb 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -134,20 +134,32 @@ __gitcomp_file_direct () __gitcomp_file "$1" "" } +__git_complete_command () +{ + emulate -L zsh + + local command="$1" + local completion_func="_git_${command//-/_}" + if (( $+functions[$completion_func] )); then + emulate ksh -c $completion_func + return 0 + else + return 1 + fi +} + __git_zsh_bash_func () { emulate -L ksh local command=$1 - local completion_func="_git_${command//-/_}" - declare -f $completion_func >/dev/null && $completion_func && return + __git_complete_command "$command" && return local expansion=$(__git_aliased_command "$command") if [ -n "$expansion" ]; then words[1]=$expansion - completion_func="_git_${expansion//-/_}" - declare -f $completion_func >/dev/null && $completion_func + __git_complete_command "$expansion" fi } From patchwork Wed Oct 28 02:07:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6362AC4363A for ; Thu, 29 Oct 2020 02:05:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19A3820878 for ; Thu, 29 Oct 2020 02:05:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RP5+Af36" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729082AbgJ2CFX (ORCPT ); Wed, 28 Oct 2020 22:05:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727097AbgJ1Vic (ORCPT ); Wed, 28 Oct 2020 17:38:32 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5400C0613CF for ; Wed, 28 Oct 2020 14:38:32 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id 9so1115655oir.5 for ; Wed, 28 Oct 2020 14:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w6Ui3PmfcmaZFFFXz0FUQ4Lr/gNpAFU0/draG+RBXU8=; b=RP5+Af36Be3KNDYtOSoeuCA+vyVPh/DCEPxeZvXXRmqphGpsdIUamqw2oVikkEJ+9h ZIegkGSAqxvB4EEIi2yDRBC8d5ihNsqUv7z7qWetnoHNi696OAuqIS4yWuvp4krkAvQs wkFJcuXV7KXbUya5EVVG4LctkYgVsaWQa6Dd2HIj2Vs4N83sc9Ge1lTiAAY16CeFGYOn BOAEixFC7209Xqha8N6mcKUpDmvXOpgZaMYwLJAmtjVvPMSda38VjD3e6pPQCInZd9hn YmvrE2ioBmOHhmGMhOMM22DxuN9crJEHqchXwl0ms9UwB7BbqwAb2AC3CUuTNKrYNvOL bquQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w6Ui3PmfcmaZFFFXz0FUQ4Lr/gNpAFU0/draG+RBXU8=; b=fhs8eBb9jCl6eP5CmDL3yidJxJuccRKfhdWcx+0JPbkHZW1zuPCyvcdl7o+eGDfF8q dNqCJk6Ib5/3eGHXURwcNCvEhPHFqJxL1ky2q9DmRjdKoIE3XMMXfygdo+bWrZIhTh4M 0UfvjNfPKD+qmmp7NFoljAKonR5oN8jzktKcC1z4ndDffDblqXXkPTuBiHAyfMKrOBqj sLVsrWsjGKY8h66kH9zHhQFExg0BxsB18vB1IOLpjfOOz92z6BuVhzAaJAWDxma2kcqQ XT0/dBlQUZcmstf5ZiQh5Fuk6VKS76ayndWe4aJSWdOjgjy/qm7Zl+E81OCXgDm30GBO 2aEQ== X-Gm-Message-State: AOAM532gEiVOSM1G7M8RsBRSzJQzilagOzqVDLQOWXaloBjf2LiQexGv KrXVINvESmMa4KL+e81JXg1XSWA/JcDwYg== X-Google-Smtp-Source: ABdhPJySgkC3uFfMb8mbJPMUJkhl+elOgWhTEy+qNDnc+naW8cuqxg9Aa2oMhWQx6SroRrFC1+K0hQ== X-Received: by 2002:a05:6808:254:: with SMTP id m20mr3705102oie.139.1603850870659; Tue, 27 Oct 2020 19:07:50 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id l23sm1722439otk.68.2020.10.27.19.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:50 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 22/29] completion: zsh: improve command tags Date: Tue, 27 Oct 2020 20:07:05 -0600 Message-Id: <20201028020712.442623-23-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org There's no need to use _alternative and repeat a lot of the code. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 858864f3fb..22d8e58fcc 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -235,10 +235,13 @@ __git_zsh_main () case $state in (command) - _alternative \ - 'alias-commands:alias:__git_zsh_cmd_alias' \ - 'common-commands:common:__git_zsh_cmd_common' \ - 'all-commands:all:__git_zsh_cmd_all' && _ret=0 + _tags common-commands alias-commands all-commands + while _tags; do + _requested common-commands && __git_zsh_cmd_common + _requested alias-commands && __git_zsh_cmd_alias + _requested all-commands && __git_zsh_cmd_all + let _ret || break + done ;; (arg) local command="${words[1]}" __git_dir From patchwork Wed Oct 28 02:07:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863369 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 299FCC56202 for ; Wed, 28 Oct 2020 21:54:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6DBB246CD for ; Wed, 28 Oct 2020 21:54:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jNxESoSB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728750AbgJ1VyV (ORCPT ); Wed, 28 Oct 2020 17:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728204AbgJ1VyQ (ORCPT ); Wed, 28 Oct 2020 17:54:16 -0400 Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADACBC0613CF for ; Wed, 28 Oct 2020 14:54:16 -0700 (PDT) Received: by mail-oi1-x232.google.com with SMTP id f7so1161884oib.4 for ; Wed, 28 Oct 2020 14:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VQTNXYVrUBWkpiOZS+bhpmquE7TdMjk1fmvFFUySG+0=; b=jNxESoSB5U9dFncOlJeJP8hfA6xaJRb8rKs9MZDHbNrfTqmYNddlZ0idG6EsGw3aFr dZhxGuBzhY0mvoGTcDwgI03JVdak2/cqw8Sn0AtyKuc+XrE6BNIRmWM7xZav81/b7Yt0 nedVFCHjBkUl+j2oq8/ldCfCgOu7CUmF1KwkelhjYckckzsEGixJAXTOBjHzGx3p4uwZ mBApgjR5Pd3IdzIKh091X+U/qJsqBFOXT/do3WeC7DPgMP1b9syDlre3TksVLuKxxR+j PbdL8O7GlFYw4b7AM3oIOTtPRpJNAl3kNdjBg+UF/nYTW7TsFZUnG5gn3Av0X7J8tOqR eisg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VQTNXYVrUBWkpiOZS+bhpmquE7TdMjk1fmvFFUySG+0=; b=ZApXx3DsNOsrk/pQ8yaynXJXZfMs0OhIh970/O9ZuQlkB6KRCbCJiJUp9TEJYMmukU HI+2JDlgMthnZyz4MPBw+3GcYa09f3u53TRX1J0gPRDutsFJqmlrH6R2fT+mwnMkGruc WAki2mEYcv8fWqrvNSKCnKQGIlgK186hghbLAZK6GOhTKvVQz6QMFS68SkCjLID9Kdvl 6qMTS9JMAfDyWRGCFWMcfHPC5Eagl5Gvl+i2jZqqUxUCLUAcTo4o/WqF0gZFJu8KoyOW hWHyh/5cpWE6f82FtTHxy9NF7eVzDcaAWF4D/ngi0xXvVZApDXgUvTOy1miPQRc1pD8g x+7w== X-Gm-Message-State: AOAM531+YQBVu6WcH24BZmXgi9fHER/CEdD+/wwZVc7jAHNwLwBViujP qEW2C7saGkLxVnp/EaS9r13R3e2K0o8E6A== X-Google-Smtp-Source: ABdhPJxt054RU9A7qDP3yYuWRK2jMYf+E3Hknqgj5E9ab/yhwFsjVp7AjFujiKWXHYtvKeztimeeDA== X-Received: by 2002:a05:6808:b35:: with SMTP id t21mr3498076oij.102.1603850872288; Tue, 27 Oct 2020 19:07:52 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id g25sm1746623otr.35.2020.10.27.19.07.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:51 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 23/29] completion: zsh: add alias descriptions Date: Tue, 27 Oct 2020 20:07:06 -0600 Message-Id: <20201028020712.442623-24-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 22d8e58fcc..1204a55890 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -196,8 +196,9 @@ __git_zsh_cmd_common () __git_zsh_cmd_alias () { local -a list - list=(${${${(0)"$(git config -z --get-regexp '^alias\.')"}#alias.}%$'\n'*}) - _describe -t alias-commands 'aliases' list $* && _ret=0 + list=(${${(0)"$(git config -z --get-regexp '^alias\.*')"}#alias.}) + list=(${(f)"$(printf "%s:alias for '%s'\n" ${(f@)list})"}) + _describe -t alias-commands 'aliases' list && _ret=0 } __git_zsh_cmd_all () From patchwork Wed Oct 28 02:07:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864213 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94240C4363A for ; Thu, 29 Oct 2020 00:15:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 299C320780 for ; Thu, 29 Oct 2020 00:15:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GmNfvTQO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725898AbgJ2AP4 (ORCPT ); Wed, 28 Oct 2020 20:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725813AbgJ2APc (ORCPT ); Wed, 28 Oct 2020 20:15:32 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5846CC0613CF for ; Wed, 28 Oct 2020 17:15:32 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id m188so719421ybf.2 for ; Wed, 28 Oct 2020 17:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b3Eaj81IkNG3n6OjleymDnw7o5F38a7rg2QPq/FwkGo=; b=GmNfvTQOf7zdcdTn8pmVrAjlZB8geA4ZVABSF6z06SiryMPVeRM9RDviv6IVu4mr1A iN9DQsZ3begMO1aQj+dnzb7/ti1/RW/5e0BFw3Az5aJugWYAEzspNvo1G1F2HaFcCgRA 8fWtZB/r2Ptb1rnwh8AcvKoNZDJU2ssbRh+P9j5Z+ZP4DTw3vxYYse1GGrfZDSP2aavk Ka9P/EpI0Dsat0uEXjD9JymKBBehHH5SpaxeaCYa8R5UT8dGRHQAmsV9GWAVCX1cO84L X0h68HB6thUGIjkN1ANd8LUj7QT8mfKTdmYvd1moHSrEwvHVLEpR6kDq/9afBF0CVWlz /QMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b3Eaj81IkNG3n6OjleymDnw7o5F38a7rg2QPq/FwkGo=; b=E4jRo/VRALiHC5PyAT+xgddBjMpCxRYiUnquEsYO4LZ+lof/onrd5tJXu5lCR30+A6 Er/T1Ns3tqhMjIwlTwK+BeuPlCLzscMNG30ZO6wOwV4NC5LHt1VJuWxTcZ2mAiaFZUBC AuqhtNatsmfhmskJ6PFpZdYYSgtC1gZQ5DhLqqvZ7qEQ5yXNHAlrX8Eigz1HBbg/i1r2 oF8/p5634Z6l4jfHO6y9obgWJtjVEROM+W8T1ows//gL9kqHie1uFnsjy8KXltpXYQDs w3nTy6IEWk+VcGxRwq6s9iKSlQHYM25fjXPVpP/qXm78Dz4DZmThSpyM9Qw/ZzEAMZAT CR5g== X-Gm-Message-State: AOAM5339BuFPWOGpVneUsRxO5ugokjjkzLsXe0XhazSM1w9Mr3OJ2hek KS6b/ud32qmlkQ8yEoXwWqaVOBUAI9UM3a24 X-Google-Smtp-Source: ABdhPJzVU3OotMvdMRL5rvvfVpu9G3deinc3soTLsYGiqHuXvkZZLhg4+CEHDWceUixj1ovc32rgwg== X-Received: by 2002:a9d:969:: with SMTP id 96mr3327116otp.365.1603850873900; Tue, 27 Oct 2020 19:07:53 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id j84sm2272472oia.25.2020.10.27.19.07.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:53 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 24/29] completion: zsh: trivial simplification Date: Tue, 27 Oct 2020 20:07:07 -0600 Message-Id: <20201028020712.442623-25-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From upstream bash simplification: d9ee1e0617 (completion: simplify inner 'case' pattern in __gitcomp()) Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 1204a55890..2956b9d0d8 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -85,7 +85,7 @@ __gitcomp () fi c="$c${4-}" case $c in - --*=*|*.) ;; + --*=|*.) ;; *) c="$c " ;; esac array+=("$c") From patchwork Wed Oct 28 02:07:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11863405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 595F6C388F7 for ; Wed, 28 Oct 2020 21:58:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2AE624743 for ; Wed, 28 Oct 2020 21:58:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j6ZgJ90k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729197AbgJ1V6c (ORCPT ); Wed, 28 Oct 2020 17:58:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729186AbgJ1V6c (ORCPT ); Wed, 28 Oct 2020 17:58:32 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6DAC0613D1 for ; Wed, 28 Oct 2020 14:58:32 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id k65so1148261oih.8 for ; Wed, 28 Oct 2020 14:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uu94bCnEjKN/EoPVWZtRahi/YSyBfCxIantkDCjPil0=; b=j6ZgJ90kwR+r/teP41UV5t2f55Rw6dnVJFdaV0RKRh/MVR/jg06PMhqTE2XKWxyFs4 1/Cej06RDAlr1hAnFzsVpdL8xs6ZQStX0Q/myQU0/nHsu4M1k305QMgYQqIpStHP4Esv r9B5g8obfZSbFB4+9uT7OVsQrNj3siXsaV/UjPz5zSDrYrRzhhLU8M3zecEsiaCAEpn/ rk1KuGW7+tCR1jONZxdK4MLc3415w53iSIk03RBGOyn6711QbDDqAuL3PK6kstYJYvkv UTT+aiXoUMt1C6+oNYDPMpg8TcXleiwqSNM4S58Qv0WyccyonvUzgYMDHqM3+swUmn1R Eorg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uu94bCnEjKN/EoPVWZtRahi/YSyBfCxIantkDCjPil0=; b=TN6WkQ/ZNevszVb3trUUlv6Pp8s/Rmqp/yLWN5Zhbf3s2fm3RoJXvUPkfS0MkF+y/H CkJP5PBfFxsSF15LwJs0ZEvFWZ6tKyMngQhm2DfkwYV3an1NdUpzKoX+TdQKio35DENN IXpnlXaqdnTdirDaIZOyjKJwB9WghMFjDLQzuDBosy8R6/VLFTotlUFQakQJxEo6BKL1 T+I3LV/IjqIEIURFNn9U3oIuw995cZe7tIymmiL/LmG2aizj2BK7xpmlUkvC4VHeeO0t JgDgf1tK9nkH6vQVawUQqf9TjqR1jgiXv+gdjLzaw5l2qUcw+dnnNAeaqc9B3kVhEN/R oeYQ== X-Gm-Message-State: AOAM532AmTMAjdYijwdQ/cB2WqOD5G6SK+8lw9O4wwRRUBX9BPxsIdKb 7aMnm75wWXP65r8lcVg4iQmWNdFGoErY7g== X-Google-Smtp-Source: ABdhPJx65rpiuX8qhS/Oxq+ep4wh/rA1OUYKqu6zlndWUWomn9Y7IYgWX0wYzWxWR8SBmPw0O2CA1Q== X-Received: by 2002:aca:aacf:: with SMTP id t198mr3741234oie.132.1603850875531; Tue, 27 Oct 2020 19:07:55 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id z12sm2487956oos.12.2020.10.27.19.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:55 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 25/29] completion: zsh: add simple version check Date: Tue, 27 Oct 2020 20:07:08 -0600 Message-Id: <20201028020712.442623-26-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org A lot of people are confused about which completion script they are using; Zsh's Git script, or Git's Zsh script. Add a simple helper so they can type 'git zsh' and find out if they are running the correct one: this. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 2956b9d0d8..811d77cb95 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -134,6 +134,11 @@ __gitcomp_file_direct () __gitcomp_file "$1" "" } +_git_zsh () +{ + __gitcomp "v1.1" +} + __git_complete_command () { emulate -L zsh From patchwork Wed Oct 28 02:07:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23637C4363A for ; Thu, 29 Oct 2020 00:23:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5EC7206DC for ; Thu, 29 Oct 2020 00:23:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LuOWz404" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388514AbgJ2AXh (ORCPT ); Wed, 28 Oct 2020 20:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727872AbgJ2AXg (ORCPT ); Wed, 28 Oct 2020 20:23:36 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0842CC0613CF for ; Wed, 28 Oct 2020 17:23:36 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id x1so1456457oic.13 for ; Wed, 28 Oct 2020 17:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xHRU2BEFrAgvQg4uU0wWjwvAdoxtstGONimXMKR4H1M=; b=LuOWz4048hwiJD/ZsnA7B5Fy6Nt6gELvP1+0FcXXXw06R1dboF6HvEQTeQGUW/0eC9 pKFiPDRLIlrUq+APAtCDiY0TNSmPWcImprujNGzVF7Ivz9oL7L+xXBD+QdqYsp0d4tt1 0WMj3cKiI2iErurkj3wVcwleHPh+XFUqxY4CoupUJqpEskRVPFqxKkLOB4JcCOLQSgzH 9R1LRFYHxFFej0Ziv9JMc22xUKocMVYfGu0Z78M+VcXjwfutfqCrhnUHt5ZRdNzEHgLj eHJpxJikhealbvaKeTM/ochwF8vm/X/9lC37gebfWydMwboy5QVVEug7R9PSnqrDRCK7 umkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xHRU2BEFrAgvQg4uU0wWjwvAdoxtstGONimXMKR4H1M=; b=dQkt0JoWeUKavNdNyf7lk9XGlnpbfGra5VrH4HeoqpiC0p2JXGh/LzzIdWnBeHxKLx Nf8PtHkgic/bWZQdsom5DIUFW7W406QRY4lRaS8zMfWOa4o6ptkcoCrrSEizD4Muu1NB 2j6FiYgMeEMJkjwcag4HnyNsw+lZV3SFAr846utUP3XUjtDYZ0RLOBiyDbHMV44D9ziG PvBrOko3PewjRr5wwDqQpHZhkZyYpiud7oTno3z1bcKn3+XPZ4Al8cpLnvzYGzk+TnSM lY3HXgqgHtNRGZNeaF/bI0oVq4x+JieTMd4IdweF119l6aO1cdNDJ+luFAaiRRpIEMRG HTtQ== X-Gm-Message-State: AOAM530V+3ZvHhskBgAqwm1Ie3OuL9L1eqoyH83/L0MJEnI2WHE9hgEG SEX2O02H4edGo0JhSiapBa2ft/J7uBKod4Zq X-Google-Smtp-Source: ABdhPJz6nge7V5pv2NPLFxev2OkBZNbHA/m2W7AQN8VZ6L2Yb6bqdMH/UoyuqsuSrX43xKBN0Vp6Pw== X-Received: by 2002:aca:b744:: with SMTP id h65mr3666568oif.149.1603850877079; Tue, 27 Oct 2020 19:07:57 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id l23sm2304249oig.12.2020.10.27.19.07.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:56 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 26/29] completion: bash: trivial cleanup Date: Tue, 27 Oct 2020 20:07:09 -0600 Message-Id: <20201028020712.442623-27-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org There's no need to set a variable we are not going to use. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 26d6ee20b0..ed059f35c3 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -416,14 +416,13 @@ __gitcomp_builtin () local options eval "options=\${$var-}" - local completion_helper - if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then - completion_helper="--git-completion-helper-all" - else - completion_helper="--git-completion-helper" - fi - if [ -z "$options" ]; then + local completion_helper + if [ "$GIT_COMPLETION_SHOW_ALL" = "1" ]; then + completion_helper="--git-completion-helper-all" + else + completion_helper="--git-completion-helper" + fi # leading and trailing spaces are significant to make # option removal work correctly. options=" $incl $(__git ${cmd/_/ } $completion_helper) " || return From patchwork Wed Oct 28 02:07:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFB86C55179 for ; Thu, 29 Oct 2020 00:21:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5415E207DE for ; Thu, 29 Oct 2020 00:21:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AxxtrG97" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbgJ2AVJ (ORCPT ); Wed, 28 Oct 2020 20:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbgJ2AUY (ORCPT ); Wed, 28 Oct 2020 20:20:24 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93F5C0613CF for ; Wed, 28 Oct 2020 17:20:23 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id y186so1510828oia.3 for ; Wed, 28 Oct 2020 17:20:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6OpLt9KP5FdRbA1PYkIm1on1UULzoMeoulti4k0DJzo=; b=AxxtrG973N5tOzoNQ6Eu3Ea+6HR7t3ghqBqy7QgljIfBEInSK6BtSw8+WVlVdV0ks6 AuPiRCDuLFSeMLcNUGAjREDjVSPqhwdIfEitLj2xlXMmSfphojVAswblmYxXu/gVvewG CmoostUP/4YMFN8eWQe2XHFQlH2ZFwPICwDAc258Ac1ejr/yWKAaIiIpODc+Ck47ShCQ okiDy/LWkHA6JxhNa29PwfB62hhsMIp7/l9lUduGyTurNGhKpiCIL4IZi3T9EFoksxdx FITqcA5O1JSTWafMO+EHrPiDSgfPIlro9x2vrnroaZfByfCBA5qp1NylpVnTU98Cch1q vQZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6OpLt9KP5FdRbA1PYkIm1on1UULzoMeoulti4k0DJzo=; b=Ve9BwIjBhAN13JvEIyVgkFQhlgx1xZqpCQdBU8m2HC5WrLECwxK7UdsGDov5dZdDAL abYoMlF50x2IyQ92bH5lI/DWVPdAZ0CXqLhFV3JyopBPSGinOjHhcIocQzG3DKH3+6WL Xa133EK2PmRrnkO/y3XLda4vNPfHUryJvut8JFhY3dEkLi63u2/EbvLz1eE6wWxWoVeZ OjxOBAGmKkmWTvvUHlPYKy29M0KzyJ0YYWlochsAn5tjDqgm0oCfFMzViap6xu7R6X+k FA6W0Py408EaJ8lAFDXdZa0Jo0/y+eEBQy416XwaI5TveNH/rrvz2pEgUbLH9uQucPdG dGNQ== X-Gm-Message-State: AOAM531ibnNVyBYFIuPmwgiCudaXUFv4vXuMvXVZwJ5gBkOgVVW5ANQo qOS3G8gKk9UCsZMXC5dAd9F/xXMtCi3JqVXw X-Google-Smtp-Source: ABdhPJwge6hssqVWPYiXdrhVSWmdLW9rCTFP7KWCs5yfqv24QwUo2+5IgClC7UC5qmwYd765ZSzH9g== X-Received: by 2002:aca:cdc4:: with SMTP id d187mr3786486oig.19.1603850878815; Tue, 27 Oct 2020 19:07:58 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id 81sm1840326oti.79.2020.10.27.19.07.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:58 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 27/29] completion: bash: cleanup cygwin check Date: Tue, 27 Oct 2020 20:07:10 -0600 Message-Id: <20201028020712.442623-28-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Avoid Yoda conditions, and use $OSTYPE. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ed059f35c3..980ce73b0f 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3499,6 +3499,6 @@ __git_complete gitk __gitk_main # when the user has tab-completed the executable name and consequently # included the '.exe' suffix. # -if [ Cygwin = "$(uname -o 2>/dev/null)" ]; then -__git_complete git.exe __git_main +if [ "$OSTYPE" = cygwin ]; then + __git_complete git.exe __git_main fi From patchwork Wed Oct 28 02:07:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7716C388F7 for ; Wed, 28 Oct 2020 23:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7E45A207CD for ; Wed, 28 Oct 2020 23:43:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D90TvNi+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387442AbgJ1XnO (ORCPT ); Wed, 28 Oct 2020 19:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389654AbgJ1Wvw (ORCPT ); Wed, 28 Oct 2020 18:51:52 -0400 Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBF23C0613D1 for ; Wed, 28 Oct 2020 15:51:51 -0700 (PDT) Received: by mail-yb1-xb2d.google.com with SMTP id c129so548969yba.8 for ; Wed, 28 Oct 2020 15:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0EmZFc5LOEyK0YBvL6y9PpGBu/UN97p4wj1DqQh+z0c=; b=D90TvNi+ws4Qx+cy1dmgIVdQXhP+uHAGdkzG6jCbpqQfzivDMDWDxi1mwjBTAAHu2e yYfc9CPOnCYh3Ar5KX1qOQ+MKEi3uV0UHmF2oyvJLjnmVcwgiP7mmigNp0m243wBrG7L EPjmOSASIGsPpzrLOLU7lZUqXDsVdLmeHRTRW7OPoxRgOMpwbq55Oowpfo6xIFZ9Vsku RL2Dj4LZapuganAs1SQMPoWpeaT6R4imVmVU9Lv+Vr86f2qJc0lGEo8vV+D1JkzOkbtQ wIo1r1cRNUAauLEYfh8UyR3D+XHJO7EhD8wsyvcRiuOlUgoq8lDWjzWHRQ2CfxviLAAj r/Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0EmZFc5LOEyK0YBvL6y9PpGBu/UN97p4wj1DqQh+z0c=; b=lH5hqvwGY7py2F73NFAxNVvJv1r5UQmbGaJHizurkgSRMsNDnH2vq0tuh9A+tdzjSn Sn8aYcZx5QVhp9aeA4n3gdSn8HpK7tF/lJzvYOPe0f2P11ShUi3CZHmWMghm+tJ1Rxs/ 3uoHlhwamliIsXSRs8Rla+WGCNQC5Skct6l8jx8HKyBcXsfNluTpR/1AFBihzNpyManz d7fpdTdWcC4iAE2vgqssd4FDhRcFrw85UdyvhsNVSCt3hRfgBzbUQ+LKgxrW/1JmIMKs OT4zkGf+ULSWLImg/wsydCgQ+vblvow784F7zUdDzOij9jaF2TDGOI4TpQCBkkcspVBC LXEw== X-Gm-Message-State: AOAM530p1ExdEtoNCOucfDIQMrPr4FugZdf6uHMs8HIDAn66ijPNvOLi jzh9ReRgI/MXDnjCBV81S5IrgDaiBwCDhhPw X-Google-Smtp-Source: ABdhPJytSyDvIdEuSq5KrzbnSMILaa0x0LfnGIvOp8xdm1lxsMklYKLCLCkaK6YTQtL63Xp6V/xm/w== X-Received: by 2002:a05:6830:232d:: with SMTP id q13mr3598914otg.324.1603850880492; Tue, 27 Oct 2020 19:08:00 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id t65sm2124526oib.50.2020.10.27.19.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:07:59 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 28/29] completion: bash: remove old compat wrappers Date: Tue, 27 Oct 2020 20:07:11 -0600 Message-Id: <20201028020712.442623-29-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org It's been eight years, more than enough time to move on. Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.bash | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 980ce73b0f..49a6ef4236 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -3480,18 +3480,6 @@ __git_complete () || complete -o default -o nospace -F $wrapper $1 } -# wrapper for backwards compatibility -_git () -{ - __git_wrap__git_main -} - -# wrapper for backwards compatibility -_gitk () -{ - __git_wrap__gitk_main -} - __git_complete git __git_main __git_complete gitk __gitk_main From patchwork Wed Oct 28 02:07:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 11864045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF030C55179 for ; Wed, 28 Oct 2020 23:14:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35256206FB for ; Wed, 28 Oct 2020 23:14:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LFh7PeMG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733140AbgJ1XOR (ORCPT ); Wed, 28 Oct 2020 19:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730070AbgJ1XNh (ORCPT ); Wed, 28 Oct 2020 19:13:37 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F32C0613CF for ; Wed, 28 Oct 2020 16:13:37 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id k65so1334057oih.8 for ; Wed, 28 Oct 2020 16:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7g7dIrWKToJ2N7xelesD6rGIrJ1WvlvSs49fLo3vHP0=; b=LFh7PeMGc3Gg1Gisl/kSSNlkVzMwOq5jauFChv2+TPacZJPtqvEL/E6g+pZW6te5tB F5/PA4Ii1AWkg6hva7ttjzcK+9g9erUs0Kh7WvyCZnJz0ZtcmR5W0i+N075vZLvGZDMw a3J1ynpiYhv3XMF8sJSDJwhrkyI9RY3z3lPg8o0jFy0k2HQobvy9ZV1F6Gf3G4iEcpp+ Q+/bY3fX2idLkNR29QBJDtVghruyiX0kXexuJ6pBFhDKxSDZxjfmiJ96vczLTwfhCF8X 1txazduULM8v2vP5df7XGPk//IuUVg2VxEgydd4WnxX2rZjVydHBvE8AG/Im1P6wujRj PQ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7g7dIrWKToJ2N7xelesD6rGIrJ1WvlvSs49fLo3vHP0=; b=YZ0UzB7BKBqRbWr5T96mBmZCtZMxPBDiS8Dh2PG9PBlLACn8/xVomEu0jxtWcR5TYv nYTXmvEXpr0dSjqlvC6AMMjV/mGZm/ZfkxQK0IWibHaS0qbMtiRQiwwOTaJiu91osNHx XHEOGOXU0eLzHoKUahA/IzOnUPo4G5f43hJ5ElMOjDqxdpAWlcBFvH4FkCWj7nK7aUHH ZIJEFkYCIzOxL9yc04vk4Wqo8WjD9laaI3NDbJzyMHRGm2nb3sPwBzrVT7FR/UREo1hI tkEkoXiqYJR/USSR1SjsreTZtFmIQeTj8W2V+nFL1zBfGEWpcY6jLEJdktCfsSXb/NsX ZG1A== X-Gm-Message-State: AOAM532cewd41xOTUh5LziPDpm1nJW84VQskM7NqVYQMc3xYakSm3T6p J6Nlo7r5nxhi9NXeh9KW3YIRq6yXg6GRAufY X-Google-Smtp-Source: ABdhPJxpCium8d/1MAVfZwHJyIJLtR8WJGbiigQWCm0iw7BEknMH2xQZO0h/L9S5fCQKmjREfVhi+w== X-Received: by 2002:aca:ec91:: with SMTP id k139mr396264oih.88.1603850881921; Tue, 27 Oct 2020 19:08:01 -0700 (PDT) Received: from localhost (189-209-26-110.static.axtel.net. [189.209.26.110]) by smtp.gmail.com with ESMTPSA id t17sm2340722oor.3.2020.10.27.19.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 19:08:01 -0700 (PDT) From: Felipe Contreras To: git@vger.kernel.org Cc: Junio C Hamano , =?utf-8?q?SZEDER_G=C3=A1bor?= , Felipe Contreras Subject: [PATCH v3 29/29] Update copyright notices Date: Tue, 27 Oct 2020 20:07:12 -0600 Message-Id: <20201028020712.442623-30-felipe.contreras@gmail.com> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201028020712.442623-1-felipe.contreras@gmail.com> References: <20201028020712.442623-1-felipe.contreras@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Felipe Contreras --- contrib/completion/git-completion.zsh | 2 +- t/t9902-completion.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh index 811d77cb95..e0fda27f4c 100644 --- a/contrib/completion/git-completion.zsh +++ b/contrib/completion/git-completion.zsh @@ -2,7 +2,7 @@ # zsh completion wrapper for git # -# Copyright (c) 2012-2013 Felipe Contreras +# Copyright (c) 2012-2020 Felipe Contreras # # The recommended way to install this script is to make a copy of it as a # file named '_git' inside any directory in your fpath. diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 7b7bc6e4bd..caf4e9101f 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2012 Felipe Contreras +# Copyright (c) 2012-2020 Felipe Contreras # test_description='test bash completion'