]> arthur.barton.de Git - ax-zsh.git/commitdiff
axzshctl: Enhance "version" information, show prefix & theme
authorAlexander Barton <alex@barton.de>
Sat, 9 Dec 2023 12:29:30 +0000 (13:29 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 9 Dec 2023 12:29:30 +0000 (13:29 +0100)
bin/axzshctl
core/40_axzsh/40_axzsh.zshrc

index 0c996e5832cf3016ecd426f6fcea87e85fd05d5b..828ee9ba3af17e6e0cc3f66d2a88f0a6a99597b5 100755 (executable)
@@ -25,9 +25,20 @@ function Version {
        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>"
+       echo
+       echo "Installation prefix: $AXZSH"
+       echo -n "Version: "
        if [[ -d "$AXZSH/.git" && -n "$commands[git]" ]]; then
-               echo -n "Version: Git ID "
+               echo -n "Git Commit-ID "
                ( cd "$AXZSH" && git describe --always )
+       else
+               echo "unknown"
+       fi
+       echo -n "Active theme: "
+       if [[ -n "$AXZSH_THEME" ]]; then
+               echo "${AXZSH_THEME:A:t:r}"
+       else
+               echo "unknown"
        fi
        echo
        exit 0
index f9d3894b261678ae0d07ec83e3349f48e92c7b01..ea262e64746f9716363d924035d975795abc9287 100644 (file)
@@ -2,7 +2,7 @@
 # 50_axzsh.zshrc: Initialize AX-ZSH
 
 function axzshctl() {
-       zsh "$AXZSH/bin/axzshctl" "$@" || return $?
+       AXZSH_THEME="$AXZSH_THEME" zsh "$AXZSH/bin/axzshctl" "$@" || return $?
 
        if [[ "$1" = "disable" ]]; then
                unset AXZSH AXZSH_FPATH AXZSH_ZLOGIN_READ AXZSH_ZPROFILE_READ