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

bash completion with 2.18.0/maint: unknown options

From
ДПДилян Палаузов <dilyan.palauzov@aegee.org>
Date
Jul 14, 2018, 14:46 UTC
Message-ID
<d9272a12c2a38429857777f7811010956b7b6ed5.camel@aegee.org>
Hello,

in /git/git I have v2.18.0 and in ~/.bashrc : export PS1='${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\h\[\e[00m\]:\[\ e[ 01;34m\]\w\[\e[36m\]$(__git_ps1 " %s")\$ \[\e[0m\]' source /git/git/contrib/completion/git-completion.bash source /git/git/contrib/completion/git-prompt.sh

After upgrading to 2.18 the completion does not work:
typing "git de<TAB>" prints
my@host:~$ git deUnknown option: --list-cmds=list-
mainporcelain,others,nohelpers,alias,list-complete,config
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-
path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [
--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
l.txt
with l.txt being part of a file called "del.txt"
or typing "git reb<TAB>" I expect to have rebase, but I see
my@myhost:~$ git rebUnknown option: --list-cmds=list-
mainporcelain,others,nohelpers,alias,list-complete,config
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-
path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [
--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
Ideas?

Doing in git/git/ "git checkout v2.17." followed by 'source /git/git/contrib/completion/git-comletion.bash" does help (makes the completion functioning).

In the likely case this is fixed by now on master, please backport the fix soon to the maint branch.

Greetings
  Дилят	
Next: Jeff King
Message 1 of 3 in “bash completion with 2.18.0/maint: unknown options”
  1. Дилян ПалаузовJul 14, 2018
  2. Jeff KingJul 14, 2018
  3. Дилян ПалаузовJul 14, 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.