From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id D40921F464 for ; Wed, 27 Nov 2019 17:42:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727104AbfK0RmV (ORCPT ); Wed, 27 Nov 2019 12:42:21 -0500 Received: from cloud.peff.net ([104.130.231.41]:34184 "HELO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726510AbfK0RmU (ORCPT ); Wed, 27 Nov 2019 12:42:20 -0500 Received: (qmail 12983 invoked by uid 109); 27 Nov 2019 17:42:20 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with SMTP; Wed, 27 Nov 2019 17:42:20 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 11926 invoked by uid 111); 27 Nov 2019 17:46:23 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 27 Nov 2019 12:46:23 -0500 Authentication-Results: peff.net; auth=none Date: Wed, 27 Nov 2019 12:42:19 -0500 From: Jeff King To: ryenus Cc: Git mailing list Subject: Re: No tab completion for git version? Message-ID: <20191127174219.GA12023@sigill.intra.peff.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, Nov 22, 2019 at 06:19:27PM +0800, ryenus wrote: > Tab completion works for `git --version`, but not `git version`. > Of course, it would work with a custom executable script git-version on PATH. > > Interestingly, it works even if the git-version script is an empty file. It's because git-version isn't mentioned in "git help -a", from which we generate the completion list. That comes from command-list.h, which in turn is generated from command-list.txt, which doesn't mention git-version as a command. And we can't add it there until it has a manpage (since we pull the oneline description from the synopsis). It might not be a bad thing to have a manpage. For example, the --build-options is undocumented. cmd_version() is also weirdly in help.c, not builtin/help.c, which might be worth fixing. -Peff