From c473fc6be242abd7d2fc343edd9c6639dd34a51a Mon Sep 17 00:00:00 2001 From: René Neumann Date: Thu, 23 Feb 2012 19:41:59 +0100 Subject: Cleanup using TRAPEXIT --- .zsh/functions/cci | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.zsh/functions') diff --git a/.zsh/functions/cci b/.zsh/functions/cci index b03666e..669f08f 100644 --- a/.zsh/functions/cci +++ b/.zsh/functions/cci @@ -18,6 +18,12 @@ log () echo ${fg_bold[white]}">> $1"${reset_color} } +TRAPEXIT () +{ + # cleanup + unfunction ask log +} + if [[ $# == 0 ]]; then echo "No message given. Aborting." return 1 @@ -90,7 +96,4 @@ log "Done" popd -q -# cleanup -unfunction ask log - # vim: ft=zsh -- cgit v1.2.3-70-g09d2