From: "Štěpán Němec" <stepnem@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] CodingGuidelines: Fix a typo
Date: Sat, 09 Oct 2010 19:35:09 +0200 [thread overview]
Message-ID: <87y6a7s20i.fsf@gmail.com> (raw)
In-Reply-To: <20101009152758.GA17799@burratino> (Jonathan Nieder's message of "Sat, 9 Oct 2010 10:27:58 -0500")
Jonathan Nieder <jrnieder@gmail.com> writes:
> stepnem@gmail.com wrote:
>
>> `${parameter/pattern/string}' shell expansion uses glob patterns, so
>> talking about `regexp' is confusing.
>
> Okay.
>
>> - - No regexp ${parameter/pattern/string}.
>> + - No substitution ${parameter/pattern/string}.
>
> A bit confusing, since ${parameter%word} and $parameter are
> substitutions, too.
Not really. They are all parameter expansions. The former a "pattern
removal", the latter a plain expansion (yeah I know you can _call_ it a
substitution anyway, but I assume you were trying to be precise/match
the Bash manual wording here).
But I agree "pattern substitution" is even clearer, thanks.
BTW, when we continue on this slightly bike-shedding note, it would make
sense to unify the capitalisation of those termini technici in there
("Arithmetic Expansion", "Process Substitution"). Personally I would
prefer having them all in lower-case; it feels a bit funny to read "We
use Arithmetic Expansion". WDYT?
I hope the whitespace goes through undisturbed this time:
--- 8< ---
Subject: CodingGuidelines: Fix a typo
`${parameter/pattern/string}' shell expansion uses glob patterns, so
talking about `regexp' is confusing.
Signed-off-by: Štěpán Němec <stepnem@gmail.com>
---
Documentation/CodingGuidelines | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 8346c19..e52474b 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -53,7 +53,7 @@ For shell scripts specifically (not exhaustive):
- No strlen ${#parameter}.
- - No regexp ${parameter/pattern/string}.
+ - No pattern substitution ${parameter/pattern/string}.
- We do not use Process Substitution <(list) or >(list).
--
next prev parent reply other threads:[~2010-10-09 17:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 11:18 [PATCH] CodingGuidelines: Fix a typo stepnem
2010-10-09 15:27 ` Jonathan Nieder
2010-10-09 17:35 ` Štěpán Němec [this message]
2010-10-09 17:51 ` Junio C Hamano
2010-10-11 6:44 ` Jonathan Nieder
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=87y6a7s20i.fsf@gmail.com \
--to=stepnem@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.