Keep ~/.zshrc upgrade-friendly by not shipping author-specific plugin samples as patch targets. Prefer the flag-tolerant trash function over bare aliases so common rm -f usage still works.
51 lines
1.8 KiB
Markdown
51 lines
1.8 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). |
|
|
| `~/.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: put them under `~/.config/zshrc/` instead.
|
|
|
|
## 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`).
|