summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2014-04-12 18:21:50 +0100
committerAlan Pearce2014-04-12 18:21:50 +0100
commit2f341cd1fad7d855a2b6d4faa9025e0aaf08314c (patch)
tree1e0469ba8e1287e5db9c0c20ecaad5b7cf16811b
parent34d2b95ffd8137abf714d5996efaa1ae1b550ca0 (diff)
downloaddotfiles-2f341cd1fad7d855a2b6d4faa9025e0aaf08314c.tar.lz
dotfiles-2f341cd1fad7d855a2b6d4faa9025e0aaf08314c.tar.zst
dotfiles-2f341cd1fad7d855a2b6d4faa9025e0aaf08314c.zip
zsh: Create dotfile links under $ZDOTDIR
For some reason, zsh expects files under $ZDOTDIR to be dotfiles, unlike
many other programs.
-rwxr-xr-xhooks/post-up/zsh7
1 files changed, 7 insertions, 0 deletions
diff --git a/hooks/post-up/zsh b/hooks/post-up/zsh
index b31a8cb..7ed08de 100755
--- a/hooks/post-up/zsh
+++ b/hooks/post-up/zsh
@@ -1,6 +1,13 @@
 #!/usr/bin/env zsh
 ZDOTDIR="${XDG_CONFIG_HOME:~/.config}/zsh"
 
+pushd $ZDOTDIR
+for f in z*(-.)
+do
+	[[ -e .$f ]] || ln $f .$f
+done
+popd
+
 if [[ ! -d ~/.cache/zsh ]]
 then
 	mkdir -p ~/.cache/zsh