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:
parent
e24d57c051
commit
aded59184c
1 changed files with 4 additions and 3 deletions
7
sh/ea
7
sh/ea
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in a new issue