Skip to content

Commit

Permalink
Add completion for aliased commands
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKarabaza authored and rultor committed Oct 18, 2017
1 parent d77a7b3 commit 12cf328
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/git-elegant-completion
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ _git_elegant() {
opts=($(git elegant commands))
COMPREPLY=( $(compgen -W "${opts[*]}" -- ${cur}) )
return 0 ;;
pull)
pull|epull)
local data=$(git branch | awk -F ' +' '! /\(no branch\)/ {print $2}')
COMPREPLY=( $(compgen -W "${data}" ${cur}) )
return 0 ;;
push)
push|epush)
COMPREPLY=( $(compgen -W "$(git branch | grep \* | cut -d ' ' -f2)" ${cur}) )
return 0 ;;
configure)
configure|econfigure)
COMPREPLY=($(compgen -W '--global --local' -- ${cur}) )
return 0 ;;
check)
check|echeck)
COMPREPLY=($(compgen -W '"--all" "--unstaged" "--staged"' -- ${cur}) )
return 0 ;;
*)
Expand Down

0 comments on commit 12cf328

Please sign in to comment.