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

Re: Interpreting EDITOR/VISUAL environment variables.

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 1, 2007, 19:53 UTC
Message-ID
<7v7iof3uc5.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<85r6mnrs1z.fsf@lola.goethe.zz>
David Kastrup <dak@gnu.org> writes:
Show 8 quoted lines
> Well, I just checked the behavior with "less", "more", "mail" and
> "mailx", quite traditional commands that would not have a reason to
> complicate things by using "system" and quoting instead of exec.
> ...
> It turns out all three contestants still in the race apparently do a).
> If nobody has a sensible idea how to shell-quote generally enough...
> Under Unix, one has the option of using "..." and quoting the three of
> "$\ with \ or using '...' and replacing every contained ' with '\''.

Our scripts and C-level both tend to prefer using '\'' for its simplicity (this also applies to rare case the user wants to unquote it by hand). Because it now is all in git-sh-setup, it should be reasonably straightforward to implement the quoting of the temporary file name and drop dq around ${EDITOR-VISUAL}.

Please make it so.
Previous: David KastrupNext: David Kastrup
Message 6 of 16 in “Interpreting EDITOR/VISUAL environment variables.”
  1. David KastrupAug 1, 2007
  2. Junio C HamanoAug 1, 2007
  3. Yann DirsonAug 1, 2007
  4. David KastrupAug 1, 2007
  5. David KastrupAug 1, 2007
  6. Junio C HamanoAug 1, 2007
  7. git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commandsDavid Kastrup, Aug 1, 2007
  8. David KastrupAug 1, 2007
  9. git-sh-setup.sh: make GIT_EDITOR/core.editor/VISUAL/EDITOR accept commandsDavid Kastrup, Aug 1, 2007
  10. Junio C HamanoAug 1, 2007
  11. Junio C HamanoAug 1, 2007
  12. David KastrupAug 1, 2007
  13. Junio C HamanoAug 2, 2007
  14. David KastrupAug 1, 2007
  15. Matthias LederhoferAug 2, 2007
  16. David KastrupAug 2, 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.