mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -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
|
done
|
||||||
} 2>&- # send bash's complaints to the abyss
|
} 2>&- # send bash's complaints to the abyss
|
||||||
|
|
||||||
ea() ( ### @- **TODO:** document.
|
__ea() { ### @ ea - **TODO:** document.
|
||||||
cmd="${1:?missing subcommand}"; shift
|
cmd="${1:?missing subcommand}"; shift
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
(head)
|
(head)
|
||||||
|
@ -74,6 +74,7 @@ ea() ( ### @- **TODO:** document.
|
||||||
printf 'unknown subcommand: %s\n' "$cmd" >&2
|
printf 'unknown subcommand: %s\n' "$cmd" >&2
|
||||||
return 2;;
|
return 2;;
|
||||||
esac
|
esac
|
||||||
)
|
}
|
||||||
|
|
||||||
[ -n "${preload+-}" ] || ea "$@"
|
ea()(__ea "$@")
|
||||||
|
[ -n "${preload+-}" ] || __ea "$@"
|
||||||
|
|
Loading…
Add table
Reference in a new issue