A Zsh framework as nice as a cool summer breeze
Zsh is a wonderful shell, but out-of-the-box it needs a bit of a boost. That's where Zephyr comes in.
Zephyr combines some of the best functionality from Prezto, sprinkles in a bit from Oh-My-Zsh, and removes bloat, extra dependencies, and prioritizes speed and simplicity.
Zephyr can be thought of as a fast, lightweight set of independent Zsh plugins.
Combine Zephyr with a plugin manager and some awesome plugins and you'll have a powerful Zsh setup that rivals anything out there.
Zephyr allows you to take an a la carte approach to building your ideal Zsh configuration. Other Zsh frameworks are meant to be used wholesale and are not truly modular. Zephyr is different - each of its plugins works completely independently, and works well with modern Zsh plugin managers. Zephyr can be used in whole or in part, and works well with other popular plugins. Zephyr brings together core Zsh functionality - many not available elsewhere as standalone plugins - while favoring a build-your-own composable Zsh config through plugins.
Zephyr comes with an (optional) Starship prompt config.
If your plugin manager supports using sub-plugins, you can load Zephyr that way as well.
Antidote is one such plugin manager. You can load only the parts of Zephyr you need like so:
# .zsh_plugins.txt
# pick only the plugins you want and remove the rest
mattmc3/zephyr path:plugins/color
mattmc3/zephyr path:plugins/completion
mattmc3/zephyr path:plugins/confd
mattmc3/zephyr path:plugins/directory
mattmc3/zephyr path:plugins/editor
mattmc3/zephyr path:plugins/environment
mattmc3/zephyr path:plugins/history
mattmc3/zephyr path:plugins/homebrew
mattmc3/zephyr path:plugins/macos
mattmc3/zephyr path:plugins/prompt
mattmc3/zephyr path:plugins/utility
mattmc3/zephyr path:plugins/zfunctions
Add the following snippet to your .zshrc
:
# Clone Zephyr.
[[ -d ${ZDOTDIR:-~}/.zephyr ]] ||
git clone --depth=1 https://github.com/mattmc3/zephyr ${ZDOTDIR:-~}/.zephyr
# Use zstyle to specify which plugins you want. Order matters.
zephyr_plugins=(
zfunctions
directory
editor
history
)
zstyle ':zephyr:load' plugins $zephyr_plugins
# Source Zephyr.
source ${ZDOTDIR:-~}/.zephyr/zephyr.zsh
- color - Make terminal things more colorful
- completion - Load and initialize the built-in zsh completion system
- confd - Source conf.d like Fish
- directory - Set options and aliases related to the dirstack and filesystem
- editor - Override and fill in the gaps of the default keybinds
- environment - Define common environment variables
- history - Load and initialize the built-in zsh history system
- homebrew - Functionality for users of Homebrew
- macos - Functionality for macOS users
- prompt - Load and initialize the build-in zsh prompt system
- utility - Common shell utilities, aimed at making cross platform work less painful
- zfunctions - Lazy load functions dir like Fish
Q: Why don't you include programming language plugins (eg: Python, Ruby)? A: These kinds of plugins can be very opinionated, and are in need of lots of upkeep from maintainers that use those languages. Language plugins are already available via Oh-My-Zsh and Prezto, and can always be installed with a plugin manager that supports subplugins.
Q: Why don't you also include popular plugins the way Prezto does (eg: zsh-autosuggestions, zsh-completions)? A: These kinds of utilities are already available as standalone plugins. Zephyr aims to include only core Zsh functionality that you can't already easily get via a plugin manager, with a few exceptions for convenience. I have experimented with including submodules similar to Prezto, but was not happy with the result. Simpler is better.
Zephyr is a derivative work of the following great projects: