From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Tait <git.git@t41t.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Sverre Rabbelier <srabbelier@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 2/2] grep: long context options
Date: Tue, 02 Aug 2011 19:24:01 +0200 [thread overview]
Message-ID: <4E3832B1.1030408@lsrfire.ath.cx> (raw)
In-Reply-To: <20110802010143.GL13795@ece.pdx.edu>
Am 02.08.2011 03:01, schrieb Tait:
> René Scharfe <rene.scharfe_lsrfire.ath.cx> said (on 2011/08/01):
>> Take long option names for -A (--after-context), -B (--before-context)
>> and -C (--context) from GNU grep and add a similar long option name
>> for -W (--function-context).
>
> Why not just add --context=function? Then when I want --context=indent
> to give context based on the indent-level, it is an intuitive extension
> of the existing options. (Of course, --context=<number> would still do
> exactly what it does now.)
With the current patches, you can use --function-context together with
--context=<num> to specify a minimum number of context lines to show,
even beyond function boundaries.
I'd expect a --context=function option to be equivalent to -W -C0 and
--context=<num> to be equivalent to -C<num> --no-function-context, so
the syntax would be limited in that regard (or be unintuitive to me).
We can still add it on top, though.
René
prev parent reply other threads:[~2011-08-02 17:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-31 15:59 [PATCH] grep: add option to show whole function as context René Scharfe
2011-07-31 17:34 ` Sverre Rabbelier
2011-08-01 15:37 ` René Scharfe
2011-08-01 15:39 ` Sverre Rabbelier
2011-08-01 17:20 ` René Scharfe
2011-08-01 17:20 ` [PATCH v2 1/2] " René Scharfe
2011-08-01 23:17 ` Junio C Hamano
2011-08-02 18:08 ` René Scharfe
2011-08-01 17:22 ` [PATCH v2 2/2] grep: long context options René Scharfe
2011-08-02 1:01 ` Tait
2011-08-02 17:24 ` René Scharfe [this message]
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=4E3832B1.1030408@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git.git@t41t.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=srabbelier@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.