Friday fun: my .zshrc has more aliases than I have memory
I opened my .zshrc the other day for the first time in maybe six months. Not to fix something, just curious. The file was two hundred lines long.
Two hundred lines of aliases, functions, exports, and one commented-out block that I think was related to a Raspberry Pi project I abandoned in 2022. I do not own a Raspberry Pi anymore.
The archaeology of a config file
There is something weirdly personal about a .zshrc. It’s a history of every tool you were excited about, every workflow you tried to optimise, every phase of your career. Looking at mine was like reading old journal entries.
I found an alias that opens a directory I haven’t visited in three years. A function that formats AWS CLI output into a table - I was on a Vonage project in 2020 that used AWS for something I can no longer remember. An export for a Java home path from before I realised I never actually write Java and just kept the JDK installed in case.
The aliases were the most revealing. alias dc="docker-compose" from 2019, back when I thought compose was the Docker command I would use most. I don’t use compose anymore. I probably should delete that line. I won’t.
The ones that survived
Some aliases made it through every clean-up though. These are the ones that earned their keep:
# this one I use every single day without thinking
alias gs="git status"
# pipe anything into this and get a quick transcript
alias stt="dg listen --output json | jq '.results.channels[0].alternatives[0].transcript'"
# the one that looks ridiculous but saves ten keystrokes daily
alias ..="cd .."
The dg one is my favourite. It pipes audio straight through the Deepgram CLI and gives me a transcript in the terminal. I added it the week the CLI launched and it’s never left. That’s maybe the test of a good alias: you forget it exists until you switch machines and immediately notice it’s missing.
What stayed after the clean-up
I deleted about forty lines. The things that went were the aliases for tools I no longer use, the exports for paths that don’t exist anymore, and the commented-out experimental config I was never coming back to.
What stayed was about half the file. The core muscle memory stuff. Git shorthand, a few transcription pipelines, and some functions that I genuinely would not know how to do without looking up the flags.
I feel lighter. Not dramatically so. Just a little bit. Opening zsh now feels like opening a tidy desk, not a junk drawer.
Maybe that’s the real value of a dotfiles clean-up. It doesn’t save you time day to day. But it removes the low-grade background noise of knowing your config file is a mess. And that noise matters more than you think.
FAQ
How often should I clean up my .zshrc?
When you open it and the first thought is “what is all this.” About once a year for most people. More often if you switch jobs or toolsets frequently.
What should I definitely keep in my dotfiles?
Git aliases, shell navigation shortcuts, and any pipe you run more than once a week through a tool specific to your work. For voice AI work, that means transcription and TTS wrappers.
Is a long .zshrc a problem?
Not inherently. A long config file full of things you use is fine. A long config file full of things you forgot about is debt. The length is not the issue. It is whether each line earns its place.