From 289782f350582bfef87769895ae9e7cf98b2db1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Schmidts?= Date: Fri, 12 Apr 2013 14:46:17 +0200 Subject: [PATCH 1/3] fixing issue #132 forcing a certain value for IFS in _lp_load_color --- liquidprompt | 1 + 1 file changed, 1 insertion(+) diff --git a/liquidprompt b/liquidprompt index 3109433..c5a30d0 100755 --- a/liquidprompt +++ b/liquidprompt @@ -1151,6 +1151,7 @@ _lp_load_color() [[ "$LP_ENABLE_LOAD" != 1 ]] && return local load + local IFS=" \t\n" load="$(_lp_cpu_load | sed 's/\.//g;s/^0*//g' )" let "load=${load:-0}/$_lp_CPUNUM" From 2b9d9c7aaee71b6eeab56074b6a5790d45a74c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Schmidts?= Date: Wed, 17 Apr 2013 14:12:17 +0200 Subject: [PATCH 2/3] implementing default prompt mark as described in issue #135 --- liquidprompt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/liquidprompt b/liquidprompt index 3109433..b9f0937 100755 --- a/liquidprompt +++ b/liquidprompt @@ -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 From 74f9ca846c2ff2f8cf5ca06f653257edcffe5bf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Schmidts?= Date: Wed, 17 Apr 2013 14:19:16 +0200 Subject: [PATCH 3/3] updating documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e3368bf..fe146e9 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,7 @@ Set to a null string "" if you do not want color. ### CHARACTERS Special characters: +* `LP_MARK_DEFAULT` (default: "") the mark you want at the end of your prompt (leave to empty for your shell default mark) * `LP_MARK_BATTERY` (default: "⌁") in front of the battery charge * `LP_MARK_ADAPTER` (default: "⏚") displayed when plugged * `LP_MARK_LOAD` (default: "⌂") in front of the load