#!/usr/bin/env bash # Find the real bat. HERE="$(cd "$(dirname "$0")" && pwd)" while read -d ':' -r dir; do if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi if [[ -f "${dir}/bat" ]]; then exec "${dir}/bat" "$@" --no-config --theme="Monokai Extended" fi done <<<"$PATH:" # Print error and exit. echo "bat was not found on \$PATH" 1>&2 exit 127