Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@

| Layer | Owns | Mechanism |
|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| **[omnishell](https://github.com/JtheGunner/omnishell)** | rc *lines*: plugin inits, history, completion, `zsh-completions`, `fzf`, `zoxide`, `modern-aliases`, `colorized-man`, `direnv`, `broot`, `mise`, `starship` (prompt + its seeded config), `root-loops` (OSC palette push), `tmux` (installs it; auto-attach is off) | one marker block in `~/.zshrc` / `~/.bashrc`, sourcing a generated `init.<shell>` |
| **[omnishell](https://github.com/JtheGunner/omnishell)** | rc *lines*: plugin inits, history, completion, `zsh-completions`, `dynamic-completion`, `fzf`, `navi`, `zoxide`, `modern-aliases`, `colorized-man`, `tealdeer`, `you-should-use`, `direnv`, `broot`, `mise`, `starship` (prompt + its seeded config), `root-loops` (OSC palette push), `tmux` (installs it; auto-attach is off) | one marker block in `~/.zshrc` / `~/.bashrc`, sourcing a generated `init.<shell>` |
| **this repo: stow packages** | standalone config *files*: `git`, `tmux` (`.tmux.conf` only), `bat`, `ghostty` (+ optional `nvim`) | [GNU Stow](https://www.gnu.org/software/stow/) symlinks into `$HOME` |
| **this repo: rc libraries** | the base `~/.zshrc` / `~/.bashrc` content: env, keybindings, zsh completion styling | `zsh/zshrc.zsh` + `bash/bashrc.bash`, **`source`d** from a generated real rc file (not stowed, see below) |
| **this repo: `shell.d/`** | personal rc lines not worth a public module: k8s / docker aliases, `linuxbrew`, helper functions | a second marker block, sourced *after* omnishell |
| **`~/.zshrc.local` / `~/.bashrc.local`** | machine-specific and secret: per-host `PATH`, tool completions, tokens. **Not version-controlled.** | sourced last by the same marker block |

omnishell is consumed as a released binary (Homebrew tap / curl installer); this
repo never modifies it. **omnishell 0.9.0 or newer is required**: older releases
repo never modifies it. **omnishell 0.10.0 or newer is required**: older releases
don't know all of the `starship`, `root-loops`, `tmux`, `broot`, `direnv`, `mise` and
`colorized-man` modules, and install `mise`, `starship` and `broot` with a long
source build where no distro package exists, 0.7.0 is the first with
`omnishell tui`, which `--interactive` uses, before 0.7.1 a tool installed
from a release binary or a source build is not on `PATH` at shell start (no
`starship` prompt), before 0.8.0 `modern-aliases` is degraded where the
distro has no `eza` package, and before 0.9.0 there is no `zsh-completions`
module. `bootstrap.sh` upgrades an older
distro has no `eza` package, before 0.9.0 there is no `zsh-completions`
module, and before 0.10.0 there are no `navi`, `tealdeer`, `you-should-use` and
`dynamic-completion` modules. `bootstrap.sh` upgrades an older
install, or stops with a message if it can't.

```text
Expand Down Expand Up @@ -79,11 +80,11 @@
`bootstrap.sh`:

1. checks that nothing points at another checkout (see [Multiple checkouts](#multiple-checkouts))
2. installs dependencies, omnishell (upgrading it below 0.9.0) and Ghostty (unless switched off), and zsh if you opted in, then offers to make zsh your login shell (see [Settings file](#-settings-file)); on apt systems with a CPU other than x86_64 / arm64 also a Rust toolchain
2. installs dependencies, omnishell (upgrading it below 0.10.0) and Ghostty (unless switched off), and zsh if you opted in, then offers to make zsh your login shell (see [Settings file](#-settings-file)); on apt systems with a CPU other than x86_64 / arm64 also a Rust toolchain
3. writes real `~/.zshrc` / `~/.bashrc`
4. stows the packages (unless skipped)
5. writes the git `delta` config and asks for your git identity (unless skipped) (see [Git identity](#-git-identity))
6. on Homebrew, removes the group/other write bit from `share` and `share/zsh` so zsh's `compinit` accepts the `zsh-completions` directory (unless switched off), then applies `omnishell/config.toml`, which also installs `zsh-completions`, `starship`, `mise`, `tmux`, `direnv` and `broot`
6. on Homebrew, removes the group/other write bit from `share` and `share/zsh` so zsh's `compinit` accepts the `zsh-completions` directory (unless switched off), then applies `omnishell/config.toml`, which also installs `zsh-completions`, `navi`, `tealdeer`, `you-should-use`, `starship`, `mise`, `tmux`, `direnv` and `broot`
7. appends the `shell.d` block to both rc files
8. renders the terminal colour themes

Expand Down Expand Up @@ -122,7 +123,7 @@
>
> Fix the cause (or install the packages yourself) and re-run `./bootstrap.sh`.

### Multiple checkouts

Check warning on line 126 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "Multiple checkouts" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh).

Several clones on one machine are fine, e.g. a working copy to hack on and a
second one to test the install end to end. Only one of them is live. Two things
Expand Down Expand Up @@ -165,7 +166,7 @@

---

## ⚙️ Settings file

Check warning on line 169 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "⚙️ Settings file" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh, omnishell/config.toml).

Every per-machine choice lives in one untracked file:
`~/.config/dotfiles/config.toml`. The first run copies
Expand Down Expand Up @@ -272,7 +273,7 @@

---

## 🪪 Git identity

Check warning on line 276 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "🪪 Git identity" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh).

This repo ships **no** `user.name` / `user.email`. The git config sets
`user.useConfigOnly = true` instead, so git refuses to commit until you set an
Expand All @@ -288,7 +289,7 @@
git config --file ~/.gitconfig.local user.email "12345+you@users.noreply.github.com"
```

### ✍️ Signing commits with SSH (optional)

Check warning on line 292 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "✍️ Signing commits with SSH (optional)" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh).

`bootstrap.sh` also asks for the path to your **public** SSH key. Give just the
path and the rest of the signing setup is derived from it. Leave it empty to
Expand Down Expand Up @@ -316,7 +317,7 @@

---

## ⚙️ Configuring

Check warning on line 320 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "⚙️ Configuring" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh, omnishell/config.toml).

Every setting lives in **one** of five places. None of this needs `bootstrap.sh`
re-run (though re-running it is always safe); the "Apply with" column says how
Expand Down Expand Up @@ -382,7 +383,11 @@
| `completion`, `history` | zsh/bash plugin baseline | `history.size = 50000` |
| `zsh-completions` | zsh only: extra completion definitions, on `fpath` before `compinit` | - |
| `autosuggestions`, `syntax-highlighting` | zsh only: grey inline suggestions, command colouring as you type | - |
| `dynamic-completion` | bash only: `complete -C` for CLIs that complete themselves | `commands = [...]` |
| `fzf` | key bindings + defaults | `ctrl_r`, `ctrl_t`, `default_opts` |
| `navi` | interactive cheatsheet browser on Ctrl+G (uses `fzf`) | `key = "ctrl-g"` |
| `tealdeer` | `tldr`: short command examples instead of long man pages | - |
| `you-should-use` | zsh only: reminds you of an existing alias for the command you typed | `message_position`, `mode`, `ignored_aliases` |
| `zoxide` | smarter `cd` | `cmd = "z"` |
| `modern-aliases` | `ls` / `cat` / `find` → `eza` / `bat` / `fd` | `replace = [...]` |
| `colorized-man` | man pages through `bat`; plain `less` colours when `bat` is missing | - |
Expand All @@ -393,6 +398,8 @@
| `root-loops` | OSC 4/10/11 palette push on shell start | `appearance = "dark"` |
| `tmux` | installs tmux; optional auto-attach to a session on shell start | `session = "default"`, `auto_attach = false` |

`ble-sh` (bash autosuggestions and highlighting) is not enabled: omnishell rejects it together with `fzf`, which `navi` needs.

`starship`, `mise`, `tmux`, `direnv` and `broot` are **installed** by
`omnishell apply`, not by `bootstrap.sh`. Where the distro has no package,
`mise`, `starship` and `broot` come from a checksum-verified upstream release
Expand Down Expand Up @@ -420,7 +427,7 @@
shells start outside it. Flip it to `true` to attach to (or create) the
`default` session on every shell start.

### 4. Stow packages: standalone config files

Check warning on line 430 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "4. Stow packages: standalone config files" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh).

`stow` symlinks these into `$HOME`, so **editing the file in the repo changes the
live config immediately** (you may still need to reload the target app). After
Expand Down Expand Up @@ -462,7 +469,7 @@

---

## 🎨 Colours: Root Loops

Check warning on line 472 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "🎨 Colours: Root Loops" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh, omnishell/config.toml).

Terminal colours are defined **once**; everything else inherits the 16 ANSI
colours. See [`rootloops`](rootloops):
Expand Down Expand Up @@ -530,7 +537,7 @@
tests/ test-*.sh (make test) + bootstrap-smoke.sh (CI)
```

### Notes

Check warning on line 540 in README.md

View workflow job for this annotation

GitHub Actions / docs-drift

doc-drift

Section "Notes" may be outdated: linked code changed but the section did not (changed code: bootstrap.sh).

- The git config lives at `~/.config/git/config` (not `~/.gitconfig`). The
`delta` paging config is `~/.gitconfig.delta`, which `bootstrap.sh` writes only
Expand Down
5 changes: 3 additions & 2 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,13 @@ reload_settings() {
# found at shell start (no starship prompt, no mise / broot); 0.8.0 installs
# eza as a release binary where the distro has no package (Debian 12), instead
# of degrading modern-aliases; 0.9.0 adds the zsh-completions module (fpath before
# compinit) and the `omnishell doctor` check for writable completion directories.
# compinit) and the `omnishell doctor` check for writable completion directories;
# 0.10.0 adds the navi, tealdeer, you-should-use and dynamic-completion modules.
# What has no
# binary (broot on 32-bit ARM, mise on armv6, everything on other CPUs) still
# builds from source, which needs Rust 1.95 for mise / starship (broot: 1.85) -
# newer than what Debian / Ubuntu LTS ship as `cargo`.
OMNISHELL_MIN_VERSION="0.9.0"
OMNISHELL_MIN_VERSION="0.10.0"
RUST_MIN_VERSION="1.95"

# What a cargo build of mise needs besides Rust: a C toolchain, cmake (libz-ng-sys),
Expand Down
132 changes: 132 additions & 0 deletions docs/superpowers/plans/2026-11-28-new-omnishell-default-modules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# New omnishell default modules Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** Enable the omnishell modules `navi`, `tealdeer`, `you-should-use` and `dynamic-completion` in the default `omnishell/config.toml` and raise the omnishell floor to 0.10.0.

**Architecture:** Four new `[modules.*]` tables in the tracked default config. All four modules first shipped in omnishell 0.10.0, so `OMNISHELL_MIN_VERSION` in `bootstrap.sh` and the README follow. Shell-specific modules (`you-should-use`: zsh, `dynamic-completion`: bash) are enabled globally; omnishell applies each only to its own shell.

**Tech Stack:** TOML, bash, the repo's `tests/test-*.sh` harness (`make test`).

**Spec:** Agreed in chat on YouTrack issue DOTFI-26; the issue description is the requirement list. No separate spec file.

## Global Constraints

- Language: English for code, comments, docs and git (user-facing text excepted).
- `ble-sh` stays disabled: omnishell rejects `ble-sh` together with `fzf` (`omnishell validate`: "conflicts with fzf"), and `navi` requires `fzf`.
- `bash-completion` needs no change: the already enabled `completion` module installs and loads `bash-completion@2`.
- `dynamic-completion.commands` is exactly `["terraform", "vault", "aws=aws_completer", "mc"]` (an implementer's call; binaries not on `PATH` are skipped silently).
- `OMNISHELL_MIN_VERSION` becomes `0.10.0`.
- No `ignored_aliases` for `you-should-use` for now.
- `config.toml.example` has no omnishell module entries; leave it unchanged unless a test shows otherwise.
- Commit format `<type>: <description>`, English, no attribution trailers.

## Review Focus

- A bash-only module (`dynamic-completion`) and a zsh-only module (`you-should-use`) enabled globally must not break `omnishell validate` for either shell.
- `ble-sh` accidentally enabled together with `fzf` (config error) must be caught by a test.
- Docs naming a stale floor (`0.9.0`) anywhere after the bump.
- A host with omnishell below 0.10.0 must be upgraded by `bootstrap.sh`, not silently accept the new config.
- `navi` enabled while `fzf` is off would fail validation; `fzf` must stay enabled.

---

### Task 1: Enable the four modules in the default config

**Files:**
- Modify: `omnishell/config.toml`
- Test: `tests/test-optional-parts.sh` (next to the `zsh-completions` assertion at line 239)

**Interfaces:**
- Consumes: nothing.
- Produces: default config with `[modules.navi]`, `[modules.tealdeer]`, `[modules.you-should-use]`, `[modules.dynamic-completion]` all `enabled = true`; `[modules.ble-sh]` absent.

- [ ] **Step 1: Write the failing tests** in `tests/test-optional-parts.sh`, after the existing `zsh-completions` check. Add a helper `module_enabled() { awk -v m="$1" '$0 == "[modules." m "]" {f=1; next} /^\[/ {f=0} f && /^enabled = true/ {ok=1} END {exit !ok}' "$DOTFILES/omnishell/config.toml"; }` and checks named:
- `omnishell/config.toml enables navi`, `... tealdeer`, `... you-should-use`, `... dynamic-completion` (each `module_enabled <name>`).
- `dynamic-completion lists the self-completing CLIs`: the config contains `commands = ["terraform", "vault", "aws=aws_completer", "mc"]`.
- `ble-sh stays off (it conflicts with fzf)`: `! grep -q '^\[modules\.ble-sh\]' "$DOTFILES/omnishell/config.toml"`.
- `fzf stays enabled (navi requires it)`: `module_enabled fzf`.
- `the default config validates`: runs only when `omnishell` is on `PATH` and `omnishell version` reports 0.10.0 or newer; copies the default config to `$WORK/validate/omnishell/config.toml` and asserts `XDG_CONFIG_HOME=$WORK/validate omnishell validate` exits 0. Otherwise prints a skip line and does not count as a failure.

- [ ] **Step 2: Run to verify failure**

Run: `bash tests/test-optional-parts.sh`
Expected: the four `enables ...` checks and the `commands` check FAIL; `ble-sh stays off` and `fzf stays enabled` pass.

- [ ] **Step 3: Add the module tables to `omnishell/config.toml`**, after `[modules.zsh-completions]`: `navi` and `tealdeer` (comment: Ctrl+G cheatsheet browser needing fzf; tldr client), `you-should-use` (comment: zsh only, reminds of an existing alias), `dynamic-completion` with `[modules.dynamic-completion.options]` `commands` as in Global Constraints (comment: bash only, `complete -C` for CLIs that complete themselves). Add one comment near `fzf` or at the top: `ble-sh` is not enabled because it conflicts with `fzf`, which `navi` needs.

- [ ] **Step 4: Run to verify pass**

Run: `bash tests/test-optional-parts.sh && bash tests/test-bootstrap-settings.sh`
Expected: all checks `ok`, no `FAIL` (the second file compares the live config with the repo default and must stay green).

- [ ] **Step 5: Commit**

```bash
git add omnishell/config.toml tests/test-optional-parts.sh
git commit -m "feat: enable the omnishell navi, tealdeer, you-should-use and dynamic-completion modules"
```

### Task 2: Raise the omnishell floor to 0.10.0

**Files:**
- Modify: `bootstrap.sh:206-225` (comment block and `OMNISHELL_MIN_VERSION`)
- Modify: `tests/test-interactive.sh:46`, `tests/test-interactive.sh:140`
- Modify: `tests/test-omnishell-toolchain.sh:21-22`, `:67-70`, `:80`, `:89`

**Interfaces:**
- Consumes: Task 1's config (modules that need 0.10.0).
- Produces: `OMNISHELL_MIN_VERSION="0.10.0"`; README floor wording is Task 3.

- [ ] **Step 1: Update the tests first.** In `test-omnishell-toolchain.sh` the stub "new omnishell" becomes 0.10.0 (`NEW_OMNISHELL`, its `echo`), the "current version" case uses a 0.10.0 stub and message `already installed (0.10.0`, the "too old" case uses `0.9.0` (the release just below the floor) and expects `below the minimum 0.10.0`, the "stuck" case expects `0.10.0` in the output. In `test-interactive.sh` the floor check expects `0.10.0` and the README check expects `omnishell 0.10.0 or newer`.

- [ ] **Step 2: Run to verify failure**

Run: `bash tests/test-omnishell-toolchain.sh; bash tests/test-interactive.sh`
Expected: the floor / upgrade checks FAIL, others pass.

- [ ] **Step 3: Set `OMNISHELL_MIN_VERSION="0.10.0"` in `bootstrap.sh`** and extend the comment above it by one clause: 0.10.0 adds the `navi`, `tealdeer`, `you-should-use` and `dynamic-completion` modules the default config enables.

- [ ] **Step 4: Run to verify the toolchain test passes**

Run: `bash tests/test-omnishell-toolchain.sh`
Expected: no `FAIL`. (`test-interactive.sh` still fails its README check until Task 3.)

- [ ] **Step 5: Commit**

```bash
git add bootstrap.sh tests/test-omnishell-toolchain.sh tests/test-interactive.sh
git commit -m "chore: require omnishell 0.10.0 for the new default modules"
```

### Task 3: Document the modules and the new floor

**Files:**
- Modify: `README.md` (layer table line 25, floor paragraph lines 31-41, bootstrap step 2 line 82 and step 6 line 86, "Modules" table around line 383)

**Interfaces:**
- Consumes: Task 1 (modules) and Task 2 (floor).
- Produces: README text matching both.

- [ ] **Step 1: The failing test already exists** (`the README names the 0.10.0 floor` in `tests/test-interactive.sh`, Task 2). Run it to confirm it fails.

Run: `bash tests/test-interactive.sh`
Expected: only the README floor check FAILs.

- [ ] **Step 2: Edit `README.md`:**
- Layer table: add `navi`, `tealdeer`, `you-should-use` and `dynamic-completion` to the omnishell rc-lines list.
- Floor paragraph: "omnishell 0.10.0 or newer is required" and add that before 0.10.0 there are no `navi`, `tealdeer`, `you-should-use` and `dynamic-completion` modules.
- Step 2: "upgrading it below 0.10.0". Step 6: list the new modules among those omnishell installs where relevant (`navi`, `tealdeer`, `you-should-use`).
- Modules table: add rows for the four modules (what it does; options: `navi` Ctrl+G, `you-should-use` zsh only, `dynamic-completion` bash only with `commands`). Add a one-line note under the table that `ble-sh` is not enabled because it conflicts with `fzf`, which `navi` needs.

- [ ] **Step 3: Run the full suite and lint**

Run: `make lint && make test`
Expected: lint clean, every test file ends without `FAIL`.

- [ ] **Step 4: Commit**

```bash
git add README.md
git commit -m "docs: document the new omnishell default modules and the 0.10.0 floor"
```
21 changes: 21 additions & 0 deletions omnishell/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ enabled = true
[modules.history.options]
size = 50000

# Interactive cheatsheet browser on Ctrl+G (omnishell >= 0.10.0). It uses fzf as its
# selector, so fzf must stay enabled. That is also why ble-sh (bash autosuggestions)
# is not enabled: omnishell rejects ble-sh together with fzf.
[modules.navi]
enabled = true

# `tldr` client: short, practical command examples instead of long man pages.
[modules.tealdeer]
enabled = true

# Reminds you of an existing alias when you type the long command (zsh only).
[modules.you-should-use]
enabled = true

# `complete -C` for CLIs that complete themselves (bash only). A command without a
# binary on PATH is skipped silently; `name=binary` names another completer.
[modules.dynamic-completion]
enabled = true
[modules.dynamic-completion.options]
commands = ["terraform", "vault", "aws=aws_completer", "mc"]

[modules.autosuggestions]
enabled = true

Expand Down
Loading
Loading