github.com/pengwynn/gh@v1.0.1-0.20140118055701-14327ca3942e/features/zsh_completion.feature (about) 1 @completion 2 Feature: zsh tab-completion 3 4 Background: 5 Given my shell is zsh 6 And I'm using zsh-distributed base git completions 7 8 Scenario: "pu" expands to "pull-request" after "pull" 9 When I type "git pu" and press <Tab> 10 Then the completion menu should offer "pull-request" with description "open a pull request on GitHub" 11 When I press <Tab> again 12 Then the command should expand to "git pull" 13 When I press <Tab> again 14 Then the command should expand to "git pull-request" 15 16 Scenario: "ci-" expands to "ci-status" 17 When I type "git ci-" and press <Tab> 18 Then the command should expand to "git ci-status" 19 20 Scenario: Completion of pull-request arguments 21 When I type "git pull-request -" and press <Tab> 22 Then the completion menu should offer: 23 | -b | base | 24 | -h | head | 25 | -m | message | 26 | -F | file | 27 | -i | issue | 28 | -f | force (skip check for local commits) | 29 30 Scenario: Completion of fork arguments 31 When I type "git fork -" and press <Tab> 32 Then the command should expand to "git fork --no-remote" 33 34 Scenario: Completion of 2nd browse argument 35 When I type "git browse -- i" and press <Tab> 36 Then the command should expand to "git browse -- issues" 37 38 # In this combination, zsh uses completion support from a bash script. 39 Scenario: "ci-" expands to "ci-status" 40 Given I'm using git-distributed base git completions 41 When I type "git ci-" and press <Tab> 42 Then the command should expand to "git ci-status"