pagerduty-cli icon indicating copy to clipboard operation
pagerduty-cli copied to clipboard

feature-request: --data= via file

Open robbat2 opened this issue 1 year ago • 0 comments

Right now --data for rest put expects the entire JSON to be provided.

For ease of tooling, it would be very nice to support data via file.

AWSCLI has precedent for this: --data=@filename - if the first character is @, then the rest of the arg is a filename, and should be slurped before processing as before.

It would also permit easy changes like:

pd rest get -e teams/$ID  | jq '.team.name|="newname"' | pd rest put -e teams/$ID --data=@/dev/stdin

robbat2 avatar Sep 18 '24 23:09 robbat2