From 8beb935e988a37132aac6511064be0ad6b35cefe Mon Sep 17 00:00:00 2001 From: Thomas Preisner Date: Wed, 12 Jul 2017 18:23:43 +0200 Subject: [PATCH] zsh: add check for global variables (setopt warn_create_global) --- zsh/setopt.zsh | 4 ++++ zshrc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/zsh/setopt.zsh b/zsh/setopt.zsh index 7b3510d..ff5eee2 100644 --- a/zsh/setopt.zsh +++ b/zsh/setopt.zsh @@ -1,3 +1,7 @@ +# ===== important +# warns when creating a global variable from inside a function +setopt warn_create_global + # ===== basics # disable beeps setopt no_beep diff --git a/zshrc b/zshrc index 8f23ba5..da107e2 100644 --- a/zshrc +++ b/zshrc @@ -1,7 +1,7 @@ # Loading keybindings first because activating Vi-bindings resets all keybinds. source ~/.zsh/keybindings.zsh -source ~/.zsh/general.zsh source ~/.zsh/setopt.zsh +source ~/.zsh/general.zsh source ~/.zsh/checks.zsh source ~/.zsh/colors.zsh source ~/.zsh/prompt.zsh