threads / patch / 48352

patchgit: add -N as a short option for --no-pager

Subject: [PATCH] git: add -N as a short option for --no-pager

## tl;dr

14 messages between Apr 24, 2018 and Dec 21, 2018. Diffs are folded; open one to read it.

replies: 13people: 7as markdown or json

Johannes Sixt· Apr 24, 2018, 16:59 UTC · lore

In modern setups, less, the pager, uses alternate screen to show the content. When it is closed, it switches back to the original screen, and all content is gone.

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 <j6t@kdbg.org>
---
 Documentation/git.txt | 3 ++-
 git.c                 | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Show changes to 2 files +4 −3

Documentation/git.txt, git.c

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>]
@@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
 	configuration options (see the "Configuration Mechanism" section
 	below).
 
+-N::
 --no-pager::
 	Do not pipe Git output into a pager.
 
diff --git a/git.c b/git.c
index ceaa58ef40..9e2d78f442 100644
--- a/git.c
+++ b/git.c
@@ -7,7 +7,7 @@
 const char git_usage_string[] =
 	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"
 	   "           <command> [<args>]");
 
@@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			exit(0);
 		} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
 			use_pager = 1;
-		} else if (!strcmp(cmd, "--no-pager")) {
+		} else if (!strcmp(cmd, "-N") || !strcmp(cmd, "--no-pager")) {
 			use_pager = 0;
 			if (envchanged)
 				*envchanged = 1;
-- 
2.17.0.69.g0c1d01d9b6
Junio C Hamano· Apr 25, 2018, 00:05 UTC · re: Johannes Sixt · lore

Re: [PATCH] git: add -N as a short option for --no-pager

Johannes Sixt <j6t@kdbg.org> writes:
Show 12 quoted lines
> In modern setups, less, the pager, uses alternate screen to show
> the content. When it is closed, it switches back to the original
> screen, and all content is gone.
>
> 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 <j6t@kdbg.org>
> ---

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.

Show 20 quoted lines
> 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>]
> @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
>  	configuration options (see the "Configuration Mechanism" section
>  	below).
>  
> +-N::
>  --no-pager::
>  	Do not pipe Git output into a pager.
Beat Bolli <bbolli@ewanet.ch>· Apr 25, 2018, 05:45 UTC · re: Junio C Hamano · lore

Re: [PATCH] git: add -N as a short option for --no-pager

On Wed, Apr 25, 2018 at 09:05:56AM +0900, Junio C Hamano wrote:
Show 28 quoted lines
> Johannes Sixt <j6t@kdbg.org> writes:
> 
> > In modern setups, less, the pager, uses alternate screen to show
> > the content. When it is closed, it switches back to the original
> > screen, and all content is gone.
> >
> > 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 <j6t@kdbg.org>
> > ---
> 
> 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'm quite fond of the notation "-p-", but that would set a precedent for all other "--no-" options.

Maybe the option parser could be enhanced to allow for both?

Thanks, Beat

Show 20 quoted lines
> > 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>]
> > @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
> >  	configuration options (see the "Configuration Mechanism" section
> >  	below).
> >  
> > +-N::
> >  --no-pager::
> >  	Do not pipe Git output into a pager.
Johannes Sixt· Apr 25, 2018, 06:25 UTC · re: Junio C Hamano · lore

Re: [PATCH] git: add -N as a short option for --no-pager

Am 25.04.2018 um 02:05 schrieb Junio C Hamano:
Show 22 quoted lines
> Johannes Sixt <j6t@kdbg.org> 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 <j6t@kdbg.org>
>> ---
> 
> 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?

Show 14 quoted lines
> 
>> 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>]
Johannes Schindelin· Apr 25, 2018, 07:41 UTC · re: Johannes Sixt · lore

Re: [PATCH] git: add -N as a short option for --no-pager

Hi Hannes,
On Wed, 25 Apr 2018, Johannes Sixt wrote:
> Am 25.04.2018 um 02:05 schrieb Junio C Hamano:
> > Johannes Sixt <j6t@kdbg.org> writes:
> > > It is not uncommon to request that the output remains visible in
> > > the terminal.

I ran `git log` and then hit `q`, and the latest screen contents were still visible in all of these scenarios:

- in a Linux VM via SSH client
- in Git Bash on Windows
- in Git CMD on Windows

Granted, this is only the latest screen, but that is usually good enough here.

Is anything different happening in your setups?

Ciao, Dscho

Johannes Sixt· Apr 25, 2018, 19:30 UTC · re: Johannes Schindelin · lore

Re: [PATCH] git: add -N as a short option for --no-pager

Am 25.04.2018 um 09:41 schrieb Johannes Schindelin:
Show 22 quoted lines
> Hi Hannes,
> 
> On Wed, 25 Apr 2018, Johannes Sixt wrote:
> 
>> Am 25.04.2018 um 02:05 schrieb Junio C Hamano:
>>> Johannes Sixt <j6t@kdbg.org> writes:
>>>> It is not uncommon to request that the output remains visible in
>>>> the terminal.
> 
> I ran `git log` and then hit `q`, and the latest screen contents were
> still visible in all of these scenarios:
> 
> - in a Linux VM via SSH client
> 
> - in Git Bash on Windows
> 
> - in Git CMD on Windows
> 
> Granted, this is only the latest screen, but that is usually good enough
> here.
> 
> Is anything different happening in your setups?

I have LESS=RS in my environment, because I do want that the alternate screen is used by the pager. Nevertheless, occasionally I want git's output to remain visible.

-- Hannes
Kaartic Sivaraam· May 1, 2018, 11:41 UTC · re: Johannes Sixt · lore

Re: [PATCH] git: add -N as a short option for --no-pager

On Wednesday 25 April 2018 11:55 AM, Johannes Sixt wrote:
Show 7 quoted lines
> 
> 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.
> 

It might be a good choice but I don't think it's not the best choice anyway because '-P' doesn't seem to communicate 'no pager' well.

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

Considering the other alternatives you suggested (as I couldn't come up with a better "single letter" option ;-) ), I think '-s' might be a nice choice but would possibly need some explanation in the documentation to the wondering users.

In the end, lacking a better one letter option, I think '-P' would be a better choice after all. It would, possibly, be easily understood as a negation of pagination (-p). So, I guess it would be better to go with '-P' than '-N'.

-- 
Sivaraam

QUOTE:

“The most valuable person on any team is the person who makes everyone
else on the team more valuable, not the person who knows the most.”

      - Joel Spolsky

KIND NOTE TO THE NATIVE ENGLISH SPEAKER:

As I'm not a native English speaker myself, there might be mistaeks in
my usage of English. I apologise for any mistakes that I make.

It would be "helpful" if you take the time to point out the mistakes.

It would be "super helpful" if you could provide suggestions about how
to correct those mistakes.

Thanks in advance!
Phillip Wood· Apr 25, 2018, 09:21 UTC · re: Johannes Sixt · lore

Re: [PATCH] git: add -N as a short option for --no-pager

On 24/04/18 17:59, Johannes Sixt wrote:
> 
> In modern setups, less, the pager, uses alternate screen to show
> the content. When it is closed, it switches back to the original
> screen, and all content is gone.
Are you setting LESS explicitly in the environment?
 From the git config man page:
When the LESS environment variable is unset, Git sets it to FRX (if LESS 
environment variable is set, Git does not change it at all).
 From the less man page the X option:
Disables  sending the termcap initialization and deinitialization 
strings to the terminal.  This is sometimes desirable if the 
deinitialization string does something unnecessary, like clearing the 
screen.
So with the default setup the output should remain on the screen.
Best Wishes
Phillip
Show 56 quoted lines
> 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 <j6t@kdbg.org>
> ---
>   Documentation/git.txt | 3 ++-
>   git.c                 | 4 ++--
>   2 files changed, 4 insertions(+), 3 deletions(-)
> 
> 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>]
> @@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
>   	configuration options (see the "Configuration Mechanism" section
>   	below).
>   
> +-N::
>   --no-pager::
>   	Do not pipe Git output into a pager.
>   
> diff --git a/git.c b/git.c
> index ceaa58ef40..9e2d78f442 100644
> --- a/git.c
> +++ b/git.c
> @@ -7,7 +7,7 @@
>   const char git_usage_string[] =
>   	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"
>   	   "           <command> [<args>]");
>   
> @@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
>   			exit(0);
>   		} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
>   			use_pager = 1;
> -		} else if (!strcmp(cmd, "--no-pager")) {
> +		} else if (!strcmp(cmd, "-N") || !strcmp(cmd, "--no-pager")) {
>   			use_pager = 0;
>   			if (envchanged)
>   				*envchanged = 1;
> 
Johannes Sixt· Apr 25, 2018, 19:31 UTC · re: Phillip Wood · lore

Re: [PATCH] git: add -N as a short option for --no-pager

Am 25.04.2018 um 11:21 schrieb Phillip Wood:
Show 19 quoted lines
> On 24/04/18 17:59, Johannes Sixt wrote:
>>
>> In modern setups, less, the pager, uses alternate screen to show
>> the content. When it is closed, it switches back to the original
>> screen, and all content is gone.
> 
> Are you setting LESS explicitly in the environment?
> 
>  From the git config man page:
> When the LESS environment variable is unset, Git sets it to FRX (if LESS 
> environment variable is set, Git does not change it at all).
> 
>  From the less man page the X option:
> Disables  sending the termcap initialization and deinitialization 
> strings to the terminal.  This is sometimes desirable if the 
> deinitialization string does something unnecessary, like clearing the 
> screen.
> 
> So with the default setup the output should remain on the screen.

Right. But I have LESS=RS because I do *not* want it to remain on screen by default.

-- Hannes
Kaartic Sivaraam· May 1, 2018, 11:25 UTC · re: Johannes Sixt · lore

Re: [PATCH] git: add -N as a short option for --no-pager

On Thursday 26 April 2018 01:01 AM, Johannes Sixt wrote:
> 
> Right. But I have LESS=RS because I do *not* want it to remain on screen
> by default.
> 

In that case how about updating the commit message to be more clear about it. How about,

	It is possible to configure 'less', the pager, to use an
	alternate screen to show the content. When it is closed in this
	case, it switches back to the original screen, and all content
	is gone.
-- 
Sivaraam

QUOTE:

“The most valuable person on any team is the person who makes everyone
else on the team more valuable, not the person who knows the most.”

      - Joel Spolsky

KIND NOTE TO THE NATIVE ENGLISH SPEAKER:

As I'm not a native English speaker myself, there might be mistaeks in
my usage of English. I apologise for any mistakes that I make.

It would be "helpful" if you take the time to point out the mistakes.

It would be "super helpful" if you could provide suggestions about how
to correct those mistakes.

Thanks in advance!
Johannes Sixt· May 3, 2018, 17:15 UTC · re: Johannes Sixt · lore

[PATCH v2] git: add -P as a short option for --no-pager

It is possible to configure 'less', the pager, to use an alternate screen to show the content, for example, by setting LESS=RS in the environment. When it is closed in this configuration, it switches back to the original screen, and all content is gone.

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, -P, to make the option easier accessible.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Given the positive feedback, I resurrect the patch.
 Changes since v1:
 - Use -P instead of -N
 - Commit message changed as proposed by Kaartic
 Documentation/git.txt | 3 ++-
 git.c                 | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Show changes to 2 files +4 −3

Documentation/git.txt, git.c

diff --git a/Documentation/git.txt b/Documentation/git.txt
index 4767860e72..c662f41c1d 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|-P|--no-pager] [--no-replace-objects] [--bare]
     [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
     [--super-prefix=<path>]
     <command> [<args>]
@@ -103,6 +103,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config
 	configuration options (see the "Configuration Mechanism" section
 	below).
 
+-P::
 --no-pager::
 	Do not pipe Git output into a pager.
 
diff --git a/git.c b/git.c
index ceaa58ef40..71d013424e 100644
--- a/git.c
+++ b/git.c
@@ -7,7 +7,7 @@
 const char git_usage_string[] =
 	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"
 	   "           <command> [<args>]");
 
@@ -81,7 +81,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			exit(0);
 		} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
 			use_pager = 1;
-		} else if (!strcmp(cmd, "--no-pager")) {
+		} else if (!strcmp(cmd, "-P") || !strcmp(cmd, "--no-pager")) {
 			use_pager = 0;
 			if (envchanged)
 				*envchanged = 1;
-- 
2.17.0.69.g0c1d01d9b6
Eric Sunshine· May 3, 2018, 20:06 UTC · re: Johannes Sixt · lore

Re: [PATCH v2] git: add -P as a short option for --no-pager

On Thu, May 3, 2018 at 1:15 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 10 quoted lines
> It is possible to configure 'less', the pager, to use an alternate
> screen to show the content, for example, by setting LESS=RS in the
> environment. When it is closed in this configuration, it switches
> back to the original screen, and all content is gone.
>
> 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, -P, to make the option easier
> accessible.

s/easier accessible/easier to access/ --- or --- s/easier accessible/more easily accessible/ --- or --- s/easier accessible/more accessible/

The patch itself looks fine.
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Junio C Hamano· May 4, 2018, 05:43 UTC · re: Eric Sunshine · lore

Re: [PATCH v2] git: add -P as a short option for --no-pager

Eric Sunshine <sunshine@sunshineco.com> writes:
Show 10 quoted lines
>> available. Provide a short option, -P, to make the option easier
>> accessible.
>
> s/easier accessible/easier to access/
> --- or ---
> s/easier accessible/more easily accessible/
> --- or ---
> s/easier accessible/more accessible/
>
> The patch itself looks fine.
Thanks.  More easily accessible, it is.
Johannes Schindelin· Dec 21, 2018, 12:04 UTC · re: Johannes Sixt · lore

Re: [PATCH v2] git: add -P as a short option for --no-pager

Hi Hannes,
On Thu, 3 May 2018, Johannes Sixt wrote:
Show 18 quoted lines
> It is possible to configure 'less', the pager, to use an alternate
> screen to show the content, for example, by setting LESS=RS in the
> environment. When it is closed in this configuration, it switches
> back to the original screen, and all content is gone.
> 
> 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, -P, to make the option easier
> accessible.
> 
> Signed-off-by: Johannes Sixt <j6t@kdbg.org>
> ---
>  Given the positive feedback, I resurrect the patch.
> 
>  Changes since v1:
>  - Use -P instead of -N
>  - Commit message changed as proposed by Kaartic

Just a quick note, as mine was a vocal voice against this patch: I find myself using this more and more. So I was wrong to object, and I apologize.

Thank you, Dscho

← back to recent threads