diff options
author | René Neumann <rene.neumann@in.tum.de> | 2012-02-23 19:41:59 +0100 |
---|---|---|
committer | René Neumann <rene.neumann@in.tum.de> | 2012-02-23 19:42:00 +0100 |
commit | c473fc6be242abd7d2fc343edd9c6639dd34a51a (patch) | |
tree | 569ebd3528e202df06e21d473e9a2acc0531db9a | |
parent | 1ec3034f50c4cd9254148ddbdf42114b1cb26f85 (diff) | |
download | dotfiles-c473fc6be242abd7d2fc343edd9c6639dd34a51a.tar.gz dotfiles-c473fc6be242abd7d2fc343edd9c6639dd34a51a.tar.bz2 dotfiles-c473fc6be242abd7d2fc343edd9c6639dd34a51a.zip |
Cleanup using TRAPEXIT
-rw-r--r-- | .zsh/functions/cci | 9 |
1 files changed, 6 insertions, 3 deletions
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 |