ohmybash / oh-my-bash

A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
https://ohmybash.github.io
MIT License
5.86k stars 651 forks source link

Git completion is not compatible with centos7 #415

Closed shelfofclub closed 1 year ago

shelfofclub commented 1 year ago

Currently oh my bash searches git-core/contrib/completion/git-completion.bash https://github.com/ohmybash/oh-my-bash/blob/ec7efa5628f6d087bc1a68cb11c23704798d00ee/completions/git.completion.bash#L17

However, in centos7, there is no /usr/share/bash-completion/completions/git, but it has /usr/share/doc/git-1.8.3.1/contrib/completion/git-completion.bash.

akinomyoga commented 1 year ago

@shelfofclub Thank you for the report. I have pushed a fix in 70e0787. Could you check it?

shelfofclub commented 1 year ago

@akinomyoga It doesn't work. I try to echo file. The file is /share/bash-completion/completions/git or /usr/share/bash-completion/completions/git.

And it seems that you use prefix before defining it.

akinomyoga commented 1 year ago

Ah, sorry, you are right. It seemed to work in my local testing, but it just picked up prefix of the previous loop. Also, I now noticed that your reported path contains doc after share. I also added the possible path of doc. I pushed commit 96f6e00. Could you check it again?

shelfofclub commented 1 year ago

@akinomyoga It works!👍

akinomyoga commented 1 year ago

Thanks for reporting and checking!