mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
done
This commit is contained in:
parent
f6b1e7cdc9
commit
3bac174aeb
3 changed files with 11 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ bindkey -M menuselect '^o' accept-and-infer-next-history
|
||||||
|
|
||||||
zstyle ':completion:*:*:*:*:*' menu select
|
zstyle ':completion:*:*:*:*:*' menu select
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
|
||||||
zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w"
|
zstyle ':completion:*:*:*:*:processes' command "ps -e -o pid,user,comm -w -w"
|
||||||
|
|
||||||
# disable named-directories autocompletion
|
# disable named-directories autocompletion
|
||||||
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
|
||||||
|
|
@ -51,7 +51,7 @@ zstyle ':completion:*:hosts' hosts $hosts
|
||||||
|
|
||||||
# Use caching so that commands like apt and dpkg complete are useable
|
# Use caching so that commands like apt and dpkg complete are useable
|
||||||
zstyle ':completion::complete:*' use-cache 1
|
zstyle ':completion::complete:*' use-cache 1
|
||||||
zstyle ':completion::complete:*' cache-path ~/.oh-my-zsh/cache/
|
zstyle ':completion::complete:*' cache-path ~/tmp/cache/
|
||||||
|
|
||||||
# Don't complete uninteresting users
|
# Don't complete uninteresting users
|
||||||
zstyle ':completion:*:*:*:users' ignored-patterns \
|
zstyle ':completion:*:*:*:users' ignored-patterns \
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,7 @@ function vi_mode_prompt_info() {
|
||||||
if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
|
if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then
|
||||||
RPS1='$(vi_mode_prompt_info)'
|
RPS1='$(vi_mode_prompt_info)'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
autoload edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
bindkey -M vicmd v edit-command-line
|
||||||
|
|
|
||||||
|
|
@ -34,20 +34,20 @@ jobs_prompt_info() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$SHLVL" = "0" ] || [ "$SHLVL" = "1" ] || [ "$SHLVL" = "" ]; then
|
if [ "$SHLVL" = "0" ] || [ "$SHLVL" = "1" ] || [ "$SHLVL" = "" ]; then
|
||||||
shell_level=""
|
local shell_level=""
|
||||||
else
|
else
|
||||||
shell_level="%{$fg[cyan]%}(%{$fg[red]%}$[${SHLVL} - 1]%{$fg[cyan]%})%{$reset_color%}"
|
local shell_level="%{$fg[cyan]%}(%{$fg[red]%}$[${SHLVL} - 1]%{$fg[cyan]%})%{$reset_color%}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setup command result indicator
|
# setup command result indicator
|
||||||
CMDRESULT="%(?,,%{$fg[red]%}[%?]%{$reset_color%})"
|
local exit_code="%(?,,%{$fg[red]%}[%?]%{$reset_color%})"
|
||||||
|
|
||||||
# Put it all together
|
# Put it all together
|
||||||
PROMPT='${CMDRESULT}%{$fg[cyan]%}[${user_host} %{$fg[yellow]%}%~%{$fg[cyan]%}]$(jobs_prompt_info)${shell_level}${prompt_char} '
|
PROMPT='${exit_code}%{$fg[cyan]%}[${user_host} %{$fg[yellow]%}%~%{$fg[cyan]%}]$(jobs_prompt_info)${shell_level}${prompt_char} '
|
||||||
|
|
||||||
|
|
||||||
# Setup vi mode indicator
|
# Setup vi mode indicator
|
||||||
MODE_INDICATOR="%{$fg_bold[yellow]%}<N>%{$reset_color%}"
|
MODE_INDICATOR="%{$fg_bold[yellow]%}<CMD>%{$reset_color%}"
|
||||||
|
|
||||||
# Setup git prompt info
|
# Setup git prompt info
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}("
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue