From fe2010231a8b5c2b65d0916a4fcf464d522b5a55 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 21 Dec 2015 00:40:38 -0500 Subject: [PATCH] zsh: clean up fasd on zlogout --- zlogout | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 zlogout diff --git a/zlogout b/zlogout new file mode 100644 index 00000000..a4def0f4 --- /dev/null +++ b/zlogout @@ -0,0 +1,12 @@ + +# Clean up symlinks in fasd +if is-callable 'fasd'; then + for entry in $(fasd -l); do + if [[ -L "$entry" ]]; then + local realpath=$(realpath "$entry") + fasd -D "$entry" + fasd -A "$realpath" + fi + done +fi +