From 0d3532c4e0929ddafb50b61fab0637a6974fc791 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 4 Mar 2018 17:50:49 -0500 Subject: conditionalize fancy-prompt config on being installed so that we don't end up promptless on a new system before installing it --- zshrc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'zshrc') diff --git a/zshrc b/zshrc index 99ca293..e82c817 100644 --- a/zshrc +++ b/zshrc @@ -89,11 +89,13 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=black,bold' # }}} # }}} # prompt {{{ -function shell_prompt_precmd () { - PROMPT=`fancy-prompt --prompt-escape zsh $?` - RPS1='' -} -precmd_functions+=(shell_prompt_precmd) +if type fancy-prompt > /dev/null 2>&1; then + function shell_prompt_precmd () { + PROMPT=`fancy-prompt --prompt-escape zsh $?` + RPS1='' + } + precmd_functions+=(shell_prompt_precmd) +fi function zle-keymap-select () { setopt localoptions no_ksharrays { [[ "${@[2]-main}" == opp ]] } && return -- cgit v1.2.3-54-g00ecf