aboutsummaryrefslogtreecommitdiff
path: root/base/zsh/functions.zsh
diff options
context:
space:
mode:
authorAdam Hovorka <[email protected]>2017-09-04 13:42:23 -0600
committerAdam Hovorka <[email protected]>2017-09-04 13:42:23 -0600
commit8ae9c465242c5e379877a15832043113021d714e (patch)
treee7d1eabb895ee5dc954dc88ca3d6896b0c8ffadc /base/zsh/functions.zsh
parent8916659e0e1cb67b860373f2d094445bb1f657aa (diff)
Switch from stowsh to dotbot
Diffstat (limited to 'base/zsh/functions.zsh')
-rw-r--r--base/zsh/functions.zsh18
1 files changed, 18 insertions, 0 deletions
diff --git a/base/zsh/functions.zsh b/base/zsh/functions.zsh
new file mode 100644
index 0000000..d2905ad
--- /dev/null
+++ b/base/zsh/functions.zsh
@@ -0,0 +1,18 @@
+function todo {
+ a=""
+ for i; do a="$a,$i"; done
+ a="{$(echo "$a" | cut -d',' -f2-)}"
+ echo "grep -R --exclude-dir=$a TODO | sed -e 's/.*TODO //;s/ \*\/$//;s/ -->//' | LC_ALL=C sort -u" | zsh
+}
+
+function which {
+ (alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
+} #export -f which
+
+function 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 -mindepth 1 -mtime +90 -delete