From ce8ff7e6730e7f517015bcb240bdb283991daf0a Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Fri, 6 Apr 2018 18:00:57 -0700 Subject: [PATCH 1/7] Added Custom SPROMPT --- modules/completion/init.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index cfdb129..b26ac19 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -21,6 +21,8 @@ autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-. # set any compdefs source ${0:h}/compdefs.zsh +# set custom sprompt +SPROMPT="Correct %F{1}%R%f to %F{2}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? " # # zsh options From 807f364204e811f541fc219c2f4a5ce1cef34e7e Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Sat, 7 Apr 2018 18:32:23 -0700 Subject: [PATCH 2/7] Added Diffrent SPROMPT Themes --- modules/completion/init.zsh | 10 +++++++++- templates/zimrc | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index b26ac19..8efaa53 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -22,7 +22,15 @@ autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-. source ${0:h}/compdefs.zsh # set custom sprompt -SPROMPT="Correct %F{1}%R%f to %F{2}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? " +if [[ ! ${TERM} = 'dumb' ]]; then + if (( ${+zsprompt_theme} )); then + if [ $zsprompt_theme = "zim" ]; then + SPROMPT="Correct %F{1}%R%f to %F{2}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? " + elif [ $zsprompt_theme = "color" ]; then + SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? ' + fi + fi +fi # # zsh options diff --git a/templates/zimrc b/templates/zimrc index 203a7a6..3f61d37 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -26,6 +26,9 @@ zmodules=(directory environment git git-info history input utility custom \ # Set your desired prompt here zprompt_theme='steeef' +# Set your completion prompt here, options are 'zim' and 'color' +zsprompt_theme='zim' + # # Completion # From b80ac0714c7456c69035a028834494e295d30fad Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Sun, 8 Apr 2018 11:25:16 -0700 Subject: [PATCH 3/7] Removed themes and switched to override method --- modules/completion/init.zsh | 10 ++++------ templates/zimrc | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 8efaa53..0ccca72 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -23,12 +23,10 @@ source ${0:h}/compdefs.zsh # set custom sprompt if [[ ! ${TERM} = 'dumb' ]]; then - if (( ${+zsprompt_theme} )); then - if [ $zsprompt_theme = "zim" ]; then - SPROMPT="Correct %F{1}%R%f to %F{2}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? " - elif [ $zsprompt_theme = "color" ]; then - SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? ' - fi + if (( ${+zsprompt} )); then + SPROMPT=$zsprompt + else + SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? ' fi fi diff --git a/templates/zimrc b/templates/zimrc index 3f61d37..8d16ec7 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -26,9 +26,6 @@ zmodules=(directory environment git git-info history input utility custom \ # Set your desired prompt here zprompt_theme='steeef' -# Set your completion prompt here, options are 'zim' and 'color' -zsprompt_theme='zim' - # # Completion # @@ -37,6 +34,9 @@ zsprompt_theme='zim' # if none is provided, the default '.zcompdump' is used. #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}" +# Set your own completion prompt, comment out for default +#zsprompt='Correct %F{red}%R%f to %F{green}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? ' + # # Utility # From f64cae4188d5b4853cfc89b0c50225e4ae95f50d Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Sun, 8 Apr 2018 12:11:45 -0700 Subject: [PATCH 4/7] Use color names instead of numbers --- modules/completion/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 0ccca72..6c12777 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -26,7 +26,7 @@ if [[ ! ${TERM} = 'dumb' ]]; then if (( ${+zsprompt} )); then SPROMPT=$zsprompt else - SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? ' + SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' fi fi From 5d9bf8dd720502a3fc8b515fc13a24622ee3cc2c Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Sat, 21 Apr 2018 12:34:00 -0700 Subject: [PATCH 5/7] Changed Config Method --- modules/completion/init.zsh | 8 ++------ templates/zimrc | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 6c12777..154e62b 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -22,12 +22,8 @@ autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-. source ${0:h}/compdefs.zsh # set custom sprompt -if [[ ! ${TERM} = 'dumb' ]]; then - if (( ${+zsprompt} )); then - SPROMPT=$zsprompt - else - SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' - fi +if [ ${SPROMPT} = "zsh: correct '%R' to '%r' [nyae]?" ]; then + SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' fi # diff --git a/templates/zimrc b/templates/zimrc index 8d16ec7..203a7a6 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -34,9 +34,6 @@ zprompt_theme='steeef' # if none is provided, the default '.zcompdump' is used. #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}" -# Set your own completion prompt, comment out for default -#zsprompt='Correct %F{red}%R%f to %F{green}%r%f? (%UY%ues, %UN%uo, %UA%ubort, %UE%udit)? ' - # # Utility # From c6972c87db340c2dff4e9f0488a3115b8966d5b3 Mon Sep 17 00:00:00 2001 From: AtomicCoding Date: Sat, 21 Apr 2018 19:05:42 -0700 Subject: [PATCH 6/7] Moved Config to zimrc --- modules/completion/init.zsh | 5 ----- templates/zimrc | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 154e62b..1df1bab 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -21,11 +21,6 @@ autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-. # set any compdefs source ${0:h}/compdefs.zsh -# set custom sprompt -if [ ${SPROMPT} = "zsh: correct '%R' to '%r' [nyae]?" ]; then - SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' -fi - # # zsh options # diff --git a/templates/zimrc b/templates/zimrc index 203a7a6..54d4667 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -34,6 +34,9 @@ zprompt_theme='steeef' # if none is provided, the default '.zcompdump' is used. #zcompdump_file=".zcompdump-${HOST}-${ZSH_VERSION}" +# Set custom completion prompt +SPROMPT="zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? " + # # Utility # From 94af1ac93489d9f41c9fe7de0c96a142a1678f0e Mon Sep 17 00:00:00 2001 From: Atomic Coding Date: Sat, 21 Apr 2018 19:06:10 -0700 Subject: [PATCH 7/7] Fix incorrect diff --- modules/completion/init.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 1df1bab..cfdb129 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -21,6 +21,7 @@ autoload -Uz compinit && compinit -C -d "${ZDOTDIR:-${HOME}}/${zcompdump_file:-. # set any compdefs source ${0:h}/compdefs.zsh + # # zsh options #