Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > stepnem@xxxxxxxxx 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@xxxxxxxxx> --- 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). -- -- 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