https://qiita.com/navitime_tech/items/c249269a3b47666c784b
I decided to put in more and more useful things by looking at, so bat following the last time.
https://github.com/sharkdp/bat
As far as I can see from the github page, there seems to be no way to install with yum (centos).
So I will use this link in releases to put it in.
https://github.com/sharkdp/bat/releases/download/v0.15.4/bat-v0.15.4-x86_64-unknown-linux-gnu.tar.gz
#Installation
$ wget https://github.com/sharkdp/bat/releases/download/v0.15.4/bat-v0.15.4-x86_64-unknown-linux-gnu.tar.gz
$ tar -zxvf bat-v0.15.4-x86_64-unknown-linux-gnu.tar.gz
$ cd bat-v0.15.4-x86_64-unknown-linux-gnu
$ sudo mv ./bat /usr/local/bin/
--style <components>
Configure which elements (line numbers, file headers, grid borders, Git modifications,
..) to display in addition to the file contents. The argument is a comma-separated list
of components to display (e.g. 'numbers,changes,grid') or a pre-defined style ('full').
To set a default style, add the '--style=".."' option to the configuration file or
export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
values: *auto*, full, plain, changes, header, grid, numbers, snip.
It seems that you can change the appearance in various ways. Is it full by default? maybe.
I know the file name when I hit it, so I wonder if I don't have to do it personally. Also, the difference of git can be seen with the git command and it is not necessary for bat (even if it is uselessly slow)
With this, the vertical width could be reduced a little.
alias bat='bat --style="numbers,grid"'
Now the style is fine without any specification! I'm happy.
Recommended Posts