Skip to content

bash completion installs to incorrect location on macOS #1018

@twolfson

Description

@twolfson

I recently upgraded to the latest git-extras via brew on macOS and the bash completion broke.

It seems related to this change, though unsure how: #983

The bash completion file was installed to:

/usr/local/etc/bash-completion/completions/git-extras

when there are no other files/folders inside /usr/local/etc/bash-completion, and all other bash completion files are inside /usr/local/etc/bash_completion.d/

$ ls /usr/local/etc/bash_completion.d/
abook               cups                gsettings           mailman             portupgrade         sshfs
ant                 cvs                 gzip                make                postfix             strace
apache2ctl          cvsps               heimdal             man                 postgresql          svk
...

My workaround fix was to relocate the file:

# mv doesn't work due to different levels of directory and being symlinked
rm /usr/local/etc/bash-completion/completions/git-extras
ln -s ../../Cellar/git-extras/{VERSION}/etc/bash-completion/completions/git-extras /usr/local/etc/bash_completion.d/git-extras
# Optional: rm -r /usr/local/etc/bash-completion/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions