zshrc: enable transient_rprompt to fix sad-smiley situation in rprompt
authorMichael Prokop <mika@grml.org>
Fri, 26 Jun 2020 11:38:55 +0000 (13:38 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 26 Jun 2020 12:10:09 +0000 (14:10 +0200)
This feature got lost in commit 08ab5d9, but nobody really noticed
this until we got annoyed by the sad-smiley on the right sight of the
prompt (rprompt) and wanted to disable the smiley overall. :)

But once the transient_rprompt option is active, the annoying
c/p behavior with the sad-smiley no longer exists, while
the feature is still there.

FTR, the rprompt in the grml prompt can be disabled e.g. with:

  zstyle ':prompt:grml:right:setup' use-rprompt false

Thanks: Frank Terbeck
Closes: grml/grml-etc-core#107

etc/zsh/zshrc

index 2690cfd..1d161d7 100644 (file)
@@ -2478,6 +2478,9 @@ else
     function precmd () { (( ${+functions[vcs_info]} )) && vcs_info; }
 fi
 
+# make sure to use right prompt only when not running a command
+is41 && setopt transient_rprompt
+
 # Terminal-title wizardry
 
 function ESC_print () {