From: martin f. krafft Date: Mon, 5 May 2008 20:51:12 +0000 (+0100) Subject: remove backup files on successful recompile X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/5838b305850a8bd1e0d7d4701986fae648858a08?ds=inline;hp=56bf0738ba62a40206ad3cd2cebb73303c7a2801 remove backup files on successful recompile --- diff --git a/.zsh/zshrc/00_recompile b/.zsh/zshrc/00_recompile index 9589a6b..6f5b2e3 100644 --- a/.zsh/zshrc/00_recompile +++ b/.zsh/zshrc/00_recompile @@ -8,6 +8,12 @@ # Source repository: http://git.madduck.net/v/etc/zsh.git # -zrecompile $ZDOTDIR $ZVAR +zrecompile $ZDOTDIR $ZVAR | while read pre file post; do + case "$post" in + succeeded) rm -f "${file%:}".old;; + *) :;; + esac + echo "$pre ${file##$HOME/} $post" >&2 + done # vim:ft=zsh