1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

Add JFrog CLI plugin (#8250)

This commit is contained in:
Yahav Itzhak 2020-02-25 13:00:25 +02:00 committed by GitHub
parent 7290a08bf6
commit b72607bc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

11
plugins/jfrog/README.md Normal file
View file

@ -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)
```

View file

@ -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