mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:49:03 -08:00
add clash
for testing shells
This commit is contained in:
parent
053e168760
commit
1baf7f16b3
1 changed files with 14 additions and 0 deletions
14
sh/clash
Normal file
14
sh/clash
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
# YES_ZSH YES_BASH YES_DASH YES_ASH
|
||||
|
||||
clash() { ### @- run a command through 9 different shells.
|
||||
### only returns false when no arguments are given.
|
||||
[ $# != 0 ] || return
|
||||
for sh in ash bash dash ksh mksh osh posh yash zsh; do
|
||||
printf '\033[7m %s \033[m\n' "trying $sh"
|
||||
"$sh" "$@"
|
||||
done
|
||||
true
|
||||
}
|
||||
|
||||
[ -n "${preload+-}" ] || clash "$@"
|
Loading…
Reference in a new issue