restish icon indicating copy to clipboard operation
restish copied to clipboard

Provide example using CLI Shorthand with API short name

Open aaronkjones opened this issue 1 year ago • 1 comments

Description

I am unable to get CLI Shorthand to work when using an API short name.

For example, given the API short name example.

restish PUT example create-repo org: myorg1, repo: myrepo1, description: a nice one

Expected result

Request payload that looks like

{"org":"myorg1","repo":"myrepo1","description":"a nice one"}

Actual result

{"create-repo org":"myorg1","repo":"myrepo1","description":"a nice one"}

Environment

  • Ubuntu 22.04.4 LTS
  • zsh 5.8.1 (x86_64-ubuntu-linux-gnu)
  • restish version 0.20.0

aaronkjones avatar Mar 26 '24 22:03 aaronkjones

I did find that using the j executable, piped to restish, serves my purpose.

j 'org: myorg1, repo: myrepo1, description: a nice one' | restish example create-repo

aaronkjones avatar Mar 26 '24 23:03 aaronkjones