Skip to content

dynamic completion #181

Answered by DannyBen
easyrider14 asked this question in Q&A
Feb 17, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Interesting.

Well, this seems like a gross abuse of the completions mechanism, but I believe it should be still possible.
It is hard for me to help you debug this problem since I have no access to your completions "server".

That said, the error you are getting is not from bashly itself, but from the YAML parser.
The below syntax should make it pass validation (the only thing you care about is the pipe in the completions string):

name: delete
help: Delete an object instance

commands:
- name: processor
  help: delete a processor instance
  completions: # this is the secret
  - |
    $(TOKEN=$(cat /tmp/access_token.txt) && eval $(cat /etc/env/environment.txt | grep API_URL) && curl -sL --he…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@easyrider14
Comment options

@DannyBen
Comment options

@easyrider14
Comment options

Answer selected by easyrider14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants