From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 08A7A1F9AF for ; Fri, 3 Feb 2017 11:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753125AbdBCLC0 convert rfc822-to-8bit (ORCPT ); Fri, 3 Feb 2017 06:02:26 -0500 Received: from zimbra-vnc.tngtech.com ([83.144.240.98]:27002 "EHLO proxy.tng.vnc.biz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbdBCLCY (ORCPT ); Fri, 3 Feb 2017 06:02:24 -0500 Received: from localhost (localhost [127.0.0.1]) by proxy.tng.vnc.biz (Postfix) with ESMTP id CEA431E384B; Fri, 3 Feb 2017 12:02:21 +0100 (CET) Received: from proxy.tng.vnc.biz ([127.0.0.1]) by localhost (proxy.tng.vnc.biz [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OdO6dz7NuZAW; Fri, 3 Feb 2017 12:02:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by proxy.tng.vnc.biz (Postfix) with ESMTP id 83B611E3844; Fri, 3 Feb 2017 12:02:21 +0100 (CET) X-Virus-Scanned: amavisd-new at Received: from proxy.tng.vnc.biz ([127.0.0.1]) by localhost (proxy.tng.vnc.biz [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id z6JLHPSeSm1i; Fri, 3 Feb 2017 12:02:21 +0100 (CET) Received: from localhost.localdomain (46.128.140.114.dynamic.cablesurf.de [46.128.140.114]) by proxy.tng.vnc.biz (Postfix) with ESMTPSA id 2D1BA1E384B; Fri, 3 Feb 2017 12:02:21 +0100 (CET) From: cornelius.weig@tngtech.com To: git@vger.kernel.org Cc: szeder.dev@gmail.com, j6t@kdbg.org, Cornelius Weig Subject: [PATCH v2 4/7] completion: teach ls-remote to complete options Date: Fri, 3 Feb 2017 12:01:56 +0100 Message-Id: <20170203110159.377-5-cornelius.weig@tngtech.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170203110159.377-1-cornelius.weig@tngtech.com> References: <20170203110159.377-1-cornelius.weig@tngtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Cornelius Weig ls-remote needs to complete remote names and its own options. In addition to the existing remote name completions, do also complete the options --heads, --tags, --refs, --get-url, and --symref. Signed-off-by: Cornelius Weig Reviewed-by: SZEDER Gábor --- contrib/completion/git-completion.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 652c7e2..a355eeb 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1449,6 +1449,12 @@ _git_ls_files () _git_ls_remote () { + case "$cur" in + --*) + __gitcomp "--heads --tags --refs --get-url --symref" + return + ;; + esac __gitcomp_nl "$(__git_remotes)" } -- 2.10.2