From 6e7b861675c4568931e91255abc62a7c45660e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 10 Oct 2020 19:14:30 +0200 Subject: [PATCH] lib: fix regex bug in git_prompt_status Fixes #9326 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index f9b27949e..53d39609e 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -226,7 +226,7 @@ function git_prompt_status() { # For each status prefix, do a regex comparison for status_prefix in ${(k)prefix_constant_map}; do local status_constant="${prefix_constant_map[$status_prefix]}" - local status_regex="(^|\n)$status_prefix" + local status_regex=$'(^|\n)'"$status_prefix" if [[ "$status_text" =~ $status_regex ]]; then statuses_seen[$status_constant]=1