We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I've encountered some issues formatting zsh flavoured script (*.zsh).
*.zsh
Suppose I want to check if some command exists with the script below:
#!/usr/bin/env zsh if (( $+commands[cat] )); then echo "ok" fi
After formatting You will see:
#!/usr/bin/env zsh if (($ + commands[cat])); then echo "ok" fi
This will raise an error:
./test.zsh:3: bad math expression: operand expected at '/bin/cat'
So You are forced to use quotation:
#!/usr/bin/env zsh if (("$+commands[cat]")); then echo "ok" fi
After formatting it still lacks padding spaces.
Desired behaviour: (( "$+commands[cat]" )) or (( $+commands[cat] ))
(( "$+commands[cat]" ))
(( $+commands[cat] ))
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! I've encountered some issues formatting zsh flavoured script (
*.zsh
).Check for existing issues
Describe the bug / provide steps to reproduce it
Suppose I want to check if some command exists with the script below:
After formatting You will see:
This will raise an error:
./test.zsh:3: bad math expression: operand expected at '/bin/cat'
So You are forced to use quotation:
After formatting it still lacks padding spaces.
Desired behaviour:
(( "$+commands[cat]" ))
or(( $+commands[cat] ))
Thanks!
The text was updated successfully, but these errors were encountered: