infamousjoeg / cybr-cli

A "Swiss Army Knife" command-line interface (CLI) for easy human and non-human interaction with @CyberArk suite of products.
Apache License 2.0
71 stars 15 forks source link

#70 Add auto completion tab for fish, bash, zsh and powershell #83

Closed AndrewCopeland closed 3 years ago

AndrewCopeland commented 3 years ago
infamousjoeg commented 3 years ago

I'm testing this in zsh after install and it is not working. Can you elaborate on how it functions?

I tested cybr con[TAB] and show cybr version as cybr v0.1.1-beta.

AndrewCopeland commented 3 years ago

Try out cybr completion --help for more info. You have to create a simple file in a specific location.

infamousjoeg commented 3 years ago

I think we should generate new docs and add instructions to the README in this PR before we merge.

I found that the copy pasta the CLI gave me needed to be adjusted as I had two different zsh locations in $fpath[]:

╰ echo $fpath[1]
/usr/local/Cellar/heroku/7.42.1/libexec/node_modules/@heroku-cli/plugin-autocomplete/autocomplete/zsh

╰ echo $fpath[2]
/Users/joegarcia/.zsh/completion

╰ cybr completion zsh > "${fpath[2]}/_cybr"
sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

AndrewCopeland commented 3 years ago

README.md updated