ITADN

[bug] read-only version and release date variables don't play nicely with re-sourcing zshrc

#3Closedcybardev 创建于 2025-06-04
C
cybardevcommented
https://github.com/olets/zsh-autosuggestions-abbreviations-strategy/blob/8edbd1d52445d87172d355f8242082b1ec6c34e7/zsh-autosuggestions-abbreviations-strategy.zsh#L8-L9 These lines do not check if the variables are already set, causing the following error when re-sourcing `zshrc` within the same terminal session: ``` /usr/share/zsh/site-functions/zsh-autosuggestions-abbreviations-strategy.zsh:8: read-only variable: ZSH_AUTOSUGGESTIONS_ABBREVIATIONS_STRATEGY_VERSION ``` I suggest checking whether the variables are already set, or just not making them read-only (realistically, no one's touching these variables).
关闭于 2025-07-01 3 条评论