summaryrefslogtreecommitdiff
path: root/plugins/jfrog
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2020-02-27 14:43:29 -0800
committerTuowen Zhao <ztuowen@gmail.com>2020-02-27 14:43:29 -0800
commit0b67340fd2fe9330d8487491e1983ad1a111fb2b (patch)
treefe9cdff80e98deced5c63e79110593d430802adb /plugins/jfrog
parent93a2003db7738e2255a4589ef2073df1be34fe02 (diff)
parent2b499e1a9e8788d607768ecef67851e8234b72b3 (diff)
downloadzsh-0b67340fd2fe9330d8487491e1983ad1a111fb2b.tar.gz
zsh-0b67340fd2fe9330d8487491e1983ad1a111fb2b.tar.bz2
zsh-0b67340fd2fe9330d8487491e1983ad1a111fb2b.zip
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'plugins/jfrog')
-rw-r--r--plugins/jfrog/README.md11
-rw-r--r--plugins/jfrog/jfrog.plugin.zsh10
2 files changed, 21 insertions, 0 deletions
diff --git a/plugins/jfrog/README.md b/plugins/jfrog/README.md
new file mode 100644
index 000000000..1d858620b
--- /dev/null
+++ b/plugins/jfrog/README.md
@@ -0,0 +1,11 @@
+# JFrog CLI
+
+This plugin provides completion for [JFrog CLI](https://github.com/jfrog/jfrog-cli).
+
+JFrog CLI provides a simple interface that automates access to [Artifactory](https://jfrog.com/artifactory), [Xray](https://jfrog.com/xray), [Bintray](https://jfrog.com/bintray) and [Mission Control](https://jfrog.com/mission-control) through their respective REST APIs.
+
+To use it, add `jfrog` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... jfrog)
+```
diff --git a/plugins/jfrog/jfrog.plugin.zsh b/plugins/jfrog/jfrog.plugin.zsh
new file mode 100644
index 000000000..064ffa2db
--- /dev/null
+++ b/plugins/jfrog/jfrog.plugin.zsh
@@ -0,0 +1,10 @@
+_jfrog() {
+ local -a opts
+ opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
+ _describe 'values' opts
+ if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
+ _files
+ fi
+}
+
+compdef _jfrog jfrog \ No newline at end of file