Skip to content

Commit

Permalink
fix background (#52)
Browse files Browse the repository at this point in the history
Fix background when command failed and we draw a red %, the background
was set to black. Don't do this; use the default terminal background.

Signed-off-by: Miek Gieben <miek@miek.nl>
  • Loading branch information
miekg committed Aug 9, 2019
1 parent 4085d3e commit 1217934
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion prompt_lean_setup
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ prompt_lean_precmd() {

setopt promptsubst
local vcs_info_str='$vcs_info_msg_0_' # avoid https://github.com/njhartwell/pw3nage
PROMPT="$prompt_lean_jobs%F{"$COLOR3"}${prompt_lean_tmux}%f`$PROMPT_LEAN_LEFT`%f%(?.%F{"$COLOR2"}.%B%F{203}%K{234})%#%f%k%b "
PROMPT="$prompt_lean_jobs%F{"$COLOR3"}${prompt_lean_tmux}%f`$PROMPT_LEAN_LEFT`%f%(?.%F{"$COLOR2"}.%B%F{203})%#%f%k%b "
RPROMPT="%F{"$COLOR3"}`prompt_lean_cmd_exec_time`%f$prompt_lean_vimode%F{"$COLOR2"}`prompt_lean_pwd`%F{"$COLOR1"}$vcs_info_str`prompt_lean_git_dirty`$prompt_lean_host%f`$PROMPT_LEAN_RIGHT`%f"

unset cmd_timestamp # reset value since `preexec` isn't always triggered
Expand Down
6 changes: 3 additions & 3 deletions prompt_lean_test.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ source prompt_lean_setup
(
prompt_lean_precmd
prompt_lean_preexec
expect='%F{'$COLOR3'}%f%f%(?.%F{'$COLOR2'}.%B%F{red})%#%f%b '
expect='%F{'$COLOR3'}%f%f%(?.%F{'$COLOR2'}.%B%F{203})%#%f%k%b '
comphex "prompt" $PROMPT $expect
)

Expand All @@ -48,7 +48,7 @@ PROMPT_LEAN_LEFT=left

prompt_lean_precmd
prompt_lean_preexec
expect='%F{'$COLOR3'}%fleft%f%(?.%F{'$COLOR2'}.%B%F{red})%#%f%b '
expect='%F{'$COLOR3'}%fleft%f%(?.%F{'$COLOR2'}.%B%F{203})%#%f%k%b '
comphex "lean_left" $PROMPT $expect
)

Expand All @@ -69,7 +69,7 @@ source prompt_lean_setup # TMUX is only evaluated in setup

prompt_lean_precmd
prompt_lean_preexec
expect='%F{'$COLOR3'}t%f%f%(?.%F{'$COLOR2'}.%B%F{red})%#%f%b '
expect='%F{'$COLOR3'}t%f%f%(?.%F{'$COLOR2'}.%B%F{203})%#%f%k%b '
comphex "tmux" $PROMPT $expect
)

Expand Down

0 comments on commit 1217934

Please sign in to comment.