Skip to content

Commit

Permalink
Revert "Warn about bad variable usage pattern for Zsh"
Browse files Browse the repository at this point in the history
This reverts commit 42332c6.

Reason: maintainer of zsh-syntax-highlighting [doesn’t like][1]
`warn_nested_var`. The other option, `warn_create_global`, might be
fine, but more experiments should be done with it.

[1]: zsh-users/zsh-syntax-highlighting#781 (comment)
  • Loading branch information
FranklinYu committed Sep 14, 2021
1 parent 42332c6 commit 1408d5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zsh/config.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ zstyle ':completion:*' cache-path ~/.cache/zsh

setopt extended_history \
hist_ignore_dups hist_ignore_space hist_no_store hist_reduce_blanks \
inc_append_history_time list_packed numeric_glob_sort print_exit_value \
warn_create_global warn_nested_var
inc_append_history_time list_packed numeric_glob_sort print_exit_value
autoload -Uz add-zsh-hook
source ~/.config/zsh/report-completion.zsh

Expand Down

2 comments on commit 1408d5a

@danielshahaf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean, "doesn't like"? zsh-syntax-highlighting tries hard to work everywhere, including under very unusual setups. If z-sy-h and WARN_NESTED_VAR don't play nice together out of the box, that's a bug that will be fixed.

@FranklinYu
Copy link
Owner Author

@FranklinYu FranklinYu commented on 1408d5a Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielshahaf I thought you made it clear in the comment about this. You said that you were unhappy about adding typeset -g to every usage, and I think it’s fair (that you dislike it). This commit is to disable it in my dotfile.

Please sign in to comment.