changeset 518:62e62b885540

merge
author Augie Fackler <raf@durin42.com>
date Wed, 08 Dec 2021 12:06:45 -0500
parents 92d3f40572b6 (current diff) 7e8603e0a822 (diff)
children d3219c644f43
files
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/.hgrc
+++ b/.hgrc
@@ -23,6 +23,7 @@ upstream-bookmarks = log -r 'bookmark() 
 utip = log -r 'limit(heads(upstream()), 1)'
 egrep = !$HG locate -0 '$2' $3 $4 $5 $6 $7 $8 $9 | (cd $(hg root) ; xargs -0 egrep -H '$1')
 crecord = !$HG commit --interactive --config ui.interface=curses $@
+crevert = !$HG revert --interactive --config ui.interface=curses $@
 
 wc-out = log -r 'ancestors(.) and not upstream()'
 wc-email = email -r 'ancestors(.) and not upstream()'
--- a/.shell.d/99.prompt.zsh
+++ b/.shell.d/99.prompt.zsh
@@ -28,10 +28,19 @@ function right_side_prompt() {
     fi
 }
 
+function _init_async() {
+    async
+    async_stop_worker 'durin42_prompt' || true
+    async_start_worker durin42_prompt -u -n
+    async_register_callback durin42_prompt right_prompt_results
+}
+
 function right_prompt_results() {
     if [ $2 = 0 ] ; then
         rps_branch=$3
         zle && zle reset-prompt
+     else
+         _init_async
      fi
 }
 
@@ -73,10 +82,8 @@ if [[ $TERM == "dumb" ]]; then  # in ema
     PS1='$ '
     RPS1=''
 else
-    autoload -Uz async && async
-    async_start_worker durin42_prompt -u -n
-    async_register_callback durin42_prompt right_prompt_results
-
+    autoload -Uz async
+    _init_async
     function precmd () {
         rps_branch="$(date '+%D %H:%M')"
         async_job durin42_prompt right_side_prompt $PWD