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

Re: [PATCH] rebase -i: commit when continuing after "edit"

From
David Kastrup <dak@gnu.org>
Date
Sep 25, 2007, 16:04 UTC
Message-ID
<86ir5y689l.fsf@lola.quinscape.zz>
In-Reply-To
<46F92F26.6050204@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 14 quoted lines
> David Kastrup schrieb:
>> Johannes Sixt <j.sixt@viscovery.net> writes:
>>> I poked around a bit, but one major obstacle is that the assignments
>>> in $author_script are on separate lines, which you would have to
>>> splice into a single line before you can insert them in the eval.
>>
>> Hm?  Why?  Newlines separate assignments just as reliable as spaces
>> do.  They are primarily special to the tty as line separators, not the
>> shell as such.
>
> The task here is to have the assignments on the same line as the
> command at the end so that they are locally exported. Here we are
> inside an 'eval', and the new-lines *do* what their name suggest: make
> new lines.
The documentation to eval clearly states:
`eval'
          eval [ARGUMENTS]
     The arguments are concatenated together into a single command,
     which is then read and executed, and its exit status returned as
     the exit status of `eval'.  If there are no arguments or only
     empty arguments, the return status is zero.
So we are talking about a single command here.  However, we indeed get
$ eval "echo x
> y
> z"

x bash: y: command not found bash: z: command not found $

Um, so I have been talking nonsense. Does "the docs made me do it" count as excuse?

-- 
David Kastrup
Previous: Johannes Sixt
Message 15 of 15 in “git-rebase--interactive needs a better message”
  1. Dmitry PotapovSep 23, 2007
  2. Johannes SchindelinSep 23, 2007
  3. rebase -i: commit when continuing after "edit"Johannes Schindelin, Sep 24, 2007
  4. Dmitry PotapovSep 24, 2007
  5. Junio C HamanoSep 25, 2007
  6. Johannes SchindelinSep 25, 2007
  7. Johannes SixtSep 25, 2007
  8. Johannes SchindelinSep 25, 2007
  9. Johannes SixtSep 25, 2007
  10. Johannes SchindelinSep 25, 2007
  11. Johannes SixtSep 25, 2007
  12. Johannes SchindelinSep 25, 2007
  13. David KastrupSep 25, 2007
  14. Johannes SixtSep 25, 2007
  15. David KastrupSep 25, 2007

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.