From d5e94cd65e997770adbd05a8ef3f59c7e26c228a Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 21 Jan 2021 03:06:17 +0000 Subject: [PATCH] shgit: quote glob characters --- utils/shgit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/shgit b/utils/shgit index 4c7ffd9..98cbb32 100644 --- a/utils/shgit +++ b/utils/shgit @@ -1,5 +1,5 @@ # shgit -# Written in 2019 by Lucas +# Written in 2019,2021 by Lucas # CC0 1.0 Universal/Public domain - No rights reserved # # To the extent possible under law, the author(s) have dedicated all @@ -21,7 +21,7 @@ shgit() if ! name=$(git symbolic-ref -q --short HEAD); then name=$(git rev-parse --short HEAD 2>/dev/null) - name=${name:-?} + name=${name:-"?"} fi rb= @@ -39,10 +39,10 @@ shgit() status= if [ "$worktree" = "true" ]; then if [ -n "$(git status --porcelain)" ]; then - status=${SHGIT_SEP}* + status=$SHGIT_SEP"*" fi else - status=${SHGIT_SEP}? + status=$SHGIT_SEP"?" fi oldIFS=$IFS