summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2020-06-03 17:50:25 +0200
committerMarc Cornellà <marc.cornella@live.com>2020-06-03 17:50:53 +0200
commitaee9e603b42192d787ceaa7be3e0a55986ce3f46 (patch)
tree25d32ef277219779dc9aae3bf9f49274931a585d
parent5d1cdb22c118b99c342979af58129bd7e4c949c5 (diff)
downloadzsh-aee9e603b42192d787ceaa7be3e0a55986ce3f46.tar.gz
zsh-aee9e603b42192d787ceaa7be3e0a55986ce3f46.tar.bz2
zsh-aee9e603b42192d787ceaa7be3e0a55986ce3f46.zip
init: reapply hack for invalid ZSH_COMPDUMP filenames (b8761985)
-rw-r--r--oh-my-zsh.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index a60d25956..4025f0025 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -85,7 +85,9 @@ fi
# Append zcompdump metadata if missing
if (( $zcompdump_refresh )); then
- cat >>| "$ZSH_COMPDUMP" <<EOF
+ # Use `tee` in case the $ZSH_COMPDUMP filename is invalid, to silence the error
+ # See https://github.com/ohmyzsh/ohmyzsh/commit/dd1a7269#commitcomment-39003489
+ tee -a "$ZSH_COMPDUMP" &>/dev/null <<EOF
$zcompdump_revision
$zcompdump_fpath