Terminal 1.0: a-Shell 2.3.2 full + worse_query + native plugin environment

This commit is contained in:
ztby committed 2026-11-09 22:51:39 +08:00
commit 598ef7b1bf
43 files changed
+5118

No files matched your search

Vendored Executable
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
# bash-compat - a-Shell POSIX sh compatibility launcher.
#
# GNU bash is not bundled with Terminal. This launcher provides the common
# `bash script` / `bash -c 'command'` interface on top of a-Shell's sh so
# simple plugin scripts work. If a real bash is installed at
# $PREFIX/bin/bash, the prefix PATH takes precedence over this launcher.
if [ "${1:-}" = "--version" ] || [ "${1:-}" = "-version" ]; then
echo "bash-compat 1.0 (a-Shell POSIX sh; GNU bash is not bundled)"
exit 0
fi
if [ "${1:-}" = "-c" ]; then
shift
if [ $# -eq 0 ]; then
echo "bash-compat: -c requires a command" >&2
exit 2
fi
command="$1"
shift
sh -c "$command" "$@"
exit $?
fi
if [ $# -gt 0 ] && [ -f "$1" ]; then
sh "$@"
exit $?
fi
if [ $# -eq 0 ]; then
echo "bash-compat: a-Shell POSIX sh. GNU bash-specific syntax is not supported." >&2
sh -s
exit $?
fi
sh "$@"
exit $?