add local vars

This commit is contained in:
Alwaysproblem 2022-03-11 13:56:15 +08:00
parent 51f054b3d3
commit 4c7cb8e455

View file

@ -163,6 +163,8 @@ function vscode_git_status() {
# If the tracking line exists, get and parse it
if [[ "$status_lines[1]" =~ "^## [^ ]+ \[(.*)\]" ]]; then
local branch_statuses
local match
local branch_status
branch_statuses=("${(@s/,/)match}")
for branch_status in $branch_statuses; do
if [[ ! $branch_status =~ "(behind|diverged|ahead) ([0-9]+)?" ]]; then