diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-05-07 11:25:35 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-05-07 11:28:10 +0200 |
commit | b876198575cbf23d589ddc8da6b22254d3d5358b (patch) | |
tree | 8b05b91301c17275881b003f847ad0abb9b3219d /oh-my-zsh.sh | |
parent | 0736a3749a9c9ae4ba3096b0b6c55250f19fef17 (diff) | |
download | zsh-b876198575cbf23d589ddc8da6b22254d3d5358b.tar.gz zsh-b876198575cbf23d589ddc8da6b22254d3d5358b.tar.bz2 zsh-b876198575cbf23d589ddc8da6b22254d3d5358b.zip |
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 https://github.com/ohmyzsh/ohmyzsh/commit/dd1a72696f162fd5285a104b5f63970deb66e8b0#commitcomment-38984764
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r-- | oh-my-zsh.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 285caf668..6c61725cd 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -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 |