From bcb29e299d0786ccbee8a255eb9e178a87511b55 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 22 May 2008 15:05:26 +0200 Subject: [PATCH] fix log output for cleanfiles --- .zsh/zshrc/90_cleanfiles | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5