1# bash completion for git-bug -*- shell-script -*-
2
3__git-bug_debug()
4{
5 if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
6 echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
7 fi
8}
9
10# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
11# _init_completion. This is a very minimal version of that function.
12__git-bug_init_completion()
13{
14 COMPREPLY=()
15 _get_comp_words_by_ref "$@" cur prev words cword
16}
17
18__git-bug_index_of_word()
19{
20 local w word=$1
21 shift
22 index=0
23 for w in "$@"; do
24 [[ $w = "$word" ]] && return
25 index=$((index+1))
26 done
27 index=-1
28}
29
30__git-bug_contains_word()
31{
32 local w word=$1; shift
33 for w in "$@"; do
34 [[ $w = "$word" ]] && return
35 done
36 return 1
37}
38
39__git-bug_handle_reply()
40{
41 __git-bug_debug "${FUNCNAME[0]}"
42 case $cur in
43 -*)
44 if [[ $(type -t compopt) = "builtin" ]]; then
45 compopt -o nospace
46 fi
47 local allflags
48 if [ ${#must_have_one_flag[@]} -ne 0 ]; then
49 allflags=("${must_have_one_flag[@]}")
50 else
51 allflags=("${flags[*]} ${two_word_flags[*]}")
52 fi
53 COMPREPLY=( $(compgen -W "${allflags[*]}" -- "$cur") )
54 if [[ $(type -t compopt) = "builtin" ]]; then
55 [[ "${COMPREPLY[0]}" == *= ]] || compopt +o nospace
56 fi
57
58 # complete after --flag=abc
59 if [[ $cur == *=* ]]; then
60 if [[ $(type -t compopt) = "builtin" ]]; then
61 compopt +o nospace
62 fi
63
64 local index flag
65 flag="${cur%=*}"
66 __git-bug_index_of_word "${flag}" "${flags_with_completion[@]}"
67 COMPREPLY=()
68 if [[ ${index} -ge 0 ]]; then
69 PREFIX=""
70 cur="${cur#*=}"
71 ${flags_completion[${index}]}
72 if [ -n "${ZSH_VERSION}" ]; then
73 # zsh completion needs --flag= prefix
74 eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
75 fi
76 fi
77 fi
78 return 0;
79 ;;
80 esac
81
82 # check if we are handling a flag with special work handling
83 local index
84 __git-bug_index_of_word "${prev}" "${flags_with_completion[@]}"
85 if [[ ${index} -ge 0 ]]; then
86 ${flags_completion[${index}]}
87 return
88 fi
89
90 # we are parsing a flag and don't have a special handler, no completion
91 if [[ ${cur} != "${words[cword]}" ]]; then
92 return
93 fi
94
95 local completions
96 completions=("${commands[@]}")
97 if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
98 completions=("${must_have_one_noun[@]}")
99 fi
100 if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
101 completions+=("${must_have_one_flag[@]}")
102 fi
103 COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )
104
105 if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then
106 COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
107 fi
108
109 if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
110 declare -F __custom_func >/dev/null && __custom_func
111 fi
112
113 # available in bash-completion >= 2, not always present on macOS
114 if declare -F __ltrim_colon_completions >/dev/null; then
115 __ltrim_colon_completions "$cur"
116 fi
117
118 # If there is only 1 completion and it is a flag with an = it will be completed
119 # but we don't want a space after the =
120 if [[ "${#COMPREPLY[@]}" -eq "1" ]] && [[ $(type -t compopt) = "builtin" ]] && [[ "${COMPREPLY[0]}" == --*= ]]; then
121 compopt -o nospace
122 fi
123}
124
125# The arguments should be in the form "ext1|ext2|extn"
126__git-bug_handle_filename_extension_flag()
127{
128 local ext="$1"
129 _filedir "@(${ext})"
130}
131
132__git-bug_handle_subdirs_in_dir_flag()
133{
134 local dir="$1"
135 pushd "${dir}" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1
136}
137
138__git-bug_handle_flag()
139{
140 __git-bug_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
141
142 # if a command required a flag, and we found it, unset must_have_one_flag()
143 local flagname=${words[c]}
144 local flagvalue
145 # if the word contained an =
146 if [[ ${words[c]} == *"="* ]]; then
147 flagvalue=${flagname#*=} # take in as flagvalue after the =
148 flagname=${flagname%=*} # strip everything after the =
149 flagname="${flagname}=" # but put the = back
150 fi
151 __git-bug_debug "${FUNCNAME[0]}: looking for ${flagname}"
152 if __git-bug_contains_word "${flagname}" "${must_have_one_flag[@]}"; then
153 must_have_one_flag=()
154 fi
155
156 # if you set a flag which only applies to this command, don't show subcommands
157 if __git-bug_contains_word "${flagname}" "${local_nonpersistent_flags[@]}"; then
158 commands=()
159 fi
160
161 # keep flag value with flagname as flaghash
162 # flaghash variable is an associative array which is only supported in bash > 3.
163 if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
164 if [ -n "${flagvalue}" ] ; then
165 flaghash[${flagname}]=${flagvalue}
166 elif [ -n "${words[ $((c+1)) ]}" ] ; then
167 flaghash[${flagname}]=${words[ $((c+1)) ]}
168 else
169 flaghash[${flagname}]="true" # pad "true" for bool flag
170 fi
171 fi
172
173 # skip the argument to a two word flag
174 if __git-bug_contains_word "${words[c]}" "${two_word_flags[@]}"; then
175 c=$((c+1))
176 # if we are looking for a flags value, don't show commands
177 if [[ $c -eq $cword ]]; then
178 commands=()
179 fi
180 fi
181
182 c=$((c+1))
183
184}
185
186__git-bug_handle_noun()
187{
188 __git-bug_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
189
190 if __git-bug_contains_word "${words[c]}" "${must_have_one_noun[@]}"; then
191 must_have_one_noun=()
192 elif __git-bug_contains_word "${words[c]}" "${noun_aliases[@]}"; then
193 must_have_one_noun=()
194 fi
195
196 nouns+=("${words[c]}")
197 c=$((c+1))
198}
199
200__git-bug_handle_command()
201{
202 __git-bug_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
203
204 local next_command
205 if [[ -n ${last_command} ]]; then
206 next_command="_${last_command}_${words[c]//:/__}"
207 else
208 if [[ $c -eq 0 ]]; then
209 next_command="_git-bug_root_command"
210 else
211 next_command="_${words[c]//:/__}"
212 fi
213 fi
214 c=$((c+1))
215 __git-bug_debug "${FUNCNAME[0]}: looking for ${next_command}"
216 declare -F "$next_command" >/dev/null && $next_command
217}
218
219__git-bug_handle_word()
220{
221 if [[ $c -ge $cword ]]; then
222 __git-bug_handle_reply
223 return
224 fi
225 __git-bug_debug "${FUNCNAME[0]}: c is $c words[c] is ${words[c]}"
226 if [[ "${words[c]}" == -* ]]; then
227 __git-bug_handle_flag
228 elif __git-bug_contains_word "${words[c]}" "${commands[@]}"; then
229 __git-bug_handle_command
230 elif [[ $c -eq 0 ]]; then
231 __git-bug_handle_command
232 elif __git-bug_contains_word "${words[c]}" "${command_aliases[@]}"; then
233 # aliashash variable is an associative array which is only supported in bash > 3.
234 if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
235 words[c]=${aliashash[${words[c]}]}
236 __git-bug_handle_command
237 else
238 __git-bug_handle_noun
239 fi
240 else
241 __git-bug_handle_noun
242 fi
243 __git-bug_handle_word
244}
245
246
247_git_bug() {
248 __start_git-bug "$@"
249}
250
251_git-bug_add()
252{
253 last_command="git-bug_add"
254
255 command_aliases=()
256
257 commands=()
258
259 flags=()
260 two_word_flags=()
261 local_nonpersistent_flags=()
262 flags_with_completion=()
263 flags_completion=()
264
265 flags+=("--title=")
266 two_word_flags+=("-t")
267 local_nonpersistent_flags+=("--title=")
268 flags+=("--message=")
269 two_word_flags+=("-m")
270 local_nonpersistent_flags+=("--message=")
271 flags+=("--file=")
272 two_word_flags+=("-F")
273 local_nonpersistent_flags+=("--file=")
274
275 must_have_one_flag=()
276 must_have_one_noun=()
277 noun_aliases=()
278}
279
280_git-bug_bridge_configure()
281{
282 last_command="git-bug_bridge_configure"
283
284 command_aliases=()
285
286 commands=()
287
288 flags=()
289 two_word_flags=()
290 local_nonpersistent_flags=()
291 flags_with_completion=()
292 flags_completion=()
293
294
295 must_have_one_flag=()
296 must_have_one_noun=()
297 noun_aliases=()
298}
299
300_git-bug_bridge_pull()
301{
302 last_command="git-bug_bridge_pull"
303
304 command_aliases=()
305
306 commands=()
307
308 flags=()
309 two_word_flags=()
310 local_nonpersistent_flags=()
311 flags_with_completion=()
312 flags_completion=()
313
314
315 must_have_one_flag=()
316 must_have_one_noun=()
317 noun_aliases=()
318}
319
320_git-bug_bridge_rm()
321{
322 last_command="git-bug_bridge_rm"
323
324 command_aliases=()
325
326 commands=()
327
328 flags=()
329 two_word_flags=()
330 local_nonpersistent_flags=()
331 flags_with_completion=()
332 flags_completion=()
333
334
335 must_have_one_flag=()
336 must_have_one_noun=()
337 noun_aliases=()
338}
339
340_git-bug_bridge()
341{
342 last_command="git-bug_bridge"
343
344 command_aliases=()
345
346 commands=()
347 commands+=("configure")
348 commands+=("pull")
349 commands+=("rm")
350
351 flags=()
352 two_word_flags=()
353 local_nonpersistent_flags=()
354 flags_with_completion=()
355 flags_completion=()
356
357
358 must_have_one_flag=()
359 must_have_one_noun=()
360 noun_aliases=()
361}
362
363_git-bug_commands()
364{
365 last_command="git-bug_commands"
366
367 command_aliases=()
368
369 commands=()
370
371 flags=()
372 two_word_flags=()
373 local_nonpersistent_flags=()
374 flags_with_completion=()
375 flags_completion=()
376
377 flags+=("--pretty")
378 flags+=("-p")
379 local_nonpersistent_flags+=("--pretty")
380
381 must_have_one_flag=()
382 must_have_one_noun=()
383 noun_aliases=()
384}
385
386_git-bug_comment_add()
387{
388 last_command="git-bug_comment_add"
389
390 command_aliases=()
391
392 commands=()
393
394 flags=()
395 two_word_flags=()
396 local_nonpersistent_flags=()
397 flags_with_completion=()
398 flags_completion=()
399
400 flags+=("--file=")
401 two_word_flags+=("-F")
402 local_nonpersistent_flags+=("--file=")
403 flags+=("--message=")
404 two_word_flags+=("-m")
405 local_nonpersistent_flags+=("--message=")
406
407 must_have_one_flag=()
408 must_have_one_noun=()
409 noun_aliases=()
410}
411
412_git-bug_comment()
413{
414 last_command="git-bug_comment"
415
416 command_aliases=()
417
418 commands=()
419 commands+=("add")
420
421 flags=()
422 two_word_flags=()
423 local_nonpersistent_flags=()
424 flags_with_completion=()
425 flags_completion=()
426
427
428 must_have_one_flag=()
429 must_have_one_noun=()
430 noun_aliases=()
431}
432
433_git-bug_deselect()
434{
435 last_command="git-bug_deselect"
436
437 command_aliases=()
438
439 commands=()
440
441 flags=()
442 two_word_flags=()
443 local_nonpersistent_flags=()
444 flags_with_completion=()
445 flags_completion=()
446
447
448 must_have_one_flag=()
449 must_have_one_noun=()
450 noun_aliases=()
451}
452
453_git-bug_label_add()
454{
455 last_command="git-bug_label_add"
456
457 command_aliases=()
458
459 commands=()
460
461 flags=()
462 two_word_flags=()
463 local_nonpersistent_flags=()
464 flags_with_completion=()
465 flags_completion=()
466
467
468 must_have_one_flag=()
469 must_have_one_noun=()
470 noun_aliases=()
471}
472
473_git-bug_label_rm()
474{
475 last_command="git-bug_label_rm"
476
477 command_aliases=()
478
479 commands=()
480
481 flags=()
482 two_word_flags=()
483 local_nonpersistent_flags=()
484 flags_with_completion=()
485 flags_completion=()
486
487
488 must_have_one_flag=()
489 must_have_one_noun=()
490 noun_aliases=()
491}
492
493_git-bug_label()
494{
495 last_command="git-bug_label"
496
497 command_aliases=()
498
499 commands=()
500 commands+=("add")
501 commands+=("rm")
502
503 flags=()
504 two_word_flags=()
505 local_nonpersistent_flags=()
506 flags_with_completion=()
507 flags_completion=()
508
509
510 must_have_one_flag=()
511 must_have_one_noun=()
512 noun_aliases=()
513}
514
515_git-bug_ls()
516{
517 last_command="git-bug_ls"
518
519 command_aliases=()
520
521 commands=()
522
523 flags=()
524 two_word_flags=()
525 local_nonpersistent_flags=()
526 flags_with_completion=()
527 flags_completion=()
528
529 flags+=("--status=")
530 two_word_flags+=("-s")
531 local_nonpersistent_flags+=("--status=")
532 flags+=("--author=")
533 two_word_flags+=("-a")
534 local_nonpersistent_flags+=("--author=")
535 flags+=("--participant=")
536 two_word_flags+=("-p")
537 local_nonpersistent_flags+=("--participant=")
538 flags+=("--actor=")
539 two_word_flags+=("-A")
540 local_nonpersistent_flags+=("--actor=")
541 flags+=("--label=")
542 two_word_flags+=("-l")
543 local_nonpersistent_flags+=("--label=")
544 flags+=("--title=")
545 two_word_flags+=("-t")
546 local_nonpersistent_flags+=("--title=")
547 flags+=("--no=")
548 two_word_flags+=("-n")
549 local_nonpersistent_flags+=("--no=")
550 flags+=("--by=")
551 two_word_flags+=("-b")
552 local_nonpersistent_flags+=("--by=")
553 flags+=("--direction=")
554 two_word_flags+=("-d")
555 local_nonpersistent_flags+=("--direction=")
556
557 must_have_one_flag=()
558 must_have_one_noun=()
559 noun_aliases=()
560}
561
562_git-bug_ls-id()
563{
564 last_command="git-bug_ls-id"
565
566 command_aliases=()
567
568 commands=()
569
570 flags=()
571 two_word_flags=()
572 local_nonpersistent_flags=()
573 flags_with_completion=()
574 flags_completion=()
575
576
577 must_have_one_flag=()
578 must_have_one_noun=()
579 noun_aliases=()
580}
581
582_git-bug_ls-label()
583{
584 last_command="git-bug_ls-label"
585
586 command_aliases=()
587
588 commands=()
589
590 flags=()
591 two_word_flags=()
592 local_nonpersistent_flags=()
593 flags_with_completion=()
594 flags_completion=()
595
596
597 must_have_one_flag=()
598 must_have_one_noun=()
599 noun_aliases=()
600}
601
602_git-bug_pull()
603{
604 last_command="git-bug_pull"
605
606 command_aliases=()
607
608 commands=()
609
610 flags=()
611 two_word_flags=()
612 local_nonpersistent_flags=()
613 flags_with_completion=()
614 flags_completion=()
615
616
617 must_have_one_flag=()
618 must_have_one_noun=()
619 noun_aliases=()
620}
621
622_git-bug_push()
623{
624 last_command="git-bug_push"
625
626 command_aliases=()
627
628 commands=()
629
630 flags=()
631 two_word_flags=()
632 local_nonpersistent_flags=()
633 flags_with_completion=()
634 flags_completion=()
635
636
637 must_have_one_flag=()
638 must_have_one_noun=()
639 noun_aliases=()
640}
641
642_git-bug_select()
643{
644 last_command="git-bug_select"
645
646 command_aliases=()
647
648 commands=()
649
650 flags=()
651 two_word_flags=()
652 local_nonpersistent_flags=()
653 flags_with_completion=()
654 flags_completion=()
655
656
657 must_have_one_flag=()
658 must_have_one_noun=()
659 noun_aliases=()
660}
661
662_git-bug_show()
663{
664 last_command="git-bug_show"
665
666 command_aliases=()
667
668 commands=()
669
670 flags=()
671 two_word_flags=()
672 local_nonpersistent_flags=()
673 flags_with_completion=()
674 flags_completion=()
675
676 flags+=("--field=")
677 two_word_flags+=("-f")
678 local_nonpersistent_flags+=("--field=")
679
680 must_have_one_flag=()
681 must_have_one_noun=()
682 noun_aliases=()
683}
684
685_git-bug_status_close()
686{
687 last_command="git-bug_status_close"
688
689 command_aliases=()
690
691 commands=()
692
693 flags=()
694 two_word_flags=()
695 local_nonpersistent_flags=()
696 flags_with_completion=()
697 flags_completion=()
698
699
700 must_have_one_flag=()
701 must_have_one_noun=()
702 noun_aliases=()
703}
704
705_git-bug_status_open()
706{
707 last_command="git-bug_status_open"
708
709 command_aliases=()
710
711 commands=()
712
713 flags=()
714 two_word_flags=()
715 local_nonpersistent_flags=()
716 flags_with_completion=()
717 flags_completion=()
718
719
720 must_have_one_flag=()
721 must_have_one_noun=()
722 noun_aliases=()
723}
724
725_git-bug_status()
726{
727 last_command="git-bug_status"
728
729 command_aliases=()
730
731 commands=()
732 commands+=("close")
733 commands+=("open")
734
735 flags=()
736 two_word_flags=()
737 local_nonpersistent_flags=()
738 flags_with_completion=()
739 flags_completion=()
740
741
742 must_have_one_flag=()
743 must_have_one_noun=()
744 noun_aliases=()
745}
746
747_git-bug_termui()
748{
749 last_command="git-bug_termui"
750
751 command_aliases=()
752
753 commands=()
754
755 flags=()
756 two_word_flags=()
757 local_nonpersistent_flags=()
758 flags_with_completion=()
759 flags_completion=()
760
761
762 must_have_one_flag=()
763 must_have_one_noun=()
764 noun_aliases=()
765}
766
767_git-bug_title_edit()
768{
769 last_command="git-bug_title_edit"
770
771 command_aliases=()
772
773 commands=()
774
775 flags=()
776 two_word_flags=()
777 local_nonpersistent_flags=()
778 flags_with_completion=()
779 flags_completion=()
780
781 flags+=("--title=")
782 two_word_flags+=("-t")
783 local_nonpersistent_flags+=("--title=")
784
785 must_have_one_flag=()
786 must_have_one_noun=()
787 noun_aliases=()
788}
789
790_git-bug_title()
791{
792 last_command="git-bug_title"
793
794 command_aliases=()
795
796 commands=()
797 commands+=("edit")
798
799 flags=()
800 two_word_flags=()
801 local_nonpersistent_flags=()
802 flags_with_completion=()
803 flags_completion=()
804
805
806 must_have_one_flag=()
807 must_have_one_noun=()
808 noun_aliases=()
809}
810
811_git-bug_user_adopt()
812{
813 last_command="git-bug_user_adopt"
814
815 command_aliases=()
816
817 commands=()
818
819 flags=()
820 two_word_flags=()
821 local_nonpersistent_flags=()
822 flags_with_completion=()
823 flags_completion=()
824
825
826 must_have_one_flag=()
827 must_have_one_noun=()
828 noun_aliases=()
829}
830
831_git-bug_user_create()
832{
833 last_command="git-bug_user_create"
834
835 command_aliases=()
836
837 commands=()
838
839 flags=()
840 two_word_flags=()
841 local_nonpersistent_flags=()
842 flags_with_completion=()
843 flags_completion=()
844
845
846 must_have_one_flag=()
847 must_have_one_noun=()
848 noun_aliases=()
849}
850
851_git-bug_user_ls()
852{
853 last_command="git-bug_user_ls"
854
855 command_aliases=()
856
857 commands=()
858
859 flags=()
860 two_word_flags=()
861 local_nonpersistent_flags=()
862 flags_with_completion=()
863 flags_completion=()
864
865
866 must_have_one_flag=()
867 must_have_one_noun=()
868 noun_aliases=()
869}
870
871_git-bug_user()
872{
873 last_command="git-bug_user"
874
875 command_aliases=()
876
877 commands=()
878 commands+=("adopt")
879 commands+=("create")
880 commands+=("ls")
881
882 flags=()
883 two_word_flags=()
884 local_nonpersistent_flags=()
885 flags_with_completion=()
886 flags_completion=()
887
888 flags+=("--field=")
889 two_word_flags+=("-f")
890 local_nonpersistent_flags+=("--field=")
891
892 must_have_one_flag=()
893 must_have_one_noun=()
894 noun_aliases=()
895}
896
897_git-bug_version()
898{
899 last_command="git-bug_version"
900
901 command_aliases=()
902
903 commands=()
904
905 flags=()
906 two_word_flags=()
907 local_nonpersistent_flags=()
908 flags_with_completion=()
909 flags_completion=()
910
911 flags+=("--number")
912 flags+=("-n")
913 local_nonpersistent_flags+=("--number")
914 flags+=("--commit")
915 flags+=("-c")
916 local_nonpersistent_flags+=("--commit")
917 flags+=("--all")
918 flags+=("-a")
919 local_nonpersistent_flags+=("--all")
920
921 must_have_one_flag=()
922 must_have_one_noun=()
923 noun_aliases=()
924}
925
926_git-bug_webui()
927{
928 last_command="git-bug_webui"
929
930 command_aliases=()
931
932 commands=()
933
934 flags=()
935 two_word_flags=()
936 local_nonpersistent_flags=()
937 flags_with_completion=()
938 flags_completion=()
939
940 flags+=("--port=")
941 two_word_flags+=("-p")
942 local_nonpersistent_flags+=("--port=")
943
944 must_have_one_flag=()
945 must_have_one_noun=()
946 noun_aliases=()
947}
948
949_git-bug_root_command()
950{
951 last_command="git-bug"
952
953 command_aliases=()
954
955 commands=()
956 commands+=("add")
957 commands+=("bridge")
958 commands+=("commands")
959 commands+=("comment")
960 commands+=("deselect")
961 commands+=("label")
962 commands+=("ls")
963 commands+=("ls-id")
964 commands+=("ls-label")
965 commands+=("pull")
966 commands+=("push")
967 commands+=("select")
968 commands+=("show")
969 commands+=("status")
970 commands+=("termui")
971 commands+=("title")
972 commands+=("user")
973 commands+=("version")
974 commands+=("webui")
975
976 flags=()
977 two_word_flags=()
978 local_nonpersistent_flags=()
979 flags_with_completion=()
980 flags_completion=()
981
982
983 must_have_one_flag=()
984 must_have_one_noun=()
985 noun_aliases=()
986}
987
988__start_git-bug()
989{
990 local cur prev words cword
991 declare -A flaghash 2>/dev/null || :
992 declare -A aliashash 2>/dev/null || :
993 if declare -F _init_completion >/dev/null 2>&1; then
994 _init_completion -s || return
995 else
996 __git-bug_init_completion -n "=" || return
997 fi
998
999 local c=0
1000 local flags=()
1001 local two_word_flags=()
1002 local local_nonpersistent_flags=()
1003 local flags_with_completion=()
1004 local flags_completion=()
1005 local commands=("git-bug")
1006 local must_have_one_flag=()
1007 local must_have_one_noun=()
1008 local last_command
1009 local nouns=()
1010
1011 __git-bug_handle_word
1012}
1013
1014if [[ $(type -t compopt) = "builtin" ]]; then
1015 complete -o default -F __start_git-bug git-bug
1016else
1017 complete -o default -o nospace -F __start_git-bug git-bug
1018fi
1019
1020# ex: ts=4 sw=4 et filetype=sh