Fix: eliminate errors on source ~/.zshrc after install#18
Merged
Conversation
Two root causes:
1. atuin double-init: the curl installer appends eval "$(atuin init zsh)"
directly to ~/.zshrc, which conflicts with .zshrc.d/atuin.zsh and causes
"(eval):1: can't change option: zle" on every shell startup.
- modules/shell.sh: pass ATUIN_NO_MODIFY_SHELL=1 to the curl installer
- modules/shell.sh: add cleanup step to remove any already-appended lines
- dotfiles/.zshrc.d/atuin.zsh: source ~/.atuin/bin/env for PATH setup
(needed when ATUIN_NO_MODIFY_SHELL=1 skips the env install)
2. starship.toml parse error: (, ), and [ inside text groups [text](style)
must be escaped as \(, \), \[ in starship format strings; the closing ]
of the visual bracket and the newline were also malformed ([]\n] → [\]\n).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- atuin.zsh: add `# shellcheck source=/dev/null` before sourcing ~/.atuin/bin/env (runtime-generated file, cannot be pre-specified) - modules/shell.sh: add `# shellcheck disable=SC2016` on the sed line where $() in single quotes is an intentional literal match pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
(eval):1: can't change option: zleon every shell start: thecurlinstaller appendseval "$(atuin init zsh)"directly to~/.zshrc, conflicting with.zshrc.d/atuin.zshError parsing "format"on every prompt:(,),[inside[text](style)groups were not escapedChanges
modules/shell.shATUIN_NO_MODIFY_SHELL=1to the atuin curl installer to prevent it from modifying~/.zshrcdotfiles/.zshrc.d/atuin.zsh~/.atuin/bin/envbefore thecommand -vcheck so atuin is on$PATHwhen installed via curl (necessary sinceATUIN_NO_MODIFY_SHELL=1skips env setup)config/starship.toml(→\\(,)→\\),[→\\[inside text groups[]\n]→[\\]]\n(closing visual bracket + newline)Test plan
bootstrap.sh --module shell— no errors on first shell opensource ~/.zshrcin an existing zsh session — no errors┌──(@)─[dir git]/└─❯🤖 Generated with Claude Code