Files
easyzsh/README.md
T
Jeffrey ed5365859c fix(zshenv): put ~/.local/bin on PATH for every zsh
Non-interactive agent shells (Codex, Claude) skip .zshrc and never saw
user-local tools installed via pipx/uv/grok. Add ~/.local/bin in
.zshenv with an idempotent guard, and source optional
~/.config/zshenv.local for machine-local early env.
2026-08-06 14:25:52 +08:00

52 lines
2.1 KiB
Markdown

# Easy Zsh Setup
One-command zsh environment: oh-my-zsh, powerlevel10k, and a curated plugin set
(autosuggestions, syntax-highlighting, completions, history-substring-search,
fzf-tab, k), plus eza, zoxide, fzf, and Nerd Fonts.
## Install
```bash
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/install.sh | bash
```
Options: `--cp-hist` / `-c` imports bash history; `--non-interactive` / `-n`
skips the default-shell change. The installer backs up an existing `~/.zshrc`
and `~/.zshenv` before replacing them.
## What gets installed where
| Path | Role |
| --- | --- |
| `~/.zshrc` | Canonical shell entry (from repo `.zshrc`). Stay close to upstream; reinstall overwrites it. |
| `~/.zshenv` | Early env for every zsh: Homebrew `shellenv` on macOS, plus `~/.local/bin` on PATH. |
| `~/.config/zshenv.local` | Optional machine-local early env (cargo, private PATH). Sourced by `~/.zshenv`; not overwritten by reinstall. |
| `~/.config/zshrc/*.zsh` | Your overlays, sourced by `~/.zshrc` **before** oh-my-zsh loads. |
Do not put personal tweaks into `~/.zshrc` if you want painless upgrades: interactive overlays go under `~/.config/zshrc/`; early PATH/env that non-interactive agents need go in `~/.config/zshenv.local`.
## Personal configuration
Every `*.zsh` file in `~/.config/zshrc/` is sourced near the end of `~/.zshrc`,
just before oh-my-zsh loads, so it can add plugins and override defaults.
```bash
# ~/.config/zshrc/local.zsh
plugins+=(docker) # add plugins
plugins=(${plugins:#zsh-autosuggestions}) # or remove one
alias gs='git status'
```
Ready-made **tool** configs from this repo's `zshrc/` directory can be pulled in
by name (not personal samples):
```bash
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- fnm pyenv
```
Current fragments: `fnm`, `nvm`, `pyenv`, `p10k`, `merlin_devbox`, `merlin_worker`.
Because these files load before oh-my-zsh, plugin and theme changes take effect;
aliases that must beat oh-my-zsh's own should be defined after oh-my-zsh loads
(see the note in `~/.zshrc`).