mirror of
https://github.com/notwa/rc
synced 2024-06-29 02:17:12 -07:00
14 lines
219 B
Bash
14 lines
219 B
Bash
#!/usr/bin/sh
|
|
# YES_ZSH
|
|
# YES_BASH
|
|
# YES_DASH
|
|
|
|
ify() {
|
|
[ $# -ge 2 ] || { printf "%s\n" "$0: too few arguments" >&2; return 1; }
|
|
local ex="$1"
|
|
shift
|
|
"$@" | "$ex"
|
|
}
|
|
|
|
[ "${SOURCING:-0}" -gt 0 ] || ify "$@"
|