From e2150602c7c92fae2f06d88a031b225bc1f62b15 Mon Sep 17 00:00:00 2001 From: Matthew Adams Date: Fri, 1 May 2020 09:17:18 -0500 Subject: [PATCH 1/3] add powerline config for prompt after chars --- themes/powerline-plain/powerline-plain.base.bash | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/powerline-plain/powerline-plain.base.bash b/themes/powerline-plain/powerline-plain.base.bash index 37b4ff50..1b214fdb 100644 --- a/themes/powerline-plain/powerline-plain.base.bash +++ b/themes/powerline-plain/powerline-plain.base.bash @@ -51,7 +51,12 @@ function __powerline_prompt_command { LEFT_PROMPT+=" " fi - PS1="${LEFT_PROMPT}" + ## after prompt ## + if [[ -n "${POWERLINE_PROMPT_AFTER}" ]]; then + PROMPT_AFTER="${POWERLINE_PROMPT_AFTER}" + fi + + PS1="${LEFT_PROMPT}${PROMPT_AFTER}" ## cleanup ## unset LAST_SEGMENT_COLOR \ From dddb8636577b3dc7d8fc1a9355104afd80115eef Mon Sep 17 00:00:00 2001 From: Matthew Adams Date: Sat, 2 May 2020 08:43:08 -0500 Subject: [PATCH 2/3] change from feedback --- themes/powerline-plain/powerline-plain.base.bash | 6 +----- themes/powerline-plain/powerline-plain.theme.bash | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/themes/powerline-plain/powerline-plain.base.bash b/themes/powerline-plain/powerline-plain.base.bash index 1b214fdb..ce91ef89 100644 --- a/themes/powerline-plain/powerline-plain.base.bash +++ b/themes/powerline-plain/powerline-plain.base.bash @@ -32,6 +32,7 @@ function __powerline_prompt_command { LEFT_PROMPT="" SEGMENTS_AT_LEFT=0 LAST_SEGMENT_COLOR="" + PROMPT_AFTER="${POWERLINE_PROMPT_AFTER}" _save-and-reload-history "${HISTORY_AUTOSAVE:-0}" @@ -51,11 +52,6 @@ function __powerline_prompt_command { LEFT_PROMPT+=" " fi - ## after prompt ## - if [[ -n "${POWERLINE_PROMPT_AFTER}" ]]; then - PROMPT_AFTER="${POWERLINE_PROMPT_AFTER}" - fi - PS1="${LEFT_PROMPT}${PROMPT_AFTER}" ## cleanup ## diff --git a/themes/powerline-plain/powerline-plain.theme.bash b/themes/powerline-plain/powerline-plain.theme.bash index 942c411c..709fe341 100644 --- a/themes/powerline-plain/powerline-plain.theme.bash +++ b/themes/powerline-plain/powerline-plain.theme.bash @@ -12,6 +12,7 @@ POWERLINE_COMPACT_AFTER_SEPARATOR=${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLI POWERLINE_COMPACT_BEFOR_FIRST_SEGMENT=${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}} POWERLINE_COMPACT_AFTER_LAST_SEGMENT=${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}} POWERLINE_COMPACT_PROMPT=${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}} +POWERLINE_PROMPT_AFTER="${POWERLINE_PROMPT_AFTER:-''}" PYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:="ⓔ "} CONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:="ⓔ "} From 8f3872acb88fbedffca3d443cdc96ac34400ba34 Mon Sep 17 00:00:00 2001 From: Matthew Adams Date: Thu, 7 May 2020 13:08:27 -0500 Subject: [PATCH 3/3] review2 --- themes/powerline-plain/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/powerline-plain/README.md b/themes/powerline-plain/README.md index 049c12f1..0a8a75ad 100644 --- a/themes/powerline-plain/README.md +++ b/themes/powerline-plain/README.md @@ -85,5 +85,6 @@ You can configure various aspects of the prompt to use less whitespace. Supporte |POWERLINE_COMPACT_AFTER_LAST_SEGMENT | Removes the trailing space on the last segment |POWERLINE_COMPACT_PROMPT | Removes the space after the prompt character |POWERLINE_COMPACT | Enable all Compact settings (you can still override individual settings) +|POWERLINE_PROMPT_AFTER | Adds characters after the prompt The default value for all settings is `0` (disabled). Use `1` to enable.