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
Using a command in the form tweet.sh tw -i image.png Hello world will successfully post the image and caption, but tweet.sh tw -i image.png causes the script to hang indefinitely for me, when I would expect it to post the image with no caption. It also hangs when sending a space, like " ".
It seems like the problem can be solved by not putting the word status in the params variable in post() if there are no more params to follow status. Images seem to work with or without captions by including the word status in posting_body():
posting_body() {
if [ "$*" != '' ]; then
echo -n -e "status $*" | sed -E -e 's/$/\\n/' | paste -s -d '\0' -
fi
}
and removing the word status from post():
$(posting_body $*)
That way, the word status is not sent if there is no status/caption.
But I'm not a shell expert so I don't know if this snippet would cause other problems.
Thanks!
The text was updated successfully, but these errors were encountered:
Using a command in the form
tweet.sh tw -i image.png Hello world
will successfully post the image and caption, buttweet.sh tw -i image.png
causes the script to hang indefinitely for me, when I would expect it to post the image with no caption. It also hangs when sending a space, like" "
.It seems like the problem can be solved by not putting the word
status
in theparams
variable in post() if there are no more params to followstatus
. Images seem to work with or without captions by including the wordstatus
in posting_body():and removing the word
status
from post():That way, the word
status
is not sent if there is no status/caption.But I'm not a shell expert so I don't know if this snippet would cause other problems.
Thanks!
The text was updated successfully, but these errors were encountered: