Permalink
Browse files

Merge pull request #52 from akatrevorjay/master-pull

Allow spark to be sourced by other scripts easily
  • Loading branch information...
2 parents 1194fa6 + 60c4d0d commit 5eabc563957d14acd32ab3f33892e60da9b35897 @holman committed Aug 9, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 spark
View
3 spark
@@ -75,6 +75,9 @@ spark()
echo
}
+# If we're being sourced, don't worry about such things
+[[ ${#BASH_SOURCE[@]} -eq 1 ]] || return
+
# show help for no arguments if stdin is a terminal
if ([ -z $1 ] && [ -t 0 ]) || [ "$1" == '-h' ]
then

0 comments on commit 5eabc56

Please sign in to comment.