mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Sixt <>
To: Junio C Hamano <>
Cc: Git Mailing List <>
Subject: Re: [PATCH] git: add -N as a short option for --no-pager
Date: Wed, 25 Apr 2018 08:25:21 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Am 25.04.2018 um 02:05 schrieb Junio C Hamano:
> Johannes Sixt <> writes:
>> It is not uncommon to request that the output remains visible in
>> the terminal. For this, the option --no-pager can be used. But
>> it is a bit cumbersome to type, even when command completion is
>> available. Provide a short option, -N, to make the option easier
>> accessible.
>> Signed-off-by: Johannes Sixt <>
>> ---
> Heh, I used to append "|cat", which is four keystrokes that is a bit
> shorter than " --no-pager", but that is only acceptable when you do
> not care about colored output ;-)
> I am not absolutely certain about the choice of a single letter. I
> already checked we do not use "git -N cmd" for anything else right
> now, so I am certain about the availability, but I am not sure if
> capital 'N' is the best choice, when the other side is lowercase 'p'
> (and more importantly, the other side 'p' has mneomonic value for
> 'pagination', but 'N' merely stands for 'no' and could be negating
> anything, not related to pagination). But I agree that a short-hand
> would be welcome.

I considered -P, but thought that it would better be reserved for 
something related to "paths". We have --{html,man,info}-path, which 
would be served better with -[HMI]. That leaves --exec-path, which we 
would probably abbreviate as -x or -X. So, -P is perhaps not that bad 
after all.

We could also choose +p, for which there is some precedent in other 
POSIX tools to mean negated -p, but not in git, I think. 
Implementationwise, it is not that trivial, either, because the section 
handling options is guarded by a check that the word begins with a dash.

Perhaps --no-pager means also "unpaginated" (-u, -U), "linear" (-l, -L), 
"streamed" (-s, -S). Other ideas, anyone?

>> diff --git a/Documentation/git.txt b/Documentation/git.txt
>> index 4767860e72..17b50b0dc6 100644
>> --- a/Documentation/git.txt
>> +++ b/Documentation/git.txt
>> @@ -11,7 +11,7 @@ SYNOPSIS
>>   [verse]
>>   'git' [--version] [--help] [-C <path>] [-c <name>=<value>]
>>       [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
>> -    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
>> +    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]
>>       [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
>>       [--super-prefix=<path>]
>>       <command> [<args>]

  parent reply	other threads:[~2018-04-25  6:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 16:59 [PATCH] git: add -N as a short option for --no-pager Johannes Sixt
2018-04-25  0:05 ` Junio C Hamano
2018-04-25  5:45   ` Beat Bolli <>
2018-04-25  6:25   ` Johannes Sixt [this message]
2018-04-25  7:41     ` Johannes Schindelin
2018-04-25 19:30       ` Johannes Sixt
2018-05-01 11:41     ` Kaartic Sivaraam
2018-04-25  9:21 ` Phillip Wood
2018-04-25 19:31   ` Johannes Sixt
2018-05-01 11:25     ` Kaartic Sivaraam
2018-05-03 17:15 ` [PATCH v2] git: add -P " Johannes Sixt
2018-05-03 20:06   ` Eric Sunshine
2018-05-04  5:43     ` Junio C Hamano
2018-12-21 12:04   ` Johannes Schindelin

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).