File tree 2 files changed +22
-11
lines changed
2 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 17
17
browse
18
18
compare
19
19
ci-status
20
+ release
21
+ issue
22
+ update
20
23
EOF
21
24
__git_list_all_commands_without_hub
22
25
}
54
57
# hub browse [-u] [--|[USER/]REPOSITORY] [SUBPAGE]
55
58
_git_browse () {
56
59
local i c=2 u=-u repo subpage
57
- local -A subpages
58
- subpages[" /" ]=" commits issues tree wiki pulls branches stargazers
60
+ local subpages_=" commits issues tree wiki pulls branches stargazers
59
61
contributors network network/ graphs graphs/"
60
- subpages[ " /network " ] =" members"
61
- subpages[ " /graphs " ] =" commit-activity code-frequency punch-card"
62
+ local subpages_network =" members"
63
+ local subpages_graphs =" commit-activity code-frequency punch-card"
62
64
while [ $c -lt $cword ]; do
63
65
i=" ${words[c]} "
64
66
case " $i " in
81
83
case " $cur " in
82
84
* /* )
83
85
local pfx=" ${cur%/* } " cur_=" ${cur#*/ } "
84
- __gitcomp " ${subpages[/$pfx]} " " $pfx /" " $cur_ "
86
+ local subpages_var=" subpages_$pfx "
87
+ __gitcomp " ${! subpages_var} " " $pfx /" " $cur_ "
85
88
;;
86
89
* )
87
- __gitcomp " $u ${subpages[/] } "
90
+ __gitcomp " $u ${subpages_ } "
88
91
;;
89
92
esac
90
93
else
184
187
case " $i " in
185
188
-d|-h)
186
189
(( c++ ))
187
- ;;&
188
- -p|-d|-h)
190
+ flags=${flags/ $i / }
191
+ ;;
192
+ -p)
189
193
flags=${flags/ $i / }
190
194
;;
191
195
* )
232
236
case " $i " in
233
237
-m|-F|-i|-b|-h)
234
238
(( c++ ))
235
- ;;&
236
- -f|-m|-F|-i|-b|-h)
239
+ flags=${flags/ $i / }
240
+ ;;
241
+ -f)
237
242
flags=${flags/ $i / }
238
243
;;
239
244
esac
248
253
# Uncomment the following line when 'owner/repo:[TAB]' misbehaved
249
254
# _get_comp_words_by_ref -n : cur
250
255
__gitcomp_nl " $( __hub_heads) "
251
- __ltrim_colon_completions " $cur "
256
+ # __ltrim_colon_completions "$cur"
257
+ ;;
258
+ -F)
259
+ COMPREPLY=( " $cur " * )
252
260
;;
253
261
-f|* )
254
262
__gitcomp " $flags "
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ create
112
112
browse
113
113
compare
114
114
ci-status
115
+ release
116
+ issue
117
+ update
115
118
EOF
116
119
__git_list_all_commands_without_hub
117
120
}
You can’t perform that action at this time.
0 commit comments