git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Automatic parameters completion

From
Stephen R Guglielmo <srguglielmo@gmail.com>
Date
Feb 8, 2018, 14:22 UTC
Message-ID
<CADfK3RWXJyFWPUds1Q2qQS-w-Kwh8jKmO9VWCAgueo434LSYcg@mail.gmail.com>
In-Reply-To
<131f3b0f-0002-2823-d64b-ffd16fff8dfa@wp.pl>
On Thu, Feb 8, 2018 at 9:03 AM, Andrzej <borucki_andrzej@wp.pl> wrote:
Show 5 quoted lines
> I have Linux Mint and its terminal besides usual completion (add file name
> when type first letter and press tab) also can complete git parameters. How
> is doing this? Bash knows git or bash has special interface to completion
> and git uses it?
> I want in my Linux program apply this mechanism.

Various shells include support for completion of git parameters. These completion functions may be enabled by default in your distribution. For example, zsh has vcs_info[1]. There are also scripts included in git (contrib/completion) [2] to do this.

[1] http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information [2] https://github.com/git/git/tree/master/contrib/completion

Previous: Andrzej
Message 4 of 4 in “How juggle branches?”
  1. AndrzejJan 29, 2018
  2. Patryk ObaraJan 30, 2018
  3. Automatic parameters completionAndrzej, Feb 8, 2018
  4. Stephen R GuglielmoFeb 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.