commit 1ea527ead94450f09246bcd0244032184bfbbacb
parent 20b251cf2db9e83ea2769de24eb92a6c99ce227b
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 26 Feb 2019 13:06:31 +0100
Highlight prompt when command finishes through alert
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/links/.zshrc b/links/.zshrc
@@ -37,7 +37,6 @@ HISTFILE=~/.zhistory
 HISTSIZE=$((2 ** 16))
 SAVEHIST=$((2 ** 17))
 
-
 #### BINDINGS
 
 set -o vi
@@ -158,7 +157,7 @@ git_modified() {
 
 
 function prompt_with_vimode {
-    echo -ne '\n'
+    echo -e "\a"
     echo -n '%(1j.%{$fg[yellow]%}%jbg %{$reset_color%}.)'  # background jobs
     echo -n "$1"
     [ -z "$1" ] &&  # show prompt symbol if no insert/normal mode is passed
@@ -178,8 +177,8 @@ rprompt() {
     echo -n "%m"  # hostname
 }
 
-PROMPT=$(prompt_with_vimode $insert_mode)
-RPROMPT=$(rprompt)
+PROMPT="$(prompt_with_vimode $insert_mode)"
+RPROMPT="$(rprompt)"
 
 function zle-line-init zle-keymap-select {
     PROMPT=$(prompt_with_vimode \