Convert Figma logo to code with AI

sorin-ionescu logoprezto

The configuration framework for Zsh

13,985
4,486
13,985
185

Top Related Projects

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

A Zsh theme

Fish-like autosuggestions for zsh

Fish shell like syntax highlighting for Zsh.

172,326

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

2,939

🌻 Flexible and fast ZSH plugin manager

Quick Overview

Prezto is a configuration framework for Zsh, the Z shell. It enriches the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes. Prezto aims to provide a fast, extensible, and elegant setup for Zsh without compromising usability.

Pros

  • Modular architecture allowing easy customization and extension
  • Comes with a rich set of pre-configured modules for common tasks
  • Faster startup time compared to some other Zsh frameworks
  • Active community and regular updates

Cons

  • Steeper learning curve for beginners compared to simpler Zsh setups
  • Some users may find the default configuration overwhelming
  • Potential conflicts with existing Zsh configurations
  • Requires manual updating (no built-in update mechanism)

Getting Started

  1. Clone the repository:

    git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
    
  2. Create configuration files:

    setopt EXTENDED_GLOB
    for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
      ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
    done
    
  3. Set Zsh as your default shell:

    chsh -s /bin/zsh
    
  4. Launch a new Zsh session to start using Prezto.

  5. Customize your setup by editing ~/.zpreztorc:

    nano ~/.zpreztorc
    

    Uncomment and modify the desired module lines to enable or disable features.

Competitor Comparisons

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

Pros of Oh My Zsh

  • Larger community and more extensive plugin ecosystem
  • Easier setup and configuration for beginners
  • More frequent updates and active development

Cons of Oh My Zsh

  • Slower startup time due to larger codebase
  • Can be overwhelming with numerous options and plugins
  • Less focus on performance optimization

Code Comparison

Oh My Zsh configuration example:

plugins=(git docker kubectl)
ZSH_THEME="robbyrussell"
source $ZSH/oh-my-zsh.sh

Prezto configuration example:

zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt'

Summary

Oh My Zsh offers a more extensive plugin ecosystem and easier setup for beginners, but may have slower performance due to its larger codebase. Prezto, on the other hand, focuses on speed and minimalism, providing a leaner configuration but with fewer built-in features and a smaller community. The choice between the two depends on individual preferences for customization, performance, and ease of use.

A Zsh theme

Pros of Powerlevel10k

  • Faster and more responsive than Prezto, especially on slower systems
  • Highly customizable with an easy-to-use configuration wizard
  • Supports instant prompt for faster shell startup

Cons of Powerlevel10k

  • Focused solely on prompt customization, while Prezto is a full Zsh framework
  • May require additional setup for non-prompt related features
  • Can be overwhelming for users who prefer a simpler prompt

Code Comparison

Prezto configuration (.zpreztorc):

zstyle ':prezto:module:prompt' theme 'sorin'
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt'

Powerlevel10k configuration (.p10k.zsh):

POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
  os_icon
  dir
  vcs
)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
  status
  command_execution_time
  background_jobs
)

Prezto provides a full Zsh framework with various modules, while Powerlevel10k focuses on creating a highly customizable and performant prompt. Prezto offers a more comprehensive solution for Zsh configuration, but Powerlevel10k excels in prompt customization and performance.

Fish-like autosuggestions for zsh

Pros of zsh-autosuggestions

  • Lightweight and focused on a single feature (autosuggestions)
  • Easy to integrate with existing Zsh configurations
  • Frequently updated and actively maintained

Cons of zsh-autosuggestions

  • Limited in scope compared to Prezto's comprehensive framework
  • Requires manual configuration for advanced features
  • May conflict with other Zsh plugins or configurations

Code Comparison

zsh-autosuggestions:

# Basic configuration
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'

Prezto:

# Enable modules
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt'

Summary

zsh-autosuggestions is a focused plugin that provides excellent autosuggestion functionality for Zsh. It's lightweight and easy to integrate but limited in scope. Prezto, on the other hand, is a comprehensive Zsh configuration framework that includes various modules and features, including autosuggestions. While Prezto offers a more complete solution, it may be overkill for users who only need specific features. The choice between the two depends on individual needs and preferences for Zsh customization.

Fish shell like syntax highlighting for Zsh.

Pros of zsh-syntax-highlighting

  • Focused solely on syntax highlighting, making it lightweight and easy to integrate
  • Provides real-time highlighting as you type, enhancing the interactive shell experience
  • Can be used alongside other Zsh frameworks or as a standalone plugin

Cons of zsh-syntax-highlighting

  • Limited in scope compared to Prezto's comprehensive feature set
  • Requires manual configuration for advanced customization
  • May have a slight performance impact on very long command lines

Code Comparison

zsh-syntax-highlighting:

source /path/to/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
ZSH_HIGHLIGHT_STYLES[command]='fg=blue,bold'

Prezto:

zstyle ':prezto:module:syntax-highlighting' color 'yes'
zstyle ':prezto:module:syntax-highlighting' highlighters \
  'main' 'brackets' 'pattern' 'cursor' 'root'
zstyle ':prezto:module:syntax-highlighting' styles \
  'command' 'fg=blue,bold'

zsh-syntax-highlighting offers a more straightforward setup for users who only need syntax highlighting, while Prezto provides a more comprehensive Zsh configuration framework that includes syntax highlighting along with many other features and modules.

172,326

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

Pros of Oh My Zsh

  • Larger community and more extensive plugin ecosystem
  • Easier setup and configuration for beginners
  • More frequent updates and active development

Cons of Oh My Zsh

  • Slower startup time due to larger codebase
  • Can be overwhelming with numerous options and plugins
  • Less focus on performance optimization

Code Comparison

Oh My Zsh configuration example:

plugins=(git docker kubectl)
ZSH_THEME="robbyrussell"
source $ZSH/oh-my-zsh.sh

Prezto configuration example:

zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt'

Summary

Oh My Zsh offers a more extensive plugin ecosystem and easier setup for beginners, but may have slower performance due to its larger codebase. Prezto, on the other hand, focuses on speed and minimalism, providing a leaner configuration but with fewer built-in features and a smaller community. The choice between the two depends on individual preferences for customization, performance, and ease of use.

2,939

🌻 Flexible and fast ZSH plugin manager

Pros of Zinit

  • Faster loading times and improved performance
  • More flexible and customizable plugin management
  • Supports a wider range of plugins and frameworks

Cons of Zinit

  • Steeper learning curve and more complex configuration
  • Less opinionated, requiring more user decisions
  • Potentially overwhelming for Zsh beginners

Code Comparison

Prezto configuration example:

zstyle ':prezto:*:*' color 'yes'
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt'

Zinit configuration example:

zinit light zsh-users/zsh-autosuggestions
zinit light zdharma-continuum/fast-syntax-highlighting
zinit ice depth=1; zinit light romkatv/powerlevel10k
zinit snippet OMZ::lib/history.zsh
zinit snippet OMZ::lib/key-bindings.zsh

Prezto offers a more structured and pre-configured setup, while Zinit provides greater flexibility and control over plugin loading. Prezto uses a module-based approach, whereas Zinit allows for more granular plugin management and loading optimizations. Both tools aim to enhance the Zsh experience, but cater to different user preferences and skill levels.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Prezto — Instantly Awesome Zsh

Prezto is the configuration framework for Zsh; it enriches the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes.

Installation

Manual

Prezto will work with any recent release of Zsh, but the minimum required version is 4.3.11.

  1. Launch Zsh:

    zsh
    
  2. Clone the repository:

    git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
    
    Optional: Installing in $XDG_CONFIG_HOME

    Optionally, if you already have $XDG_CONFIG_HOME configured (usually as $HOME/.config by default) and intend to install Prezto under $XDG_CONFIG_HOME/zsh instead, you can clone the repository there and configure $ZDOTDIR separately if not already configured.

    • Clone the repository:

      git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-${XDG_CONFIG_HOME:-$HOME/.config}/zsh}/.zprezto"
      
    • Configure $XDG_CONFIG_HOME and $ZDOTDIR in $HOME/.zshenv:

      export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
      [[ -d $XDG_CONFIG_HOME/zsh ]] && export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
      source "$ZDOTDIR/.zshenv"
      
  3. Create a new Zsh configuration by copying/linking the Zsh configuration files provided:

    setopt EXTENDED_GLOB
    for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
      ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
    done
    

    Note: If you already have any of the given configuration files, ln in the above operation will cause an error. In simple cases, you can load Prezto by adding the line source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" to the bottom of your ${ZDOTDIR:-$HOME}/.zshrc and keep the rest of your Zsh configuration intact. For more complicated setups, we recommend that you back up your original configs and replace them with the provided Prezto runcoms.

  4. Set Zsh as your default shell:

    chsh -s /bin/zsh
    
  5. Open a new Zsh terminal window or tab.

Troubleshooting

If you are not able to find certain commands after switching to Prezto, modify the PATH variable in ${ZDOTDIR:-$HOME}/.zprofile then open a new Zsh terminal window or tab.

Updating

Run zprezto-update to automatically check if there is an update to Prezto. If there are no file conflicts, Prezto and its submodules will be automatically updated. If there are conflicts you will be instructed to go into the $ZPREZTODIR directory and resolve them yourself.

To pull the latest changes and update submodules manually:

cd $ZPREZTODIR
git pull
git submodule sync --recursive
git submodule update --init --recursive

Usage

Prezto has many features disabled by default. Read the source code and the accompanying README files to learn about what is available.

Modules

  1. Browse modules to see what is available.
  2. Load the modules you need in ${ZDOTDIR:-$HOME}/.zpreztorc and then open a new Zsh terminal window or tab.

Themes

  1. For a list of themes, type prompt -l.

  2. To preview a theme, type prompt -p name.

  3. Load the theme you like in ${ZDOTDIR:-$HOME}/.zpreztorc and then open a new Zsh terminal window or tab.

    sorin theme Note that the git module may be required for special symbols to appear, such as those on the right of the above image. Add 'git' to the pmodule list (under zstyle ':prezto:load' pmodule \ in your ${ZDOTDIR:-$HOME}/.zpreztorc) to enable this module.

External Modules

  1. By default modules will be loaded from /modules and /contrib.

  2. Additional module directories can be added to the :prezto:load:pmodule-dirs setting in ${ZDOTDIR:-$HOME}/.zpreztorc.

    Note that module names need to be unique or they will cause an error when loading.

    zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
    

Customization

The project is managed via Git. We highly recommend that you fork this project so that you can commit your changes and push them to your fork on GitHub to preserve them. If you do not know how to use Git, follow this tutorial and bookmark this reference.

Resources

The Zsh Reference Card and the zsh-lovers man page are indispensable.

License

This project is licensed under the MIT License.