Bash scripts that integrate bat with various command line tools.
Go to file
2019-09-08 19:24:10 -07:00
.circleci Fixed building in CI 2019-06-21 14:54:12 -07:00
doc Added script for using bat with man 2019-09-07 15:19:12 -07:00
lib Fix regression introduced in 5749d9e 2019-09-08 19:24:10 -07:00
src Add support for building with alternate executable names 2019-09-08 17:43:29 -07:00
test Fix test/run.sh passing when tests are actually failing 2019-09-08 19:09:52 -07:00
.gitignore Fixed CI tests, hopefully. 2019-06-19 17:37:16 -07:00
build.sh Add support for building with alternate executable names 2019-09-08 17:43:29 -07:00
LICENSE.md Added license. 2019-06-19 14:41:20 -07:00
README.md Add support for building with alternate executable names 2019-09-08 17:43:29 -07:00

bat-extras

Bash scripts that integrate bat with various command line tools.

 

Scripts

 

Installation

The scripts in this repository are designed to run as-is, provided that they aren't moved around. This means that you're free to just symlink src/[script].sh to your local bin folder.

If you would rather have self-contained scripts that you can place and run anywhere, you can use the build.sh script to create (and optionally install) them.

 

Building:

./build.sh [OPTIONS...]

This will combine and preprocess each script under the src directory, and create corresponding self-contained scripts in the bin folder. Any library scripts that are sourced using source "${LIB}/[NAME].sh" will be embedded automatically.

 

Minification:

There are three different options for minification:

Option Description
--minify=none Nothing will be minified.
--minify=lib Embedded library scripts will be minified. [default]
--minify=all Everything will be minified.

This uses shfmt to perform minification.

 

Installation:

You can also specify --install and --prefix=PATH to have the build script automatically install the scripts for all users on the system. You may need to run the build script as root.

Alternate Executable:

Depending on the distribution, bat may have been renamed to avoid package conflicts. If you wish to use these scripts on a distribution where this is the case, there is an --alternate-executable=NAME option which will build the scripts to use an alternate executable name.