[Linux convenient command] Try inserting bat

environment

Overview

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.

bat installation

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/

Confirm bat

image.png

        --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)

image.png

With this, the vertical width could be reduced a little.

alias

alias bat='bat --style="numbers,grid"'

image.png

Now the style is fine without any specification! I'm happy.

Recommended Posts

[Linux convenient command] Try inserting bat
[Linux convenient command] Try inserting csview
[Linux convenient command] Try to insert vivid
Linux command # 3
Linux command # 5
Linux command list
linux at command
[Linux] Search command
Linux command <Basic 2>
Linux [directory command]
Linux server command
Linux # Command Memo 1
Linux command [read]
Linux [shell command]
Convenient command combination
[Linux] Command / Knowledge
My linux command
Linux command <Basic 1>
Linux command collection
Linux mkdir command
Linux command basics
[Linux] Git command
Linux (command memory)
Try to create a new command on linux
[Linux] Volume configuration command
Linux command cheat sheet
Linux command (sequential update)
Linux basic command memorandum
Linux command [File operation]
Linux command for self-collection
linux command error collection 1
Try NeosVR on Linux
Linux command line shortcut
linux sar command CPU usage
What is Linux? [Command list]
Try normal Linux programming Part 2
Convenient diff command usage notes
Try normal Linux programming Part 3
Try normal Linux programming Part 4
Easy df command on Linux
Linux tar xz command memo
Try normal Linux programming Part 6
Linux Command Dictionary (for myself)
linux: create original Terminal command
[Note] Useful linux command collection
Linux command memorandum [for beginners]
Linux PC spec check command
[Linux] User / group command summary
Convenient Linux shortcuts (for beginners)
[C language] [Linux] Try to create a simple Linux command * Just add! !!