mirror of
https://github.com/notwa/rc
synced 2024-11-05 07:29:04 -08:00
14 lines
224 B
Bash
14 lines
224 B
Bash
#!/usr/bin/env sh
|
|
# YES_ZSH
|
|
# YES_BASH
|
|
# YES_DASH
|
|
|
|
has() {
|
|
if [ -n "$ZSH_VERSION" ]; then
|
|
whence -p "$1"
|
|
else
|
|
which "$1" >/dev/null 2>&1 && which "$1"
|
|
fi
|
|
}
|
|
|
|
[ "${SOURCING:-0}" -gt 0 ] || has "$@"
|