aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-03-05 21:07:35 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-03-05 21:07:42 +0300
commit3f470b2d7d868ed5769387b3e0d7449bb4d46373 (patch)
treefd4180053a098fa09191374762dee43f2ea7b5c8 /internal/p10k.zsh
parente302a9693e5b48771bffdb70ea2cd11ebfb277e2 (diff)
more robust detection of clear and reset commands; see #545
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index ad85182e..ac8917dc 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -6204,7 +6204,8 @@ _p9k_precmd_impl() {
fi
_p9k_save_status
- if [[ $_p9k__preexec_cmd == (clear|reset) ]]; then
+ if [[ $_p9k__preexec_cmd == [[:space:]]#(clear([[:space:]]##-[a-zA-Z-_]#)#|reset)[[:space:]]# &&
+ $_p9k__status == 0 ]]; then
P9K_TTY=new
elif [[ $P9K_TTY == new && $_p9k__fully_initialized == 1 ]] && ! zle; then
P9K_TTY=old