1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 07:20:09 +00:00

init: silence zcompdump metadata write for invalid ZSH_COMPDUMP filenames

If `$SHORT_HOST` contains invalid filename characters, the compinit call doesn't
error, but the zcompdump metadata write does. Use `tee` instead so we can silence
the error.

See dd1a72696f (commitcomment-38984764)
This commit is contained in:
Marc Cornellà 2020-05-07 11:25:35 +02:00
parent 0736a3749a
commit b876198575

View file

@ -86,7 +86,7 @@ fi
# Append zcompdump metadata if missing
if (( $zcompdump_refresh )); then
echo "\n$zcompdump_metadata" >>! "$ZSH_COMPDUMP"
echo "\n$zcompdump_metadata" | tee -a "$ZSH_COMPDUMP" &>/dev/null
fi
unset zcompdump_metadata zcompdump_refresh