mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-04 21:40:44 +01:00
15 lines
339 B
Bash
Executable File
15 lines
339 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Find the real fish.
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
while read -d ':' -r dir; do
|
|
if [[ "$dir" == "$HERE" || -z "$dir" ]]; then continue; fi
|
|
if [[ -f "${dir}/fish" ]]; then
|
|
TMPDIR='' "${dir}/fish" "$@"
|
|
exit $?
|
|
fi
|
|
done <<<"$PATH:"
|
|
|
|
# Print error and exit.
|
|
echo "fish was not found on \$PATH" 1>&2
|
|
exit 127
|