From 66972609bc591718c146e0930217b63191fdf0e4 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Thu, 10 Aug 2017 11:23:26 -0700 Subject: [PATCH] prompt: add sp option to prompt_setup functions This was a change in zsh 5.4.1 where prompt_sp is now reset on calls to prompt, unlike previous behavior where it was set by default. This restores the previous default behavior. Refs #1423, but is not a complete fix because we need to wait for external prompts to update as well. --- modules/prompt/functions/prompt_cloud_setup | 2 +- modules/prompt/functions/prompt_damoekri_setup | 2 +- modules/prompt/functions/prompt_giddie_setup | 2 +- modules/prompt/functions/prompt_kylewest_setup | 2 +- modules/prompt/functions/prompt_minimal_setup | 2 +- modules/prompt/functions/prompt_nicoulaj_setup | 2 +- modules/prompt/functions/prompt_paradox_setup | 2 +- modules/prompt/functions/prompt_peepcode_setup | 2 +- modules/prompt/functions/prompt_skwp_setup | 2 +- modules/prompt/functions/prompt_smiley_setup | 2 +- modules/prompt/functions/prompt_sorin_setup | 2 +- modules/prompt/functions/prompt_steeef_setup | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/prompt/functions/prompt_cloud_setup b/modules/prompt/functions/prompt_cloud_setup index 3b048df13e6..0637208b4e4 100644 --- a/modules/prompt/functions/prompt_cloud_setup +++ b/modules/prompt/functions/prompt_cloud_setup @@ -76,7 +76,7 @@ function prompt_cloud_preview { function prompt_cloud_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Set the theme prefix to a cloud or to the user's given characters. if [[ -n "$1" ]]; then diff --git a/modules/prompt/functions/prompt_damoekri_setup b/modules/prompt/functions/prompt_damoekri_setup index ca3b09ec71d..4fe132d6e15 100644 --- a/modules/prompt/functions/prompt_damoekri_setup +++ b/modules/prompt/functions/prompt_damoekri_setup @@ -32,7 +32,7 @@ prompt_damoekri_precmd() { function prompt_damoekri_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_giddie_setup b/modules/prompt/functions/prompt_giddie_setup index 5a14ffe0f3c..3c194fb9a04 100644 --- a/modules/prompt/functions/prompt_giddie_setup +++ b/modules/prompt/functions/prompt_giddie_setup @@ -38,7 +38,7 @@ function prompt_giddie_precmd { function prompt_giddie_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz vcs_info diff --git a/modules/prompt/functions/prompt_kylewest_setup b/modules/prompt/functions/prompt_kylewest_setup index e4ee0c0ef07..70b6a54afe1 100644 --- a/modules/prompt/functions/prompt_kylewest_setup +++ b/modules/prompt/functions/prompt_kylewest_setup @@ -32,7 +32,7 @@ function prompt_kylewest_precmd { function prompt_kylewest_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_minimal_setup b/modules/prompt/functions/prompt_minimal_setup index 8c07e70ef55..7456ffdb1d0 100644 --- a/modules/prompt/functions/prompt_minimal_setup +++ b/modules/prompt/functions/prompt_minimal_setup @@ -23,7 +23,7 @@ function prompt_minimal_precmd { function prompt_minimal_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_nicoulaj_setup b/modules/prompt/functions/prompt_nicoulaj_setup index 241c8b6ea7c..447ba1f40a4 100644 --- a/modules/prompt/functions/prompt_nicoulaj_setup +++ b/modules/prompt/functions/prompt_nicoulaj_setup @@ -26,7 +26,7 @@ function prompt_nicoulaj_precmd { function prompt_nicoulaj_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_paradox_setup b/modules/prompt/functions/prompt_paradox_setup index 088e77e44c6..4f19989dafb 100644 --- a/modules/prompt/functions/prompt_paradox_setup +++ b/modules/prompt/functions/prompt_paradox_setup @@ -107,7 +107,7 @@ function prompt_paradox_preexec { function prompt_paradox_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_peepcode_setup b/modules/prompt/functions/prompt_peepcode_setup index c70fb9a7826..2081961ca42 100644 --- a/modules/prompt/functions/prompt_peepcode_setup +++ b/modules/prompt/functions/prompt_peepcode_setup @@ -25,7 +25,7 @@ function prompt_peepcode_precmd { function prompt_peepcode_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_skwp_setup b/modules/prompt/functions/prompt_skwp_setup index 1c8f0a90afd..f69dcddfe7d 100644 --- a/modules/prompt/functions/prompt_skwp_setup +++ b/modules/prompt/functions/prompt_skwp_setup @@ -28,7 +28,7 @@ function prompt_skwp_precmd { function prompt_skwp_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook diff --git a/modules/prompt/functions/prompt_smiley_setup b/modules/prompt/functions/prompt_smiley_setup index 3066a2dc2b3..3c78486d73a 100644 --- a/modules/prompt/functions/prompt_smiley_setup +++ b/modules/prompt/functions/prompt_smiley_setup @@ -36,7 +36,7 @@ function prompt_smiley_precmd { function prompt_smiley_setup { unsetopt XTRACE KSH_ARRAYS - prompt_opts=(percent subst) + prompt_opts=(percent sp subst) # Add hook for calling git-info before each command. add-zsh-hook precmd prompt_smiley_precmd diff --git a/modules/prompt/functions/prompt_sorin_setup b/modules/prompt/functions/prompt_sorin_setup index 9ecc1b094ee..6856de60dd6 100644 --- a/modules/prompt/functions/prompt_sorin_setup +++ b/modules/prompt/functions/prompt_sorin_setup @@ -88,7 +88,7 @@ function prompt_sorin_precmd { function prompt_sorin_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) _prompt_sorin_precmd_async_pid=0 _prompt_sorin_precmd_async_data=$(mktemp "${TMPDIR:-/tmp}/sorin-prompt-async-XXXXXXXXXX") diff --git a/modules/prompt/functions/prompt_steeef_setup b/modules/prompt/functions/prompt_steeef_setup index 996331fd588..b241f9aa351 100644 --- a/modules/prompt/functions/prompt_steeef_setup +++ b/modules/prompt/functions/prompt_steeef_setup @@ -32,7 +32,7 @@ function prompt_steeef_precmd { function prompt_steeef_setup { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS - prompt_opts=(cr percent subst) + prompt_opts=(cr percent sp subst) # Load required functions. autoload -Uz add-zsh-hook