-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bash: Fix completion for git-dotfiles and hub
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!bash | ||
# shellcheck disable=SC2239 | ||
|
||
. /usr/share/bash-completion/completions/git | ||
complete -F _git git-dotfiles | ||
if ! declare -F __git_complete >/dev/null; then | ||
_completion_loader git | ||
fi | ||
|
||
# FIXME: "git" instead of "__git_main" once https://github.com/git/git/commit/5a067ba9d04eebc92ad77f101b785219238f4f1e is released | ||
__git_complete git-dotfiles __git_main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!bash | ||
# shellcheck disable=SC2239 | ||
|
||
# drop once https://github.com/github/hub/issues/2684 is released | ||
|
||
if ! declare -F __git_complete >/dev/null; then | ||
_completion_loader git | ||
fi | ||
|
||
function _git { __git_wrap__git_main "$@"; } | ||
|
||
. /usr/share/bash-completion/completions/hub | ||
|
||
__git_compute_all_commands | ||
__git_all_commands=$({ __git_list_all_commands 2>/dev/null; echo "$__git_all_commands"; } | sort -u) |