From f6d9a2ac2d2a0c7433de8fc6ec11a82eb864fb16 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Fri, 11 Sep 2015 18:22:57 -0700 Subject: [PATCH] Function to prune broken symlinks. --- dotfiles/zshrc.d/prune-broken-symlinks.zsh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 dotfiles/zshrc.d/prune-broken-symlinks.zsh diff --git a/dotfiles/zshrc.d/prune-broken-symlinks.zsh b/dotfiles/zshrc.d/prune-broken-symlinks.zsh new file mode 100644 index 0000000..458d2e4 --- /dev/null +++ b/dotfiles/zshrc.d/prune-broken-symlinks.zsh @@ -0,0 +1,4 @@ +prune-broken-symlinks() { + setopt localoptions nounset + find $1 -type l -xtype l -print -delete +}