charmbracelet / charmbracelet/vhs
How to print curl command with json payload
- Dominant language
- Go
- Stars
- 20.9k
- Forks
- 474
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 2
Description
**Please**: I do not know if this is a bug.
I want to send to the shell this:
~~~
curl -X POST localhost:8080/get/pets -H'Content-type: application/json' -d'{"payload":"low"}'
~~~
I searched through examples, I found nothing similar
file.tape contains:
~~~
Type "curl -X POST localhost:8080/get/pets -H\"Content-type: application/json\" -d\"{\"payload\":\"low\"}\""
Enter
Sleep 2s
~~~
This print "Invalid command: ..." here and there.
Contributor guide
Research direction
Start by reproducing the Type command from file.tape, including the escaped quotes in the JSON payload, and trace how VHS parses Type input. Check the command-line handling that produces “Invalid command” and verify the curl command can be typed without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100