News for hackers. Stuff that matters.
Re:An Illustrated Guide to Useful Command Line Tools by johnisgood on Saturday October 26, 2019 @09:30AM (#21363539)
I use:

    cless() {
      pygmentize -O style=<style> "$1" 2>/dev/null | less
    }
I have programs that depend on pygmentize so I am not sure I will use bat anytime soon when I already have pygmentize and less, or at least not for it having syntax highlighting.
Re:An Illustrated Guide to Useful Command Line Tools by pcr910303 on Saturday October 26, 2019 @09:36AM (#21363576)
That use is the exact reason why LESSPIPE exists, check out man less & https://www-zeuthen.desy.de/~friebel/unix/lesspipe.html
Re:An Illustrated Guide to Useful Command Line Tools by johnisgood on Saturday October 26, 2019 @09:40AM (#21363594)
Maybe, but I already had pygmentize, I already had less, and this small function took me less than 10 seconds to type in and start using immediately (and I use a particular style that pygmentize provides so that is a plus). :P In any case, thanks for sharing.
Re:An Illustrated Guide to Useful Command Line Tools by pcr910303 on Saturday October 26, 2019 @09:59AM (#21363698)
Oh, I forgot to mention that LESSPIPE is a mechanism to automatically pipe the contents of a file when opening in less, and that the linked LESSPIPE script has an option to use pigmentize for syntax highlighting.

It’s a tool for enhancing less & pygmentize, not replacing them.

Well, just providing info for everyone. I’m not trying to force you using that script :-)

Re:An Illustrated Guide to Useful Command Line Tools by johnisgood on Saturday October 26, 2019 @10:13AM (#21363771)
> Well, just providing info for everyone. I’m not trying to force you using that script :-)

Yeah of course, sorry, I admit my comment did seem defensive! Thank you for sharing, really. :)

Re:An Illustrated Guide to Useful Command Line Tools by saagarjha on Saturday October 26, 2019 @09:37AM (#21363580)
I just use nano -v.