mirror of
https://github.com/notwa/rc
synced 2024-11-05 08:09:03 -08:00
13 lines
219 B
Bash
13 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 "$@"
|