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

Re: [msysGit] [PATCH/RFC] alias: use run_command api to execute aliases

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 7, 2011, 01:17 UTC
Message-ID
<alpine.DEB.1.00.1101070216390.1542@bonsai2>
In-Reply-To
<1294341187-3956-1-git-send-email-kusmabite@gmail.com>
Hi,
On Thu, 6 Jan 2011, Erik Faye-Lund wrote:
Show 9 quoted lines
> On Windows, system() executes with cmd.exe instead of /bin/sh. This
> means that aliases currently has to be batch-scripts instead of
> bourne-scripts. On top of that, cmd.exe does not handle single quotes,
> which is what the code-path currently uses to handle arguments with
> spaces.
> 
> To solve both problems in one go, use run_command_v_opt() to execute
> the alias. It already does the right thing prepend "sh -c " to the
> alias.

Would this not break setups where aliases were defined to execute batch scripts?

If this is true, I'm of two minds here.

Ciao, Dscho

Previous: Erik Faye-LundNext: Erik Faye-Lund
Message 4 of 7 in “alias: use run_command api to execute aliases”
  1. alias: use run_command api to execute aliasesErik Faye-Lund, Jan 6, 2011
  2. Jonathan NiederJan 6, 2011
  3. Erik Faye-LundJan 6, 2011
  4. Johannes SchindelinJan 7, 2011
  5. Erik Faye-LundJan 7, 2011
  6. Johannes SchindelinJan 7, 2011
  7. Junio C HamanoJan 7, 2011

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.