so I want to use horizontal scrolling in the terminal for my custom bash command by connecting the output of the command to | less -S
However, if I do this, as soon as you exit less, the output of the command will not remain in the command line history
Is there a way to configure less to keep the output of the command in history when exiting less?
Eg. if you look at git diff, you can scroll horizontally and then exit, but the output will remain in the history in which you can enter new commands ... I essentially want to emulate this for my custom bash command. Also in git diffit performs horizontal scrolling in place (i.e., without using a new screen), and the command line history is still visible, while for lessit it will do it on its own screen, and you will not be able to see the command line history with " decrease ". Could this git diff-like mechanism be emulated less?
If there is another solution without use less, feel free to throw it away.
UPDATE QUESTION
So, suppose I do this:
cat loremipsum | less -FRSX
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed
, . q, . , , :
cat loremipsum | less -FRSX
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed
ESCOC
dictum diam. Nullam quis urna ullamcorper, accumsan quam vitae, aliquet
ESCOD
nisl. Maecenas vitae lorem orci. Ut vel est erat. Cras quis sagittis sapien, ac volutpat metus.
username@server:~/httpdocs$
git diff, , q, (.. , )
git diff
nisl. Maecenas vitae lorem orci. Ut vel est erat. Cras quis sagittis sapien, ac volutpat metus.
username@server:~/httpdocs$
?