Skip to content

Commit

Permalink
More system report improvements (ohmyzsh#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri authored Sep 27, 2020
1 parent 7924d09 commit f9a3686
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pure.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,15 @@ prompt_pure_is_inside_container() {
prompt_pure_system_report() {
setopt localoptions noshwordsplit

print - "- Zsh: $($SHELL --version) ($SHELL)"
local shell=$SHELL
if [[ -z $shell ]]; then
shell=$commands[zsh]
fi
print - "- Zsh: $($shell --version) ($shell)"
print -n - "- Operating system: "
case "$(uname -s)" in
Darwin) print "$(sw_vers -productName) $(sw_vers -productVersion) ($(sw_vers -buildVersion))";;
*) print "$(uname -s) ($(uname -v))";;
*) print "$(uname -s) ($(uname -r) $(uname -v) $(uname -m) $(uname -o))";;
esac
print - "- Terminal program: ${TERM_PROGRAM:-unknown} (${TERM_PROGRAM_VERSION:-unknown})"
print -n - "- Tmux: "
Expand All @@ -719,11 +723,12 @@ prompt_pure_system_report() {

print - "- Pure state:"
for k v in "${(@kv)prompt_pure_state}"; do
print - " - $k: \`${(q)v}\`"
print - " - $k: \`${(q-)v}\`"
done
print - "- zsh-async version: ${ASYNC_VERSION}"
print - "- zsh-async version: \`${ASYNC_VERSION}\`"
print - "- PROMPT: \`$(typeset -p PROMPT)\`"
print - "- Colors: \`$(typeset -p prompt_pure_colors)\`"
print - "- TERM: \`$(typeset -p TERM)\`"
print - "- Virtualenv: \`$(typeset -p VIRTUAL_ENV_DISABLE_PROMPT)\`"
print - "- Conda: \`$(typeset -p CONDA_CHANGEPS1)\`"

Expand Down

0 comments on commit f9a3686

Please sign in to comment.