Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'allow_spaced_input' of https://github.com/patricklucas/…

…spark into patricklucas-allow_spaced_input
  • Loading branch information...
commit b7f36658f0ed7ecefb71791e3475fe22fb9936d2 2 parents a2f142b + cf1269b
@holman holman authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 spark
View
7 spark
@@ -133,9 +133,9 @@ while getopts ":h" option; do
done
# Accept input from $1 or from the pipeline.
-if test "$1" != ""
+if test "$*" != ""
then
- data="$1"
+ data="$*"
else
# check to see if stdin's a tty
if [ -t 0 ]; then
@@ -146,5 +146,8 @@ else
read data
fi
+# Trim spaces to allow input like '1, 2, 3'
+data=$(echo $data | tr -s ' ' ',')
+
setup_array $data
print_ticks $data
Please sign in to comment.
Something went wrong with that request. Please try again.