diff options
author | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
commit | edc449275b6c04445f58b108ca0937a87c1e8430 (patch) | |
tree | 9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/plugins/jfrog | |
parent | 6f5424ca96c4221ef433f545642669e9c104d0ed (diff) |
add zsh
Diffstat (limited to 'oh-my-zsh/plugins/jfrog')
-rw-r--r-- | oh-my-zsh/plugins/jfrog/README.md | 11 | ||||
-rw-r--r-- | oh-my-zsh/plugins/jfrog/jfrog.plugin.zsh | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/jfrog/README.md b/oh-my-zsh/plugins/jfrog/README.md new file mode 100644 index 0000000..1d85862 --- /dev/null +++ b/oh-my-zsh/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/oh-my-zsh/plugins/jfrog/jfrog.plugin.zsh b/oh-my-zsh/plugins/jfrog/jfrog.plugin.zsh new file mode 100644 index 0000000..1441bc1 --- /dev/null +++ b/oh-my-zsh/plugins/jfrog/jfrog.plugin.zsh @@ -0,0 +1,11 @@ +_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 +compdef _jfrog jf |