Add optional Oh My Zsh installation and configuration to provisioning - #7
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an explicit opt-in path to install and configure Oh My Zsh (with Powerlevel10k, plugins, fonts, and a generated .zshrc) as part of provisioning, while also improving how “user-scoped” installs are targeted (especially for non-standard/centrally managed home directories on Ubuntu).
Changes:
- Add
--install-oh-my-zshflag (defaultfalse) to both Ubuntu and macOS provisioning, including post-installp10k configurein interactive runs. - Improve Ubuntu “target user/home” handling via
--target-user/--target-homeoverrides and run more user-scoped actions withsudo -H ... env HOME=.... - Document the new flags and optional terminal customization behavior in
README.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/provision-ubuntu.sh | Adds opt-in Oh My Zsh setup, target user/home overrides, and user-context execution for home-scoped installs/verification. |
| scripts/provision-macos.sh | Adds opt-in Oh My Zsh setup and post-install configuration wizard behavior. |
| README.md | Documents new flags, examples, and the optional Oh My Zsh configuration behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+439
to
+442
| install_git_repo_user "$u" "$h" https://github.com/ohmyzsh/ohmyzsh.git "$h/.oh-my-zsh" | ||
| install_git_repo_user "$u" "$h" https://github.com/romkatv/powerlevel10k.git "$custom_dir/themes/powerlevel10k" | ||
| install_git_repo_user "$u" "$h" https://github.com/zsh-users/zsh-autosuggestions.git "$custom_dir/plugins/zsh-autosuggestions" | ||
| install_git_repo_user "$u" "$h" https://github.com/zsh-users/zsh-syntax-highlighting.git "$custom_dir/plugins/zsh-syntax-highlighting" |
Comment on lines
+147
to
+148
| sudo -H -u "$TARGET_USER" env HOME="$TARGET_HOME" test -d "$TARGET_HOME" \ | ||
| || { err "Target home does not exist, is not mounted, or is inaccessible to $TARGET_USER: $TARGET_HOME"; exit 1; } |
Comment on lines
+299
to
+303
| log "Installing Oh My Zsh and the requested theme/plugins..." | ||
| install_git_repo_user https://github.com/ohmyzsh/ohmyzsh.git "$HOME/.oh-my-zsh" | ||
| install_git_repo_user https://github.com/romkatv/powerlevel10k.git "$custom_dir/themes/powerlevel10k" | ||
| install_git_repo_user https://github.com/zsh-users/zsh-autosuggestions.git "$custom_dir/plugins/zsh-autosuggestions" | ||
| install_git_repo_user https://github.com/zsh-users/zsh-syntax-highlighting.git "$custom_dir/plugins/zsh-syntax-highlighting" |
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.
As in the title.