mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
luca.zsh-theme
this commit include my theme (themes/luca.zsh-theme) and a little update of (lib/rvm.zsh)
I added ZSH_THEME_RVM_PROMPT_{PREFIX|SUFFIX} analogous to ZSH_THEME_GIT_PROMPT_{PREFIX|SUFFIX}
This commit is contained in:
parent
757fa3314d
commit
9893a2a302
2 changed files with 19 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# get the name of the branch we are on
|
# get the name of the branch we are on
|
||||||
function rvm_prompt_info() {
|
function rvm_prompt_info() {
|
||||||
ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return
|
ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return
|
||||||
echo "($ruby_version)"
|
echo "$ZSH_THEME_RVM_PROMPT_PREFIX$ruby_version$ZSH_THEME_RVM_PROMPT_SUFFIX"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
18
themes/luca.zsh-theme
Normal file
18
themes/luca.zsh-theme
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="[%{$fg[green]%}GIT::"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}]"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="|✖"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="|✔"
|
||||||
|
|
||||||
|
ZSH_THEME_RVM_PROMPT_PREFIX="[%{$fg[red]%}RVM::"
|
||||||
|
ZSH_THEME_RVM_PROMPT_SUFFIX="%{$reset_color%}]"
|
||||||
|
|
||||||
|
# Display exitcode on the right when >0
|
||||||
|
return_code="%(?..%? ↵)"
|
||||||
|
|
||||||
|
PROMPT='
|
||||||
|
[%T] [%n] [%~] $(rvm_prompt_info) $(git_prompt_info)
|
||||||
|
→ '
|
||||||
|
|
||||||
|
RPROMPT=''
|
||||||
Loading…
Add table
Add a link
Reference in a new issue