From 05110ce3cafb586ef723f9e0f812e1cdb9eac0b7 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Tue, 25 Oct 2016 06:11:33 -0500 Subject: [PATCH] Treating BASH_SOURCE like an array --- mo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mo b/mo index 4b9652a..66f6968 100755 --- a/mo +++ b/mo @@ -894,7 +894,7 @@ moUsage() { # Save the original command's path for usage later -MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE%/*}" || exit 1; pwd)/${BASH_SOURCE##*/}" +MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}" # If sourced, load all functions. # If executed, perform the actions as expected.