This commit is contained in:
azure 2018-04-06 18:53:31 +00:00 committed by GitHub
commit f2030aaea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 593 additions and 7 deletions

View file

@ -42,8 +42,10 @@ svn_get_branch_name() {
if [[ -z "$_DISPLAY" ]]; then
svn_get_repo_name
elif [ "x$_DISPLAY" = "xtrunk" ]; then
echo "trunk"
else
echo $_DISPLAY
echo "NOT trunk"
fi
}
@ -63,9 +65,11 @@ svn_dirty_choose() {
if svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'; then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo $1
elif $(echo $status_str | grep -Eq '^\s*[?]'); then
echo $2
else
# Otherwise, no lines were found, or an error occurred. Return clean.
echo $2
echo $3
fi
fi
}

View file

@ -15,6 +15,7 @@ zle -N edit-command-line
bindkey -v
# allow v to edit the command line (standard behaviour)
autoload -Uz edit-command-line
bindkey -M vicmd 'v' edit-command-line
@ -34,6 +35,8 @@ bindkey '^r' history-incremental-search-backward
# allow ctrl-a and ctrl-e to move to beginning/end of line
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
bindkey '^f' forward-char
bindkey '\e.' insert-last-word
# if mode indicator wasn't setup by theme, define default
if [[ "$MODE_INDICATOR" == "" ]]; then
@ -45,6 +48,7 @@ function vi_mode_prompt_info() {
}
# define right prompt, if it wasn't defined by a theme
if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
#if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
RPS1='$(vi_mode_prompt_info)'
fi
#RPS1="$RPS1"'$(vi_mode_prompt_info)'"$RPROMPT"
#fi