Is there any way to exit “less” without clearing the screen?
Clash Royale CLAN TAG#URR8PPP
up vote
62
down vote
favorite
Relatively often, I find myself wanting to quit less
but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds?
(My current workaround is to quit, then use more
. So any workaround that's better than that is welcomed. The ideal would be something I can use once I'm already inside less
, perhaps with a shell setting or some scripting.)
My desktop is OSX, but I use RHEL and Ubuntu servers.
less termcap
add a comment |
up vote
62
down vote
favorite
Relatively often, I find myself wanting to quit less
but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds?
(My current workaround is to quit, then use more
. So any workaround that's better than that is welcomed. The ideal would be something I can use once I'm already inside less
, perhaps with a shell setting or some scripting.)
My desktop is OSX, but I use RHEL and Ubuntu servers.
less termcap
1
Reading a long output (as ingit diff
orgit log
) inless -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it ifless
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quittingless
. Any ideas?
– musiphil
Jan 9 '14 at 19:57
By the way,-R
is usually a safer choice than-r
.
– musiphil
Jan 9 '14 at 20:14
Thanks. For those wondering:-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@MatthewPhipps: I guess-c
is about how to update the screen when you move around insideless
.
– musiphil
May 1 '14 at 20:48
add a comment |
up vote
62
down vote
favorite
up vote
62
down vote
favorite
Relatively often, I find myself wanting to quit less
but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds?
(My current workaround is to quit, then use more
. So any workaround that's better than that is welcomed. The ideal would be something I can use once I'm already inside less
, perhaps with a shell setting or some scripting.)
My desktop is OSX, but I use RHEL and Ubuntu servers.
less termcap
Relatively often, I find myself wanting to quit less
but leave what I was viewing on the screen, to refer back to. Is there any way to do this? Workarounds?
(My current workaround is to quit, then use more
. So any workaround that's better than that is welcomed. The ideal would be something I can use once I'm already inside less
, perhaps with a shell setting or some scripting.)
My desktop is OSX, but I use RHEL and Ubuntu servers.
less termcap
less termcap
edited Feb 8 '14 at 18:34
Andrew Marshall
1,505196
1,505196
asked May 14 '12 at 13:36
Steve Bennett
84331121
84331121
1
Reading a long output (as ingit diff
orgit log
) inless -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it ifless
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quittingless
. Any ideas?
– musiphil
Jan 9 '14 at 19:57
By the way,-R
is usually a safer choice than-r
.
– musiphil
Jan 9 '14 at 20:14
Thanks. For those wondering:-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@MatthewPhipps: I guess-c
is about how to update the screen when you move around insideless
.
– musiphil
May 1 '14 at 20:48
add a comment |
1
Reading a long output (as ingit diff
orgit log
) inless -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it ifless
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quittingless
. Any ideas?
– musiphil
Jan 9 '14 at 19:57
By the way,-R
is usually a safer choice than-r
.
– musiphil
Jan 9 '14 at 20:14
Thanks. For those wondering:-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@MatthewPhipps: I guess-c
is about how to update the screen when you move around insideless
.
– musiphil
May 1 '14 at 20:48
1
1
Reading a long output (as in
git diff
or git log
) in less -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it if less
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quitting less
. Any ideas?– musiphil
Jan 9 '14 at 19:57
Reading a long output (as in
git diff
or git log
) in less -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it if less
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quitting less
. Any ideas?– musiphil
Jan 9 '14 at 19:57
By the way,
-R
is usually a safer choice than -r
.– musiphil
Jan 9 '14 at 20:14
By the way,
-R
is usually a safer choice than -r
.– musiphil
Jan 9 '14 at 20:14
Thanks. For those wondering:
-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
Thanks. For those wondering:
-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@MatthewPhipps: I guess
-c
is about how to update the screen when you move around inside less
.– musiphil
May 1 '14 at 20:48
@MatthewPhipps: I guess
-c
is about how to update the screen when you move around inside less
.– musiphil
May 1 '14 at 20:48
add a comment |
3 Answers
3
active
oldest
votes
up vote
65
down vote
accepted
This is actually a function of the terminal emulator you are using (xterm, gnome-terminal, konsole, screen). An alternate screen, or altscreen, gets launched when programs such as less
or vim
are invoked. This altscreen has no history buffer and exits immediately when you quit the program, switching back to the original screen which restores the previous window content history and placement.
You can prevent less
from launch in an altscreen by passing the argument "-X".
less -X /path/to/some/file
You can also pass "-X" as an environment variable. So if you are using bash
, place this in ~/.bashrc
:
export LESS="-X"
However, this disbles the termcap (terminal capability) initialization and deinitialization, so other views when you use less
may appear off.
Another option would be to use screen
and set the option altscreen off
in your ~/.screenrc
. less
will not clear the screen and should preserve color formatting. Presumably tmux
will have the same option.
This blog entry describes the problem and offers some different solutions specific to gnome-terminal
with varying success.
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
Wait, I've discovered one already - the output ofgit log
(and probably other coloured commands) is messed up.
– Steve Bennett
May 14 '12 at 13:49
1
@SteveBennett That's small enough I'd make it an alias:alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
Hey, I think I just discovered an antidote to thegit log
issue above:export LESS="-r -X"
. (No idea what the side-effects of that are...)
– Steve Bennett
May 14 '12 at 14:43
5
Actually,git
sets theLESS
variable toFRSX
if it is unset when it runs the pager, so you can just leaveLESS
unset andless
will automatically run with-FRSX
. Look forcore.pager
ingit-config(1)
for more information.
– musiphil
Jan 9 '14 at 19:51
|
show 8 more comments
up vote
1
down vote
George's solution didn't work for me, but this solution did (from the blog entry linked in his answer).
$ infocmp -I xterm > ~/xterm-noclear.src
Edit ~/xterm-noclear.src
change the name on the second line from 'xterm' to 'xterm-noclear', or whatever suits you (also change 'xterm-debian' if it's present)
remove the instructions 'smcup' and 'rmcup' (e.g. "smcup=E[?1049h, " and "rmcup=E[?1049l, ")
$ mkdir ~/.terminfo
$ tic ~/xterm-noclear.src
(x/xterm-noclear should appear in your ~/.terminfo directory)$ export TERM=xterm-noclear
(now check the behaviour of less and, if satisfied, add the export directive line to your ~/.profile)
(I copied these instructions directly from @jah's rejected edit of George's answer.)
add a comment |
up vote
1
down vote
The way I remember this is less -SEX
for when I need to dump output to the screen but don't want lines to wrap. For example docker ps | less -SEX
What that does is this:
-S
- Scroll instead of wrap
- If you drop the
-E
, you can use your arrow keys to scroll
-E
- Exit when you reach the EOF
-X
- Prevent term swapping/blanking
- The "memory" part is that I know what S and E does, so this must be the other part. (And our reason for committing this command to memory is that we want to dump (not enter an interactive session) unwrapped output.
I hope that helps. If you can't remember less -SEX
, there's not a lot of hope for you. Just re-google every time I guess.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
65
down vote
accepted
This is actually a function of the terminal emulator you are using (xterm, gnome-terminal, konsole, screen). An alternate screen, or altscreen, gets launched when programs such as less
or vim
are invoked. This altscreen has no history buffer and exits immediately when you quit the program, switching back to the original screen which restores the previous window content history and placement.
You can prevent less
from launch in an altscreen by passing the argument "-X".
less -X /path/to/some/file
You can also pass "-X" as an environment variable. So if you are using bash
, place this in ~/.bashrc
:
export LESS="-X"
However, this disbles the termcap (terminal capability) initialization and deinitialization, so other views when you use less
may appear off.
Another option would be to use screen
and set the option altscreen off
in your ~/.screenrc
. less
will not clear the screen and should preserve color formatting. Presumably tmux
will have the same option.
This blog entry describes the problem and offers some different solutions specific to gnome-terminal
with varying success.
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
Wait, I've discovered one already - the output ofgit log
(and probably other coloured commands) is messed up.
– Steve Bennett
May 14 '12 at 13:49
1
@SteveBennett That's small enough I'd make it an alias:alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
Hey, I think I just discovered an antidote to thegit log
issue above:export LESS="-r -X"
. (No idea what the side-effects of that are...)
– Steve Bennett
May 14 '12 at 14:43
5
Actually,git
sets theLESS
variable toFRSX
if it is unset when it runs the pager, so you can just leaveLESS
unset andless
will automatically run with-FRSX
. Look forcore.pager
ingit-config(1)
for more information.
– musiphil
Jan 9 '14 at 19:51
|
show 8 more comments
up vote
65
down vote
accepted
This is actually a function of the terminal emulator you are using (xterm, gnome-terminal, konsole, screen). An alternate screen, or altscreen, gets launched when programs such as less
or vim
are invoked. This altscreen has no history buffer and exits immediately when you quit the program, switching back to the original screen which restores the previous window content history and placement.
You can prevent less
from launch in an altscreen by passing the argument "-X".
less -X /path/to/some/file
You can also pass "-X" as an environment variable. So if you are using bash
, place this in ~/.bashrc
:
export LESS="-X"
However, this disbles the termcap (terminal capability) initialization and deinitialization, so other views when you use less
may appear off.
Another option would be to use screen
and set the option altscreen off
in your ~/.screenrc
. less
will not clear the screen and should preserve color formatting. Presumably tmux
will have the same option.
This blog entry describes the problem and offers some different solutions specific to gnome-terminal
with varying success.
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
Wait, I've discovered one already - the output ofgit log
(and probably other coloured commands) is messed up.
– Steve Bennett
May 14 '12 at 13:49
1
@SteveBennett That's small enough I'd make it an alias:alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
Hey, I think I just discovered an antidote to thegit log
issue above:export LESS="-r -X"
. (No idea what the side-effects of that are...)
– Steve Bennett
May 14 '12 at 14:43
5
Actually,git
sets theLESS
variable toFRSX
if it is unset when it runs the pager, so you can just leaveLESS
unset andless
will automatically run with-FRSX
. Look forcore.pager
ingit-config(1)
for more information.
– musiphil
Jan 9 '14 at 19:51
|
show 8 more comments
up vote
65
down vote
accepted
up vote
65
down vote
accepted
This is actually a function of the terminal emulator you are using (xterm, gnome-terminal, konsole, screen). An alternate screen, or altscreen, gets launched when programs such as less
or vim
are invoked. This altscreen has no history buffer and exits immediately when you quit the program, switching back to the original screen which restores the previous window content history and placement.
You can prevent less
from launch in an altscreen by passing the argument "-X".
less -X /path/to/some/file
You can also pass "-X" as an environment variable. So if you are using bash
, place this in ~/.bashrc
:
export LESS="-X"
However, this disbles the termcap (terminal capability) initialization and deinitialization, so other views when you use less
may appear off.
Another option would be to use screen
and set the option altscreen off
in your ~/.screenrc
. less
will not clear the screen and should preserve color formatting. Presumably tmux
will have the same option.
This blog entry describes the problem and offers some different solutions specific to gnome-terminal
with varying success.
This is actually a function of the terminal emulator you are using (xterm, gnome-terminal, konsole, screen). An alternate screen, or altscreen, gets launched when programs such as less
or vim
are invoked. This altscreen has no history buffer and exits immediately when you quit the program, switching back to the original screen which restores the previous window content history and placement.
You can prevent less
from launch in an altscreen by passing the argument "-X".
less -X /path/to/some/file
You can also pass "-X" as an environment variable. So if you are using bash
, place this in ~/.bashrc
:
export LESS="-X"
However, this disbles the termcap (terminal capability) initialization and deinitialization, so other views when you use less
may appear off.
Another option would be to use screen
and set the option altscreen off
in your ~/.screenrc
. less
will not clear the screen and should preserve color formatting. Presumably tmux
will have the same option.
This blog entry describes the problem and offers some different solutions specific to gnome-terminal
with varying success.
edited Aug 30 '17 at 16:58
answered May 14 '12 at 13:44
George M
8,94623247
8,94623247
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
Wait, I've discovered one already - the output ofgit log
(and probably other coloured commands) is messed up.
– Steve Bennett
May 14 '12 at 13:49
1
@SteveBennett That's small enough I'd make it an alias:alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
Hey, I think I just discovered an antidote to thegit log
issue above:export LESS="-r -X"
. (No idea what the side-effects of that are...)
– Steve Bennett
May 14 '12 at 14:43
5
Actually,git
sets theLESS
variable toFRSX
if it is unset when it runs the pager, so you can just leaveLESS
unset andless
will automatically run with-FRSX
. Look forcore.pager
ingit-config(1)
for more information.
– musiphil
Jan 9 '14 at 19:51
|
show 8 more comments
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
Wait, I've discovered one already - the output ofgit log
(and probably other coloured commands) is messed up.
– Steve Bennett
May 14 '12 at 13:49
1
@SteveBennett That's small enough I'd make it an alias:alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
Hey, I think I just discovered an antidote to thegit log
issue above:export LESS="-r -X"
. (No idea what the side-effects of that are...)
– Steve Bennett
May 14 '12 at 14:43
5
Actually,git
sets theLESS
variable toFRSX
if it is unset when it runs the pager, so you can just leaveLESS
unset andless
will automatically run with-FRSX
. Look forcore.pager
ingit-config(1)
for more information.
– musiphil
Jan 9 '14 at 19:51
2
2
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
Perfect. Is there a downside?
– Steve Bennett
May 14 '12 at 13:46
2
2
Wait, I've discovered one already - the output of
git log
(and probably other coloured commands) is messed up.– Steve Bennett
May 14 '12 at 13:49
Wait, I've discovered one already - the output of
git log
(and probably other coloured commands) is messed up.– Steve Bennett
May 14 '12 at 13:49
1
1
@SteveBennett That's small enough I'd make it an alias:
alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
@SteveBennett That's small enough I'd make it an alias:
alias les="/usr/bin/less -X"
– bonsaiviking
May 14 '12 at 14:33
3
3
Hey, I think I just discovered an antidote to the
git log
issue above: export LESS="-r -X"
. (No idea what the side-effects of that are...)– Steve Bennett
May 14 '12 at 14:43
Hey, I think I just discovered an antidote to the
git log
issue above: export LESS="-r -X"
. (No idea what the side-effects of that are...)– Steve Bennett
May 14 '12 at 14:43
5
5
Actually,
git
sets the LESS
variable to FRSX
if it is unset when it runs the pager, so you can just leave LESS
unset and less
will automatically run with -FRSX
. Look for core.pager
in git-config(1)
for more information.– musiphil
Jan 9 '14 at 19:51
Actually,
git
sets the LESS
variable to FRSX
if it is unset when it runs the pager, so you can just leave LESS
unset and less
will automatically run with -FRSX
. Look for core.pager
in git-config(1)
for more information.– musiphil
Jan 9 '14 at 19:51
|
show 8 more comments
up vote
1
down vote
George's solution didn't work for me, but this solution did (from the blog entry linked in his answer).
$ infocmp -I xterm > ~/xterm-noclear.src
Edit ~/xterm-noclear.src
change the name on the second line from 'xterm' to 'xterm-noclear', or whatever suits you (also change 'xterm-debian' if it's present)
remove the instructions 'smcup' and 'rmcup' (e.g. "smcup=E[?1049h, " and "rmcup=E[?1049l, ")
$ mkdir ~/.terminfo
$ tic ~/xterm-noclear.src
(x/xterm-noclear should appear in your ~/.terminfo directory)$ export TERM=xterm-noclear
(now check the behaviour of less and, if satisfied, add the export directive line to your ~/.profile)
(I copied these instructions directly from @jah's rejected edit of George's answer.)
add a comment |
up vote
1
down vote
George's solution didn't work for me, but this solution did (from the blog entry linked in his answer).
$ infocmp -I xterm > ~/xterm-noclear.src
Edit ~/xterm-noclear.src
change the name on the second line from 'xterm' to 'xterm-noclear', or whatever suits you (also change 'xterm-debian' if it's present)
remove the instructions 'smcup' and 'rmcup' (e.g. "smcup=E[?1049h, " and "rmcup=E[?1049l, ")
$ mkdir ~/.terminfo
$ tic ~/xterm-noclear.src
(x/xterm-noclear should appear in your ~/.terminfo directory)$ export TERM=xterm-noclear
(now check the behaviour of less and, if satisfied, add the export directive line to your ~/.profile)
(I copied these instructions directly from @jah's rejected edit of George's answer.)
add a comment |
up vote
1
down vote
up vote
1
down vote
George's solution didn't work for me, but this solution did (from the blog entry linked in his answer).
$ infocmp -I xterm > ~/xterm-noclear.src
Edit ~/xterm-noclear.src
change the name on the second line from 'xterm' to 'xterm-noclear', or whatever suits you (also change 'xterm-debian' if it's present)
remove the instructions 'smcup' and 'rmcup' (e.g. "smcup=E[?1049h, " and "rmcup=E[?1049l, ")
$ mkdir ~/.terminfo
$ tic ~/xterm-noclear.src
(x/xterm-noclear should appear in your ~/.terminfo directory)$ export TERM=xterm-noclear
(now check the behaviour of less and, if satisfied, add the export directive line to your ~/.profile)
(I copied these instructions directly from @jah's rejected edit of George's answer.)
George's solution didn't work for me, but this solution did (from the blog entry linked in his answer).
$ infocmp -I xterm > ~/xterm-noclear.src
Edit ~/xterm-noclear.src
change the name on the second line from 'xterm' to 'xterm-noclear', or whatever suits you (also change 'xterm-debian' if it's present)
remove the instructions 'smcup' and 'rmcup' (e.g. "smcup=E[?1049h, " and "rmcup=E[?1049l, ")
$ mkdir ~/.terminfo
$ tic ~/xterm-noclear.src
(x/xterm-noclear should appear in your ~/.terminfo directory)$ export TERM=xterm-noclear
(now check the behaviour of less and, if satisfied, add the export directive line to your ~/.profile)
(I copied these instructions directly from @jah's rejected edit of George's answer.)
answered Nov 28 '17 at 2:57
prl
1112
1112
add a comment |
add a comment |
up vote
1
down vote
The way I remember this is less -SEX
for when I need to dump output to the screen but don't want lines to wrap. For example docker ps | less -SEX
What that does is this:
-S
- Scroll instead of wrap
- If you drop the
-E
, you can use your arrow keys to scroll
-E
- Exit when you reach the EOF
-X
- Prevent term swapping/blanking
- The "memory" part is that I know what S and E does, so this must be the other part. (And our reason for committing this command to memory is that we want to dump (not enter an interactive session) unwrapped output.
I hope that helps. If you can't remember less -SEX
, there's not a lot of hope for you. Just re-google every time I guess.
add a comment |
up vote
1
down vote
The way I remember this is less -SEX
for when I need to dump output to the screen but don't want lines to wrap. For example docker ps | less -SEX
What that does is this:
-S
- Scroll instead of wrap
- If you drop the
-E
, you can use your arrow keys to scroll
-E
- Exit when you reach the EOF
-X
- Prevent term swapping/blanking
- The "memory" part is that I know what S and E does, so this must be the other part. (And our reason for committing this command to memory is that we want to dump (not enter an interactive session) unwrapped output.
I hope that helps. If you can't remember less -SEX
, there's not a lot of hope for you. Just re-google every time I guess.
add a comment |
up vote
1
down vote
up vote
1
down vote
The way I remember this is less -SEX
for when I need to dump output to the screen but don't want lines to wrap. For example docker ps | less -SEX
What that does is this:
-S
- Scroll instead of wrap
- If you drop the
-E
, you can use your arrow keys to scroll
-E
- Exit when you reach the EOF
-X
- Prevent term swapping/blanking
- The "memory" part is that I know what S and E does, so this must be the other part. (And our reason for committing this command to memory is that we want to dump (not enter an interactive session) unwrapped output.
I hope that helps. If you can't remember less -SEX
, there's not a lot of hope for you. Just re-google every time I guess.
The way I remember this is less -SEX
for when I need to dump output to the screen but don't want lines to wrap. For example docker ps | less -SEX
What that does is this:
-S
- Scroll instead of wrap
- If you drop the
-E
, you can use your arrow keys to scroll
-E
- Exit when you reach the EOF
-X
- Prevent term swapping/blanking
- The "memory" part is that I know what S and E does, so this must be the other part. (And our reason for committing this command to memory is that we want to dump (not enter an interactive session) unwrapped output.
I hope that helps. If you can't remember less -SEX
, there's not a lot of hope for you. Just re-google every time I guess.
answered yesterday
Bruno Bronosky
1,86511112
1,86511112
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f38634%2fis-there-any-way-to-exit-less-without-clearing-the-screen%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Reading a long output (as in
git diff
orgit log
) inless -X
will take up the scroll buffer in my terminal and evict much of the previous output. I'd love it ifless
could just exit with the last screenful of output at the time of the exit; i.e. no more than one page of the scroll buffer would be taken after quittingless
. Any ideas?– musiphil
Jan 9 '14 at 19:57
By the way,
-R
is usually a safer choice than-r
.– musiphil
Jan 9 '14 at 20:14
Thanks. For those wondering:
-R is "Like -r, but only ANSI "color" escape sequences are output in "raw" form. Unlike -r, the screen appearance is maintained correctly in most cases."
– Steve Bennett
Jan 13 '14 at 4:20
@musiphil Perhaps -c?
– Vanessa Phipps
May 1 '14 at 16:46
@MatthewPhipps: I guess
-c
is about how to update the screen when you move around insideless
.– musiphil
May 1 '14 at 20:48