mattmc3 / zephyr

:wind_face: A Zsh framework as nice as a cool summer breeze
MIT License
128 stars 13 forks source link
zsh zsh-framework zsh-plugin zsh-plugins

:wind_face: Zephyr

A Zsh framework as nice as a cool summer breeze

Zsh is a wonderful shell, but out-of-the-box it needs a boost. That's where Zephyr comes in.

Zephyr combines some of the best parts from Prezto and other Zsh frameworks, removes bloat and dependencies, and prioritizes speed and simplicity.

Zephyr can be thought of as a fast, lightweight set of independent Zsh features, and is designed to be one of the first things you load to build your ideal Zsh config.

Combine Zephyr with a plugin manager and some awesome plugins and you'll have a powerful Zsh setup that rivals anything out there.

Project goals

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 independently, and are designed to pair well with a modern Zsh plugin manager like antidote. Zephyr can be used in whole or in part, and plays nice with other popular plugins. Zephyr brings together core Zsh functionality that typically is not available elsewhere as standalone plugins - while favoring a build-your-own composable Zsh config.

Prompt

Zephyr comes with an (optional) Starship prompt config.

Zephyr Prompt

Install

Using a Plugin manager

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

Manually

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

Plugins

Why don't you include...

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-history-substring-search)? \ 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.

Credits

Zephyr is a derivative work of the following great projects: