# HG changeset patch # User Augie Fackler # Date 1638983205 18000 # Node ID 62e62b8855400c10f9c444cacef09763cb26d4b4 # Parent 92d3f40572b699656e3f367a7699b66b7962d247# Parent 7e8603e0a8225030a0f87cd10247be6afb27f1b2 merge diff --git a/.hgrc b/.hgrc --- 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()' diff --git a/.shell.d/99.prompt.zsh b/.shell.d/99.prompt.zsh --- 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