From: Phillip Wood <phillip.wood123@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>,
Jeff King <peff@peff.net>,
Yaakov Smith <Yaakov.Smith@wisetechglobal.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: \b character escapes in CLI usage
Date: Thu, 27 Feb 2025 16:26:44 +0000 [thread overview]
Message-ID: <f455db00-2064-4c2f-be2e-6c5970843f03@gmail.com> (raw)
In-Reply-To: <Z7-lbGnlzGbhrHZN@tapette.crustytoothpaste.net>
On 26/02/2025 23:36, brian m. carlson wrote:
> On 2025-02-26 at 07:38:22, Jeff King wrote:
>> On Tue, Feb 25, 2025 at 11:44:33PM +0000, Yaakov Smith wrote:
>>>
>>> Should "git config" be smarter here and print something other than a
>>> literal backspace to the terminal, like "git fetch" does?
>>
>> So I would say no here, in general.
>
> I agree this is the right choice in general. I wonder if we might want
> some sort of human-readable output option that might escape these that
> users could use. The output might still be machine-readable, but it
> might be easier to parse than the current format, which has some tricky
> edge cases when a config value contains newlines.
We have '-z' to avoid that ambiguity. I agree that having an option to
provide a human-readable output would be a nice addition.
Best Wishes
Phillip
> We already have precedent for this in core.quotePath and could easily
> use similar logic here. That format, while using octal, which I find
> ugly and hard to read, does have the pleasant side effect that it works
> correctly with POSIX printf(1) (which I'm sure was intentional), unlike
> hex escapes.
prev parent reply other threads:[~2025-02-27 16:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 23:44 \b character escapes in CLI usage Yaakov Smith
2025-02-26 7:38 ` Jeff King
2025-02-26 8:09 ` Jeff King
2025-02-26 16:02 ` Junio C Hamano
2025-02-26 16:38 ` Kyle Lippincott
2025-02-26 22:06 ` Jeff King
2025-02-26 15:59 ` Junio C Hamano
2025-02-26 23:36 ` brian m. carlson
2025-02-26 23:55 ` Junio C Hamano
2025-02-27 0:03 ` Junio C Hamano
2025-02-27 14:06 ` General output formatting (was: Re: \b character escapes in CLI usage) Marc Branchaud
2025-02-27 17:06 ` General output formatting Junio C Hamano
2025-02-27 17:14 ` Marc Branchaud
2025-02-27 18:40 ` Junio C Hamano
2025-02-27 16:26 ` Phillip Wood [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f455db00-2064-4c2f-be2e-6c5970843f03@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=Yaakov.Smith@wisetechglobal.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=phillip.wood@dunelm.org.uk \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox