Speed improvements on iSH
This commit is contained in:
parent
8ce24d5e61
commit
557d53ba1f
@ -2,6 +2,11 @@
|
|||||||
# There are some important env vars that need to exist
|
# There are some important env vars that need to exist
|
||||||
export EWCONFIG_ROOT="$HOME/.config/ewconfig"
|
export EWCONFIG_ROOT="$HOME/.config/ewconfig"
|
||||||
|
|
||||||
|
# Auto-detect if we are running inside of ISH (IOS Shell)
|
||||||
|
if [ $(uname -r | grep -c "\-ish$") -gt 0 ]; then
|
||||||
|
export EWCONFIG_IN_ISH=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Load my custom prompt and macros
|
# Load my custom prompt and macros
|
||||||
. $EWCONFIG_ROOT/configs/shells/zsh/prompt.sh
|
. $EWCONFIG_ROOT/configs/shells/zsh/prompt.sh
|
||||||
. $EWCONFIG_ROOT/configs/shells/zsh/macros.sh
|
. $EWCONFIG_ROOT/configs/shells/zsh/macros.sh
|
||||||
|
@ -29,20 +29,26 @@ fi
|
|||||||
# Add the common prompt parts
|
# Add the common prompt parts
|
||||||
export PROMPT="${PROMPT}%{$fg[cyan]%}%~ ${USER_ICON} %{$reset_color%}"
|
export PROMPT="${PROMPT}%{$fg[cyan]%}%~ ${USER_ICON} %{$reset_color%}"
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload -Uz vcs_info
|
|
||||||
zstyle ':vcs_info:*' actionformats \
|
# Don't bother rendering VCS info on weak systems. Just fallback to the time and status
|
||||||
|
if [ -n "$EWCONFIG_IN_ISH" ]; then
|
||||||
|
autoload -Uz vcs_info
|
||||||
|
zstyle ':vcs_info:*' actionformats \
|
||||||
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
|
||||||
zstyle ':vcs_info:*' formats \
|
zstyle ':vcs_info:*' formats \
|
||||||
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
|
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
|
||||||
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||||
|
|
||||||
zstyle ':vcs_info:*' enable git cvs svn
|
zstyle ':vcs_info:*' enable git cvs svn
|
||||||
|
|
||||||
# or use pre_cmd, see man zshcontrib
|
# or use pre_cmd, see man zshcontrib
|
||||||
vcs_info_wrapper() {
|
vcs_info_wrapper() {
|
||||||
vcs_info
|
vcs_info
|
||||||
if [ -n "$vcs_info_msg_0_" ]; then
|
if [ -n "$vcs_info_msg_0_" ]; then
|
||||||
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
|
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
export RPROMPT=$'%T $(vcs_info_wrapper)%?'
|
export RPROMPT=$'%T $(vcs_info_wrapper)%?'
|
||||||
|
else
|
||||||
|
export RPROMPT=$'%T %?'
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user