I have three shell aliases I use dozens of times a day:
alias j='just'
alias s='stree .'
alias z='zed .'
j runs just. s opens the current directory in Sourcetree. z opens it in Zed.
I wanted to know how much they've actually saved me, so I grepped 7 months of .zsh_history (Jan-Aug 2026, ~38.9k
commands) for exact alias invocations versus the spelled-out equivalents.
The numbers
| Alias | Expands to | Times used | Chars saved/use | Total chars saved |
|---|---|---|---|---|
j | just | 2,621 | 3 | 7,863 |
s | stree . | 2,364 | 6 | 14,184 |
z | zed . | 125 | 4 | 500 |
| Total | 5,110 | 22,547 |
I typed just in full 631 times (old habit, before the alias stuck), zed in full 88 times (usually
with a specific file, like zed foo.rs, which the alias can't help with), and stree in full exactly zero times.
s fully replaced it.
22,547 characters is about 4 printed pages of text over a few thousand terminal commands. At roughly 4 characters per token, that's about 5,600 tokens.
Somewhere, a .zshrc is crying
I checked whether Claude Code, Codex, or any of the other agent CLIs I use ever run j, s, or z
themselves. I pulled this from AgentsView's local session index: about 880k messages
across every AI CLI I've used. The answer is essentially never: one hit, in 30k+ Bash tool calls. Agent shells run
non-interactively, so .zshrc never gets sourced. The agent has no idea j means anything, so it always spells out
just build or git status in full.
So the savings above are entirely mine. My aliases only pay off for the human typing at the prompt.
Totally hypothetical token savings
I went back through the same AgentsView index, every Bash-style tool call across every AI CLI I use (Claude Code,
Codex, Amp, Gemini, Pi, Kimi), and counted how many times an agent ran the full command (just ..., zed ...,
stree ...) that a 1-character alias would have replaced.
| Full command | Alias | Times run by agents | Chars saved/use | Naive chars saved |
|---|---|---|---|---|
just | j | 1,716 | 3 | 5,148 |
zed | z | 2 | 4 | 4 |
stree | s | 0 | 6 | 0 |
| Total | 1,718 | 5,152 |
just is the one they actually run a lot: mostly just test, just format, just build. zed and stree open
GUI apps, so agents have almost no reason to touch them.
Most of the hits come from Claude Code (1,020) and Amp (434), with Codex, Pi, Kimi, and Gemini splitting the rest.
That's 5,152 characters, about 1,290 tokens at a rough 4-chars-per-token rate, across every agent session I've ever run. Not much.
