Skip to content

mohdismailmatasin/zsh-plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ZSH Plugins

A modern, fast, and optimized collection of essential ZSH enhancements that provides:

  • Syntax highlighting
  • Auto-suggestions
  • History substring search
  • Advanced tab completion

Features

Performance Optimized

  • Async loading for faster startup
  • Intelligent caching system
  • Adaptive performance modes (auto/high/medium/low)
  • Lazy initialization of components

🔧 Easy to Use

  • Simple installation via install script
  • Zero configuration needed (works out of the box)
  • Comprehensive status and diagnostic tools
  • Easy update mechanism

🛡️ Robust & Reliable

  • Component health monitoring
  • Graceful degradation if components fail
  • Automatic performance mode detection
  • Comprehensive error handling

Components

  1. History Substring Search - Search through command history with partial matches
  2. Auto Suggestions - Fish-like autosuggestions based on history and completions
  3. Auto Completion - Enhanced tab completion with intelligent matching
  4. Syntax Highlighting - Real-time syntax highlighting for better readability

Installation

Quick Install

# Clone the repository
git clone https://github.com/yourusername/zsh-plugins.git

# Install the plugins
cd zsh-plugins
./install.sh

Manual Installation

If you prefer to install manually:

# Clone or copy the zsh-plugins directory to your preferred location
# Add this to your .zshrc file:
source /path/to/zsh-plugins/zsh-plugins/zsh-plugins.plugin.zsh

# Add zsh-plugins to your plugins array if using Oh My Zsh:
# plugins=(... zsh-plugins)

Usage

After installation, the plugins will be automatically loaded when you start a new shell session.

Available Commands

Command Description
zsh-plugins-status Shows loaded components and performance metrics
zsh-plugins-reload Reloads all plugin components
zsh-plugins-benchmark Runs a performance benchmark
zsh-plugins-help Shows detailed help and configuration options
zsh-plugins-doctor Runs system health check and diagnostics
zsh-plugins-update Updates plugins from git repository
zsh-plugins-stats Shows detailed performance statistics

Configuration

You can customize the behavior by setting environment variables in your .zshrc before loading the plugins:

# Performance mode: auto|high|medium|low (default: auto)
export ZSH_PLUGINS_PERFORMANCE_MODE=high

# Enable debug mode (default: false)
export ZSH_PLUGINS_DEBUG=true

# Enable lazy loading (default: false)
export ZSH_PLUGINS_LAZY_LOAD=true

# Enable async loading (default: true)
export ZSH_PLUGINS_ASYNC_LOAD=true

# Show progress during loading (default: true)
export ZSH_PLUGINS_SHOW_PROGRESS=false

# Custom cache directory
export ZSH_PLUGINS_CACHE_DIR="$HOME/.cache/zsh-plugins"

Performance Modes

The plugin automatically detects your system capabilities and selects an appropriate performance mode:

  • High: For powerful systems (4+ CPU cores, 4GB+ RAM, low load)
  • Medium: For mid-range systems (2+ CPU cores, 2GB+ RAM)
  • Low: For limited systems or when conservative resource usage is preferred
  • Auto: Automatic detection based on system capabilities (default)

Each mode adjusts internal settings like buffer sizes and async behavior for optimal performance.

Troubleshooting

If you encounter issues:

  1. Run zsh-plugins-doctor for a comprehensive health check
  2. Check that all component files exist in their respective directories
  3. Ensure you're using ZSH version 5.0 or newer
  4. Try reloading with zsh-plugins-reload
  5. For update issues, check your git connectivity and permissions

License

This project is licensed under the MIT License - see the zsh-plugins/LICENSE file for details.

Credits

This plugin combines and enhances several popular ZSH plugins:

  • zsh-autosuggestions
  • zsh-syntax-highlighting
  • zsh-history-substring-search
  • zsh-autocomplete

Special thanks to the original authors of these projects.

About

A modern, fast, and optimized collection of essential ZSH

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages