From: martin f. krafft Date: Thu, 22 May 2008 13:05:26 +0000 (+0200) Subject: fix log output for cleanfiles X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/bcb29e299d0786ccbee8a255eb9e178a87511b55?ds=sidebyside;hp=-c fix log output for cleanfiles --- bcb29e299d0786ccbee8a255eb9e178a87511b55 diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 7bab8d4..513c01b 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -29,15 +29,15 @@ rmfiles+=~/srtp.log typeset -la _rmfiles -for f in ${~rmfiles[@]}; do +for f in ${~rmfiles}; do [[ -f $f ]] || continue _rmfiles+="$f" done -unset rmfiles -if [[ -n $_rmfiles ]]; then - info "Removing files: ${(j: :)${_rmfiles#$HOME/}}..." +if (( $#_rmfiles )); then + _rmfiles=(${_rmfiles#$HOME/}) + info "Removing files: ${_rmfiles[@]}..." rm -f ${_rmfiles[@]} fi