From dbefade193197d878c8704e465ea6a3d46a97804 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Thu, 30 Nov 2017 05:43:10 -0600 Subject: [PATCH] Adding a version number It is shown with --help. It's also available as $MO_VERSION when mo is sourced. --- mo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mo b/mo index 776b384..55496ed 100755 --- a/mo +++ b/mo @@ -1030,11 +1030,14 @@ moTrimWhitespace() { # Returns nothing. moUsage() { grep '^#/' "${MO_ORIGINAL_COMMAND}" | cut -c 4- + echo "" + set | grep ^MO_VERSION= } # Save the original command's path for usage later MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}" +MO_VERSION="2.0.4" # If sourced, load all functions. # If executed, perform the actions as expected.