Restore prompt_sorin_setup
This commit is contained in:
parent
f0beadba87
commit
41b71590c3
2 changed files with 5 additions and 16 deletions
|
@ -39,8 +39,7 @@ function prompt_sorin_pwd {
|
||||||
_prompt_sorin_pwd="$MATCH"
|
_prompt_sorin_pwd="$MATCH"
|
||||||
unset MATCH
|
unset MATCH
|
||||||
else
|
else
|
||||||
#_prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}"
|
_prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}"
|
||||||
_prompt_sorin_pwd="${pwd}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +49,7 @@ function prompt_sorin_git_info {
|
||||||
if [[ -s "$_prompt_sorin_precmd_async_data" ]]; then
|
if [[ -s "$_prompt_sorin_precmd_async_data" ]]; then
|
||||||
alias typeset='typeset -g'
|
alias typeset='typeset -g'
|
||||||
source "$_prompt_sorin_precmd_async_data"
|
source "$_prompt_sorin_precmd_async_data"
|
||||||
#RPROMPT+='${git_info:+${(e)git_info[status]}}'
|
RPROMPT+='${git_info:+${(e)git_info[status]}}'
|
||||||
unalias typeset
|
unalias typeset
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -132,19 +131,9 @@ function prompt_sorin_setup {
|
||||||
'status' '$(coalesce "%b" "%p" "%c")%s%A%B%S%a%d%m%r%U%u'
|
'status' '$(coalesce "%b" "%p" "%c")%s%A%B%S%a%d%m%r%U%u'
|
||||||
|
|
||||||
# Define prompts.
|
# 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]}}
|
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]} '
|
||||||
%(!. %B%F{1}#%f%b.)${editor_info[keymap]} '
|
|
||||||
RPROMPT=''
|
RPROMPT=''
|
||||||
SPROMPT='zsh: correct %F{1}%R%f to %F{2}%r%f [nyae]? '
|
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 "$@"
|
prompt_sorin_setup "$@"
|
||||||
|
|
|
@ -87,7 +87,7 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
|
||||||
# Set the prompt theme to load.
|
# Set the prompt theme to load.
|
||||||
# Setting it to 'random' loads a random theme.
|
# Setting it to 'random' loads a random theme.
|
||||||
# Auto set to 'off' on dumb terminals.
|
# Auto set to 'off' on dumb terminals.
|
||||||
zstyle ':prezto:module:prompt' theme 'sorin'
|
zstyle ':prezto:module:prompt' theme 'moron'
|
||||||
|
|
||||||
#
|
#
|
||||||
# Ruby
|
# Ruby
|
||||||
|
|
Loading…
Add table
Reference in a new issue