mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add Less With Style as a unix til
This commit is contained in:
@@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really
|
|||||||
warrant a full blog post. These are mostly things I learn by pairing with
|
warrant a full blog post. These are mostly things I learn by pairing with
|
||||||
smart people at [Hashrocket](http://hashrocket.com/).
|
smart people at [Hashrocket](http://hashrocket.com/).
|
||||||
|
|
||||||
_425 TILs and counting..._
|
_426 TILs and counting..._
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -383,6 +383,7 @@ _425 TILs and counting..._
|
|||||||
- [Kill Everything Running On A Certain Port](unix/kill-everything-running-on-a-certain-port.md)
|
- [Kill Everything Running On A Certain Port](unix/kill-everything-running-on-a-certain-port.md)
|
||||||
- [Killing A Frozen SSH Session](unix/killing-a-frozen-ssh-session.md)
|
- [Killing A Frozen SSH Session](unix/killing-a-frozen-ssh-session.md)
|
||||||
- [Last Argument Of The Last Command](unix/last-argument-of-the-last-command.md)
|
- [Last Argument Of The Last Command](unix/last-argument-of-the-last-command.md)
|
||||||
|
- [Less With Style](unix/less-with-style.md)
|
||||||
- [List All Users](unix/list-all-users.md)
|
- [List All Users](unix/list-all-users.md)
|
||||||
- [Only Show The Matches](unix/only-show-the-matches.md)
|
- [Only Show The Matches](unix/only-show-the-matches.md)
|
||||||
- [Partial String Matching In Bash Scripts](unix/partial-string-matching-in-bash-scripts.md)
|
- [Partial String Matching In Bash Scripts](unix/partial-string-matching-in-bash-scripts.md)
|
||||||
|
|||||||
15
unix/less-with-style.md
Normal file
15
unix/less-with-style.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Less With Style
|
||||||
|
|
||||||
|
I was using `less` the other day to look at a log file. The log file was
|
||||||
|
filled with ANSI color escape sequences which made it pretty painful to
|
||||||
|
read. I was stuck looking at a white, unparsed log file instead of a
|
||||||
|
colorful, stylish one.
|
||||||
|
|
||||||
|
The `-R` flag fixes this. It tells `less` to display the ANSI color escape
|
||||||
|
sequences as colors rather than the caret notation.
|
||||||
|
|
||||||
|
The tradeoff is that `less` has _less_ control over the overall display of
|
||||||
|
the screen. This may result in some buggy display behavior, but not
|
||||||
|
necessarily.
|
||||||
|
|
||||||
|
[source](http://superuser.com/questions/117841/get-colors-in-less-command)
|
||||||
Reference in New Issue
Block a user