An Alfred workflow for macOS: type al + a few
letters to fuzzy-search your real shell aliases, hit Enter, and it runs —
for real, in your real shell — with no Terminal window popping open.
- ✅ Fuzzy-searches aliases defined in
~/.bash_aliases,~/.bashrc,~/.bash_profile,~/.zshrc,~/.zsh_aliases, and~/.profile ▶️ Runs the alias by sourcing your real zsh config andeval-ing it — no regex-reconstruction of what the alias "probably" does, no Terminal window- 🔔 Native notification reports success/failure and the exit code
- 📄 If the command produced output, it's shown in a text view (⌘C to copy)
- ⌃⏎ Copy the alias's underlying bash command to the clipboard instead of running it
- ⌥⏎ Copy the alias name itself to the clipboard
Download Bash Aliases.alfredworkflow and double-click it to import into
Alfred.
Type al (with a trailing space) then start typing an alias name to
fuzzy-search it.
- ↩ Run the alias for real (sources your zsh config files, then
evals it). - ⌃↩ Copy the alias's command to the clipboard.
- ⌥↩ Copy the alias name to the clipboard.
This workflow's info.plist is generated, not hand-edited — Alfred's plist
XML is error-prone to write by hand, so build.py builds it with
plistlib and zips it into the .alfredworkflow bundle.
python3 build.pyThis regenerates Bash Aliases.alfredworkflow in the project root. Open it
(e.g. open "Bash Aliases.alfredworkflow") to trigger Alfred's import dialog
and update your installed copy.
See CONTEXT.md for the full architecture writeup, the plist
object graph, and known-fixed bugs worth not reintroducing.
notificator(native notification helper) and the referenceRun Commandpattern this workflow's execution step is adapted from are by Vítor Galvão, MIT licensed. Seereference-run-aliases-workflow.zipfor the original (source).
MIT — see LICENSE.