X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/ad251c8c9dbdc49a9118417654251ef18039125e..31dd1414e8c5506b61f5c5445ddf5af40f3d21a3:/.zsh/zshrc/90_cleanfiles?ds=inline diff --git a/.zsh/zshrc/90_cleanfiles b/.zsh/zshrc/90_cleanfiles index 555461c..513c01b 100644 --- a/.zsh/zshrc/90_cleanfiles +++ b/.zsh/zshrc/90_cleanfiles @@ -24,18 +24,20 @@ rmfiles+=~/.bash_history rmfiles+=~/core rmfiles+=~/nohup.out rmfiles+=~/typescript +rmfiles+=~/jpilot.log +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