w4 / bin

:wastebasket: a paste bin.
Other
441 stars 45 forks source link

In plaintext mode, end with a newline #65

Closed egor-tensin closed 10 months ago

egor-tensin commented 10 months ago

A curl call like

curl -X PUT --data-binary @data.txt https://host/

outputs the paste URL without a newline a-la

https://host/somepastenamewhich can mess up the terminal prompt. I

don't really see the downside of adding a newline. The workflow of

url="$( curl -X PUT --data-binary @data.txt https://host/ )"
curl "$url"

still works, since the shell strips the newline in command substitutions.