Re: Help creating git alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 30, 2013 at 3:47 PM, Andrew Ardill <andrew.ardill@xxxxxxxxx> wrote:
> 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



>
> On 30 October 2013 12:34, Eugene Sajine <euguess@xxxxxxxxx> 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@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]