From 17daeb3d544d022ce9c6f6faecec967620984fb3 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Thu, 31 Aug 2017 11:18:51 -0600 Subject: Update zsh trash function --- base/.zsh/functions.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'base/.zsh/functions.zsh') diff --git a/base/.zsh/functions.zsh b/base/.zsh/functions.zsh index 4606c13..d2905ad 100644 --- a/base/.zsh/functions.zsh +++ b/base/.zsh/functions.zsh @@ -10,9 +10,9 @@ function which { } #export -f which function trash { - mkdir "$HOME/.trash" + mkdir -p "$HOME/.trash" for file in "$@"; do mv "$file" "$HOME/.trash/$(basename $file).$(date +%Y%m%d-%H%M%S)" done } # Add this to your crontab: -# 43 0 * * 3 find ~/.trash -type f -mtime +90 -delete +# 43 0 * * 3 find ~/.trash -mindepth 1 -mtime +90 -delete -- cgit v1.2.3-70-g09d2