mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-29 04:53:17 +02:00
Merge e90af35311 into 62b8a70a7c
This commit is contained in:
commit
f2030aaea9
7 changed files with 593 additions and 7 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue