fix(zsh): resolve shellcheck parse errors in dot_zshrc.tmpl - #173
Open
github-actions[bot] wants to merge 1 commit into
Open
fix(zsh): resolve shellcheck parse errors in dot_zshrc.tmpl#173github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
Rewrite the one-line zle-line-init function to POSIX-style syntax and add the missing semicolon before 'then' in one-line 'if [[ ... ]] then' statements. This removes the SC1073/SC1083 parse error and the cascading SC1056/SC1072 missing-brace errors, and satisfies SC1010. Fixes #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated fix attempt
This PR was generated by the
droid-issue-fixerGitHub Action, which runsdroid execheadlessly to attempt an open issue.Closes #168
Droid exec summary
Fixed issue #168.
Changed
dot_zshrc.tmplso the rendered zshrc no longer triggers shellcheck parse errors:function zle-line-init { ... }definition as a POSIX-stylezle-line-init() { ... }multi-line function, with a comment explaining why.;beforethenin every one-lineif [[ ... ]] thenblock (atuin env, atuin init, starship, thefuck, Factory.app, factory, LM Studio).Validation:
chezmoi execute-template --config "$CHEZMOI_CI_CONFIG" < dot_zshrc.tmplrenders successfully.shellcheck --shell=shon the rendered output no longer reports the SC1073/SC1083 brace-group parse error, the cascading SC1056/SC1072 missing-}errors, or any SC1010 missing-separator warnings.The remaining POSIX-sh dialect warnings (e.g.
[[ ]],&>,source) are expected because this file is a zshrc, not a POSIX shell script.