macOS path_helper runs after .zshenv and can move system Python ahead of pyenv. Add an idempotent login hook and preserve it across later easyzsh migrations.
64 lines
2.0 KiB
Markdown
64 lines
2.0 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` — import bash history
|
|
- `--non-interactive` / `-n` — skip default-shell change and optional prompts
|
|
- `--with <names>` — install optional add-ons (comma-separated, repeatable).
|
|
Each name runs `install_<name>.sh` (currently: `fnm`, `pyenv`, `nvm`).
|
|
Interactive installs (without `-n` and without `--with`) prompt for the same list.
|
|
|
|
```bash
|
|
./install.sh --with fnm
|
|
./install.sh --with fnm,pyenv -n
|
|
curl -fsSL …/install.sh | bash -s -- --with fnm
|
|
```
|
|
|
|
From a git checkout (shell stubs only):
|
|
|
|
```bash
|
|
./deploy.sh
|
|
```
|
|
|
|
## Layout
|
|
|
|
| Path | Role | Reinstall |
|
|
| --- | --- | --- |
|
|
| `~/.zshenv` | Always-on: Homebrew, `~/.local/bin`, `~/.config/zsh/*.zsh`, then `local.zsh` | Overwritten |
|
|
| `~/.zshrc` | Interactive: omz, plugins, aliases, fzf, zoxide | Overwritten |
|
|
| `~/.config/zsh/*.zsh` | Always-on tool fragments (e.g. `fnm.zsh`) | Left alone (via `patch.sh`) |
|
|
| `~/.config/zsh/local.zsh` | Machine-local overrides (every zsh, including agents) | **Never overwritten** |
|
|
| `~/.config/zshrc/*.zsh` | Personal/tool overlays before oh-my-zsh (interactive) | Left alone |
|
|
| `~/.local/bin/` | User tools + shims (e.g. `grok` → `~/.grok/bin/grok`) | Left alone |
|
|
|
|
Core deploy does not manage `~/.zprofile`. The pyenv add-on appends one login
|
|
hook so macOS `path_helper` cannot outrank pyenv shims. Put other machine hooks
|
|
in `local.zsh`.
|
|
|
|
Do **not** put `~/.grok/bin` on PATH wholesale.
|
|
|
|
```bash
|
|
# ~/.config/zsh/local.zsh
|
|
. "$HOME/.cargo/env"
|
|
|
|
# ~/.config/zshrc/prefs.zsh
|
|
plugins+=(docker)
|
|
```
|
|
|
|
Tool fragments from this repo:
|
|
|
|
```bash
|
|
# always-on (sourced from ~/.zshenv)
|
|
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- zsh/fnm zsh/pyenv
|
|
```
|