1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 06:49:03 -08:00

sometimes avoid unnecessary subshell in ea

This commit is contained in:
Connor Olding 2024-03-05 05:42:48 +01:00
parent e24d57c051
commit aded59184c

7
sh/ea
View file

@ -24,7 +24,7 @@ __ea_urlencode() {
done
} 2>&- # send bash's complaints to the abyss
ea() ( ### @- **TODO:** document.
__ea() { ### @ ea - **TODO:** document.
cmd="${1:?missing subcommand}"; shift
case "$cmd" in
(head)
@ -74,6 +74,7 @@ ea() ( ### @- **TODO:** document.
printf 'unknown subcommand: %s\n' "$cmd" >&2
return 2;;
esac
)
}
[ -n "${preload+-}" ] || ea "$@"
ea()(__ea "$@")
[ -n "${preload+-}" ] || __ea "$@"