mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Agnosting out
This commit is contained in:
parent
8728b49aca
commit
5b7ded90a0
1 changed files with 10 additions and 6 deletions
|
|
@ -3,6 +3,9 @@ function bat {
|
||||||
echo "%{$FG[243]%}`battery_time_remaining`%{$reset_color%}"
|
echo "%{$FG[243]%}`battery_time_remaining`%{$reset_color%}"
|
||||||
# echo `date`
|
# echo `date`
|
||||||
}
|
}
|
||||||
|
function rvm_ruby {
|
||||||
|
echo "%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%} "
|
||||||
|
}
|
||||||
function virtualenv_info {
|
function virtualenv_info {
|
||||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +68,7 @@ prompt_end() {
|
||||||
echo -n "%{%k%}"
|
echo -n "%{%k%}"
|
||||||
fi
|
fi
|
||||||
echo -n "%{%f%}"
|
echo -n "%{%f%}"
|
||||||
echo -n "\n╰─$(virtualenv_info)${$(prompt_char)} "
|
# echo -n "\n╰─$(virtualenv_info)${$(prompt_char)} "
|
||||||
CURRENT_BG=''
|
CURRENT_BG=''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,7 +88,7 @@ prompt_context() {
|
||||||
prompt_git() {
|
prompt_git() {
|
||||||
local ref dirty
|
local ref dirty
|
||||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY='±'
|
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$FG[202]%}✘"
|
||||||
dirty=$(parse_git_dirty)
|
dirty=$(parse_git_dirty)
|
||||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
|
||||||
if [[ -n $dirty ]]; then
|
if [[ -n $dirty ]]; then
|
||||||
|
|
@ -99,7 +102,8 @@ prompt_git() {
|
||||||
|
|
||||||
# Dir: current working directory
|
# Dir: current working directory
|
||||||
prompt_dir() {
|
prompt_dir() {
|
||||||
prompt_segment blue black '%~'
|
# prompt_segment blue black '%~'
|
||||||
|
prompt_segment blue black '%1~'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Status:
|
# Status:
|
||||||
|
|
@ -119,7 +123,7 @@ prompt_status() {
|
||||||
## Main prompt
|
## Main prompt
|
||||||
build_prompt() {
|
build_prompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo -n '╭─ ' # Jannis'
|
# echo -n '╭─ ' # Jannis'
|
||||||
prompt_status
|
prompt_status
|
||||||
# prompt_context # Jannis'
|
# prompt_context # Jannis'
|
||||||
prompt_dir
|
prompt_dir
|
||||||
|
|
@ -127,5 +131,5 @@ build_prompt() {
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT='%{%f%b%k%}$(build_prompt)'
|
PROMPT='%{%f%b%k%}$(build_prompt) '
|
||||||
RPROMPT='$(bat)'
|
RPROMPT='$(rvm_ruby)$(bat)'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue