Add executable shim for bat which enforces a theme

This commit is contained in:
Ethan P 2020-02-19 21:33:40 -08:00
parent f8a9009503
commit ef9def267f
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA
2 changed files with 10 additions and 0 deletions

9
test/shimexec/bat Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# Find the real bat.
HERE="$(cd "$(dirname "$0")" && pwd)"
while read -d ':' -r dir; do
if [[ "$dir" == "$HERE" ]]; then continue; fi
if [[ -f "${dir}/bat" ]]; then
exec "${dir}/bat" "$@" --theme="Monokai Extended"
fi
done <<< "$PATH"

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
case "$1" in
cols) echo 80 ;;
lines) echo 22 ;;