You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does the 'r=1' do? Can you tell me where this is documented?
Also, are you sure you want to send the output to /dev/stderr when xsel is expecting input from the pipe?
Please direct me to a more appropriate (IRC?) support channel if this is not the place to ask.
Thanks!
The text was updated successfully, but these errors were encountered:
Yeah, the query string arguments need documentation; when I wrote the api spec, I was mostly looking at the route table, which doesn't include those.
sure you want to send the output to /dev/stderr when xsel is expecting input from the pipe
Yes, xsel is using the output from curl's -w. The paste metadata is displayed on the terminal via stderr, while the paste url goes into the clipboard.
What does the r=1 do?
Normal POST responses are code 200. r=1 makes it a code 302 (redirect). 300 responses are required for curl's redirect_url to grab the location header (yet, location is provided all the time, even during non-300 responses).
Admittedly the single-character things make pb usage more obscure than it needs to be, but people wanted cute copy-paste things that fit into an 80-character terminal line.
pbx () { curl -sF "c=@${1:--}" -w "%{redirect_url}" 'https://ptpb.pw/?r=1' -o /dev/stderr | xsel -l /dev/null -b }
What does the 'r=1' do? Can you tell me where this is documented?
Also, are you sure you want to send the output to /dev/stderr when
xsel
is expecting input from the pipe?Please direct me to a more appropriate (IRC?) support channel if this is not the place to ask.
Thanks!
The text was updated successfully, but these errors were encountered: