2026-09-22 09:49 UTC
When I do ls --help|less --raw-control-chars it doesn’t show the control characters, and it looks all neat and pretty. Isn’t this the opposite of how it’s supposed to work?!
You’ve gotten a longer reply to this, but just to make it clear: No, that’s how it’s supposed to work.
By default less mangles control characters so they can’t do anything to your display (or bell)
With -R, less will pass some control characters through raw and unmangled; enough to give you stuff like pretty colours
With -r, less won’t mangle any control characters, which, if you’re doing something stupid like trying to read a binary file, can leave your terminal prompt fucked up and in need of a reset.
Replies (0)
No replies.