X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/b100e099f62f7ef233b2b8c74b060d0d586f4b97..ba5bd95983d7b78f798c44022dfafac797b89228:/.zsh/zshrc/90_cleanfiles?ds=sidebyside diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 555461c..b4bd2c2 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -5,7 +5,7 @@ # Copyright © 1994–2008 martin f. krafft # Released under the terms of the Artistic Licence 2.0 # -# Source repository: http://git.madduck.net/v/etc/zsh.git +# Source repository: git://git.madduck.net/etc/zsh.git # typeset -la rmfiles @@ -24,18 +24,21 @@ rmfiles+=~/.bash_history rmfiles+=~/core rmfiles+=~/nohup.out rmfiles+=~/typescript +rmfiles+=~/jpilot.log +rmfiles+=~/srtp.log +rmfiles+=~/hs_err_pid[0-9]*.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