Skip to content
Browse files

Allow spark to be sourced by other scripts easily

  • Loading branch information...
1 parent 1194fa6 commit 60c4d0d7ab4127a0e74a8e6fb80c07cd60dc536e @akatrevorjay akatrevorjay committed Jul 30, 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 60c4d0d

Please sign in to comment.
Something went wrong with that request. Please try again.