Using Debian testing and installed Steam through the official repository I've got Bash defined as the interpreter/shebang:
$ head -n 1 $HOME/.steam/steam.sh
#!/usr/bin/env bash
I'm not sure if the /usr/bin/env bash version is altered by zsh, but if you're running the script as zsh ../steam.sh you're telling it to use a shell it is not designed to run as. It may make sense to rewrite this as using -z, but if we got the same version of the script it shouldn't be necessary.
Ah, yes I forgot to mention that due to some variants of the shellshock bug not being patched yet (and I would imagine we'll see some aftershocks for a while) I had actually switched shells and put a symlink in bash's place for compatibility. It's probably low priority for a change, but due to the severity of shellshock, I may not be unique in this use-case. Anyway, feel free to close if not relevant.
Thanks!
no plans to make this script work with zsh as well as bash
Nothing extracted yet.
There is a very small portability issue with zsh not accepting the bash implied test [[ $foo ]]. This is used in line 218 of the steam frontend script steam.sh on Ubuntu 14.04. Unknown if other distros are affected.
function in question:
function detect_scriptversion()
{
SCRIPT_VERSION=$(fgrep "$2=" "$1")
if [[ "$SCRIPT_VERSION" ]]; then
expr "$SCRIPT_VERSION" : ".=(.)"
else
echo "0"
fi
}
workaround:
add -z to the test condition
if [[ -z "$SCRIPT_VERSION" ]]; then
as opposed to above.
Note, it will also be necessary to remove 3 bytes from the file to accommodate this change, due to steam checking the size (thankfully not the checksum) of this script file on boot.