From 41b71590c357961f87090dc86a30288c8718454c Mon Sep 17 00:00:00 2001 From: Brian Moran Date: Sun, 6 Sep 2015 17:03:07 -0400 Subject: [PATCH] Restore prompt_sorin_setup --- modules/prompt/functions/prompt_sorin_setup | 19 ++++--------------- runcoms/zpreztorc | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/modules/prompt/functions/prompt_sorin_setup b/modules/prompt/functions/prompt_sorin_setup index 0f323c0f..c072a4e5 100644 --- a/modules/prompt/functions/prompt_sorin_setup +++ b/modules/prompt/functions/prompt_sorin_setup @@ -39,8 +39,7 @@ function prompt_sorin_pwd { _prompt_sorin_pwd="$MATCH" unset MATCH else - #_prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}" - _prompt_sorin_pwd="${pwd}" + _prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}" fi } @@ -50,7 +49,7 @@ function prompt_sorin_git_info { if [[ -s "$_prompt_sorin_precmd_async_data" ]]; then alias typeset='typeset -g' source "$_prompt_sorin_precmd_async_data" - #RPROMPT+='${git_info:+${(e)git_info[status]}}' + RPROMPT+='${git_info:+${(e)git_info[status]}}' unalias typeset fi @@ -109,7 +108,7 @@ function prompt_sorin_setup { # Set editor-info parameters. zstyle ':prezto:module:editor:info:completing' format '%B%F{7}...%f%b' - zstyle ':prezto:module:editor:info:keymap:primary' format '%B%F{1}❯%F{3}❯%F{2}❯%f%b' + zstyle ':prezto:module:editor:info:keymap:primary' format ' %B%F{1}❯%F{3}❯%F{2}❯%f%b' zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format ' %F{3}♺%f' zstyle ':prezto:module:editor:info:keymap:alternate' format ' %B%F{2}❮%F{3}❮%F{1}❮%f%b' @@ -132,19 +131,9 @@ function prompt_sorin_setup { 'status' '$(coalesce "%b" "%p" "%c")%s%A%B%S%a%d%m%r%U%u' # Define prompts. - PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd} ${git_info:+${(e)git_info[status]}} -%(!. %B%F{1}#%f%b.)${editor_info[keymap]} ' + PROMPT='${SSH_TTY:+"%F{9}%n%f%F{7}@%f%F{3}%m%f "}%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} ' RPROMPT='' SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? ' } -function prompt_sorin_preview { - local +h PROMPT='' - local +h RPROMPT='' - local +h SPROMPT='' - - editor-info 2>/dev/null - prompt_preview_theme 'sorin' -} - prompt_sorin_setup "$@" diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index a18e01f3..b1fec4b0 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -87,7 +87,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs' # Set the prompt theme to load. # Setting it to 'random' loads a random theme. # Auto set to 'off' on dumb terminals. -zstyle ':prezto:module:prompt' theme 'sorin' +zstyle ':prezto:module:prompt' theme 'moron' # # Ruby