From 84141dcb59666ab2565ee30f1cf1ead9d64c8a94 Mon Sep 17 00:00:00 2001 From: James Walker Date: Fri, 15 Nov 2019 12:14:06 -0500 Subject: [PATCH] fix: only show RPROMPT when asdf is available --- home/.zsh/custom/walkah.zsh-theme | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home/.zsh/custom/walkah.zsh-theme b/home/.zsh/custom/walkah.zsh-theme index 0d7408a..44a5b46 100644 --- a/home/.zsh/custom/walkah.zsh-theme +++ b/home/.zsh/custom/walkah.zsh-theme @@ -9,8 +9,9 @@ function asdf_prompt() { PROMPT='%{$fg[$HCOLOR]%}%m%{$reset_color%}:%c $(git_prompt_info)%{$fg[red]%}%(!.#.»)%{$reset_color%} ' PROMPT2='%{$fg[red]%}\ %{$reset_color%}' -RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(asdf_prompt ruby) %{$fg[green]%}$(asdf_prompt nodejs) %{$fg[blue]%}$(asdf_prompt python)%{$fg[cyan]%}) %{$reset_color%}${return_code}' - +if (( $+commands[asdf] )); then + RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(asdf_prompt ruby) %{$fg[green]%}$(asdf_prompt nodejs) %{$fg[blue]%}$(asdf_prompt python)%{$fg[cyan]%}) %{$reset_color%}${return_code}' +fi ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN=""