mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:49:03 -08:00
15 lines
447 B
Bash
Executable file
15 lines
447 B
Bash
Executable file
#!/usr/bin/env sh
|
|
# compat: +ash +bash +dash +zsh
|
|
|
|
clash() { ### @- run a command through 12 different shells.
|
|
### only returns false when no arguments are given.
|
|
[ $# != 0 ] || return
|
|
for sh in ash bash dash hush ksh loksh mksh oksh osh posh yash zsh; do
|
|
printf >&2 '\033[7m %s \033[m\n' "trying $sh"
|
|
"$sh" "$@"
|
|
printf >&2 '\033[100m $?=%s \033[m\n' $?
|
|
done
|
|
true
|
|
}
|
|
|
|
[ -n "${preload+-}" ] || clash "$@"
|