Oh My Git! support
This commit is contained in:
parent
7b42500485
commit
ba683626a7
@ -172,6 +172,7 @@ building:
|
||||
* `LP_ENABLE_SSH_COLORS`, if you want different colors for hosts you SSH in
|
||||
* `LP_ENABLE_RUNTIME`, if you want to display the runtime of the last command
|
||||
* `LP_ENABLE_TIME`, if you want to display the time at which the prompt was shown
|
||||
* `LP_ENABLE_OHMYGIT`, if you want to enable [Oh My Git](https://github.com/arialdomartini/oh-my-git)
|
||||
* `LP_TIME_ANALOG`, when showing time, use an analog clock instead of numeric values
|
||||
|
||||
Note that if required commands are not installed, enabling the
|
||||
|
@ -290,6 +290,7 @@ _lp_source_config()
|
||||
LP_ENABLE_LOAD=${LP_ENABLE_LOAD:-1}
|
||||
LP_ENABLE_BATT=${LP_ENABLE_BATT:-1}
|
||||
LP_ENABLE_GIT=${LP_ENABLE_GIT:-1}
|
||||
LP_ENABLE_OHMYGIT=${LP_ENABLE_OHMYGIT:-0}
|
||||
LP_ENABLE_SVN=${LP_ENABLE_SVN:-1}
|
||||
LP_ENABLE_VCSH=${LP_ENABLE_VCSH:-1}
|
||||
LP_ENABLE_FOSSIL=${LP_ENABLE_FOSSIL:-1}
|
||||
@ -1695,8 +1696,10 @@ _lp_set_prompt()
|
||||
|
||||
# Insert it in the prompt
|
||||
PS1="${LP_TITLE}${PS1}"
|
||||
[[ $LP_ENABLE_OHMYGIT = 1 ]] && PS1="$(build_prompt)$PS1"
|
||||
else
|
||||
PS1=$LP_PS1
|
||||
[[ $LP_ENABLE_OHMYGIT = 1 ]] && PS1="$(build_prompt)$PS1"
|
||||
fi
|
||||
if [[ -z "$LP_RPS1" ]] ; then
|
||||
RPS1="${LP_TIME}${LP_LOAD}${LP_TEMP}${LP_BATT}"
|
||||
@ -1727,6 +1730,7 @@ _lp_set_prompt()
|
||||
|
||||
# Insert it in the prompt
|
||||
PS1="${LP_TITLE}${PS1}"
|
||||
[[ $LP_ENABLE_OHMYGIT = 1 ]] && PS1="$(build_prompt)$PS1"
|
||||
|
||||
# Glue the bash prompt always go to the first column.
|
||||
# Avoid glitches after interrupting a command with Ctrl-C
|
||||
@ -1734,6 +1738,7 @@ _lp_set_prompt()
|
||||
#PS1="\[\033[G\]${PS1}${NO_COL}"
|
||||
else
|
||||
PS1=$LP_PS1
|
||||
[[ $LP_ENABLE_OHMYGIT = 1 ]] && PS1="$(build_prompt)$PS1"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user