From: Alexander Barton Date: Sat, 9 Dec 2023 12:29:30 +0000 (+0100) Subject: axzshctl: Enhance "version" information, show prefix & theme X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3c33a143313ab4266103bd4f9be72d6523cf12a;p=ax-zsh.git axzshctl: Enhance "version" information, show prefix & theme --- diff --git a/bin/axzshctl b/bin/axzshctl index 0c996e5..828ee9b 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -25,9 +25,20 @@ function Version { echo "Copyright (c) 2015-2019 Alexander Barton ." echo "Licensed under the terms of the MIT license, see LICENSE.md for details." echo "Homepage: " + 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 diff --git a/core/40_axzsh/40_axzsh.zshrc b/core/40_axzsh/40_axzsh.zshrc index f9d3894..ea262e6 100644 --- a/core/40_axzsh/40_axzsh.zshrc +++ b/core/40_axzsh/40_axzsh.zshrc @@ -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