From: Junio C Hamano Date: Thu, 15 Aug 2024 19:15:50 GMT Subject: Re: [PATCH v2 5/8] git-prompt: add some missing quotes Message-ID: In-Reply-To: <1228065843.3779090.1723743313433@mail.yahoo.com> avih writes: >> Well no matter what value $? has, it by definition has a few digits >> without any $IFS funnies.  Does this really matter?  I'd imagine >> that we would prefer to treat "$?" exactly the same way as "no". > ... > Two things here: > > 1. It can matter, because we don't control IFS. __git_ps1 is >    a function which runs in the user's shell, so if the user did >    IFS=0123, then unquoted $? or $exit can get IFS-split. Fair enough. My "we would prefer to treat $? exactly the same way as no" still stands. If the user did IFS=o, "no" would be broken. >    As the commit message notes, this is unlikely to fix things in >    practice, but it will fix things with weird IFS values. Yes, so I'd prefer to see us being consistent. If we quote "$?" to protect ourselves from crazy folks who set insane values to $IFS, we should quote "no" the same way, no?