aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-04-27 02:03:35 +0200
committerGravatar Tom Willemse2014-04-27 02:03:35 +0200
commit7f649a30941424f6f7ec3ad76bd87d291c02629b (patch)
treee6068c7754a1cf22bc7225c53e95a2e03e5c192a
parent424a165de583145656919a40c043f8ae399253ea (diff)
downloadhypo-cli-7f649a30941424f6f7ec3ad76bd87d291c02629b.tar.gz
hypo-cli-7f649a30941424f6f7ec3ad76bd87d291c02629b.zip
Use fold to make sure lines don't get too long
-rwxr-xr-xhypo27
1 files changed, 16 insertions, 11 deletions
diff --git a/hypo b/hypo
index 40a9e43..85bcf49 100755
--- a/hypo
+++ b/hypo
@@ -19,21 +19,25 @@
URL="https://ryuslash.org/hypo"
+function fold () { /usr/bin/fold -s -w $(tput cols); }
+
function help_send
{
echo "Usage: $xname send FILE"
echo " $xname send [SUFFIX]"
echo
- echo "Using the first form FILE will be uploaded to a hypo instance and the URL at "
- echo "which it can be visited will be printed."
+ echo "Using the first form FILE will be uploaded to a hypo instance \
+and the URL at which it can be visited will be printed." | fold
echo
- echo "Using the second form requires that input come from a pipe. Such as:"
+ echo "Using the second form requires that input come from a pipe. \
+Such as:" | fold
echo
echo " cat somefile.txt | hypo send"
echo
- echo "In this case the argument to send is optional, if it is specified it should "
- echo "include a \`.' to help pygments decide on the syntax highlighting to use. If the "
- echo "argument is left unspecified it defaults to \`.txt'."
+ echo "In this case the argument to send is optional, if it is \
+specified it should include a \`.' to help pygments decide on the \
+syntax highlighting to use. If the argument is left unspecified it \
+defaults to \`.txt'." | fold
}
function cmd_send
@@ -59,8 +63,8 @@ function help_scrot
{
echo "Usage: $xname scrot ARG"
echo
- echo "The ARG will be passed directly to scrot. The resulting screenshot will be sent"
- echo "directly to hypo and removed locally."
+ echo "The ARG will be passed directly to scrot. The resulting \
+screenshot will be sent directly to hypo and removed locally."
}
function cmd_scrot
@@ -72,8 +76,8 @@ function help_rm
{
echo "Usage: $xname rm HASH"
echo
- echo "Remove a file from hypo. The HASH under which it is stored remotely (the last"
- echo "part of the URL) should be specified."
+ echo "Remove a file from hypo. The HASH under which it is stored \
+remotely (the last part of the URL) should be specified." | fold
}
function cmd_rm
@@ -102,7 +106,8 @@ function cmd_help
echo " scrot Take a screenshot and send it to a hypo instance"
echo " send Send a file to a hypo instance"
echo
- echo "You can use \`$xname help <command>' to get more information about a command."
+ echo "You can use \`$xname help <command>' to get more \
+information about a command." | fold
fi
}