mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-14 02:00:40 +01:00
test: Fix bat shimexec
This commit is contained in:
parent
875504ba06
commit
f9b18f7e8e
@ -2,8 +2,12 @@
|
|||||||
# Find the real bat.
|
# Find the real bat.
|
||||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||||
while read -d ':' -r dir; do
|
while read -d ':' -r dir; do
|
||||||
if [[ "$dir" == "$HERE" ]]; then continue; fi
|
if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi
|
||||||
if [[ -f "${dir}/bat" ]]; then
|
if [[ -f "${dir}/bat" ]]; then
|
||||||
exec "${dir}/bat" "$@" --theme="Monokai Extended"
|
exec "${dir}/bat" "$@" --theme="Monokai Extended"
|
||||||
fi
|
fi
|
||||||
done <<<"$PATH"
|
done <<<"$PATH:"
|
||||||
|
|
||||||
|
# Print error and exit.
|
||||||
|
echo "bat was not found on \$PATH" 1>&2
|
||||||
|
exit 127
|
||||||
|
Loading…
Reference in New Issue
Block a user