Skip to content

Commit

Permalink
Make accept-work completion working correctly
Browse files Browse the repository at this point in the history
The fetch operation will be performed within the same BASH context where
git shows branches. This has to solve problem with wrong completion.
  • Loading branch information
extsoft committed Jul 29, 2019
1 parent 043b78c commit 1ce6967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions completions/git-elegant.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ _git_elegant() {
COMPREPLY=( $(compgen -W "${data}" ${cur}) )
return 0 ;;
accept-work)
git fetch --all
COMPREPLY=(
$(compgen -W "$(git branch --remotes --list)" -- ${cur})
$(compgen -W "$(git fetch --all &>/dev/null; git branch --remotes --list)" -- ${cur})
)
return 0 ;;
*)
Expand Down

0 comments on commit 1ce6967

Please sign in to comment.