4 ms·
On thing the article misses on is that, at least in Linux, less is not a line by line pager, it controls the whole terminal screen area, so for example if you p
by teknopaul 10y ago
On thing the article misses on is that, at least in Linux, less is not a line by line pager, it controls the whole terminal screen area, so for example if you pipe output to a file that has terminal instructions (bold, color, cursor moves etc) and try to use less to read the file it will not give such good output. More just outputs the ctrl chars and lets the terminal emulator deal with them, so they are visible, Thus highlighting the benefit of simplicity over cruft.
Sometimes, because more does less, more > less.
- ploxiln 10y agoThe "-r" option to less will allow the "raw" control characters to pass through. "less -r" will do what you want.
- therein 10y agoThat's great to know but you still need to make sure the process generating the output isn't trying to outsmart you. For instance ag (silver surfer) needs you to specify `ag --color` otherwise it will detect you are piping it and disable colors. And if I remember correctly, grep needs a `grep --color=always` to achieve the same.