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

Re: [PATCH v2] mergetools: add winmerge as a builtin tool

From
SZEDER Gábor <szeder@ira.uka.de>
Date
May 15, 2015, 09:01 UTC
Message-ID
<20150515110117.Horde.HyhfKlrEun2r-3mHUG3GSA1@webmail.informatik.kit.edu>
In-Reply-To
<CAHGBnuN-sw8Q_boB2SSNKTQP6M4jifiketFWJ23bknAdCVw_Uw@mail.gmail.com>
Quoting Sebastian Schuberth <sschuberth@gmail.com>:
Show 25 quoted lines
> On Thu, May 14, 2015 at 11:48 PM, SZEDER Gábor <szeder@ira.uka.de> wrote:
>
>>> for directory in "$(env | grep -E
>>> '^PROGRAM(FILES(\(X86\))?|W6432)=' | cut -d '=' -f 2 | sort -u)"
>>> do
>>>     test -n "$directory" &&
>>>     test -x "$directory/$winmerge_exe" &&
>>>     echo "$directory/$winmerge_exe" &&
>>>     break
>>> done
>>
>> This ain't gonna work, because the output of the pipe won't be split
>> because of the quotes around the command substitution, so $directory will
>> hold everything.  Simply loosing those quotes is not good either, because
>
> That's what I thought at first, too, but simply trying it out proved
> me wrong (again, in both MSYS1/2):
>
> $ for d in "$(env | grep -Ei '^PROGRAM(FILES(\(X86\))?|W6432)=' | cut
> -d '=' -f 2- | sort -u)"; do echo "$d"; done
> C:\Program Files
> C:\Program Files (x86)
>
> Note that the path, although they are containing spaces, are on
> separate lines.

Yeah, exactly the behavior I described in the part you quoted. Although it looks good, it's not what you want. Putting 'echo "** $d **"' in the loop gives me:

** C:\Program Files C:\Program Files (x86) **

(1.9.5 MSysGit)
Gábor
Previous: Sebastian SchuberthNext: SZEDER Gábor
Message 11 of 14 in “mergetools: add winmerge as a builtin tool”
  1. mergetools: add winmerge as a builtin toolDavid Aguilar, May 13, 2015
  2. Johannes SchindelinMay 13, 2015
  3. Sebastian SchuberthMay 13, 2015
  4. Johannes SchindelinMay 13, 2015
  5. Sebastian SchuberthMay 13, 2015
  6. Sebastian SchuberthMay 13, 2015
  7. Sebastian SchuberthMay 13, 2015
  8. Sebastian SchuberthMay 13, 2015
  9. SZEDER GáborMay 14, 2015
  10. Sebastian SchuberthMay 15, 2015
  11. SZEDER GáborMay 15, 2015
  12. SZEDER GáborMay 14, 2015
  13. Sebastian SchuberthMay 15, 2015
  14. David AguilarMay 20, 2015

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.