summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xlink.zsh5
1 files changed, 2 insertions, 3 deletions
diff --git a/link.zsh b/link.zsh
index 8d573ceb..e9fa64ca 100755
--- a/link.zsh
+++ b/link.zsh
@@ -12,8 +12,7 @@ fi
 find home -type f | while read -r findPath; do
     filePath="$PWD/$findPath"
     linkPath="$HOME/${findPath#home/}"
-    [[ -L "$linkPath" ]] && continue
     mkdir -p "$(dirname "$linkPath")"
-    ln -s "$filePath" "$linkPath"
-    echo "$linkPath"
+    [[ ( -f "$linkPath" && -L "$linkPath" ) || ! -f "$linkPath" ]]
+    ln -s -f "$filePath" "$linkPath"
 done
ss='logheader'>2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe