bat, a cat(1) clone with syntax highlighting, Git integration written in Rust
github.com
github.com
[1] https://news.ycombinator.com/item?id=17879419
---
I personally have this in ~/.bash_profile:
cless() {
pygmentize -O style=monokai "$1" 2>/dev/null | less
}
Then if I want syntax highlighting with less, I just type cless <path>.real 0m8.371s user 0m2.608s sys 0m0.679s
This isn't the first place I work where Python's startup time has been like this. Perhaps it's because all the binaries are on NFS? I don't know.
Head or tail to leave a peak in the terminal history or less to actually read the file, seems to me to be a much better habit.
Thanks for the great tip on cless - I might just extend it to a chead and ctail !
For everything else I already have emacs...