implementing default prompt mark

as described in issue #135
This commit is contained in:
François Schmidts 2013-04-17 14:12:17 +02:00
parent 42af71d3f1
commit 2b9d9c7aae

View File

@ -227,6 +227,7 @@ _lp_source_config()
LP_ENABLE_SSH_COLORS=${LP_ENABLE_SSH_COLORS:-0}
LP_DISABLED_VCS_PATH=${LP_DISABLED_VCS_PATH:-""}
LP_MARK_DEFAULT=${LP_MARK_DEFAULT:-""}
LP_MARK_BATTERY=${LP_MARK_BATTERY:-"⌁"}
LP_MARK_ADAPTER=${LP_MARK_ADAPTER:-"⏚"}
LP_MARK_LOAD=${LP_MARK_LOAD:-"⌂"}
@ -1251,9 +1252,12 @@ _lp_smart_mark()
fi
local mark
mark="\\\$"
if [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
if [[ -n "$LP_MARK_DEFAULT" ]]; then
mark=$LP_MARK_DEFAULT
elif [[ "$_LP_WORKING_SHELL" == "zsh" ]]; then
mark="%(!.#.%%)"
else
mark="\\\$"
fi
if [[ "$1" == "git" ]]; then
mark=$LP_MARK_GIT