3 ms·
just use zsh. `if [[ -f file ]] {run this command} else {run that command}` no closing `fi`, use multiline or single line, add an arbitrary number of elif sta
by kludgeon 6y ago
just use zsh.
`if [[ -f file ]] {run this command} else {run that command}`
no closing `fi`, use multiline or single line, add an arbitrary number of elif statements. this only requires the short option is set in your z shell.
- kludgeon 6y agoand I'd call most of this discussion flow control, not conditionals. Strictly speaking, conditionals are one of the primary benefits of zsh over bash imo.