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