Skip to content
/ zsh-abbr Public

The zsh manager for auto-expanding abbreviations, inspired by fish. ~18,000 unique cloners as of July '24, 700+ Homebrew installs 7/23-7/24

License

Notifications You must be signed in to change notification settings

olets/zsh-abbr

Repository files navigation

zsh-abbr GitHub release (latest by date)

zsh-abbr is the zsh manager for auto-expanding abbreviations - text that when written in a terminal is replaced with other (typically longer) text. Inspired by fish shell.

For example, abbreviate git checkout as co (or even c or anything else). Type coSpace and the co turns into git checkout. Abbreviate git checkout main as cm. Type cmEnter and the cm turns into and runs git checkout main. Don't want an abbreviation to expand? Use CtrlSpace instead of Space, and ;Enter instead of Enter.

Why? Like aliases, abbreviations save keystrokes. Unlike aliases, abbreviations can leave you with a transparently understandable command history ready for using on a different computer or sharing with a colleague. And where aliases can let you forget the full command, abbreviations may help you learn the full command even as you type the shortened version.

Like zsh's alias, zsh-abbr supports "regular" (i.e. command-position) and "global" (anywhere on the line) abbreviations. It also supports interactive creation of persistent abbreviations which are immediately available in all terminal sessions. Abbreviations automatically sync to a file, ready for your dotfile management.

Run abbr help for documentation; if the package is installed with Homebrew, man abbr is also available.

Documentation

📖 See the guide at https://zsh-abbr.olets.dev/

v5 is a major release. It makes changes that will require some users to update their configurations. Details are in the migration guide.

Changelog

See the CHANGELOG file.

Roadmap

See the ROADMAP file.

Contributing

Looking for the documentation site's source? See https://github.com/olets/zsh-abbr-docs

Thanks for your interest. Contributions are welcome!

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Check the Issues to see if your topic has been discussed before or if it is being worked on. You may also want to check the roadmap (see above).

Please read CONTRIBUTING.md before opening a pull request.

The test suite uses zsh-test-runner v2.x. See tests/README.md for instructions on running the test suite.

Sponsoring