1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-27 06:10:09 +00:00

Merge pull request #663 from MarcHauptmann/master

declared variables as 'local'
This commit is contained in:
Ben Hilburn 2017-11-02 14:34:37 -04:00 committed by GitHub
commit ba7d116677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1332,7 +1332,7 @@ powerlevel9k_vcs_init() {
prompt_vcs() { prompt_vcs() {
VCS_WORKDIR_DIRTY=false VCS_WORKDIR_DIRTY=false
VCS_WORKDIR_HALF_DIRTY=false VCS_WORKDIR_HALF_DIRTY=false
current_state="" local current_state=""
# Actually invoke vcs_info manually to gather all information. # Actually invoke vcs_info manually to gather all information.
vcs_info vcs_info
@ -1434,6 +1434,7 @@ prompt_kubecontext() {
# Main prompt # Main prompt
build_left_prompt() { build_left_prompt() {
local index=1 local index=1
local element
for element in "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[@]}"; do for element in "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[@]}"; do
# Remove joined information in direct calls # Remove joined information in direct calls
element=${element%_joined} element=${element%_joined}