{"thread":{"id":"48352","subject":"[PATCH] git: add -N as a short option for --no-pager","startedAt":"2018-04-24T16:59:44Z","lastAt":"2018-12-21T12:04:35Z","messageCount":14,"participants":["Johannes Sixt","Junio C Hamano","Beat Bolli <bbolli@ewanet.ch>","Johannes Schindelin","Phillip Wood","Kaartic Sivaraam","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"345651","messageId":"d91e98a8-7801-a3de-3865-f0480e18ba0e@kdbg.org","threadId":"48352","inReplyTo":null,"subject":"[PATCH] git: add -N as a short option for --no-pager","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-04-24T16:59:39Z","receivedAt":"2018-04-24T16:59:44Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"In modern setups, less, the pager, uses alternate screen to show\nthe content. When it is closed, it switches back to the original\nscreen, and all content is gone.\n\nIt is not uncommon to request that the output remains visible in\nthe terminal. For this, the option --no-pager can be used. But\nit is a bit cumbersome to type, even when command completion is\navailable. Provide a short option, -N, to make the option easier\naccessible.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n Documentation/git.txt | 3 ++-\n git.c                 | 4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 4767860e72..17b50b0dc6 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n [verse]\n 'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n     [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n-    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n+    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]\n     [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n     [--super-prefix=<path>]\n     <command> [<args>]\n@@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n \tconfiguration options (see the \"Configuration Mechanism\" section\n \tbelow).\n \n+-N::\n --no-pager::\n \tDo not pipe Git output into a pager.\n \ndiff --git a/git.c b/git.c\nindex ceaa58ef40..9e2d78f442 100644\n--- a/git.c\n+++ b/git.c\n@@ -7,7 +7,7 @@\n const char git_usage_string[] =\n \tN_(\"git [--version] [--help] [-C <path>] [-c <name>=<value>]\\n\"\n \t   \"           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\\n\"\n-\t   \"           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\\n\"\n+\t   \"           [-p | --paginate | -N | --no-pager] [--no-replace-objects] [--bare]\\n\"\n \t   \"           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\\n\"\n \t   \"           <command> [<args>]\");\n \n@@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)\n \t\t\texit(0);\n \t\t} else if (!strcmp(cmd, \"-p\") || !strcmp(cmd, \"--paginate\")) {\n \t\t\tuse_pager = 1;\n-\t\t} else if (!strcmp(cmd, \"--no-pager\")) {\n+\t\t} else if (!strcmp(cmd, \"-N\") || !strcmp(cmd, \"--no-pager\")) {\n \t\t\tuse_pager = 0;\n \t\t\tif (envchanged)\n \t\t\t\t*envchanged = 1;\n-- \n2.17.0.69.g0c1d01d9b6\n\n"},{"id":"345718","messageId":"xmqqh8o05evv.fsf@gitster-ct.c.googlers.com","threadId":"48352","inReplyTo":"d91e98a8-7801-a3de-3865-f0480e18ba0e@kdbg.org","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-04-25T00:05:56Z","receivedAt":"2018-04-25T00:06:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> In modern setups, less, the pager, uses alternate screen to show\n> the content. When it is closed, it switches back to the original\n> screen, and all content is gone.\n>\n> It is not uncommon to request that the output remains visible in\n> the terminal. For this, the option --no-pager can be used. But\n> it is a bit cumbersome to type, even when command completion is\n> available. Provide a short option, -N, to make the option easier\n> accessible.\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n\nHeh, I used to append \"|cat\", which is four keystrokes that is a bit\nshorter than \" --no-pager\", but that is only acceptable when you do\nnot care about colored output ;-)\n\nI am not absolutely certain about the choice of a single letter. I\nalready checked we do not use \"git -N cmd\" for anything else right\nnow, so I am certain about the availability, but I am not sure if\ncapital 'N' is the best choice, when the other side is lowercase 'p'\n(and more importantly, the other side 'p' has mneomonic value for\n'pagination', but 'N' merely stands for 'no' and could be negating\nanything, not related to pagination). But I agree that a short-hand\nwould be welcome.\n\n> diff --git a/Documentation/git.txt b/Documentation/git.txt\n> index 4767860e72..17b50b0dc6 100644\n> --- a/Documentation/git.txt\n> +++ b/Documentation/git.txt\n> @@ -11,7 +11,7 @@ SYNOPSIS\n>  [verse]\n>  'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n>      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n> -    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n> +    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]\n>      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n>      [--super-prefix=<path>]\n>      <command> [<args>]\n> @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n>  \tconfiguration options (see the \"Configuration Mechanism\" section\n>  \tbelow).\n>  \n> +-N::\n>  --no-pager::\n>  \tDo not pipe Git output into a pager.\n"},{"id":"345731","messageId":"20180425054500.GA31531@zbox.drbeat.li","threadId":"48352","inReplyTo":"xmqqh8o05evv.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Beat Bolli <bbolli@ewanet.ch>","fromEmail":"bb@zbox.drbeat.li","sentAt":"2018-04-25T05:45:00Z","receivedAt":"2018-04-25T05:45:09Z","isPatch":true,"sender":{"key":"bb@zbox.drbeat.li","avatar":null},"body":"On Wed, Apr 25, 2018 at 09:05:56AM +0900, Junio C Hamano wrote:\n> Johannes Sixt <j6t@kdbg.org> writes:\n> \n> > In modern setups, less, the pager, uses alternate screen to show\n> > the content. When it is closed, it switches back to the original\n> > screen, and all content is gone.\n> >\n> > It is not uncommon to request that the output remains visible in\n> > the terminal. For this, the option --no-pager can be used. But\n> > it is a bit cumbersome to type, even when command completion is\n> > available. Provide a short option, -N, to make the option easier\n> > accessible.\n> >\n> > Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> > ---\n> \n> Heh, I used to append \"|cat\", which is four keystrokes that is a bit\n> shorter than \" --no-pager\", but that is only acceptable when you do\n> not care about colored output ;-)\n> \n> I am not absolutely certain about the choice of a single letter. I\n> already checked we do not use \"git -N cmd\" for anything else right\n> now, so I am certain about the availability, but I am not sure if\n> capital 'N' is the best choice, when the other side is lowercase 'p'\n> (and more importantly, the other side 'p' has mneomonic value for\n> 'pagination', but 'N' merely stands for 'no' and could be negating\n> anything, not related to pagination). But I agree that a short-hand\n> would be welcome.\n> \n\nI'm quite fond of the notation \"-p-\", but that would set a precedent for\nall other \"--no-\" options.\n\nMaybe the option parser could be enhanced to allow for both?\n\nThanks,\nBeat\n\n> > diff --git a/Documentation/git.txt b/Documentation/git.txt\n> > index 4767860e72..17b50b0dc6 100644\n> > --- a/Documentation/git.txt\n> > +++ b/Documentation/git.txt\n> > @@ -11,7 +11,7 @@ SYNOPSIS\n> >  [verse]\n> >  'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n> >      [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n> > -    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n> > +    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]\n> >      [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n> >      [--super-prefix=<path>]\n> >      <command> [<args>]\n> > @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n> >  \tconfiguration options (see the \"Configuration Mechanism\" section\n> >  \tbelow).\n> >  \n> > +-N::\n> >  --no-pager::\n> >  \tDo not pipe Git output into a pager.\n"},{"id":"345732","messageId":"08882cea-5dab-3cc7-33ac-cf938253a34a@kdbg.org","threadId":"48352","inReplyTo":"xmqqh8o05evv.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-04-25T06:25:21Z","receivedAt":"2018-04-25T06:25:26Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 25.04.2018 um 02:05 schrieb Junio C Hamano:\n> Johannes Sixt <j6t@kdbg.org> writes:\n>> It is not uncommon to request that the output remains visible in\n>> the terminal. For this, the option --no-pager can be used. But\n>> it is a bit cumbersome to type, even when command completion is\n>> available. Provide a short option, -N, to make the option easier\n>> accessible.\n>>\n>> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n>> ---\n> \n> Heh, I used to append \"|cat\", which is four keystrokes that is a bit\n> shorter than \" --no-pager\", but that is only acceptable when you do\n> not care about colored output ;-)\n> \n> I am not absolutely certain about the choice of a single letter. I\n> already checked we do not use \"git -N cmd\" for anything else right\n> now, so I am certain about the availability, but I am not sure if\n> capital 'N' is the best choice, when the other side is lowercase 'p'\n> (and more importantly, the other side 'p' has mneomonic value for\n> 'pagination', but 'N' merely stands for 'no' and could be negating\n> anything, not related to pagination). But I agree that a short-hand\n> would be welcome.\n\nI considered -P, but thought that it would better be reserved for \nsomething related to \"paths\". We have --{html,man,info}-path, which \nwould be served better with -[HMI]. That leaves --exec-path, which we \nwould probably abbreviate as -x or -X. So, -P is perhaps not that bad \nafter all.\n\nWe could also choose +p, for which there is some precedent in other \nPOSIX tools to mean negated -p, but not in git, I think. \nImplementationwise, it is not that trivial, either, because the section \nhandling options is guarded by a check that the word begins with a dash.\n\nPerhaps --no-pager means also \"unpaginated\" (-u, -U), \"linear\" (-l, -L), \n\"streamed\" (-s, -S). Other ideas, anyone?\n\n> \n>> diff --git a/Documentation/git.txt b/Documentation/git.txt\n>> index 4767860e72..17b50b0dc6 100644\n>> --- a/Documentation/git.txt\n>> +++ b/Documentation/git.txt\n>> @@ -11,7 +11,7 @@ SYNOPSIS\n>>   [verse]\n>>   'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n>>       [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n>> -    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n>> +    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]\n>>       [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n>>       [--super-prefix=<path>]\n>>       <command> [<args>]\n"},{"id":"345740","messageId":"nycvar.QRO.7.76.6.1804250938370.4978@tvgsbejvaqbjf.bet","threadId":"48352","inReplyTo":"08882cea-5dab-3cc7-33ac-cf938253a34a@kdbg.org","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-04-25T07:41:44Z","receivedAt":"2018-04-25T07:41:52Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Hannes,\n\nOn Wed, 25 Apr 2018, Johannes Sixt wrote:\n\n> Am 25.04.2018 um 02:05 schrieb Junio C Hamano:\n> > Johannes Sixt <j6t@kdbg.org> writes:\n> > > It is not uncommon to request that the output remains visible in\n> > > the terminal.\n\nI ran `git log` and then hit `q`, and the latest screen contents were\nstill visible in all of these scenarios:\n\n- in a Linux VM via SSH client\n\n- in Git Bash on Windows\n\n- in Git CMD on Windows\n\nGranted, this is only the latest screen, but that is usually good enough\nhere.\n\nIs anything different happening in your setups?\n\nCiao,\nDscho\n"},{"id":"345746","messageId":"36d622ac-f07d-7fd9-65dd-94f88b0e2f56@talktalk.net","threadId":"48352","inReplyTo":"d91e98a8-7801-a3de-3865-f0480e18ba0e@kdbg.org","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Phillip Wood","fromEmail":"phillip.wood@talktalk.net","sentAt":"2018-04-25T09:21:33Z","receivedAt":"2018-04-25T09:21:42Z","isPatch":true,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 24/04/18 17:59, Johannes Sixt wrote:\n> \n> In modern setups, less, the pager, uses alternate screen to show\n> the content. When it is closed, it switches back to the original\n> screen, and all content is gone.\n\nAre you setting LESS explicitly in the environment?\n\n From the git config man page:\nWhen the LESS environment variable is unset, Git sets it to FRX (if LESS \nenvironment variable is set, Git does not change it at all).\n\n From the less man page the X option:\nDisables  sending the termcap initialization and deinitialization \nstrings to the terminal.  This is sometimes desirable if the \ndeinitialization string does something unnecessary, like clearing the \nscreen.\n\nSo with the default setup the output should remain on the screen.\n\nBest Wishes\n\nPhillip\n\n\n> It is not uncommon to request that the output remains visible in\n> the terminal. For this, the option --no-pager can be used. But\n> it is a bit cumbersome to type, even when command completion is\n> available. Provide a short option, -N, to make the option easier\n> accessible.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>   Documentation/git.txt | 3 ++-\n>   git.c                 | 4 ++--\n>   2 files changed, 4 insertions(+), 3 deletions(-)\n> \n> diff --git a/Documentation/git.txt b/Documentation/git.txt\n> index 4767860e72..17b50b0dc6 100644\n> --- a/Documentation/git.txt\n> +++ b/Documentation/git.txt\n> @@ -11,7 +11,7 @@ SYNOPSIS\n>   [verse]\n>   'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n>       [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n> -    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n> +    [-p|--paginate|-N|--no-pager] [--no-replace-objects] [--bare]\n>       [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n>       [--super-prefix=<path>]\n>       <command> [<args>]\n> @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n>   \tconfiguration options (see the \"Configuration Mechanism\" section\n>   \tbelow).\n>   \n> +-N::\n>   --no-pager::\n>   \tDo not pipe Git output into a pager.\n>   \n> diff --git a/git.c b/git.c\n> index ceaa58ef40..9e2d78f442 100644\n> --- a/git.c\n> +++ b/git.c\n> @@ -7,7 +7,7 @@\n>   const char git_usage_string[] =\n>   \tN_(\"git [--version] [--help] [-C <path>] [-c <name>=<value>]\\n\"\n>   \t   \"           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\\n\"\n> -\t   \"           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\\n\"\n> +\t   \"           [-p | --paginate | -N | --no-pager] [--no-replace-objects] [--bare]\\n\"\n>   \t   \"           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\\n\"\n>   \t   \"           <command> [<args>]\");\n>   \n> @@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)\n>   \t\t\texit(0);\n>   \t\t} else if (!strcmp(cmd, \"-p\") || !strcmp(cmd, \"--paginate\")) {\n>   \t\t\tuse_pager = 1;\n> -\t\t} else if (!strcmp(cmd, \"--no-pager\")) {\n> +\t\t} else if (!strcmp(cmd, \"-N\") || !strcmp(cmd, \"--no-pager\")) {\n>   \t\t\tuse_pager = 0;\n>   \t\t\tif (envchanged)\n>   \t\t\t\t*envchanged = 1;\n> \n\n"},{"id":"345844","messageId":"2411e97e-bda2-869e-956e-12871761c4cc@kdbg.org","threadId":"48352","inReplyTo":"nycvar.QRO.7.76.6.1804250938370.4978@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-04-25T19:30:05Z","receivedAt":"2018-04-25T19:30:11Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 25.04.2018 um 09:41 schrieb Johannes Schindelin:\n> Hi Hannes,\n> \n> On Wed, 25 Apr 2018, Johannes Sixt wrote:\n> \n>> Am 25.04.2018 um 02:05 schrieb Junio C Hamano:\n>>> Johannes Sixt <j6t@kdbg.org> writes:\n>>>> It is not uncommon to request that the output remains visible in\n>>>> the terminal.\n> \n> I ran `git log` and then hit `q`, and the latest screen contents were\n> still visible in all of these scenarios:\n> \n> - in a Linux VM via SSH client\n> \n> - in Git Bash on Windows\n> \n> - in Git CMD on Windows\n> \n> Granted, this is only the latest screen, but that is usually good enough\n> here.\n> \n> Is anything different happening in your setups?\n\nI have LESS=RS in my environment, because I do want that the alternate \nscreen is used by the pager. Nevertheless, occasionally I want git's \noutput to remain visible.\n\n-- Hannes\n"},{"id":"345845","messageId":"523dfe75-45a2-d780-2581-1bdc076dd659@kdbg.org","threadId":"48352","inReplyTo":"36d622ac-f07d-7fd9-65dd-94f88b0e2f56@talktalk.net","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-04-25T19:31:49Z","receivedAt":"2018-04-25T19:31:53Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 25.04.2018 um 11:21 schrieb Phillip Wood:\n> On 24/04/18 17:59, Johannes Sixt wrote:\n>>\n>> In modern setups, less, the pager, uses alternate screen to show\n>> the content. When it is closed, it switches back to the original\n>> screen, and all content is gone.\n> \n> Are you setting LESS explicitly in the environment?\n> \n>  From the git config man page:\n> When the LESS environment variable is unset, Git sets it to FRX (if LESS \n> environment variable is set, Git does not change it at all).\n> \n>  From the less man page the X option:\n> Disables  sending the termcap initialization and deinitialization \n> strings to the terminal.  This is sometimes desirable if the \n> deinitialization string does something unnecessary, like clearing the \n> screen.\n> \n> So with the default setup the output should remain on the screen.\n\nRight. But I have LESS=RS because I do *not* want it to remain on screen \nby default.\n\n-- Hannes\n"},{"id":"346238","messageId":"96c519e7-b05f-a883-a536-425b4b341cb8@gmail.com","threadId":"48352","inReplyTo":"523dfe75-45a2-d780-2581-1bdc076dd659@kdbg.org","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2018-05-01T11:25:38Z","receivedAt":"2018-05-01T11:25:53Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On Thursday 26 April 2018 01:01 AM, Johannes Sixt wrote:\n> \n> Right. But I have LESS=RS because I do *not* want it to remain on screen\n> by default.\n> \n\nIn that case how about updating the commit message to be more clear\nabout it. How about,\n\n\tIt is possible to configure 'less', the pager, to use an\n\talternate screen to show the content. When it is closed in this\n\tcase, it switches back to the original screen, and all content\n\tis gone.\n\n-- \nSivaraam\n\nQUOTE:\n\n“The most valuable person on any team is the person who makes everyone\nelse on the team more valuable, not the person who knows the most.”\n\n      - Joel Spolsky\n\nKIND NOTE TO THE NATIVE ENGLISH SPEAKER:\n\nAs I'm not a native English speaker myself, there might be mistaeks in\nmy usage of English. I apologise for any mistakes that I make.\n\nIt would be \"helpful\" if you take the time to point out the mistakes.\n\nIt would be \"super helpful\" if you could provide suggestions about how\nto correct those mistakes.\n\nThanks in advance!\n\n"},{"id":"346244","messageId":"5399f852-baab-6d65-6bac-9b61f5bff6ba@gmail.com","threadId":"48352","inReplyTo":"08882cea-5dab-3cc7-33ac-cf938253a34a@kdbg.org","subject":"Re: [PATCH] git: add -N as a short option for --no-pager","fromName":"Kaartic Sivaraam","fromEmail":"kaartic.sivaraam@gmail.com","sentAt":"2018-05-01T11:41:14Z","receivedAt":"2018-05-01T11:41:26Z","isPatch":true,"sender":{"key":"kaartic.sivaraam@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12448084?v=4"},"body":"On Wednesday 25 April 2018 11:55 AM, Johannes Sixt wrote:\n> \n> I considered -P, but thought that it would better be reserved for\n> something related to \"paths\". We have --{html,man,info}-path, which\n> would be served better with -[HMI]. That leaves --exec-path, which we\n> would probably abbreviate as -x or -X. So, -P is perhaps not that bad\n> after all.\n> \n\nIt might be a good choice but I don't think it's not the best choice\nanyway because '-P' doesn't seem to communicate 'no pager' well.\n\n\n> Perhaps --no-pager means also \"unpaginated\" (-u, -U), \"linear\" (-l, -L),\n> \"streamed\" (-s, -S). Other ideas, anyone?\n>\n\nConsidering the other alternatives you suggested (as I couldn't come up\nwith a better \"single letter\" option ;-) ), I think '-s' might be a nice\nchoice but would possibly need some explanation in the documentation to\nthe wondering users.\n\nIn the end, lacking a better one letter option, I think '-P' would be a\nbetter choice after all. It would, possibly, be easily understood as a\nnegation of pagination (-p). So, I guess it would be better to go with\n'-P' than '-N'.\n\n-- \nSivaraam\n\nQUOTE:\n\n“The most valuable person on any team is the person who makes everyone\nelse on the team more valuable, not the person who knows the most.”\n\n      - Joel Spolsky\n\nKIND NOTE TO THE NATIVE ENGLISH SPEAKER:\n\nAs I'm not a native English speaker myself, there might be mistaeks in\nmy usage of English. I apologise for any mistakes that I make.\n\nIt would be \"helpful\" if you take the time to point out the mistakes.\n\nIt would be \"super helpful\" if you could provide suggestions about how\nto correct those mistakes.\n\nThanks in advance!\n\n"},{"id":"346549","messageId":"23493ba1-1704-1e8c-f448-95540a36f886@kdbg.org","threadId":"48352","inReplyTo":"d91e98a8-7801-a3de-3865-f0480e18ba0e@kdbg.org","subject":"[PATCH v2] git: add -P as a short option for --no-pager","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2018-05-03T17:15:08Z","receivedAt":"2018-05-03T17:15:14Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"It is possible to configure 'less', the pager, to use an alternate\nscreen to show the content, for example, by setting LESS=RS in the\nenvironment. When it is closed in this configuration, it switches\nback to the original screen, and all content is gone.\n\nIt is not uncommon to request that the output remains visible in\nthe terminal. For this, the option --no-pager can be used. But\nit is a bit cumbersome to type, even when command completion is\navailable. Provide a short option, -P, to make the option easier\naccessible.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n Given the positive feedback, I resurrect the patch.\n\n Changes since v1:\n - Use -P instead of -N\n - Commit message changed as proposed by Kaartic\n\n Documentation/git.txt | 3 ++-\n git.c                 | 4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 4767860e72..c662f41c1d 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -11,7 +11,7 @@ SYNOPSIS\n [verse]\n 'git' [--version] [--help] [-C <path>] [-c <name>=<value>]\n     [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\n-    [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]\n+    [-p|--paginate|-P|--no-pager] [--no-replace-objects] [--bare]\n     [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\n     [--super-prefix=<path>]\n     <command> [<args>]\n@@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n \tconfiguration options (see the \"Configuration Mechanism\" section\n \tbelow).\n \n+-P::\n --no-pager::\n \tDo not pipe Git output into a pager.\n \ndiff --git a/git.c b/git.c\nindex ceaa58ef40..71d013424e 100644\n--- a/git.c\n+++ b/git.c\n@@ -7,7 +7,7 @@\n const char git_usage_string[] =\n \tN_(\"git [--version] [--help] [-C <path>] [-c <name>=<value>]\\n\"\n \t   \"           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]\\n\"\n-\t   \"           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]\\n\"\n+\t   \"           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]\\n\"\n \t   \"           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]\\n\"\n \t   \"           <command> [<args>]\");\n \n@@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)\n \t\t\texit(0);\n \t\t} else if (!strcmp(cmd, \"-p\") || !strcmp(cmd, \"--paginate\")) {\n \t\t\tuse_pager = 1;\n-\t\t} else if (!strcmp(cmd, \"--no-pager\")) {\n+\t\t} else if (!strcmp(cmd, \"-P\") || !strcmp(cmd, \"--no-pager\")) {\n \t\t\tuse_pager = 0;\n \t\t\tif (envchanged)\n \t\t\t\t*envchanged = 1;\n-- \n2.17.0.69.g0c1d01d9b6\n"},{"id":"346572","messageId":"CAPig+cR8M3NPrJdsinakLoiFWS=adv1B7QH7Bwp-9ePr_44N_g@mail.gmail.com","threadId":"48352","inReplyTo":"23493ba1-1704-1e8c-f448-95540a36f886@kdbg.org","subject":"Re: [PATCH v2] git: add -P as a short option for --no-pager","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-05-03T20:06:06Z","receivedAt":"2018-05-03T20:06:11Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, May 3, 2018 at 1:15 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> It is possible to configure 'less', the pager, to use an alternate\n> screen to show the content, for example, by setting LESS=RS in the\n> environment. When it is closed in this configuration, it switches\n> back to the original screen, and all content is gone.\n>\n> It is not uncommon to request that the output remains visible in\n> the terminal. For this, the option --no-pager can be used. But\n> it is a bit cumbersome to type, even when command completion is\n> available. Provide a short option, -P, to make the option easier\n> accessible.\n\ns/easier accessible/easier to access/\n--- or ---\ns/easier accessible/more easily accessible/\n--- or ---\ns/easier accessible/more accessible/\n\nThe patch itself looks fine.\n\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n"},{"id":"346625","messageId":"xmqqwowkrn62.fsf@gitster-ct.c.googlers.com","threadId":"48352","inReplyTo":"CAPig+cR8M3NPrJdsinakLoiFWS=adv1B7QH7Bwp-9ePr_44N_g@mail.gmail.com","subject":"Re: [PATCH v2] git: add -P as a short option for --no-pager","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-05-04T05:43:17Z","receivedAt":"2018-05-04T05:43:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n>> available. Provide a short option, -P, to make the option easier\n>> accessible.\n>\n> s/easier accessible/easier to access/\n> --- or ---\n> s/easier accessible/more easily accessible/\n> --- or ---\n> s/easier accessible/more accessible/\n>\n> The patch itself looks fine.\n\nThanks.  More easily accessible, it is.\n"},{"id":"365727","messageId":"nycvar.QRO.7.76.6.1812211303270.41@tvgsbejvaqbjf.bet","threadId":"48352","inReplyTo":"23493ba1-1704-1e8c-f448-95540a36f886@kdbg.org","subject":"Re: [PATCH v2] git: add -P as a short option for --no-pager","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-12-21T12:04:11Z","receivedAt":"2018-12-21T12:04:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Hannes,\n\nOn Thu, 3 May 2018, Johannes Sixt wrote:\n\n> It is possible to configure 'less', the pager, to use an alternate\n> screen to show the content, for example, by setting LESS=RS in the\n> environment. When it is closed in this configuration, it switches\n> back to the original screen, and all content is gone.\n> \n> It is not uncommon to request that the output remains visible in\n> the terminal. For this, the option --no-pager can be used. But\n> it is a bit cumbersome to type, even when command completion is\n> available. Provide a short option, -P, to make the option easier\n> accessible.\n> \n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n>  Given the positive feedback, I resurrect the patch.\n> \n>  Changes since v1:\n>  - Use -P instead of -N\n>  - Commit message changed as proposed by Kaartic\n\nJust a quick note, as mine was a vocal voice against this patch: I find\nmyself using this more and more. So I was wrong to object, and I\napologize.\n\nThank you,\nDscho\n"}]}