Skip to content

Commit

Permalink
feat: better version information
Browse files Browse the repository at this point in the history
For better issue digging, adding the git hash and datetime into
version information.
  • Loading branch information
jeffreytse committed Jul 17, 2023
1 parent 42a70a8 commit b56bf65
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions zsh-vi-mode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ zvm_switch_keyword_history=()

# Display version information
function zvm_version() {
echo -e "$ZVM_NAME $ZVM_VERSION"
local git_info=$(git show -s --format="(%h, %ci)" 2>/dev/null)
echo -e "$ZVM_NAME $ZVM_VERSION $git_info"
echo -e "\e[4m$ZVM_REPOSITORY\e[0m"
echo -e "$ZVM_DESCRIPTION"
}
Expand Down Expand Up @@ -3624,17 +3625,14 @@ function zvm_system_report() {
shell=zsh
fi

# ZVM
local git_info=$(git show -s --format="(%h, %ci)" 2>/dev/null)

#################
# System Report
#################
print - "- Terminal program: ${term_info}"
print - "- Operating system: ${os_info}"
print - "- ZSH framework: ${(j:, :)zsh_framworks}"
print - "- ZSH version: $($shell --version)"
print - "- ZVM version: ${ZVM_VERSION} ${git_info}"
print - "- ZVM version: $(zvm_version | head -n 1)"
}

# Load config by calling the config function
Expand Down

0 comments on commit b56bf65

Please sign in to comment.