Re: [PATCH 5/6] builtin/grep.c: show column numbers via --column-number
- From
René Scharfe <l.s.r@web.de>
- Date
- Apr 21, 2018, 05:36 UTC
- Message-ID
- <cef29224-718f-21e9-0242-8bcd8e9c20a6@web.de>
- In-Reply-To
- <xmqq4lk5b3ht.fsf@gitster-ct.c.googlers.com>
Am 21.04.2018 um 06:14 schrieb Junio C Hamano:
Show 20 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> Taylor Blau <me@ttaylorr.com> writes: >> >>> This commit teaches 'git-grep(1)' a new option, '--column-number'. This >>> ... >>> +`columnnumber`;; >>> + column number prefix (when using `-m`) >> >> Is there other people's tool (preferrably some variant of "grep") >> that has an option to tell it to show the column number of the hit? >> What is the option called there? Does that tool let the option >> squat on short-and-sweet '-m'? >> >> Thanks. > > I still do not know if we have a good existing model system to take > the longer optoin name from, but at least, GNU grep seems to use -m > to mean a completely different thing, so I'd think that we would not > assign '-m' to this new feature.
https://beyondgrep.com/feature-comparison/ is a good resource for such considerations.
ack and ripgrep use --column and no short option. If git grep got --column-number, then users could abbreviate it to --column (until it gets some other option that makes it ambiguous).
-m seems to be used for --max-count across the board ("Stop searching in each file after NUM matches") .
René