From af196368957148a1a59636d29201036944f918ee Mon Sep 17 00:00:00 2001 From: nojhan Date: Mon, 4 Dec 2023 17:33:29 +0100 Subject: [PATCH] review fixes --- docs/spelling_wordlist.txt | 10 +++++----- docs/theme/power2lines.rst | 9 ++++++--- docs/theme/powerline.rst | 3 +++ docs/theme/powerpuff.rst | 10 ++++++---- powerline.theme | 11 ++++++++--- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 57f6022..b2d8b14 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -1,13 +1,13 @@ -CMake -GitHub -Kubernetes -Powerline -Terraform chroot config +CMake +GitHub hostname js +Kubernetes Powerpuff +Powerline runtime +Terraform username workspace diff --git a/docs/theme/power2lines.rst b/docs/theme/power2lines.rst index 88cdf5e..6ea1188 100644 --- a/docs/theme/power2lines.rst +++ b/docs/theme/power2lines.rst @@ -1,9 +1,12 @@ Power2lines *********** -This ``power2line`` theme rearranges the sections of :doc:`powerline_plus`, but on two rows instead of one. -That is, the data sections are displayed on a first row, and the interactive prompt forms a second row. -This gives room for long command lines, and let the user find the prompt always at the same location. +This ``power2line`` theme rearranges the sections of :doc:`powerline_plus`, +but on two rows instead of one. +That is, the data sections are displayed on a first row, and the interactive +prompt forms a second row. +This gives room for long command lines, and let the user find the prompt always +at the same location. Preview diff --git a/docs/theme/powerline.rst b/docs/theme/powerline.rst index 1e7d9d6..0d058a4 100644 --- a/docs/theme/powerline.rst +++ b/docs/theme/powerline.rst @@ -1,6 +1,9 @@ Powerline ********* +.. contents:: + :local: + The ``powerline`` theme is a clone of the `Powerline prompt`_. It copies the `default segments`_ of the Powerline prompt for Shell. diff --git a/docs/theme/powerpuff.rst b/docs/theme/powerpuff.rst index 3aa4313..6751b32 100644 --- a/docs/theme/powerpuff.rst +++ b/docs/theme/powerpuff.rst @@ -1,7 +1,8 @@ Powerpuff ********* - This ``powerpuff`` theme go even further in rearranging the sections of the :doc:`powerline_plus` theme: +This ``powerpuff`` theme go even further in rearranging the sections of the +:doc:`powerline_plus` theme: - Data sections are spread on two rows, - each of which has a left-aligned and a right-aligned section. @@ -9,9 +10,10 @@ Powerpuff - A horizontal line link the left and right sections of the first line. - A new line is drawn before the first row. -The meta-sections are thus less prone to move around when more data is displayed, -and the user will find it easier to spot new information. -The horizontal line and the new line gap also helps in parsing screens with a lot of history. +The meta-sections are thus less prone to move around when more data is +displayed, and the user will find it easier to spot new information. +The horizontal line and the new line gap also helps in parsing screens with a +lot of history. Preview diff --git a/powerline.theme b/powerline.theme index eed2f42..d3dec85 100644 --- a/powerline.theme +++ b/powerline.theme @@ -579,7 +579,9 @@ _lp_power2lines_theme_prompt() { local lp_terminal_format _lp_powerline_plus_theme_prompt lp_terminal_format "${POWERLINE_LINE_COLOR[@]}" - PS1="${lp_terminal_format}╭╢${NO_COL}$PS1\n${lp_terminal_format}╰╴${NO_COL}" + local n + n=$'\n' + PS1="${lp_terminal_format}╭╢${NO_COL}$PS1${n}${lp_terminal_format}╰╴${NO_COL}" } _lp_powerpuff_theme_activate() { @@ -685,7 +687,8 @@ _lp_powerpuff_theme_prompt() { __powerline_section "$jobs_string" "${POWERLINE_JOBS_COLOR[@]}" __powerpuff_end_terminator - local right_sections="${powerline_sections}\r" # FIXME spacing problem + # local right_sections="${powerline_sections}\r" # FIXME spacing problem + local right_sections="${powerline_sections}" # FIXME spacing problem lp_terminal_format "${POWERLINE_LINE_COLOR[@]}" _lp_fill "${left_sections}${lp_terminal_format}" "${NO_COL}${right_sections}" "─" 0 @@ -805,5 +808,7 @@ _lp_powerpuff_theme_prompt() { # Third line. lp_terminal_format "${POWERLINE_LINE_COLOR[@]}" - PS1="\n${first_line}\n${second_line}\n${lp_terminal_format}╰╼${NO_COL}${POWERLINE_SPACER}" + local n + n=$'\n' + PS1="${n}${first_line}${n}${second_line}${n}${lp_terminal_format}╰╼${NO_COL}${POWERLINE_SPACER}" }