I have three one-letter aliases in my .zshrc:
alias j='just'
alias s='stree .'
alias z='zed .'
j runs just, s opens the current directory in Sourcetree, and z opens it in Zed.
I use them all day, and I got curious how many characters they've saved me. So I grepped my .zsh_history from January
to August 2026 (about 38.9k commands) and counted each alias against its spelled-out version.
My shell history
| 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 |
s wins even though j gets used more, because it replaces six characters instead of three.
I still typed just in full 631 times, mostly from before the alias became muscle memory. zed shows up in full 88
times, usually with a file argument like zed foo.rs, which z doesn't cover. stree in full: zero times.
22,547 characters is roughly four printed pages. At about 4 characters per token, it's around 5,600 tokens.
Agents don't use them
I also wanted to know if Claude Code, Codex and the other agent CLIs ever use these aliases. I checked with
AgentsView, which keeps a local index of every AI CLI session I've run, about 880k messages in
total. Out of 30k+ Bash tool calls, one used j, s or z.
That makes sense. Agent shells run non-interactively, so .zshrc never gets loaded and the aliases don't exist. The
agent types just build in full every time.
The only time an agent sees s is when I run it myself with ! s inside Claude Code. It has no idea what that means,
and since v2.1.186 it replies to it anyway. I had Claude dig into why.
If they did
Out of curiosity I counted how often agents ran the full commands, across Claude Code, Codex, Amp, Gemini, Pi and Kimi:
| 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 |
Nearly all of it is just: just test, just format, just build. zed and stree open GUI apps, so agents have
little reason to run them. Claude Code accounts for 1,020 of the just calls and Amp for 434, with the rest spread over
Codex, Pi, Kimi and Gemini.
5,152 characters works out to about 1,290 tokens across every agent session I've ever run, so aliases wouldn't do much for them anyway.
