b72607bc8e83c9ffc02409ae8a7fed6a8866e022

Author
Yahav Itzhak <yahavi@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

Add JFrog CLI plugin (#8250)

Diff

This diff is truncated to protect this page.

 1diff --git a/plugins/jfrog/README.md b/plugins/jfrog/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..1d858620b5ee95b818fe710fbd6b0290b253f91f
 4--- /dev/null
 5+++ b/plugins/jfrog/README.md
 6@@ -0,0 +1,11 @@
 7+# JFrog CLI
 8+
 9+This plugin provides completion for [JFrog CLI](https://github.com/jfrog/jfrog-cli).
10+
11diff --git a/plugins/jfrog/jfrog.plugin.zsh b/plugins/jfrog/jfrog.plugin.zsh
12new file mode 100644
13index 0000000000000000000000000000000000000000..064ffa2db9c10158385433efc3a7b939eb9d24f4
14--- /dev/null
15+++ b/plugins/jfrog/jfrog.plugin.zsh
16@@ -0,0 +1,10 @@
17+_jfrog() {
18+	local -a opts
19+	opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
20+	_describe 'values' opts
21+	if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
22+		_files
23+	fi
24+}
25+
26+compdef _jfrog jfrog