From 47c7077cde833217db8a4dadbabaf38e6ff490d3 Mon Sep 17 00:00:00 2001 From: Marc Hauptmann Date: Tue, 31 Oct 2017 16:47:21 +0100 Subject: [PATCH] declared variables as 'local' Prevents warning messages from zsh --- powerlevel9k.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index f6646c63..3c173e9f 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1332,7 +1332,7 @@ powerlevel9k_vcs_init() { prompt_vcs() { VCS_WORKDIR_DIRTY=false VCS_WORKDIR_HALF_DIRTY=false - current_state="" + local current_state="" # Actually invoke vcs_info manually to gather all information. vcs_info @@ -1434,6 +1434,7 @@ prompt_kubecontext() { # Main prompt build_left_prompt() { local index=1 + local element for element in "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[@]}"; do # Remove joined information in direct calls element=${element%_joined}