5 ms·
> now if only shellcheck would support zsh Since the default zsh behaviour is much more reasonable (e.g. just $foo won't do globbing or word splitting) and you
by Beltalowda 4y ago
> now if only shellcheck would support zsh
Since the default zsh behaviour is much more reasonable (e.g. just $foo won't do globbing or word splitting) and you don't really need POSIX compatibility if you're going to use zsh-specific features, the need for shellcheck is hugely less than what you need with bash or POSIX sh.
- nerdponx 4y agoStill, it would be pretty handy. For example a good Zsh linter could warn you if you use a Bashism that isn't valid in Zsh, or it could switch to Posix mode if you set `emulate sh`, or warn you when an autoload function file is missing its function call at the bottom, etc.
- Beltalowda 4y agoSure, but that's "only" useful warnings/errors of that kind that are useful for any language, rather than footguns that work on first approximation and then don't ($*, unquoted $@, unquoted $var, stuff like that). A zsh LSP would be nice as well.
- nerdponx 4y agoVery fair! I bet you could use the C "module" interface to write the Zsh LSP in Zsh itself...
- Beltalowda 4y agoThere's https://github.com/zsh-users/zsh-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting which does some parsing, but I never looked at the details of it (I just know it exists).