git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: [Question] Complex textconv text

From
Randall S. Becker <rsbecker@nexbridge.com>
Date
Dec 13, 2018, 16:14 UTC
Message-ID
<005101d492fe$fde97130$f9bc5390$@nexbridge.com>
In-Reply-To
<004501d492f5$98f0fcc0$cad2f640$@nexbridge.com>
On December 13, 2018 10:08, I wrote: 
> I have a strange situation and need help with resolving funky characters
in
Show 7 quoted lines
> .git/config. My situation is this:
> 
> [diff "*.dat"]
> 	textconv = enscribe-conv
> --format=-a1\(A=-a1,-a16,-a32\|P=-a1,-a32,-a16\|=-a1,-d,a14\),-a224
> 
> Basically this is a formatter for diff so that I can show structured
binary data.
Show 5 quoted lines
> The unquoted syntax of the format string is:
>  --format=-a1(A=-a1,-a16,-a32|P=-a1,-a32,-a16|=-a1,-d,a14),-a224
> 
> Content is not really important. The issue is that git is reporting fatal:
> bad config line 2 in file .git/config when I escape the (, ), and |
characters. I
> get syntax errors otherwise from the shell running the textconv. I have
tried -
> -format="-a1(A=-a1,-a16,-a32|P=-a1,-a32,-a16|=-a1,-d,a14),-a224", to no
> avail. How should I safely escape the characters in here?

Easiest bypass was to wrap the mess above into a shell script and execute it that way, which works just fine. I'm not sure it's possible to escape all of the special characters. Seems like the safest approach anyway.

Cheers, Randall

Previous: Randall S. BeckerNext: Junio C Hamano
Message 2 of 4 in “[Question] Complex textconv text”
  1. Randall S. BeckerDec 13, 2018
  2. Randall S. BeckerDec 13, 2018
  3. Junio C HamanoDec 14, 2018
  4. Jeff KingDec 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.