]> arthur.barton.de Git - ax-zsh.git/blobdiff - bin/axzshctl
std_env: Set CLICOLOR=1 (if not set already)
[ax-zsh.git] / bin / axzshctl
index 05062bd346c02c636bcc747de96a8c1ce654e028..c25fb442a00360177a40be854b758298fdbf22fd 100755 (executable)
@@ -21,6 +21,19 @@ if [[ -z "$ax_common_sourced" ]]; then
 fi
 unset dir ax_common ax_common_sourced
 
+function Version {
+       echo "ax-zsh -- Modular configuration system for the Z shell (ZSH)"
+       echo "Copyright (c) 2015-2019 Alexander Barton <alex@barton.de>."
+       echo "Licensed under the terms of the MIT license, see LICENSE.md for details."
+       echo "Homepage: <https://github.com/alexbarton/ax-zsh>"
+       if [[ -d "$AXZSH/.git" && -n "$commands[git]" ]]; then
+               echo -n "Version: Git ID "
+               ( cd "$AXZSH" && git describe --always )
+       fi
+       echo
+       exit 0
+}
+
 function Usage {
        echo "Usage: $NAME <command> [...]"
        echo
@@ -59,6 +72,7 @@ function UpdatePluginCache {
 
        [[ "$1" = "-v" ]] && ax_msg - "Updating plugin cache ..."
        rm -rf \
+               $AXZSH/cache/ax-io.cache \
                $AXZSH/cache/zlogin.cache \
                $AXZSH/cache/zlogout.cache \
                $AXZSH/cache/zprofile.cache \
@@ -437,8 +451,11 @@ case "$cmd" in
                [[ $# -eq 0 ]] || Usage
                UpdatePluginCache -v
                ;;
-       "--help")
-               Usage
+       "--version"|"version")
+               Version >&2
+               ;;
+       "--help"|"help")
+               Usage >&2
                ;;
        *)
                ax_error "Invalid command \"$cmd\"!"