aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2017-08-31 11:18:51 -0600
committerAdam Hovorka <[email protected]>2017-08-31 11:18:51 -0600
commit17daeb3d544d022ce9c6f6faecec967620984fb3 (patch)
treeacac5cdbf95ad4cc2fbe989775c884fef8c45070 /base
parenteac55933b6e72cbc8614c29080eb181ee37681a2 (diff)
Update zsh trash function
Diffstat (limited to 'base')
-rw-r--r--base/.zsh/functions.zsh4
1 files changed, 2 insertions, 2 deletions
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