Just discovered #bat, a drop-in replacement for the Unix `cat` command. It supports automatic paging, line numbers, and syntax highlighting, and it is extensible with custom color schemes.
https://github.com/sharkdp/bat/
`cat` `bat`
@codesections Nice find.. and for any Archers out there it's in the community repo as 'bat'.
@codesections I think that was Popey's Command Line Looove in this last edition of the Ubuntu Podcast."Bat is cat with wings".
@codesections looks neat! I wonder if it works the same than cat on file instead of terminals.
@codesections I guess I'll be the voice of reason here: this is incredibly dumb
@aminb @codesections cat is one of the smallest and simplest utilities ever. It's also standardized. This is the opposite of the unix way, just pipe things into less. less -R will pass through ANSI escape codes so your terminal renders syntax highlighting too.
@aminb @codesections
GNU cat is dumb and implements loads of very dumb extensions
Try this on for size:
https://git.suckless.org/sbase/tree/cat.c
This is POSIX compatible.
I don't have anything to say regarding the rest of your comments.
@wowaname @aminb @codesections remember that "cygwin replacement" which was just crappy implementations of some GNU coreutils and a non-ANSI terminal emulator
@wowaname @codesections @aminb well I don't use Windows so I've never actually used it
But the point of cygwin is that it is a POSIX environment, not that it provides a Unix-like shell
Just another example of missing the point
@aminb @wowaname @codesections proliferating nonstandard tools is objectively dumb because they encourage scripts et al which do not work on new platforms and make the work of porting more burdensome for hugely questionable "gains"
@wowaname @aminb @codesections that too, GNU code is really fucking bad, almost as bad as GNOME code
@aminb @wowaname @codesections Windows is used on even more machines than that. Popularity has nothing to do with being good
@wowaname @aminb @codesections bad code is everywhere. I take a more fundamental objection with GNU software because it prioritizes things like an unnecessary level of performance over simple, stable code; and because it encourages bad practices by implementing and using extensions on every standard it touches (ref bash, coreutils, gcc, glibc, etc)
@wowaname @aminb @codesections the bad code is to some extent a reflection of these warped priorites. Simple code could not achieve the braindead goals they set for themselves.
@sir @aminb @codesections I was hong to ask: how does this compare to less -FX?
@codesections That's an interesting take on cat. It would be useful for dumping short bash scripts in the terminal. Sounds like it's just a feature or two short of being an editor. MIT and Apache licenses together?