Package Details: git-completion 2.2-1

Git Clone URL: https://aur.archlinux.org/git-completion.git (read-only, click to copy)
Package Base: git-completion
Description: Git completions for zsh and bash
Upstream URL: https://github.com/felipec/git-completion
Keywords: bash completion zsh
Licenses: GPL2
Submitter: felipec
Maintainer: felipec
Last Packager: felipec
Votes: 5
Popularity: 0.000000
First Submitted: 2021-01-01 01:22 (UTC)
Last Updated: 2025-01-18 21:26 (UTC)

Dependencies (1)

Required by (0)

Sources (1)

Latest Comments

felipec commented on 2025-07-29 08:27 (UTC)

@aria_im there is no other place to put them. The correct place would be /usr/share/bash-completion/completions/git but the git package is wrongly taking ownership of that, now nobody else can.

The correct way to do this would be the split the git package so the completion stuff is a separate package, then git-completion can replace that package and install the bash completion in the right place: /usr/share/bash-completion/completions/git.

Until that happens there's no other option.

aria_im commented on 2025-07-29 00:27 (UTC)

git-completion places its files in the wrong directory (violating filesystem hierarchy standard):

$ pacman -Qo /usr/local/share
/usr/local/share/ is owned by filesystem 2025.05.03-1
/usr/local/share/ is owned by git-completion 2.2-1

However, /usr/local/share is only supposed to be used for user-installed applications, not ones handled by a package manager (including e.g. pacman).

felipec commented on 2025-01-19 22:46 (UTC)

@sph git 2.48.1-1 doesn't have /usr/share/zsh/site-functions/_git. Are you sure about that?

sph commented on 2025-01-18 11:29 (UTC)

2.0-1 conflicts git=>2.48.1-1 on /usr/share/zsh/site-functions/_git

felipec commented on 2021-04-19 08:57 (UTC)

AFAICR the tests do require bash. The only thing I can think of is that your version of git is different than mine.

ElijahLynn commented on 2021-03-26 15:47 (UTC) (edited on 2021-03-26 17:50 (UTC) by ElijahLynn)

Tried to install this just now and got error:

# failed 1 among 66 test(s)
1..66
make[1]: *** [Makefile:11: prompt.t] Error 1
make[1]: Leaving directory '/home/elijah/.cache/yay/git-completion/src/git-completion/test'
make: *** [Makefile:8: test] Error 2
==> ERROR: A failure occurred in check().
    Aborting...
error making: git-completion

The error is:

ok 13 - prompt - inside bare repository                                 
not ok 14 - prompt - interactive rebase                                 
#                                                                       
#               printf " (b1|REBASE 2/3)" >expected &&                  
#               write_script fake_editor.sh <<-\EOF &&                  
#                       echo "exec echo" >"$1"                          
#                       echo "edit $(git log -1 --format="%h")" >>"$1"  
#                       echo "exec echo" >>"$1"                         
#               EOF                                                     
#               test_when_finished "rm -f fake_editor.sh" &&            
#               test_set_editor "$TRASH_DIRECTORY/fake_editor.sh" &&    
#               git checkout b1 &&                                      
#               test_when_finished "git checkout master" &&             
#               git rebase -i HEAD^ &&                                  
#               test_when_finished "git rebase --abort" &&              
#               __git_ps1 >"$actual" &&                                 
#               test_cmp expected "$actual"                             
#                                                                       
ok 15 - prompt - rebase merge                                           

I tried this install in both fish shell and bash shell thinking that maybe it was because of shell detection. I also used yay git-completion to install.

Opened upstream issue: https://github.com/felipec/git-completion/issues/2