From: Andreas Schwab <schwab@linux-m68k.org>
To: Luke Diamand <luke@diamand.org>
Cc: "Sébastien Guimmara" <sebastien.guimmara@gmail.com>,
"Git Users" <git@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] git help: group common commands by theme
Date: Sat, 02 May 2015 13:43:19 +0200 [thread overview]
Message-ID: <87wq0rb3xk.fsf@igel.home> (raw)
In-Reply-To: <CAE5ih78xxHj-YZVnNB=kNw5ZOkT1t2dcc5yjiUWemEQpwFQfDw@mail.gmail.com> (Luke Diamand's message of "Sat, 2 May 2015 07:32:51 +0100")
Luke Diamand <luke@diamand.org> writes:
>> };
>>
>> static struct cmdname_help common_cmds[] = {"
>>
>> -sed -n -e 's/^git-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
>> +sed -n -e 's/^git-\([^ ]*\)[ ].* common-\(.*\)/\1:\2/p'
>> command-list.txt |
>> sort |
>> -while read cmd
>> +while read line
>> do
>> + cmd=`echo $line | cut -d ':' -f 1`
>> + grp=`echo $line | cut -d ':' -f 2`
>
> Should this use $(...) rather than `...` ?
> i.e.
> cmd=$(echo $(line | cut -d : -f 1)
There are various ways to do that without a command substitution, eg:
cmd=${line%%:*}
grp=${line#:*}
or:
IFS=:
set $line
cmd=$1 grp=$2
or:
sort |
while IFS=: read cmd grp
do
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2015-05-02 11:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 23:01 [PATCH v2 1/3] git help: group common commands by theme Sébastien Guimmara
2015-05-01 23:06 ` [PATCH v2 2/3] " Sébastien Guimmara
2015-05-02 6:32 ` Luke Diamand
2015-05-02 11:09 ` Sébastien Guimmara
2015-05-02 11:43 ` Andreas Schwab [this message]
2015-05-02 11:52 ` Sébastien Guimmara
2015-05-02 14:18 ` Sébastien Guimmara
2015-05-01 23:12 ` [PATCH v2 3/3] " Sébastien Guimmara
2015-05-03 0:19 ` [PATCH v3 0/4] git help: group common commands by themes Sébastien Guimmara
2015-05-03 0:21 ` [PATCH v3 1/4] command-list.txt: " Sébastien Guimmara
2015-05-03 0:22 ` [PATCH v3 2/4] generate-cmdlist.sh: parse common command groups Sébastien Guimmara
2015-05-03 17:55 ` Junio C Hamano
2015-05-03 20:40 ` Eric Sunshine
2015-05-03 20:53 ` Sébastien Guimmara
2015-05-03 21:10 ` Eric Sunshine
2015-05-03 19:18 ` Eric Sunshine
2015-05-03 20:10 ` Eric Sunshine
2015-05-03 0:23 ` [PATCH v3 3/4] help.c - group common commands by theme Sébastien Guimmara
2015-05-03 19:44 ` Eric Sunshine
2015-05-03 0:24 ` [PATCH v3 4/4] api-builtin.txt: explain common command groups Sébastien Guimmara
2015-05-03 20:02 ` Eric Sunshine
2015-05-03 20:59 ` Sébastien Guimmara
2015-05-03 21:13 ` Eric Sunshine
[not found] ` <CAHYJk3S3s4RjFMUaomP2wUVBbcTLRGYrAOa-uDjrfsKqUuWPog@mail.gmail.com>
2015-05-03 22:32 ` Sébastien Guimmara
2015-05-03 2:23 ` [PATCH v2 1/3] git help: group common commands by theme Junio C Hamano
2015-05-03 13:54 ` Sébastien Guimmara
2015-05-03 13:57 ` Sébastien Guimmara
2015-05-03 17:16 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wq0rb3xk.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=git@vger.kernel.org \
--cc=luke@diamand.org \
--cc=sebastien.guimmara@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).