Skip to content

add zsh configuration; stock is way too bland#77

Merged
davidjenni merged 4 commits into
mainfrom
zsh
May 19, 2026
Merged

add zsh configuration; stock is way too bland#77
davidjenni merged 4 commits into
mainfrom
zsh

Conversation

@davidjenni

Copy link
Copy Markdown
Owner

config is lean and mean, avoids a heavy-handed plugin manager like zinit it shares the starship.toml for its prompt

config is lean and mean, avoids a heavy-handed plugin manager like zinit
it shares the starship.toml for its prompt
Copilot AI review requested due to automatic review settings May 19, 2026 22:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/la plus Fish startup behavior (nvm + starship transient prompt change).
  • Extends bootstrap.sh to 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-update iterates over "${ZPLUGINDIR}"/*/; when no plugins are installed and nullglob is not set, the glob can remain literal and the loop will run with a non-existent path, causing git -C errors. 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.

Comment thread bootstrap.sh Outdated
Comment thread zsh/plugins.zsh Outdated
Comment thread zsh/plugins.zsh
Comment thread zsh/zshenv
Comment thread zsh/zshrc
Comment thread zsh/zshrc
Comment thread zsh/zshrc
Comment thread zsh/zshrc
davidjenni and others added 3 commits May 19, 2026 15:45
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>
@davidjenni
davidjenni merged commit eb49752 into main May 19, 2026
3 checks passed
@davidjenni
davidjenni deleted the zsh branch May 19, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants