mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-06-21 04:07:47 +02:00
developer: Fix bat reading data from stdin during tests
This commit is contained in:
parent
a6a1e55522
commit
4761b594a6
@ -1,10 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
exec 3<&0
|
||||||
|
|
||||||
# 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" || -z "$dir" ]]; then continue; fi
|
if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi
|
||||||
if [[ -f "${dir}/bat" ]]; then
|
if [[ -f "${dir}/bat" ]]; then
|
||||||
exec "${dir}/bat" "$@" --no-config --theme="Monokai Extended"
|
exec "${dir}/bat" "$@" --no-config --theme="Monokai Extended" <&3
|
||||||
fi
|
fi
|
||||||
done <<<"$PATH:"
|
done <<<"$PATH:"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user