Re: [PATCH v6 1/1] userdiff: extend Bash pattern to cover more shell function forms
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- May 18, 2025, 07:41 UTC
- Message-ID
- <613e934c-9236-411c-be37-a8db2e3a3b50@kdbg.org>
- In-Reply-To
- <xmqq8qmvs7sd.fsf@gitster.g>
Am 17.05.25 um 15:09 schrieb Junio C Hamano:
Show 14 quoted lines
> Johannes Sixt <j6t@kdbg.org> writes: > >>> +y=<RED>3.14<RESET><GREEN>2.71<RESET> >>> +z=<RED>.5<RESET><GREEN>.75<RESET> >> >> When do decimal numbers occur in shell scripts? Wouldn't it be more >> often the case that a fullstop is part of a regular expression or a file >> name or version number that happens to be surrounded by numbers? In that >> case, we would prefer to capture the digit sequences as separate words. > > Sorry but I am confused. > > Do you want a filename "sample.3gp" treated as having separate > parts, "sample", ".3", and "gp", instead of a single word?
I didn't consider such a case. The cited paragraph could be interpreted to say that we want the words "sample", ".", "3", and "gp". But the pattern that we have in round v7 by a lucky strike actually gives "sample", ".", and "3gp" (I think), which is much better.
-- Hannes