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