Writing a custom zsh completion function, end to end

A walkthrough of writing a zsh completion function for a small CLI — from an empty file to subcommand dispatch, contextual argument completion with help text, and dynamic completion driven by a command’s own output. The one subsystem that makes zsh worth the switch.

September 22, 2026 · 11 min · Omar Crosby

Zsh parameter expansion flags: the bash user's missing manual

A tour of zsh’s parameter expansion flags — the expressive superset of bash’s parameter expansion that most switching guides never mention. Case flags, split/join flags, indirect expansion, hash key/value extraction, and the csh-derived path modifiers, with the bash equivalent for each so the delta is concrete.

September 22, 2026 · 10 min · Omar Crosby

Zsh extended glob qualifiers: a language inside pathnames

A tour of zsh’s glob qualifiers — the small sublanguage attached to pathname expansion that filters, sorts, and slices matched files without a pipeline. File-type checks, time and size predicates, ordering, slicing, and the recursive globstar — with the equivalent bash + find one-liners for each so the win is concrete.

September 22, 2026 · 10 min · Omar Crosby

Zsh is worth switching to for two features and one subsystem

The case for zsh over bash — and fish, and framework distributions — narrowed to the three parts of the shell that actually earn the switch: extended glob qualifiers, parameter expansion flags, and the completion system. Everything else is bash-plus-plugins.

September 22, 2026 · 11 min · Omar Crosby

Reducing your Claude token bill without giving up capability

You open Claude, ask a question, and see an answer. That is the entire mental model most people have of a token bill. What is invisible on that same turn is that the session has already loaded a system prompt, whatever memory files apply, the tool definitions, the last few tool results, and — if you asked Claude to read a file — the file too. Add fifty turns and a couple of re-reads to fix a mistake, and the same conversation that felt like ten questions is closer to a hundred pages of input the model is re-processing every time you hit enter. ...

September 15, 2026 · 13 min · Omar Crosby