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

Re: Help creating git alias

From
ESEugene Sajine <euguess@gmail.com>
Date
Oct 30, 2013, 19:53 UTC
Message-ID
<CAPZPVFaDyjxw_vQG_4wo0opw5KEX9sKMJnVNXGUJnCQGnBrB2g@mail.gmail.com>
In-Reply-To
<CAH5451kcTCYaXK4tqsCkHFNLxE0z8tv=n6h6QS_VkMpnWAsdGA@mail.gmail.com>
On Wed, Oct 30, 2013 at 3:47 PM, Andrew Ardill <andrew.ardill@gmail.com> wrote:
Show 7 quoted lines
> Have you tried backslash escaping the backslash? double escaping?
>
> I don't know how many are required, but I would try first \S, then
> \\S, then \\\\S, etc
> Regards,
>
> Andrew Ardill

When i do that it stops understanding \S* as regexp so it removes only "@", while i need to remove from @ to the next whitespace

Thanks, Eugene

Show 32 quoted lines
>
> On 30 October 2013 12:34, Eugene Sajine <euguess@gmail.com> wrote:
>> Hi,
>>
>> I need some advice about creating the git command alias:
>>
>> I have this as the command:
>>
>> git log --pretty=format:"%h %ad %ae %s" --date=short | sed 's/@\S*//g'
>>
>>
>> The purpose is to cut off the email domain and keep only username.
>>
>> I'm trying to create this as the alias:
>>
>>
>> lg = !sh -c 'git log --pretty=format:"%h %ad %ae %s" --date=short |
>> sed 's/@\S*//g'' -
>>
>> but it complains about the \S and i'm failing to come up with the
>> escape sequence to make it work right.
>>
>> I know i can work around that by creating shell alias, but it is not
>> what i would like to have.
>>
>> Any ideas?
>>
>> Thanks!
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Andrew ArdillNext: Ralf Thielow
Message 3 of 15 in “Help creating git alias”
  1. Eugene SajineOct 30, 2013
  2. Andrew ArdillOct 30, 2013
  3. Eugene SajineOct 30, 2013
  4. Ralf ThielowOct 30, 2013
  5. Eugene SajineOct 30, 2013
  6. Junio C HamanoOct 30, 2013
  7. Eugene SajineOct 31, 2013
  8. Junio C HamanoOct 31, 2013
  9. Eugene SajineOct 31, 2013
  10. David AguilarOct 31, 2013
  11. Junio C HamanoOct 31, 2013
  12. David AguilarOct 31, 2013
  13. Eugene SajineOct 31, 2013
  14. Junio C HamanoOct 31, 2013
  15. Eugene SajineOct 31, 2013

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.