summary refs log tree commit diff
path: root/prune.zsh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xprune.zsh7
1 files changed, 7 insertions, 0 deletions
diff --git a/prune.zsh b/prune.zsh
new file mode 100755
index 00000000..928fe066
--- /dev/null
+++ b/prune.zsh
@@ -0,0 +1,7 @@
+#!/usr/bin/env zsh
+set -o errexit -o nounset -o pipefail
+
+find -L ~ -type l -lname "$PWD/*" | while read -r linkPath; do
+    rm "$linkPath"
+    echo "$linkPath"
+done