aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/man/git-bug-add.13
-rw-r--r--doc/man/git-bug-bridge-auth-add-token.13
-rw-r--r--doc/man/git-bug-bridge-auth-rm.13
-rw-r--r--doc/man/git-bug-bridge-auth-show.13
-rw-r--r--doc/man/git-bug-bridge-auth.13
-rw-r--r--doc/man/git-bug-bridge-configure.13
-rw-r--r--doc/man/git-bug-bridge-pull.13
-rw-r--r--doc/man/git-bug-bridge-push.13
-rw-r--r--doc/man/git-bug-bridge-rm.13
-rw-r--r--doc/man/git-bug-bridge.13
-rw-r--r--doc/man/git-bug-commands.13
-rw-r--r--doc/man/git-bug-comment-add.13
-rw-r--r--doc/man/git-bug-comment.13
-rw-r--r--doc/man/git-bug-deselect.13
-rw-r--r--doc/man/git-bug-label-add.13
-rw-r--r--doc/man/git-bug-label-rm.13
-rw-r--r--doc/man/git-bug-label.13
-rw-r--r--doc/man/git-bug-ls-id.13
-rw-r--r--doc/man/git-bug-ls-label.13
-rw-r--r--doc/man/git-bug-ls.13
-rw-r--r--doc/man/git-bug-pull.13
-rw-r--r--doc/man/git-bug-push.13
-rw-r--r--doc/man/git-bug-rm.13
-rw-r--r--doc/man/git-bug-select.13
-rw-r--r--doc/man/git-bug-show.13
-rw-r--r--doc/man/git-bug-status-close.13
-rw-r--r--doc/man/git-bug-status-open.13
-rw-r--r--doc/man/git-bug-status.13
-rw-r--r--doc/man/git-bug-termui.13
-rw-r--r--doc/man/git-bug-title-edit.13
-rw-r--r--doc/man/git-bug-title.13
-rw-r--r--doc/man/git-bug-user-adopt.13
-rw-r--r--doc/man/git-bug-user-create.13
-rw-r--r--doc/man/git-bug-user-ls.13
-rw-r--r--doc/man/git-bug-user.13
-rw-r--r--doc/man/git-bug-version.13
-rw-r--r--doc/man/git-bug-webui.13
-rw-r--r--doc/man/git-bug.13
-rw-r--r--doc/md/git-bug_add.md4
-rw-r--r--doc/md/git-bug_bridge.md4
-rw-r--r--doc/md/git-bug_bridge_auth.md4
-rw-r--r--doc/md/git-bug_bridge_auth_add-token.md4
-rw-r--r--doc/md/git-bug_bridge_auth_rm.md4
-rw-r--r--doc/md/git-bug_bridge_auth_show.md4
-rw-r--r--doc/md/git-bug_bridge_pull.md4
-rw-r--r--doc/md/git-bug_bridge_push.md4
-rw-r--r--doc/md/git-bug_bridge_rm.md4
-rw-r--r--doc/md/git-bug_commands.md4
-rw-r--r--doc/md/git-bug_comment.md4
-rw-r--r--doc/md/git-bug_comment_add.md4
-rw-r--r--doc/md/git-bug_deselect.md4
-rw-r--r--doc/md/git-bug_label.md4
-rw-r--r--doc/md/git-bug_label_add.md4
-rw-r--r--doc/md/git-bug_label_rm.md4
-rw-r--r--doc/md/git-bug_ls-id.md4
-rw-r--r--doc/md/git-bug_pull.md4
-rw-r--r--doc/md/git-bug_push.md4
-rw-r--r--doc/md/git-bug_show.md4
-rw-r--r--doc/md/git-bug_status.md4
-rw-r--r--doc/md/git-bug_status_close.md4
-rw-r--r--doc/md/git-bug_status_open.md4
-rw-r--r--doc/md/git-bug_termui.md4
-rw-r--r--doc/md/git-bug_title.md4
-rw-r--r--doc/md/git-bug_title_edit.md4
-rw-r--r--doc/md/git-bug_user.md4
-rw-r--r--doc/md/git-bug_user_adopt.md4
-rw-r--r--doc/md/git-bug_user_create.md4
-rw-r--r--doc/md/git-bug_user_ls.md4
-rw-r--r--doc/md/git-bug_version.md4
-rw-r--r--go.mod2
-rw-r--r--go.sum75
-rw-r--r--misc/bash_completion/git-bug112
-rw-r--r--misc/fish_completion/git-bug129
-rw-r--r--misc/zsh_completion/git-bug628
74 files changed, 442 insertions, 742 deletions
diff --git a/doc/man/git-bug-add.1 b/doc/man/git-bug-add.1
index 9b0e6ec7..f5083119 100644
--- a/doc/man/git-bug-add.1
+++ b/doc/man/git-bug-add.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-auth-add-token.1 b/doc/man/git-bug-bridge-auth-add-token.1
index d522f0c7..e70b3f7f 100644
--- a/doc/man/git-bug-bridge-auth-add-token.1
+++ b/doc/man/git-bug-bridge-auth-add-token.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-auth-rm.1 b/doc/man/git-bug-bridge-auth-rm.1
index f2a9408a..5070cea6 100644
--- a/doc/man/git-bug-bridge-auth-rm.1
+++ b/doc/man/git-bug-bridge-auth-rm.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-auth-show.1 b/doc/man/git-bug-bridge-auth-show.1
index ae5d2039..e2ef1e46 100644
--- a/doc/man/git-bug-bridge-auth-show.1
+++ b/doc/man/git-bug-bridge-auth-show.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-auth.1 b/doc/man/git-bug-bridge-auth.1
index 02f2ca0f..9be49b68 100644
--- a/doc/man/git-bug-bridge-auth.1
+++ b/doc/man/git-bug-bridge-auth.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-configure.1 b/doc/man/git-bug-bridge-configure.1
index cc66487f..3ce411a9 100644
--- a/doc/man/git-bug-bridge-configure.1
+++ b/doc/man/git-bug-bridge-configure.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-pull.1 b/doc/man/git-bug-bridge-pull.1
index 12d12438..96502fb9 100644
--- a/doc/man/git-bug-bridge-pull.1
+++ b/doc/man/git-bug-bridge-pull.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-push.1 b/doc/man/git-bug-bridge-push.1
index c15cce60..c5893de9 100644
--- a/doc/man/git-bug-bridge-push.1
+++ b/doc/man/git-bug-bridge-push.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge-rm.1 b/doc/man/git-bug-bridge-rm.1
index 70ca410f..0066785a 100644
--- a/doc/man/git-bug-bridge-rm.1
+++ b/doc/man/git-bug-bridge-rm.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-bridge.1 b/doc/man/git-bug-bridge.1
index 8d5c7dc0..42670054 100644
--- a/doc/man/git-bug-bridge.1
+++ b/doc/man/git-bug-bridge.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-commands.1 b/doc/man/git-bug-commands.1
index 28fabca5..949b82fe 100644
--- a/doc/man/git-bug-commands.1
+++ b/doc/man/git-bug-commands.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-comment-add.1 b/doc/man/git-bug-comment-add.1
index c1d13aa2..d1845782 100644
--- a/doc/man/git-bug-comment-add.1
+++ b/doc/man/git-bug-comment-add.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-comment.1 b/doc/man/git-bug-comment.1
index 7d46258d..7cad5a0d 100644
--- a/doc/man/git-bug-comment.1
+++ b/doc/man/git-bug-comment.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-deselect.1 b/doc/man/git-bug-deselect.1
index 7cdf5112..0b179453 100644
--- a/doc/man/git-bug-deselect.1
+++ b/doc/man/git-bug-deselect.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-label-add.1 b/doc/man/git-bug-label-add.1
index a11cdbe7..3becf736 100644
--- a/doc/man/git-bug-label-add.1
+++ b/doc/man/git-bug-label-add.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-label-rm.1 b/doc/man/git-bug-label-rm.1
index 58dcccec..43008118 100644
--- a/doc/man/git-bug-label-rm.1
+++ b/doc/man/git-bug-label-rm.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-label.1 b/doc/man/git-bug-label.1
index f5a47c5c..6fdaceb1 100644
--- a/doc/man/git-bug-label.1
+++ b/doc/man/git-bug-label.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-ls-id.1 b/doc/man/git-bug-ls-id.1
index d35415b4..4a3cecb9 100644
--- a/doc/man/git-bug-ls-id.1
+++ b/doc/man/git-bug-ls-id.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-ls-label.1 b/doc/man/git-bug-ls-label.1
index 30e63f94..6e7bfca8 100644
--- a/doc/man/git-bug-ls-label.1
+++ b/doc/man/git-bug-ls-label.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-ls.1 b/doc/man/git-bug-ls.1
index 2e6e0b63..b77bc969 100644
--- a/doc/man/git-bug-ls.1
+++ b/doc/man/git-bug-ls.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-pull.1 b/doc/man/git-bug-pull.1
index aed5a844..3bbcd8d8 100644
--- a/doc/man/git-bug-pull.1
+++ b/doc/man/git-bug-pull.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-push.1 b/doc/man/git-bug-push.1
index 19a90cfc..37a1200e 100644
--- a/doc/man/git-bug-push.1
+++ b/doc/man/git-bug-push.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-rm.1 b/doc/man/git-bug-rm.1
index 8989c2ff..73ccfc48 100644
--- a/doc/man/git-bug-rm.1
+++ b/doc/man/git-bug-rm.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-select.1 b/doc/man/git-bug-select.1
index 47d46fe1..dfd02a97 100644
--- a/doc/man/git-bug-select.1
+++ b/doc/man/git-bug-select.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-show.1 b/doc/man/git-bug-show.1
index 6aca9063..4191774b 100644
--- a/doc/man/git-bug-show.1
+++ b/doc/man/git-bug-show.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-status-close.1 b/doc/man/git-bug-status-close.1
index 2caeb8f5..5ccbe5ab 100644
--- a/doc/man/git-bug-status-close.1
+++ b/doc/man/git-bug-status-close.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-status-open.1 b/doc/man/git-bug-status-open.1
index 950574ff..d7fd7dff 100644
--- a/doc/man/git-bug-status-open.1
+++ b/doc/man/git-bug-status-open.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-status.1 b/doc/man/git-bug-status.1
index 22c31a3a..b0207bf1 100644
--- a/doc/man/git-bug-status.1
+++ b/doc/man/git-bug-status.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-termui.1 b/doc/man/git-bug-termui.1
index f8ccc42a..7454d22f 100644
--- a/doc/man/git-bug-termui.1
+++ b/doc/man/git-bug-termui.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-title-edit.1 b/doc/man/git-bug-title-edit.1
index 99f4de86..ea378d42 100644
--- a/doc/man/git-bug-title-edit.1
+++ b/doc/man/git-bug-title-edit.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-title.1 b/doc/man/git-bug-title.1
index 9d7deb0e..aa60e7b5 100644
--- a/doc/man/git-bug-title.1
+++ b/doc/man/git-bug-title.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-user-adopt.1 b/doc/man/git-bug-user-adopt.1
index 6a53b36c..5259b61b 100644
--- a/doc/man/git-bug-user-adopt.1
+++ b/doc/man/git-bug-user-adopt.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-user-create.1 b/doc/man/git-bug-user-create.1
index 099a44bd..fa991cc3 100644
--- a/doc/man/git-bug-user-create.1
+++ b/doc/man/git-bug-user-create.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-user-ls.1 b/doc/man/git-bug-user-ls.1
index 14bc9ff7..83f7706b 100644
--- a/doc/man/git-bug-user-ls.1
+++ b/doc/man/git-bug-user-ls.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-user.1 b/doc/man/git-bug-user.1
index a454b56c..39925433 100644
--- a/doc/man/git-bug-user.1
+++ b/doc/man/git-bug-user.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-version.1 b/doc/man/git-bug-version.1
index 07d4e0c5..581bf006 100644
--- a/doc/man/git-bug-version.1
+++ b/doc/man/git-bug-version.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug-webui.1 b/doc/man/git-bug-webui.1
index 3fc6fc33..954250a2 100644
--- a/doc/man/git-bug-webui.1
+++ b/doc/man/git-bug-webui.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/man/git-bug.1 b/doc/man/git-bug.1
index ecb35feb..aea6792f 100644
--- a/doc/man/git-bug.1
+++ b/doc/man/git-bug.1
@@ -1,6 +1,5 @@
.nh
-.TH GIT\-BUG(1)Apr 2019
-Generated from git\-bug's source code
+.TH "GIT\-BUG" "1" "Apr 2019" "Generated from git\-bug's source code" ""
.SH NAME
.PP
diff --git a/doc/md/git-bug_add.md b/doc/md/git-bug_add.md
index c103cebb..4e76ca7c 100644
--- a/doc/md/git-bug_add.md
+++ b/doc/md/git-bug_add.md
@@ -2,10 +2,6 @@
Create a new bug.
-### Synopsis
-
-Create a new bug.
-
```
git-bug add [flags]
```
diff --git a/doc/md/git-bug_bridge.md b/doc/md/git-bug_bridge.md
index 3ddb9892..e8b6e382 100644
--- a/doc/md/git-bug_bridge.md
+++ b/doc/md/git-bug_bridge.md
@@ -2,10 +2,6 @@
Configure and use bridges to other bug trackers.
-### Synopsis
-
-Configure and use bridges to other bug trackers.
-
```
git-bug bridge [flags]
```
diff --git a/doc/md/git-bug_bridge_auth.md b/doc/md/git-bug_bridge_auth.md
index e953f0ec..bcaf6028 100644
--- a/doc/md/git-bug_bridge_auth.md
+++ b/doc/md/git-bug_bridge_auth.md
@@ -2,10 +2,6 @@
List all known bridge authentication credentials.
-### Synopsis
-
-List all known bridge authentication credentials.
-
```
git-bug bridge auth [flags]
```
diff --git a/doc/md/git-bug_bridge_auth_add-token.md b/doc/md/git-bug_bridge_auth_add-token.md
index c6466522..faafaf61 100644
--- a/doc/md/git-bug_bridge_auth_add-token.md
+++ b/doc/md/git-bug_bridge_auth_add-token.md
@@ -2,10 +2,6 @@
Store a new token
-### Synopsis
-
-Store a new token
-
```
git-bug bridge auth add-token [TOKEN] [flags]
```
diff --git a/doc/md/git-bug_bridge_auth_rm.md b/doc/md/git-bug_bridge_auth_rm.md
index cf470c0c..d890054e 100644
--- a/doc/md/git-bug_bridge_auth_rm.md
+++ b/doc/md/git-bug_bridge_auth_rm.md
@@ -2,10 +2,6 @@
Remove a credential.
-### Synopsis
-
-Remove a credential.
-
```
git-bug bridge auth rm ID [flags]
```
diff --git a/doc/md/git-bug_bridge_auth_show.md b/doc/md/git-bug_bridge_auth_show.md
index 5da3820f..18d468db 100644
--- a/doc/md/git-bug_bridge_auth_show.md
+++ b/doc/md/git-bug_bridge_auth_show.md
@@ -2,10 +2,6 @@
Display an authentication credential.
-### Synopsis
-
-Display an authentication credential.
-
```
git-bug bridge auth show [flags]
```
diff --git a/doc/md/git-bug_bridge_pull.md b/doc/md/git-bug_bridge_pull.md
index 784bf99c..b1ce2169 100644
--- a/doc/md/git-bug_bridge_pull.md
+++ b/doc/md/git-bug_bridge_pull.md
@@ -2,10 +2,6 @@
Pull updates.
-### Synopsis
-
-Pull updates.
-
```
git-bug bridge pull [NAME] [flags]
```
diff --git a/doc/md/git-bug_bridge_push.md b/doc/md/git-bug_bridge_push.md
index 387270e2..a532a26d 100644
--- a/doc/md/git-bug_bridge_push.md
+++ b/doc/md/git-bug_bridge_push.md
@@ -2,10 +2,6 @@
Push updates.
-### Synopsis
-
-Push updates.
-
```
git-bug bridge push [NAME] [flags]
```
diff --git a/doc/md/git-bug_bridge_rm.md b/doc/md/git-bug_bridge_rm.md
index 748011f2..6d8ff67c 100644
--- a/doc/md/git-bug_bridge_rm.md
+++ b/doc/md/git-bug_bridge_rm.md
@@ -2,10 +2,6 @@
Delete a configured bridge.
-### Synopsis
-
-Delete a configured bridge.
-
```
git-bug bridge rm NAME [flags]
```
diff --git a/doc/md/git-bug_commands.md b/doc/md/git-bug_commands.md
index 00eef422..db1054f8 100644
--- a/doc/md/git-bug_commands.md
+++ b/doc/md/git-bug_commands.md
@@ -2,10 +2,6 @@
Display available commands.
-### Synopsis
-
-Display available commands.
-
```
git-bug commands [flags]
```
diff --git a/doc/md/git-bug_comment.md b/doc/md/git-bug_comment.md
index 60c4ee88..6ac7c45b 100644
--- a/doc/md/git-bug_comment.md
+++ b/doc/md/git-bug_comment.md
@@ -2,10 +2,6 @@
Display or add comments to a bug.
-### Synopsis
-
-Display or add comments to a bug.
-
```
git-bug comment [ID] [flags]
```
diff --git a/doc/md/git-bug_comment_add.md b/doc/md/git-bug_comment_add.md
index 64bd840c..83133949 100644
--- a/doc/md/git-bug_comment_add.md
+++ b/doc/md/git-bug_comment_add.md
@@ -2,10 +2,6 @@
Add a new comment to a bug.
-### Synopsis
-
-Add a new comment to a bug.
-
```
git-bug comment add [ID] [flags]
```
diff --git a/doc/md/git-bug_deselect.md b/doc/md/git-bug_deselect.md
index 7cf667b0..51ce5dda 100644
--- a/doc/md/git-bug_deselect.md
+++ b/doc/md/git-bug_deselect.md
@@ -2,10 +2,6 @@
Clear the implicitly selected bug.
-### Synopsis
-
-Clear the implicitly selected bug.
-
```
git-bug deselect [flags]
```
diff --git a/doc/md/git-bug_label.md b/doc/md/git-bug_label.md
index a847af3d..dd597b69 100644
--- a/doc/md/git-bug_label.md
+++ b/doc/md/git-bug_label.md
@@ -2,10 +2,6 @@
Display, add or remove labels to/from a bug.
-### Synopsis
-
-Display, add or remove labels to/from a bug.
-
```
git-bug label [ID] [flags]
```
diff --git a/doc/md/git-bug_label_add.md b/doc/md/git-bug_label_add.md
index 9900b52d..c90b45d3 100644
--- a/doc/md/git-bug_label_add.md
+++ b/doc/md/git-bug_label_add.md
@@ -2,10 +2,6 @@
Add a label to a bug.
-### Synopsis
-
-Add a label to a bug.
-
```
git-bug label add [ID] LABEL... [flags]
```
diff --git a/doc/md/git-bug_label_rm.md b/doc/md/git-bug_label_rm.md
index fa6d1aa3..15982d0e 100644
--- a/doc/md/git-bug_label_rm.md
+++ b/doc/md/git-bug_label_rm.md
@@ -2,10 +2,6 @@
Remove a label from a bug.
-### Synopsis
-
-Remove a label from a bug.
-
```
git-bug label rm [ID] LABEL... [flags]
```
diff --git a/doc/md/git-bug_ls-id.md b/doc/md/git-bug_ls-id.md
index 134f3aec..493a1829 100644
--- a/doc/md/git-bug_ls-id.md
+++ b/doc/md/git-bug_ls-id.md
@@ -2,10 +2,6 @@
List bug identifiers.
-### Synopsis
-
-List bug identifiers.
-
```
git-bug ls-id [PREFIX] [flags]
```
diff --git a/doc/md/git-bug_pull.md b/doc/md/git-bug_pull.md
index cf29e079..5c1d51b6 100644
--- a/doc/md/git-bug_pull.md
+++ b/doc/md/git-bug_pull.md
@@ -2,10 +2,6 @@
Pull bugs update from a git remote.
-### Synopsis
-
-Pull bugs update from a git remote.
-
```
git-bug pull [REMOTE] [flags]
```
diff --git a/doc/md/git-bug_push.md b/doc/md/git-bug_push.md
index 226bc951..18779700 100644
--- a/doc/md/git-bug_push.md
+++ b/doc/md/git-bug_push.md
@@ -2,10 +2,6 @@
Push bugs update to a git remote.
-### Synopsis
-
-Push bugs update to a git remote.
-
```
git-bug push [REMOTE] [flags]
```
diff --git a/doc/md/git-bug_show.md b/doc/md/git-bug_show.md
index 1c6a4ab0..c284fc71 100644
--- a/doc/md/git-bug_show.md
+++ b/doc/md/git-bug_show.md
@@ -2,10 +2,6 @@
Display the details of a bug.
-### Synopsis
-
-Display the details of a bug.
-
```
git-bug show [ID] [flags]
```
diff --git a/doc/md/git-bug_status.md b/doc/md/git-bug_status.md
index c2b380f3..9eb56c6b 100644
--- a/doc/md/git-bug_status.md
+++ b/doc/md/git-bug_status.md
@@ -2,10 +2,6 @@
Display or change a bug status.
-### Synopsis
-
-Display or change a bug status.
-
```
git-bug status [ID] [flags]
```
diff --git a/doc/md/git-bug_status_close.md b/doc/md/git-bug_status_close.md
index 97081b59..aee72649 100644
--- a/doc/md/git-bug_status_close.md
+++ b/doc/md/git-bug_status_close.md
@@ -2,10 +2,6 @@
Mark a bug as closed.
-### Synopsis
-
-Mark a bug as closed.
-
```
git-bug status close [ID] [flags]
```
diff --git a/doc/md/git-bug_status_open.md b/doc/md/git-bug_status_open.md
index 661508ad..332a1d96 100644
--- a/doc/md/git-bug_status_open.md
+++ b/doc/md/git-bug_status_open.md
@@ -2,10 +2,6 @@
Mark a bug as open.
-### Synopsis
-
-Mark a bug as open.
-
```
git-bug status open [ID] [flags]
```
diff --git a/doc/md/git-bug_termui.md b/doc/md/git-bug_termui.md
index 02e59e60..3da6869e 100644
--- a/doc/md/git-bug_termui.md
+++ b/doc/md/git-bug_termui.md
@@ -2,10 +2,6 @@
Launch the terminal UI.
-### Synopsis
-
-Launch the terminal UI.
-
```
git-bug termui [flags]
```
diff --git a/doc/md/git-bug_title.md b/doc/md/git-bug_title.md
index 5c5698e0..791fcb75 100644
--- a/doc/md/git-bug_title.md
+++ b/doc/md/git-bug_title.md
@@ -2,10 +2,6 @@
Display or change a title of a bug.
-### Synopsis
-
-Display or change a title of a bug.
-
```
git-bug title [ID] [flags]
```
diff --git a/doc/md/git-bug_title_edit.md b/doc/md/git-bug_title_edit.md
index 8119b8b5..61a4e4bd 100644
--- a/doc/md/git-bug_title_edit.md
+++ b/doc/md/git-bug_title_edit.md
@@ -2,10 +2,6 @@
Edit a title of a bug.
-### Synopsis
-
-Edit a title of a bug.
-
```
git-bug title edit [ID] [flags]
```
diff --git a/doc/md/git-bug_user.md b/doc/md/git-bug_user.md
index 4fc0dd54..d9388def 100644
--- a/doc/md/git-bug_user.md
+++ b/doc/md/git-bug_user.md
@@ -2,10 +2,6 @@
Display or change the user identity.
-### Synopsis
-
-Display or change the user identity.
-
```
git-bug user [USER-ID] [flags]
```
diff --git a/doc/md/git-bug_user_adopt.md b/doc/md/git-bug_user_adopt.md
index 86682be0..87d1305f 100644
--- a/doc/md/git-bug_user_adopt.md
+++ b/doc/md/git-bug_user_adopt.md
@@ -2,10 +2,6 @@
Adopt an existing identity as your own.
-### Synopsis
-
-Adopt an existing identity as your own.
-
```
git-bug user adopt USER-ID [flags]
```
diff --git a/doc/md/git-bug_user_create.md b/doc/md/git-bug_user_create.md
index 8af6e37a..95fcc5eb 100644
--- a/doc/md/git-bug_user_create.md
+++ b/doc/md/git-bug_user_create.md
@@ -2,10 +2,6 @@
Create a new identity.
-### Synopsis
-
-Create a new identity.
-
```
git-bug user create [flags]
```
diff --git a/doc/md/git-bug_user_ls.md b/doc/md/git-bug_user_ls.md
index 51f01712..d86263e3 100644
--- a/doc/md/git-bug_user_ls.md
+++ b/doc/md/git-bug_user_ls.md
@@ -2,10 +2,6 @@
List identities.
-### Synopsis
-
-List identities.
-
```
git-bug user ls [flags]
```
diff --git a/doc/md/git-bug_version.md b/doc/md/git-bug_version.md
index 1f9e0fa7..2d1a16a9 100644
--- a/doc/md/git-bug_version.md
+++ b/doc/md/git-bug_version.md
@@ -2,10 +2,6 @@
Show git-bug version information.
-### Synopsis
-
-Show git-bug version information.
-
```
git-bug version [flags]
```
diff --git a/go.mod b/go.mod
index 6a1321d9..da39764e 100644
--- a/go.mod
+++ b/go.mod
@@ -26,7 +26,7 @@ require (
github.com/shurcooL/githubv4 v0.0.0-20190601194912-068505affed7
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e
- github.com/spf13/cobra v1.0.0
+ github.com/spf13/cobra v1.1.1
github.com/stretchr/testify v1.6.1
github.com/vektah/gqlparser v1.3.1
github.com/xanzy/go-gitlab v0.38.2
diff --git a/go.sum b/go.sum
index 521a92ad..8e25d4b1 100644
--- a/go.sum
+++ b/go.sum
@@ -21,6 +21,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
+cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
@@ -58,7 +59,9 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195 h1:c4mLfegoDw6OhSJXTd2jUEQgZUQuJWtocudb97Qn9EM=
github.com/araddon/dateparse v0.0.0-20190622164848-0fb0a474d195/go.mod h1:SLqhdZcd+dF3TEVL2RMoob5bBP5R1P1qkox+HtCBgGI=
-github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
+github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
+github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
+github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/awesome-gocui/gocui v0.6.1-0.20191115151952-a34ffb055986 h1:QvIfX96O11qjX1Zr3hKkG0dI12JBRBGABWffyZ1GI60=
@@ -68,6 +71,8 @@ github.com/awesome-gocui/termbox-go v0.0.0-20190427202837-c0aef3d18bcc/go.mod h1
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
+github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -82,9 +87,8 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
@@ -111,6 +115,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
@@ -195,33 +200,49 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.2.0 h1:VJtLvh6VQym50czpZzx07z/kw9EgAxI3x1ZB8taTMQQ=
github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
-github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
+github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
+github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
+github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
+github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
+github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
+github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-retryablehttp v0.6.4 h1:BbgctKO892xEyOXnGiaAwIoSq1QZ/SS4AhjoAh9DnfY=
github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-retryablehttp v0.6.7 h1:8/CAEZt/+F7kR7GevNHulKkUjLht3CPmn7egmhieNKo=
github.com/hashicorp/go-retryablehttp v0.6.7/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
+github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
+github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
+github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
+github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
+github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
+github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
+github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
+github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428 h1:Mo9W14pwbO9VfRe+ygqZ8dFbPpoIK1HFrG/zjTuQ+nc=
github.com/icrowley/fake v0.0.0-20180203215853-4178557ae428/go.mod h1:uhpZMVGznybq1itEKXj6RYw9I71qK4kH+OGMjRC4KEo=
@@ -235,8 +256,10 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY=
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
@@ -254,10 +277,12 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
-github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
+github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
@@ -268,11 +293,20 @@ github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/Qd
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
+github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
+github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
+github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
+github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
+github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs=
github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -282,6 +316,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
+github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5 h1:rZQtoozkfsiNs36c7Tdv/gyGNzD1X1XWKO8rptVNZuM=
github.com/phayes/freeport v0.0.0-20171002181615-b8543db493a5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
@@ -292,6 +327,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3 h1:9iH4JKXLzFbOAdtqv/a+j8aewx2Y8lAjAydhbaScPF8=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
@@ -311,6 +347,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
+github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
@@ -329,16 +367,19 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e h1:VAzdS5Nw68fbf5RZ8RDVlUvPXNU6Z3jtPCK/qvm4FoQ=
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
+github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
+github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
-github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
+github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4=
+github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
@@ -353,8 +394,8 @@ github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U=
github.com/vektah/gqlparser v1.3.1 h1:8b0IcD3qZKWJQHSzynbDlrtP3IxVydZ2DZepCGofqfU=
@@ -368,7 +409,6 @@ github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0B
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -382,6 +422,7 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
+golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -427,8 +468,10 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -437,7 +480,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -479,8 +521,10 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU=
@@ -542,6 +586,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
+golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
@@ -552,6 +597,7 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
@@ -640,7 +686,6 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@@ -670,6 +715,7 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
+gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
@@ -679,6 +725,7 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
diff --git a/misc/bash_completion/git-bug b/misc/bash_completion/git-bug
index 8e2de8df..912e87b4 100644
--- a/misc/bash_completion/git-bug
+++ b/misc/bash_completion/git-bug
@@ -40,6 +40,12 @@ __git-bug_handle_go_custom_completion()
{
__git-bug_debug "${FUNCNAME[0]}: cur is ${cur}, words[*] is ${words[*]}, #words[@] is ${#words[@]}"
+ local shellCompDirectiveError=1
+ local shellCompDirectiveNoSpace=2
+ local shellCompDirectiveNoFileComp=4
+ local shellCompDirectiveFilterFileExt=8
+ local shellCompDirectiveFilterDirs=16
+
local out requestComp lastParam lastChar comp directive args
# Prepare the command to request completions for the program.
@@ -73,24 +79,50 @@ __git-bug_handle_go_custom_completion()
__git-bug_debug "${FUNCNAME[0]}: the completion directive is: ${directive}"
__git-bug_debug "${FUNCNAME[0]}: the completions are: ${out[*]}"
- if [ $((directive & 1)) -ne 0 ]; then
+ if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
# Error code. No completion.
__git-bug_debug "${FUNCNAME[0]}: received error from custom completion go code"
return
else
- if [ $((directive & 2)) -ne 0 ]; then
+ if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__git-bug_debug "${FUNCNAME[0]}: activating no space"
compopt -o nospace
fi
fi
- if [ $((directive & 4)) -ne 0 ]; then
+ if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
if [[ $(type -t compopt) = "builtin" ]]; then
__git-bug_debug "${FUNCNAME[0]}: activating no file completion"
compopt +o default
fi
fi
+ fi
+ if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
+ # File extension filtering
+ local fullFilter filter filteringCmd
+ # Do not use quotes around the $out variable or else newline
+ # characters will be kept.
+ for filter in ${out[*]}; do
+ fullFilter+="$filter|"
+ done
+
+ filteringCmd="_filedir $fullFilter"
+ __git-bug_debug "File filtering command: $filteringCmd"
+ $filteringCmd
+ elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
+ # File completion for directories only
+ local subDir
+ # Use printf to strip any trailing newline
+ subdir=$(printf "%s" "${out[0]}")
+ if [ -n "$subdir" ]; then
+ __git-bug_debug "Listing directories in $subdir"
+ __git-bug_handle_subdirs_in_dir_flag "$subdir"
+ else
+ __git-bug_debug "Listing directories in ."
+ _filedir -d
+ fi
+ else
while IFS='' read -r comp; do
COMPREPLY+=("$comp")
done < <(compgen -W "${out[*]}" -- "$cur")
@@ -159,10 +191,9 @@ __git-bug_handle_reply()
local completions
completions=("${commands[@]}")
if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then
- completions=("${must_have_one_noun[@]}")
+ completions+=("${must_have_one_noun[@]}")
elif [[ -n "${has_completion_function}" ]]; then
# if a go completion function is provided, defer to that function
- completions=()
__git-bug_handle_go_custom_completion
fi
if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then
@@ -344,15 +375,21 @@ _git-bug_add()
flags+=("--title=")
two_word_flags+=("--title")
two_word_flags+=("-t")
+ local_nonpersistent_flags+=("--title")
local_nonpersistent_flags+=("--title=")
+ local_nonpersistent_flags+=("-t")
flags+=("--message=")
two_word_flags+=("--message")
two_word_flags+=("-m")
+ local_nonpersistent_flags+=("--message")
local_nonpersistent_flags+=("--message=")
+ local_nonpersistent_flags+=("-m")
flags+=("--file=")
two_word_flags+=("--file")
two_word_flags+=("-F")
+ local_nonpersistent_flags+=("--file")
local_nonpersistent_flags+=("--file=")
+ local_nonpersistent_flags+=("-F")
must_have_one_flag=()
must_have_one_noun=()
@@ -376,15 +413,21 @@ _git-bug_bridge_auth_add-token()
flags+=("--target=")
two_word_flags+=("--target")
two_word_flags+=("-t")
+ local_nonpersistent_flags+=("--target")
local_nonpersistent_flags+=("--target=")
+ local_nonpersistent_flags+=("-t")
flags+=("--login=")
two_word_flags+=("--login")
two_word_flags+=("-l")
+ local_nonpersistent_flags+=("--login")
local_nonpersistent_flags+=("--login=")
+ local_nonpersistent_flags+=("-l")
flags+=("--user=")
two_word_flags+=("--user")
two_word_flags+=("-u")
+ local_nonpersistent_flags+=("--user")
local_nonpersistent_flags+=("--user=")
+ local_nonpersistent_flags+=("-u")
must_have_one_flag=()
must_have_one_noun=()
@@ -471,40 +514,57 @@ _git-bug_bridge_configure()
flags+=("--name=")
two_word_flags+=("--name")
two_word_flags+=("-n")
+ local_nonpersistent_flags+=("--name")
local_nonpersistent_flags+=("--name=")
+ local_nonpersistent_flags+=("-n")
flags+=("--target=")
two_word_flags+=("--target")
two_word_flags+=("-t")
+ local_nonpersistent_flags+=("--target")
local_nonpersistent_flags+=("--target=")
+ local_nonpersistent_flags+=("-t")
flags+=("--url=")
two_word_flags+=("--url")
two_word_flags+=("-u")
+ local_nonpersistent_flags+=("--url")
local_nonpersistent_flags+=("--url=")
+ local_nonpersistent_flags+=("-u")
flags+=("--base-url=")
two_word_flags+=("--base-url")
two_word_flags+=("-b")
+ local_nonpersistent_flags+=("--base-url")
local_nonpersistent_flags+=("--base-url=")
+ local_nonpersistent_flags+=("-b")
flags+=("--login=")
two_word_flags+=("--login")
two_word_flags+=("-l")
+ local_nonpersistent_flags+=("--login")
local_nonpersistent_flags+=("--login=")
+ local_nonpersistent_flags+=("-l")
flags+=("--credential=")
two_word_flags+=("--credential")
two_word_flags+=("-c")
+ local_nonpersistent_flags+=("--credential")
local_nonpersistent_flags+=("--credential=")
+ local_nonpersistent_flags+=("-c")
flags+=("--token=")
two_word_flags+=("--token")
+ local_nonpersistent_flags+=("--token")
local_nonpersistent_flags+=("--token=")
flags+=("--token-stdin")
local_nonpersistent_flags+=("--token-stdin")
flags+=("--owner=")
two_word_flags+=("--owner")
two_word_flags+=("-o")
+ local_nonpersistent_flags+=("--owner")
local_nonpersistent_flags+=("--owner=")
+ local_nonpersistent_flags+=("-o")
flags+=("--project=")
two_word_flags+=("--project")
two_word_flags+=("-p")
+ local_nonpersistent_flags+=("--project")
local_nonpersistent_flags+=("--project=")
+ local_nonpersistent_flags+=("-p")
must_have_one_flag=()
must_have_one_noun=()
@@ -528,10 +588,13 @@ _git-bug_bridge_pull()
flags+=("--no-resume")
flags+=("-n")
local_nonpersistent_flags+=("--no-resume")
+ local_nonpersistent_flags+=("-n")
flags+=("--since=")
two_word_flags+=("--since")
two_word_flags+=("-s")
+ local_nonpersistent_flags+=("--since")
local_nonpersistent_flags+=("--since=")
+ local_nonpersistent_flags+=("-s")
must_have_one_flag=()
must_have_one_noun=()
@@ -620,6 +683,7 @@ _git-bug_commands()
flags+=("--pretty")
flags+=("-p")
local_nonpersistent_flags+=("--pretty")
+ local_nonpersistent_flags+=("-p")
must_have_one_flag=()
must_have_one_noun=()
@@ -643,11 +707,15 @@ _git-bug_comment_add()
flags+=("--file=")
two_word_flags+=("--file")
two_word_flags+=("-F")
+ local_nonpersistent_flags+=("--file")
local_nonpersistent_flags+=("--file=")
+ local_nonpersistent_flags+=("-F")
flags+=("--message=")
two_word_flags+=("--message")
two_word_flags+=("-m")
+ local_nonpersistent_flags+=("--message")
local_nonpersistent_flags+=("--message=")
+ local_nonpersistent_flags+=("-m")
must_have_one_flag=()
must_have_one_noun=()
@@ -774,43 +842,63 @@ _git-bug_ls()
flags+=("--status=")
two_word_flags+=("--status")
two_word_flags+=("-s")
+ local_nonpersistent_flags+=("--status")
local_nonpersistent_flags+=("--status=")
+ local_nonpersistent_flags+=("-s")
flags+=("--author=")
two_word_flags+=("--author")
two_word_flags+=("-a")
+ local_nonpersistent_flags+=("--author")
local_nonpersistent_flags+=("--author=")
+ local_nonpersistent_flags+=("-a")
flags+=("--participant=")
two_word_flags+=("--participant")
two_word_flags+=("-p")
+ local_nonpersistent_flags+=("--participant")
local_nonpersistent_flags+=("--participant=")
+ local_nonpersistent_flags+=("-p")
flags+=("--actor=")
two_word_flags+=("--actor")
two_word_flags+=("-A")
+ local_nonpersistent_flags+=("--actor")
local_nonpersistent_flags+=("--actor=")
+ local_nonpersistent_flags+=("-A")
flags+=("--label=")
two_word_flags+=("--label")
two_word_flags+=("-l")
+ local_nonpersistent_flags+=("--label")
local_nonpersistent_flags+=("--label=")
+ local_nonpersistent_flags+=("-l")
flags+=("--title=")
two_word_flags+=("--title")
two_word_flags+=("-t")
+ local_nonpersistent_flags+=("--title")
local_nonpersistent_flags+=("--title=")
+ local_nonpersistent_flags+=("-t")
flags+=("--no=")
two_word_flags+=("--no")
two_word_flags+=("-n")
+ local_nonpersistent_flags+=("--no")
local_nonpersistent_flags+=("--no=")
+ local_nonpersistent_flags+=("-n")
flags+=("--by=")
two_word_flags+=("--by")
two_word_flags+=("-b")
+ local_nonpersistent_flags+=("--by")
local_nonpersistent_flags+=("--by=")
+ local_nonpersistent_flags+=("-b")
flags+=("--direction=")
two_word_flags+=("--direction")
two_word_flags+=("-d")
+ local_nonpersistent_flags+=("--direction")
local_nonpersistent_flags+=("--direction=")
+ local_nonpersistent_flags+=("-d")
flags+=("--format=")
two_word_flags+=("--format")
two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--format")
local_nonpersistent_flags+=("--format=")
+ local_nonpersistent_flags+=("-f")
must_have_one_flag=()
must_have_one_noun=()
@@ -953,11 +1041,14 @@ _git-bug_show()
flags+=("--field=")
two_word_flags+=("--field")
+ local_nonpersistent_flags+=("--field")
local_nonpersistent_flags+=("--field=")
flags+=("--format=")
two_word_flags+=("--format")
two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--format")
local_nonpersistent_flags+=("--format=")
+ local_nonpersistent_flags+=("-f")
must_have_one_flag=()
must_have_one_noun=()
@@ -1063,7 +1154,9 @@ _git-bug_title_edit()
flags+=("--title=")
two_word_flags+=("--title")
two_word_flags+=("-t")
+ local_nonpersistent_flags+=("--title")
local_nonpersistent_flags+=("--title=")
+ local_nonpersistent_flags+=("-t")
must_have_one_flag=()
must_have_one_noun=()
@@ -1148,7 +1241,9 @@ _git-bug_user_ls()
flags+=("--format=")
two_word_flags+=("--format")
two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--format")
local_nonpersistent_flags+=("--format=")
+ local_nonpersistent_flags+=("-f")
must_have_one_flag=()
must_have_one_noun=()
@@ -1175,7 +1270,9 @@ _git-bug_user()
flags+=("--field=")
two_word_flags+=("--field")
two_word_flags+=("-f")
+ local_nonpersistent_flags+=("--field")
local_nonpersistent_flags+=("--field=")
+ local_nonpersistent_flags+=("-f")
must_have_one_flag=()
must_have_one_noun=()
@@ -1199,12 +1296,15 @@ _git-bug_version()
flags+=("--number")
flags+=("-n")
local_nonpersistent_flags+=("--number")
+ local_nonpersistent_flags+=("-n")
flags+=("--commit")
flags+=("-c")
local_nonpersistent_flags+=("--commit")
+ local_nonpersistent_flags+=("-c")
flags+=("--all")
flags+=("-a")
local_nonpersistent_flags+=("--all")
+ local_nonpersistent_flags+=("-a")
must_have_one_flag=()
must_have_one_noun=()
@@ -1232,7 +1332,9 @@ _git-bug_webui()
flags+=("--port=")
two_word_flags+=("--port")
two_word_flags+=("-p")
+ local_nonpersistent_flags+=("--port")
local_nonpersistent_flags+=("--port=")
+ local_nonpersistent_flags+=("-p")
flags+=("--read-only")
local_nonpersistent_flags+=("--read-only")
diff --git a/misc/fish_completion/git-bug b/misc/fish_completion/git-bug
index edbfa81b..28e66532 100644
--- a/misc/fish_completion/git-bug
+++ b/misc/fish_completion/git-bug
@@ -1,30 +1,36 @@
# fish completion for git-bug -*- shell-script -*-
-function __git-bug_debug
+function __git_bug_debug
set file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
-function __git-bug_perform_completion
- __git-bug_debug "Starting __git-bug_perform_completion with: $argv"
+function __git_bug_perform_completion
+ __git_bug_debug "Starting __git_bug_perform_completion with: $argv"
set args (string split -- " " "$argv")
set lastArg "$args[-1]"
- __git-bug_debug "args: $args"
- __git-bug_debug "last arg: $lastArg"
+ __git_bug_debug "args: $args"
+ __git_bug_debug "last arg: $lastArg"
set emptyArg ""
if test -z "$lastArg"
- __git-bug_debug "Setting emptyArg"
+ __git_bug_debug "Setting emptyArg"
set emptyArg \"\"
end
- __git-bug_debug "emptyArg: $emptyArg"
+ __git_bug_debug "emptyArg: $emptyArg"
+
+ if not type -q "$args[1]"
+ # This can happen when "complete --do-complete git-bug" is called when running this script.
+ __git_bug_debug "Cannot find $args[1]. No completions."
+ return
+ end
set requestComp "$args[1] __complete $args[2..-1] $emptyArg"
- __git-bug_debug "Calling $requestComp"
+ __git_bug_debug "Calling $requestComp"
set results (eval $requestComp 2> /dev/null)
set comps $results[1..-2]
@@ -34,9 +40,9 @@ function __git-bug_perform_completion
# completions must be prefixed with the flag
set flagPrefix (string match -r -- '-.*=' "$lastArg")
- __git-bug_debug "Comps: $comps"
- __git-bug_debug "DirectiveLine: $directiveLine"
- __git-bug_debug "flagPrefix: $flagPrefix"
+ __git_bug_debug "Comps: $comps"
+ __git_bug_debug "DirectiveLine: $directiveLine"
+ __git_bug_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
@@ -46,92 +52,113 @@ function __git-bug_perform_completion
end
# This function does three things:
-# 1- Obtain the completions and store them in the global __git-bug_comp_results
-# 2- Set the __git-bug_comp_do_file_comp flag if file completion should be performed
+# 1- Obtain the completions and store them in the global __git_bug_comp_results
+# 2- Set the __git_bug_comp_do_file_comp flag if file completion should be performed
# and unset it otherwise
# 3- Return true if the completion results are not empty
-function __git-bug_prepare_completions
+function __git_bug_prepare_completions
# Start fresh
- set --erase __git-bug_comp_do_file_comp
- set --erase __git-bug_comp_results
+ set --erase __git_bug_comp_do_file_comp
+ set --erase __git_bug_comp_results
# Check if the command-line is already provided. This is useful for testing.
- if not set --query __git-bug_comp_commandLine
- set __git-bug_comp_commandLine (commandline)
+ if not set --query __git_bug_comp_commandLine
+ # Use the -c flag to allow for completion in the middle of the line
+ set __git_bug_comp_commandLine (commandline -c)
end
- __git-bug_debug "commandLine is: $__git-bug_comp_commandLine"
+ __git_bug_debug "commandLine is: $__git_bug_comp_commandLine"
- set results (__git-bug_perform_completion "$__git-bug_comp_commandLine")
- set --erase __git-bug_comp_commandLine
- __git-bug_debug "Completion results: $results"
+ set results (__git_bug_perform_completion "$__git_bug_comp_commandLine")
+ set --erase __git_bug_comp_commandLine
+ __git_bug_debug "Completion results: $results"
if test -z "$results"
- __git-bug_debug "No completion, probably due to a failure"
+ __git_bug_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
- set --global __git-bug_comp_do_file_comp 1
- return 0
+ set --global __git_bug_comp_do_file_comp 1
+ return 1
end
set directive (string sub --start 2 $results[-1])
- set --global __git-bug_comp_results $results[1..-2]
+ set --global __git_bug_comp_results $results[1..-2]
+
+ __git_bug_debug "Completions are: $__git_bug_comp_results"
+ __git_bug_debug "Directive is: $directive"
- __git-bug_debug "Completions are: $__git-bug_comp_results"
- __git-bug_debug "Directive is: $directive"
+ set shellCompDirectiveError 1
+ set shellCompDirectiveNoSpace 2
+ set shellCompDirectiveNoFileComp 4
+ set shellCompDirectiveFilterFileExt 8
+ set shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
- set compErr (math (math --scale 0 $directive / 1) % 2)
+ set compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
- __git-bug_debug "Received error directive: aborting."
+ __git_bug_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
- set --global __git-bug_comp_do_file_comp 1
- return 0
+ set --global __git_bug_comp_do_file_comp 1
+ return 1
end
- set nospace (math (math --scale 0 $directive / 2) % 2)
- set nofiles (math (math --scale 0 $directive / 4) % 2)
+ set filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
+ set dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
+ if test $filefilter -eq 1; or test $dirfilter -eq 1
+ __git_bug_debug "File extension filtering or directory filtering not supported"
+ # Do full file completion instead
+ set --global __git_bug_comp_do_file_comp 1
+ return 1
+ end
+
+ set nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
+ set nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
- __git-bug_debug "nospace: $nospace, nofiles: $nofiles"
+ __git_bug_debug "nospace: $nospace, nofiles: $nofiles"
# Important not to quote the variable for count to work
- set numComps (count $__git-bug_comp_results)
- __git-bug_debug "numComps: $numComps"
+ set numComps (count $__git_bug_comp_results)
+ __git_bug_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# To support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
- __git-bug_debug "Adding second completion to perform nospace directive"
- set --append __git-bug_comp_results $__git-bug_comp_results[1].
+ __git_bug_debug "Adding second completion to perform nospace directive"
+ set --append __git_bug_comp_results $__git_bug_comp_results[1].
end
if test $numComps -eq 0; and test $nofiles -eq 0
- __git-bug_debug "Requesting file completion"
- set --global __git-bug_comp_do_file_comp 1
+ __git_bug_debug "Requesting file completion"
+ set --global __git_bug_comp_do_file_comp 1
end
# If we don't want file completion, we must return true even if there
# are no completions found. This is because fish will perform the last
# completion command, even if its condition is false, if no other
# completion command was triggered
- return (not set --query __git-bug_comp_do_file_comp)
+ return (not set --query __git_bug_comp_do_file_comp)
end
-# Remove any pre-existing completions for the program since we will be handling all of them
-# TODO this cleanup is not sufficient. Fish completions are only loaded once the user triggers
-# them, so the below deletion will not work as it is run too early. What else can we do?
+# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
+# so we can properly delete any completions provided by another script.
+# The space after the the program name is essential to trigger completion for the program
+# and not completion of the program name itself.
+complete --do-complete "git-bug " > /dev/null 2>&1
+# Using '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
+
+# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c git-bug -e
-# The order in which the below two lines are defined is very important so that __git-bug_prepare_completions
-# is called first. It is __git-bug_prepare_completions that sets up the __git-bug_comp_do_file_comp variable.
+# The order in which the below two lines are defined is very important so that __git_bug_prepare_completions
+# is called first. It is __git_bug_prepare_completions that sets up the __git_bug_comp_do_file_comp variable.
#
# This completion will be run second as complete commands are added FILO.
-# It triggers file completion choices when __git-bug_comp_do_file_comp is set.
-complete -c git-bug -n 'set --query __git-bug_comp_do_file_comp'
+# It triggers file completion choices when __git_bug_comp_do_file_comp is set.
+complete -c git-bug -n 'set --query __git_bug_comp_do_file_comp'
# This completion will be run first as complete commands are added FILO.
-# The call to __git-bug_prepare_completions will setup both __git-bug_comp_results abd __git-bug_comp_do_file_comp.
+# The call to __git_bug_prepare_completions will setup both __git_bug_comp_results and __git_bug_comp_do_file_comp.
# It provides the program's completion choices.
-complete -c git-bug -n '__git-bug_prepare_completions' -f -a '$__git-bug_comp_results'
+complete -c git-bug -n '__git_bug_prepare_completions' -f -a '$__git_bug_comp_results'
diff --git a/misc/zsh_completion/git-bug b/misc/zsh_completion/git-bug
index 4ae10382..e0a6d8a1 100644
--- a/misc/zsh_completion/git-bug
+++ b/misc/zsh_completion/git-bug
@@ -1,473 +1,159 @@
#compdef _git-bug git-bug
-
-function _git-bug {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "add:Create a new bug."
- "bridge:Configure and use bridges to other bug trackers."
- "commands:Display available commands."
- "comment:Display or add comments to a bug."
- "deselect:Clear the implicitly selected bug."
- "label:Display, add or remove labels to/from a bug."
- "ls:List bugs."
- "ls-id:List bug identifiers."
- "ls-label:List valid labels."
- "pull:Pull bugs update from a git remote."
- "push:Push bugs update to a git remote."
- "rm:Remove an existing bug."
- "select:Select a bug for implicit use in future commands."
- "show:Display the details of a bug."
- "status:Display or change a bug status."
- "termui:Launch the terminal UI."
- "title:Display or change a title of a bug."
- "user:Display or change the user identity."
- "version:Show git-bug version information."
- "webui:Launch the web UI."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- add)
- _git-bug_add
- ;;
- bridge)
- _git-bug_bridge
- ;;
- commands)
- _git-bug_commands
- ;;
- comment)
- _git-bug_comment
- ;;
- deselect)
- _git-bug_deselect
- ;;
- label)
- _git-bug_label
- ;;
- ls)
- _git-bug_ls
- ;;
- ls-id)
- _git-bug_ls-id
- ;;
- ls-label)
- _git-bug_ls-label
- ;;
- pull)
- _git-bug_pull
- ;;
- push)
- _git-bug_push
- ;;
- rm)
- _git-bug_rm
- ;;
- select)
- _git-bug_select
- ;;
- show)
- _git-bug_show
- ;;
- status)
- _git-bug_status
- ;;
- termui)
- _git-bug_termui
- ;;
- title)
- _git-bug_title
- ;;
- user)
- _git-bug_user
- ;;
- version)
- _git-bug_version
- ;;
- webui)
- _git-bug_webui
- ;;
- esac
-}
-
-function _git-bug_add {
- _arguments \
- '(-t --title)'{-t,--title}'[Provide a title to describe the issue]:' \
- '(-m --message)'{-m,--message}'[Provide a message to describe the issue]:' \
- '(-F --file)'{-F,--file}'[Take the message from the given file. Use - to read the message from the standard input]:'
-}
-
-
-function _git-bug_bridge {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "auth:List all known bridge authentication credentials."
- "configure:Configure a new bridge."
- "pull:Pull updates."
- "push:Push updates."
- "rm:Delete a configured bridge."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- auth)
- _git-bug_bridge_auth
- ;;
- configure)
- _git-bug_bridge_configure
- ;;
- pull)
- _git-bug_bridge_pull
- ;;
- push)
- _git-bug_bridge_push
- ;;
- rm)
- _git-bug_bridge_rm
- ;;
- esac
-}
-
-
-function _git-bug_bridge_auth {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "add-token:Store a new token"
- "rm:Remove a credential."
- "show:Display an authentication credential."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- add-token)
- _git-bug_bridge_auth_add-token
- ;;
- rm)
- _git-bug_bridge_auth_rm
- ;;
- show)
- _git-bug_bridge_auth_show
- ;;
- esac
-}
-
-function _git-bug_bridge_auth_add-token {
- _arguments \
- '(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,gitlab,jira,launchpad-preview]]:' \
- '(-l --login)'{-l,--login}'[The login in the remote bug-tracker]:' \
- '(-u --user)'{-u,--user}'[The user to add the token to. Default is the current user]:'
-}
-
-function _git-bug_bridge_auth_rm {
- _arguments
-}
-
-function _git-bug_bridge_auth_show {
- _arguments
-}
-
-function _git-bug_bridge_configure {
- _arguments \
- '(-n --name)'{-n,--name}'[A distinctive name to identify the bridge]:' \
- '(-t --target)'{-t,--target}'[The target of the bridge. Valid values are [github,gitlab,jira,launchpad-preview]]:' \
- '(-u --url)'{-u,--url}'[The URL of the remote repository]:' \
- '(-b --base-url)'{-b,--base-url}'[The base URL of your remote issue tracker]:' \
- '(-l --login)'{-l,--login}'[The login on your remote issue tracker]:' \
- '(-c --credential)'{-c,--credential}'[The identifier or prefix of an already known credential for your remote issue tracker (see "git-bug bridge auth")]:' \
- '--token[A raw authentication token for the remote issue tracker]:' \
- '--token-stdin[Will read the token from stdin and ignore --token]' \
- '(-o --owner)'{-o,--owner}'[The owner of the remote repository]:' \
- '(-p --project)'{-p,--project}'[The name of the remote repository]:'
-}
-
-function _git-bug_bridge_pull {
- _arguments \
- '(-n --no-resume)'{-n,--no-resume}'[force importing all bugs]' \
- '(-s --since)'{-s,--since}'[import only bugs updated after the given date (ex: "200h" or "june 2 2019")]:'
-}
-
-function _git-bug_bridge_push {
- _arguments
-}
-
-function _git-bug_bridge_rm {
- _arguments
-}
-
-function _git-bug_commands {
- _arguments \
- '(-p --pretty)'{-p,--pretty}'[Output the command description as well as Markdown compatible comment]'
-}
-
-
-function _git-bug_comment {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "add:Add a new comment to a bug."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- add)
- _git-bug_comment_add
- ;;
- esac
-}
-
-function _git-bug_comment_add {
- _arguments \
- '(-F --file)'{-F,--file}'[Take the message from the given file. Use - to read the message from the standard input]:' \
- '(-m --message)'{-m,--message}'[Provide the new message from the command line]:'
-}
-
-function _git-bug_deselect {
- _arguments
-}
-
-
-function _git-bug_label {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "add:Add a label to a bug."
- "rm:Remove a label from a bug."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- add)
- _git-bug_label_add
- ;;
- rm)
- _git-bug_label_rm
- ;;
- esac
-}
-
-function _git-bug_label_add {
- _arguments
-}
-
-function _git-bug_label_rm {
- _arguments
-}
-
-function _git-bug_ls {
- _arguments \
- '(*-s *--status)'{\*-s,\*--status}'[Filter by status. Valid values are [open,closed]]:' \
- '(*-a *--author)'{\*-a,\*--author}'[Filter by author]:' \
- '(*-p *--participant)'{\*-p,\*--participant}'[Filter by participant]:' \
- '(*-A *--actor)'{\*-A,\*--actor}'[Filter by actor]:' \
- '(*-l *--label)'{\*-l,\*--label}'[Filter by label]:' \
- '(*-t *--title)'{\*-t,\*--title}'[Filter by title]:' \
- '(*-n *--no)'{\*-n,\*--no}'[Filter by absence of something. Valid values are [label]]:' \
- '(-b --by)'{-b,--by}'[Sort the results by a characteristic. Valid values are [id,creation,edit]]:' \
- '(-d --direction)'{-d,--direction}'[Select the sorting direction. Valid values are [asc,desc]]:' \
- '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,plain,json,org-mode]]:'
-}
-
-function _git-bug_ls-id {
- _arguments
-}
-
-function _git-bug_ls-label {
- _arguments
-}
-
-function _git-bug_pull {
- _arguments
-}
-
-function _git-bug_push {
- _arguments
-}
-
-function _git-bug_rm {
- _arguments
-}
-
-function _git-bug_select {
- _arguments
-}
-
-function _git-bug_show {
- _arguments \
- '--field[Select field to display. Valid values are [author,authorEmail,createTime,lastEdit,humanId,id,labels,shortId,status,title,actors,participants]]:' \
- '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,json,org-mode]]:'
-}
-
-
-function _git-bug_status {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "close:Mark a bug as closed."
- "open:Mark a bug as open."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- close)
- _git-bug_status_close
- ;;
- open)
- _git-bug_status_open
- ;;
- esac
-}
-
-function _git-bug_status_close {
- _arguments
-}
-
-function _git-bug_status_open {
- _arguments
-}
-
-function _git-bug_termui {
- _arguments
-}
-
-
-function _git-bug_title {
- local -a commands
-
- _arguments -C \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "edit:Edit a title of a bug."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- edit)
- _git-bug_title_edit
- ;;
- esac
-}
-
-function _git-bug_title_edit {
- _arguments \
- '(-t --title)'{-t,--title}'[Provide a title to describe the issue]:'
-}
-
-
-function _git-bug_user {
- local -a commands
-
- _arguments -C \
- '(-f --field)'{-f,--field}'[Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamport,login,metadata,name]]:' \
- "1: :->cmnds" \
- "*::arg:->args"
-
- case $state in
- cmnds)
- commands=(
- "adopt:Adopt an existing identity as your own."
- "create:Create a new identity."
- "ls:List identities."
- )
- _describe "command" commands
- ;;
- esac
-
- case "$words[1]" in
- adopt)
- _git-bug_user_adopt
- ;;
- create)
- _git-bug_user_create
- ;;
- ls)
- _git-bug_user_ls
- ;;
- esac
-}
-
-function _git-bug_user_adopt {
- _arguments
-}
-
-function _git-bug_user_create {
- _arguments
-}
-
-function _git-bug_user_ls {
- _arguments \
- '(-f --format)'{-f,--format}'[Select the output formatting style. Valid values are [default,json]]:'
-}
-
-function _git-bug_version {
- _arguments \
- '(-n --number)'{-n,--number}'[Only show the version number]' \
- '(-c --commit)'{-c,--commit}'[Only show the commit hash]' \
- '(-a --all)'{-a,--all}'[Show all version information]'
-}
-
-function _git-bug_webui {
- _arguments \
- '--open[Automatically open the web UI in the default browser]' \
- '--no-open[Prevent the automatic opening of the web UI in the default browser]' \
- '(-p --port)'{-p,--port}'[Port to listen to (default is random)]:' \
- '--read-only[Whether to run the web UI in read-only mode]'
-}
-
+# zsh completion for git-bug -*- shell-script -*-
+
+__git-bug_debug()
+{
+ local file="$BASH_COMP_DEBUG_FILE"
+ if [[ -n ${file} ]]; then
+ echo "$*" >> "${file}"
+ fi
+}
+
+_git-bug()
+{
+ local shellCompDirectiveError=1
+ local shellCompDirectiveNoSpace=2
+ local shellCompDirectiveNoFileComp=4
+ local shellCompDirectiveFilterFileExt=8
+ local shellCompDirectiveFilterDirs=16
+
+ local lastParam lastChar flagPrefix requestComp out directive compCount comp lastComp
+ local -a completions
+
+ __git-bug_debug "\n========= starting completion logic =========="
+ __git-bug_debug "CURRENT: ${CURRENT}, words[*]: ${words[*]}"
+
+ # The user could have moved the cursor backwards on the command-line.
+ # We need to trigger completion from the $CURRENT location, so we need
+ # to truncate the command-line ($words) up to the $CURRENT location.
+ # (We cannot use $CURSOR as its value does not work when a command is an alias.)
+ words=("${=words[1,CURRENT]}")
+ __git-bug_debug "Truncated words[*]: ${words[*]},"
+
+ lastParam=${words[-1]}
+ lastChar=${lastParam[-1]}
+ __git-bug_debug "lastParam: ${lastParam}, lastChar: ${lastChar}"
+
+ # For zsh, when completing a flag with an = (e.g., git-bug -n=<TAB>)
+ # completions must be prefixed with the flag
+ setopt local_options BASH_REMATCH
+ if [[ "${lastParam}" =~ '-.*=' ]]; then
+ # We are dealing with a flag with an =
+ flagPrefix="-P ${BASH_REMATCH}"
+ fi
+
+ # Prepare the command to obtain completions
+ requestComp="${words[1]} __complete ${words[2,-1]}"
+ if [ "${lastChar}" = "" ]; then
+ # If the last parameter is complete (there is a space following it)
+ # We add an extra empty parameter so we can indicate this to the go completion code.
+ __git-bug_debug "Adding extra empty parameter"
+ requestComp="${requestComp} \"\""
+ fi
+
+ __git-bug_debug "About to call: eval ${requestComp}"
+
+ # Use eval to handle any environment variables and such
+ out=$(eval ${requestComp} 2>/dev/null)
+ __git-bug_debug "completion output: ${out}"
+
+ # Extract the directive integer following a : from the last line
+ local lastLine
+ while IFS='\n' read -r line; do
+ lastLine=${line}
+ done < <(printf "%s\n" "${out[@]}")
+ __git-bug_debug "last line: ${lastLine}"
+
+ if [ "${lastLine[1]}" = : ]; then
+ directive=${lastLine[2,-1]}
+ # Remove the directive including the : and the newline
+ local suffix
+ (( suffix=${#lastLine}+2))
+ out=${out[1,-$suffix]}
+ else
+ # There is no directive specified. Leave $out as is.
+ __git-bug_debug "No directive found. Setting do default"
+ directive=0
+ fi
+
+ __git-bug_debug "directive: ${directive}"
+ __git-bug_debug "completions: ${out}"
+ __git-bug_debug "flagPrefix: ${flagPrefix}"
+
+ if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
+ __git-bug_debug "Completion received error. Ignoring completions."
+ return
+ fi
+
+ compCount=0
+ while IFS='\n' read -r comp; do
+ if [ -n "$comp" ]; then
+ # If requested, completions are returned with a description.
+ # The description is preceded by a TAB character.
+ # For zsh's _describe, we need to use a : instead of a TAB.
+ # We first need to escape any : as part of the completion itself.
+ comp=${comp//:/\\:}
+
+ local tab=$(printf '\t')
+ comp=${comp//$tab/:}
+
+ ((compCount++))
+ __git-bug_debug "Adding completion: ${comp}"
+ completions+=${comp}
+ lastComp=$comp
+ fi
+ done < <(printf "%s\n" "${out[@]}")
+
+ if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
+ # File extension filtering
+ local filteringCmd
+ filteringCmd='_files'
+ for filter in ${completions[@]}; do
+ if [ ${filter[1]} != '*' ]; then
+ # zsh requires a glob pattern to do file filtering
+ filter="\*.$filter"
+ fi
+ filteringCmd+=" -g $filter"
+ done
+ filteringCmd+=" ${flagPrefix}"
+
+ __git-bug_debug "File filtering command: $filteringCmd"
+ _arguments '*:filename:'"$filteringCmd"
+ elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
+ # File completion for directories only
+ local subDir
+ subdir="${completions[1]}"
+ if [ -n "$subdir" ]; then
+ __git-bug_debug "Listing directories in $subdir"
+ pushd "${subdir}" >/dev/null 2>&1
+ else
+ __git-bug_debug "Listing directories in ."
+ fi
+
+ _arguments '*:dirname:_files -/'" ${flagPrefix}"
+ if [ -n "$subdir" ]; then
+ popd >/dev/null 2>&1
+ fi
+ elif [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ] && [ ${compCount} -eq 1 ]; then
+ __git-bug_debug "Activating nospace."
+ # We can use compadd here as there is no description when
+ # there is only one completion.
+ compadd -S '' "${lastComp}"
+ elif [ ${compCount} -eq 0 ]; then
+ if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
+ __git-bug_debug "deactivating file completion"
+ else
+ # Perform file completion
+ __git-bug_debug "activating file completion"
+ _arguments '*:filename:_files'" ${flagPrefix}"
+ fi
+ else
+ _describe "completions" completions $(echo $flagPrefix)
+ fi
+}
+
+# don't run the completion function when being source-ed or eval-ed
+if [ "$funcstack[1]" = "_git-bug" ]; then
+ _git-bug
+fi