aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorken restivo <ken@restivo.org>2016-01-14 21:05:36 -0800
committerken restivo <ken@restivo.org>2016-01-14 21:05:36 -0800
commitb58177e3c60fd6dfbe01549bb7894d9c84d40710 (patch)
treef99abd4d3f0e65ac2b516f8c02d72b59ab79ed17
parentf888548e0e722933e5b03b49fd5e19dd6e55743e (diff)
downloadvolse-hubzilla-b58177e3c60fd6dfbe01549bb7894d9c84d40710.tar.gz
volse-hubzilla-b58177e3c60fd6dfbe01549bb7894d9c84d40710.tar.bz2
volse-hubzilla-b58177e3c60fd6dfbe01549bb7894d9c84d40710.zip
Use ctrl-d for multi-line messages.
-rwxr-xr-xutil/hz8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/hz b/util/hz
index baa5bfb55..cb6ccf419 100755
--- a/util/hz
+++ b/util/hz
@@ -12,7 +12,7 @@ echo " USER=youruserame "
echo " PASS=yourpass"
echo " HUB=your.hub.domain.org"
echo
-echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Hit ENTER to send."
+echo "Type \"hz\" (with or without a conf file as an arg), then enter your message. Use ctrl-D to send.."
}
@@ -29,8 +29,10 @@ CUR=`which curl`
[ "$PASS" ] || { echo "no PASS"; usage; exit 1; }
[ "$HUB" ] || { echo "no HUB"; usage; exit 1; }
-echo "enter your message to be posted as $USER @ $HUB, then hit ENTER to send:"
+echo "enter your message to be posted as $USER @ $HUB, then hit Ctrl-D to send."
-(read MSG; curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update )
+MSG=$(cat)
+
+curl -ssl -u${USER}:${PASS} --data-urlencode "status=${MSG}" https://${HUB}/api/statuses/update