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

Re: [PATCH 1/2] Support for $FILENAMES in tool definitions

From
Jakub Narębski <jnareb@gmail.com>
Date
Jun 27, 2016, 18:09 UTC
Message-ID
<CANQwDwcq=O-ZVW2=+EnZnmCZpTjP=soQ_-cQP_n0p-TJ6DFQ-w@mail.gmail.com>
In-Reply-To
<xmqq7fdabjsb.fsf@gitster.mtv.corp.google.com>
On 27 June 2016 at 19:53, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Jakub Narębski <jnareb@gmail.com> writes:
>
>> On 2016-06-27, Alex Riesen wrote:
>>
>>> This adds a FILENAMES environment variable, which contains the repository
>>> pathnames of all selected files the list.
>>> The variable contains the names separated by spaces.
>>
>> Why not separate filenames with end-of-line character (LF)? It would still
>> be broken for some filenames, but only for unportable ones.  Filenames with
>> internal space (common on MS Windows) would work then.
>>
>>   http://www.dwheeler.com/essays/filenames-in-shell.html
>>
>> If Tcl allows it, you could separate filenames in FILENAMES environment
>> variable with NUL ("\0") character...
>
> Tcl may or may not handle a string with an embedded NUL, but I think
> it is hard to have an embedded NUL in an environment variable.
>
> Use of LF is a good suggestion regardless.

Or be a good citizen, and use $IFS... though then the user would need to set it to something sane-ish.

-- 
Jakub Narebski
Previous: Junio C HamanoNext: Alex Riesen
Message 9 of 10 in “Support for $FILENAMES in tool definitions”
  1. 1/2 Support for $FILENAMES in tool definitionsAlex Riesen, Jun 27, 2016
  2. 2/2 Ensure the file in the diff pane is always in the list of selected filesAlex Riesen, Jun 27, 2016
  3. Jakub NarębskiJun 27, 2016
  4. Alex RiesenJun 28, 2016
  5. Johannes SchindelinJun 27, 2016
  6. Alex RiesenJun 28, 2016
  7. Jakub NarębskiJun 27, 2016
  8. Junio C HamanoJun 27, 2016
  9. Jakub NarębskiJun 27, 2016
  10. Alex RiesenJun 28, 2016

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.