Glam Prestige Journal

Bright entertainment trends with youth appeal.

I recently updated to Ubuntu 18.10 and after that my git completion has been failing.

Bash is able to complete the first command successfully, for example (I'll use ↬ to indicate TAB was used)

$ ala↬
$ alacritty

But when I use tab to complete a git command it fails.

$ git stat↬
$ git status #should be
$ git statunknown 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>]

I've tried reinstalling bash-completion

$ sudo apt install --reinstall bash-completion 

Check if it was some issue in my ~/.bashrc Link

Do you have an idea how to fix this?

3

1 Answer

This question was answered on a different StackExchange site. Here is the answer.

The reason I was having issues with my git-completion is that when I updated by Ubuntu it replaced the git-completion file found in /usr/share/bash-completion/completions/git with a version that needed git v2.18 and I have v2.17.1. The problem is that none of the package managers have updated to git v2.18 yet.

So I just replaced my git-completions file with the appropriate version found here.

Works as expected!

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy