add zsh configuration; stock is way too bland#77
Merged
Merged
Conversation
config is lean and mean, avoids a heavy-handed plugin manager like zinit it shares the starship.toml for its prompt
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Zsh configuration alongside existing shell dotfiles, aiming for a lightweight setup (custom plugin loader + shared Starship prompt config) and a few related prompt/shell tweaks.
Changes:
- Introduces new Zsh config files:
.zshenv,.zshrc, and a minimal Git-cloning plugin loader. - Updates Starship prompt formatting and adjusts Fish
ll/laplus Fish startup behavior (nvm + starship transient prompt change). - Extends
bootstrap.shto install/copy Zsh config into~/.config/zsh.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
zsh/zshrc |
New Zsh interactive config (history, completion, aliases, fzf keybinds, plugin sourcing, starship). |
zsh/zshenv |
New Zsh environment setup (XDG dirs, editor/pager vars, PATH, STARSHIP_CONFIG). |
zsh/plugins.zsh |
New lightweight plugin loader/updater that clones plugins from GitHub. |
starship.toml |
Adjusts prompt format positioning for time/character. |
fish/functions/ll.fish |
Adds -h and --git flags to ll. |
fish/functions/la.fish |
Adds --git flag to la. |
fish/config.fish |
Auto-selects Node LTS via nvm if present; removes transient right prompt time module. |
bootstrap.sh |
Copies Zsh config files into ~/.config/zsh during bootstrap. |
Comments suppressed due to low confidence (2)
zsh/plugins.zsh:14
source "${plugin_path}/${2}.plugin.zsh"is unconditional; if a plugin’s entrypoint filename differs or the clone is incomplete, zsh will error on startup. Add a file-existence check with a clear error (or allow passing the entrypoint filename) so the shell can continue gracefully.
git clone --depth=1 "https://github.com/${1}/${2}" "$plugin_path" \
|| { echo "ERROR: failed to install ${2}" >&2; return 1; }
fi
source "${plugin_path}/${2}.plugin.zsh"
}
zsh/plugins.zsh:21
zplugin-updateiterates over "${ZPLUGINDIR}"/*/; when no plugins are installed andnullglobis not set, the glob can remain literal and the loop will run with a non-existent path, causinggit -Cerrors. Use a nullglob-safe glob qualifier (e.g.,*(/N)) or guard for directory existence before looping.
zplugin-update() {
local dir
for dir in "${ZPLUGINDIR}"/*/; do
echo "Updating ${dir:t}..."
git -C "$dir" pull --ff-only
done
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
config is lean and mean, avoids a heavy-handed plugin manager like zinit it shares the starship.toml for its prompt