less -S not working

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I would like each line of a file to show up on just a single line in the terminal when viewing the file with less. less -S is not working for me, no matter how I try. With the flag -S, whether specified on the command line or in the program (entering -S<CR> in less), the line continues onto the line below, wrapped.



For a terminal emulator I am using urxvt, if that matters, with the following options:



rxvt-unicode (urxvt) v9.19 - released: 2013-10-27
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent, tint,pixbuf,XIM,frills,selectionscrolling, wheel,slipwheel,smart-resizecursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm


And this is in .Xdefaults:



URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: -7

! Fonts
URxvt*font: xft:Monospace:pixelsize=20
URxvt*boldFont: xft:Monospace:pixelsize=20:style=bold
! Fix font space
URxvt*letterSpace: -1


Plus some other options for color scheme.



It's not working with gnome-terminal, either, so maybe it's not something having to do with urxvt.



Edit:



less --version gives less 458 (GNU regular expressions).



Neither $less nor $LESS are set.







share|improve this question






















  • any environment variables interfering with your plans? aliases?
    – mdpc
    Nov 29 '17 at 0:23






  • 1




    What is the output of "echo $LESS" and of "less --version"?
    – gmarmstrong
    Nov 29 '17 at 0:24










  • Edited with this information.
    – ammodramus
    Nov 29 '17 at 0:32










  • Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
    – ammodramus
    Nov 29 '17 at 0:33











  • @ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
    – Timothy Martin
    Nov 29 '17 at 0:36














up vote
1
down vote

favorite












I would like each line of a file to show up on just a single line in the terminal when viewing the file with less. less -S is not working for me, no matter how I try. With the flag -S, whether specified on the command line or in the program (entering -S<CR> in less), the line continues onto the line below, wrapped.



For a terminal emulator I am using urxvt, if that matters, with the following options:



rxvt-unicode (urxvt) v9.19 - released: 2013-10-27
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent, tint,pixbuf,XIM,frills,selectionscrolling, wheel,slipwheel,smart-resizecursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm


And this is in .Xdefaults:



URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: -7

! Fonts
URxvt*font: xft:Monospace:pixelsize=20
URxvt*boldFont: xft:Monospace:pixelsize=20:style=bold
! Fix font space
URxvt*letterSpace: -1


Plus some other options for color scheme.



It's not working with gnome-terminal, either, so maybe it's not something having to do with urxvt.



Edit:



less --version gives less 458 (GNU regular expressions).



Neither $less nor $LESS are set.







share|improve this question






















  • any environment variables interfering with your plans? aliases?
    – mdpc
    Nov 29 '17 at 0:23






  • 1




    What is the output of "echo $LESS" and of "less --version"?
    – gmarmstrong
    Nov 29 '17 at 0:24










  • Edited with this information.
    – ammodramus
    Nov 29 '17 at 0:32










  • Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
    – ammodramus
    Nov 29 '17 at 0:33











  • @ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
    – Timothy Martin
    Nov 29 '17 at 0:36












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I would like each line of a file to show up on just a single line in the terminal when viewing the file with less. less -S is not working for me, no matter how I try. With the flag -S, whether specified on the command line or in the program (entering -S<CR> in less), the line continues onto the line below, wrapped.



For a terminal emulator I am using urxvt, if that matters, with the following options:



rxvt-unicode (urxvt) v9.19 - released: 2013-10-27
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent, tint,pixbuf,XIM,frills,selectionscrolling, wheel,slipwheel,smart-resizecursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm


And this is in .Xdefaults:



URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: -7

! Fonts
URxvt*font: xft:Monospace:pixelsize=20
URxvt*boldFont: xft:Monospace:pixelsize=20:style=bold
! Fix font space
URxvt*letterSpace: -1


Plus some other options for color scheme.



It's not working with gnome-terminal, either, so maybe it's not something having to do with urxvt.



Edit:



less --version gives less 458 (GNU regular expressions).



Neither $less nor $LESS are set.







share|improve this question














I would like each line of a file to show up on just a single line in the terminal when viewing the file with less. less -S is not working for me, no matter how I try. With the flag -S, whether specified on the command line or in the program (entering -S<CR> in less), the line continues onto the line below, wrapped.



For a terminal emulator I am using urxvt, if that matters, with the following options:



rxvt-unicode (urxvt) v9.19 - released: 2013-10-27
options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent, tint,pixbuf,XIM,frills,selectionscrolling, wheel,slipwheel,smart-resizecursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm


And this is in .Xdefaults:



URxvt.depth: 32
URxvt.geometry: 90x30
URxvt.transparent: false
URxvt.fading: 0
URxvt.loginShell: true
URxvt.saveLines: 50
URxvt.internalBorder: 3
URxvt.lineSpace: -7

! Fonts
URxvt*font: xft:Monospace:pixelsize=20
URxvt*boldFont: xft:Monospace:pixelsize=20:style=bold
! Fix font space
URxvt*letterSpace: -1


Plus some other options for color scheme.



It's not working with gnome-terminal, either, so maybe it's not something having to do with urxvt.



Edit:



less --version gives less 458 (GNU regular expressions).



Neither $less nor $LESS are set.









share|improve this question













share|improve this question




share|improve this question








edited Nov 29 '17 at 0:29

























asked Nov 29 '17 at 0:14









ammodramus

263




263











  • any environment variables interfering with your plans? aliases?
    – mdpc
    Nov 29 '17 at 0:23






  • 1




    What is the output of "echo $LESS" and of "less --version"?
    – gmarmstrong
    Nov 29 '17 at 0:24










  • Edited with this information.
    – ammodramus
    Nov 29 '17 at 0:32










  • Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
    – ammodramus
    Nov 29 '17 at 0:33











  • @ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
    – Timothy Martin
    Nov 29 '17 at 0:36
















  • any environment variables interfering with your plans? aliases?
    – mdpc
    Nov 29 '17 at 0:23






  • 1




    What is the output of "echo $LESS" and of "less --version"?
    – gmarmstrong
    Nov 29 '17 at 0:24










  • Edited with this information.
    – ammodramus
    Nov 29 '17 at 0:32










  • Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
    – ammodramus
    Nov 29 '17 at 0:33











  • @ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
    – Timothy Martin
    Nov 29 '17 at 0:36















any environment variables interfering with your plans? aliases?
– mdpc
Nov 29 '17 at 0:23




any environment variables interfering with your plans? aliases?
– mdpc
Nov 29 '17 at 0:23




1




1




What is the output of "echo $LESS" and of "less --version"?
– gmarmstrong
Nov 29 '17 at 0:24




What is the output of "echo $LESS" and of "less --version"?
– gmarmstrong
Nov 29 '17 at 0:24












Edited with this information.
– ammodramus
Nov 29 '17 at 0:32




Edited with this information.
– ammodramus
Nov 29 '17 at 0:32












Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
– ammodramus
Nov 29 '17 at 0:33





Ah, my .bashrc was aliasing less with less -r, which must interfere with -S. Removing the alias fixed the problem.
– ammodramus
Nov 29 '17 at 0:33













@ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
– Timothy Martin
Nov 29 '17 at 0:36




@ammodramus Yes, you are correct. linuxquestions.org/questions/ubuntu-63/…
– Timothy Martin
Nov 29 '17 at 0:36










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Per mdpc's suggestion, I looked at aliases and found my .bashrc was aliasing less with less -r so that less can display colors. Removing this alias and thus removing the -r flag fixed the problem and made the -S flag produce the expected behavior.



From man less:



 -r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.


So -r seems to break -S, understandably.






share|improve this answer




















  • In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
    – egmont
    Nov 30 '17 at 12:13










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407617%2fless-s-not-working%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













Per mdpc's suggestion, I looked at aliases and found my .bashrc was aliasing less with less -r so that less can display colors. Removing this alias and thus removing the -r flag fixed the problem and made the -S flag produce the expected behavior.



From man less:



 -r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.


So -r seems to break -S, understandably.






share|improve this answer




















  • In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
    – egmont
    Nov 30 '17 at 12:13














up vote
2
down vote













Per mdpc's suggestion, I looked at aliases and found my .bashrc was aliasing less with less -r so that less can display colors. Removing this alias and thus removing the -r flag fixed the problem and made the -S flag produce the expected behavior.



From man less:



 -r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.


So -r seems to break -S, understandably.






share|improve this answer




















  • In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
    – egmont
    Nov 30 '17 at 12:13












up vote
2
down vote










up vote
2
down vote









Per mdpc's suggestion, I looked at aliases and found my .bashrc was aliasing less with less -r so that less can display colors. Removing this alias and thus removing the -r flag fixed the problem and made the -S flag produce the expected behavior.



From man less:



 -r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.


So -r seems to break -S, understandably.






share|improve this answer












Per mdpc's suggestion, I looked at aliases and found my .bashrc was aliasing less with less -r so that less can display colors. Removing this alias and thus removing the -r flag fixed the problem and made the -S flag produce the expected behavior.



From man less:



 -r or --raw-control-chars
Causes "raw" control characters to be displayed. The default is to display control characters using the caret nota-
tion; for example, a control-A (octal 001) is displayed as "^A". Warning: when the -r option is used, less cannot
keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of con-
trol character). Thus, various display problems may result, such as long lines being split in the wrong place.


So -r seems to break -S, understandably.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 29 '17 at 0:39









ammodramus

263




263











  • In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
    – egmont
    Nov 30 '17 at 12:13
















  • In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
    – egmont
    Nov 30 '17 at 12:13















In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
– egmont
Nov 30 '17 at 12:13




In order to retain displaying colors you should use the -R option instead of -r, which is compatible with -S.
– egmont
Nov 30 '17 at 12:13

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f407617%2fless-s-not-working%23new-answer', 'question_page');

);

Post as a guest













































































vOVvvRUu,hk,GQP1FCzPOTOSg7wcV Kq8oybIh1z,2a,wGytyGesaf3vrF Cgpr3CtuWglk8R5eNu
vQ al6,YObp4X4S HEWyTxV,db,Etm 3vxavUGKqqqL7

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS