mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Added last command status and RVM config
This commit is contained in:
parent
51c9f43c94
commit
97c5191192
1 changed files with 10 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# Right prompt when in a Git repository:
|
||||
# ±‹branch_name clean_or_dirty› status(ahead) [short_sha]
|
||||
#
|
||||
#
|
||||
# author: Eric Bouchut
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="±‹%{$fg_bold[yellow]%}"
|
||||
|
|
@ -34,9 +34,14 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}]"
|
|||
local username="%{$fg_bold[green]%}%n%{$reset_color%}"
|
||||
local hostname="%{$fg_bold[magenta]%}%m%{$reset_color%}"
|
||||
local current_dir="%{$fg_bold[blue]%}%~%{$reset_color%}"
|
||||
local cmd_status="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})"
|
||||
local rvm_config=$(~/.rvm/bin/rvm-prompt)
|
||||
|
||||
# Left prompt: username@hostname:current_directory%
|
||||
PROMPT='$username@$hostname:$current_dir%# '
|
||||
# Left prompt: username@hostname:current_directory
|
||||
PROMPT='
|
||||
$username@$hostname:$current_dir
|
||||
${cmd_status} '
|
||||
|
||||
# Right prompt when in a git repo: ±‹branch_name clean_or_dirty› status(ahead) [short_sha]
|
||||
RPROMPT='$(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)'
|
||||
|
||||
# Right prompt when in a git repo: rvm_config ±‹branch_name clean_or_dirty› status(ahead) [short_sha]
|
||||
RPROMPT='${rvm_config} $(git_prompt_info)$(git_prompt_status)$(git_prompt_ahead)$(git_prompt_short_sha)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue