profile for monkeydom at Stack Overflow, Q&A for professional and enthusiast programmers

cocoa-dom

coding bits I use, come across, like, hate, the whole shebang.

twitter | github | mastodon     rant-dom     rss | archive

Permalink
Home

Command line utilities: exa and bat

While surfing through the rust ecosystem, I stumbled across a few excellent command line utilities I enjoy using and installed on all my systems. I'm going to post about them for my own reference and in case they might be useful to you too.

exa

exa is a modern replacement for ls. Apart from great coloring I use it mostly for its tree based view and git and extended attributes integration.

dom@dreizehn:/usr/local/etc$ exa -lTF
drwxrwxr-x     - dom  3 Jul 13:02 ./
drwxr-xr-x     - dom  3 Jul 13:02 ├── bash_completion.d/
lrwxr-xr-x    36 dom 29 Jun  2017 │  ├── brew -> ../../Homebrew/completions/bash/brew
lrwxr-xr-x    48 dom  5 Oct  2017 │  ├── exa -> ../../Cellar/exa/0.8.0/etc/bash_completion.d/exa
lrwxr-xr-x    51 dom 29 Apr  4:36 │  ├── fd.bash -> ../../Cellar/fd/7.0.0/etc/bash_completion.d/fd.bash
lrwxr-xr-x    65 dom 22 Jun 16:38 │  ├── git-completion.bash -> ../../Cellar/git/2.18.0/etc/bash_completion.d/git-completion.bash
lrwxr-xr-x    59 dom 22 Jun 16:38 │  ├── git-prompt.sh -> ../../Cellar/git/2.18.0/etc/bash_completion.d/git-prompt.sh
…

bat

bat to me is a great less/cat combination that adds syntax highlighting and line numbers. Especially useful on remote servers.

dom@dreizehn:/etc$ bat hosts
───────┬────────────────────────────────────────────────────────────────────────────────────────────
       │ File: hosts
───────┼────────────────────────────────────────────────────────────────────────────────────────────
   1   │ ##
   2   │ # Host Database
   3   │ #
   4   │ # localhost is used to configure the loopback interface
   5   │ # when the system is booting.  Do not change this entry.
   6   │ ##
   7   │ 127.0.0.1       localhost
   8   │ 255.255.255.255 broadcasthost
   9   │ ::1             localhost
───────┴────────────────────────────────────────────────────────────────────────────────────────────