Convert Figma logo to code with AI

zsh-users logozsh-completions

Additional completion definitions for Zsh.

6,952
714
6,952
42

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.

13,985

The configuration framework for Zsh

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.

Fish-like autosuggestions for zsh

Fish shell like syntax highlighting for Zsh.

A Zsh theme

Quick Overview

zsh-users/zsh-completions is a collection of additional completion definitions for Zsh, the popular Unix shell. It aims to enhance the command-line experience by providing more comprehensive and up-to-date completions for various commands and tools that are not included in the standard Zsh distribution.

Pros

  • Extends Zsh's built-in completion system with a wide range of additional completions
  • Regularly updated to include new commands and options for existing tools
  • Easy to install and integrate with popular Zsh frameworks like Oh My Zsh or Antigen
  • Community-driven project with contributions from many developers

Cons

  • May conflict with existing completions or custom configurations
  • Some completions might be outdated if not regularly maintained
  • Can potentially slow down shell startup time if too many completions are loaded
  • Requires manual updates to get the latest completions

Getting Started

To use zsh-users/zsh-completions, follow these steps:

  1. Clone the repository:

    git clone https://github.com/zsh-users/zsh-completions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-completions
    
  2. Add the plugin to your .zshrc file:

    plugins=(... zsh-completions)
    
  3. Add the following line to your .zshrc file before the compinit function is called:

    autoload -U compinit && compinit
    
  4. Restart your Zsh session or run source ~/.zshrc to apply the changes.

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

  • Comprehensive framework with a large collection of plugins and themes
  • Easy to set up and configure for beginners
  • Active community and frequent updates

Cons of Oh My Zsh

  • Can be slower to load due to its extensive feature set
  • May include unnecessary features for some users
  • Potential conflicts with existing Zsh configurations

Code Comparison

Oh My Zsh (plugin loading):

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

zsh-completions (manual setup):

fpath=(path/to/zsh-completions/src $fpath)
autoload -U compinit && compinit

Summary

Oh My Zsh is a full-featured Zsh framework that provides a wide range of plugins, themes, and configurations out of the box. It's ideal for users who want a pre-configured, feature-rich Zsh environment with minimal setup.

zsh-completions, on the other hand, focuses solely on providing additional completion definitions for various commands and tools. It's more lightweight and can be easily integrated into existing Zsh setups without the overhead of a full framework.

Choose Oh My Zsh for a comprehensive, ready-to-use Zsh environment, or opt for zsh-completions if you prefer a minimal approach and only need enhanced command completions in your existing Zsh configuration.

13,985

The configuration framework for Zsh

Pros of prezto

  • Comprehensive Zsh configuration framework with modules for various functionalities
  • Includes themes and prompt customization options out of the box
  • Offers a more complete Zsh environment setup beyond just completions

Cons of prezto

  • Larger and more complex, potentially slower to load than zsh-completions
  • May include unnecessary features for users who only need completions
  • Requires more configuration and setup compared to zsh-completions

Code comparison

zsh-completions:

fpath=(path/to/zsh-completions/src $fpath)
autoload -U compinit
compinit

prezto:

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

prezto offers a more comprehensive setup, while zsh-completions focuses solely on adding completion definitions to the Zsh environment. prezto requires symlinking configuration files, whereas zsh-completions only needs to be added to the fpath and initialized with compinit.

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.

Pros of zsh-autocomplete

  • Provides real-time, as-you-type autocompletion
  • Offers more intelligent and context-aware suggestions
  • Includes built-in syntax highlighting for better readability

Cons of zsh-autocomplete

  • May have a steeper learning curve for new users
  • Can potentially slow down terminal performance on older systems
  • Requires more configuration to customize behavior

Code Comparison

zsh-completions:

compdef _git git-flow
zstyle ':completion:*:*:git:*' user-commands flow:'description for git-flow'

zsh-autocomplete:

zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:*' widget-style menu-select
bindkey '\t' menu-select

zsh-completions focuses on providing additional completion definitions for various commands and tools, while zsh-autocomplete aims to enhance the overall autocompletion experience with real-time suggestions and more advanced features. zsh-completions is generally easier to set up and use out of the box, but zsh-autocomplete offers a more dynamic and interactive completion system for users willing to invest time in configuration and customization.

Fish-like autosuggestions for zsh

Pros of zsh-autosuggestions

  • Provides real-time suggestions based on command history
  • Offers a more interactive and intuitive command-line experience
  • Can significantly speed up typing common or long commands

Cons of zsh-autosuggestions

  • May slow down terminal performance on older systems
  • Can be distracting for users who prefer a clean command-line interface
  • Limited to suggesting based on history, not offering new completions

Code comparison

zsh-autosuggestions:

# Enable autosuggestions
source /path/to/zsh-autosuggestions.zsh

# Customize suggestion color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'

zsh-completions:

# Add zsh-completions to fpath
fpath=(/path/to/zsh-completions/src $fpath)

# Initialize completions
autoload -U compinit && compinit

zsh-autosuggestions focuses on providing instant suggestions based on command history, enhancing typing speed and efficiency. It's particularly useful for users who frequently repeat commands. On the other hand, zsh-completions offers a broader range of completions for various commands and tools, improving overall command-line functionality. While zsh-autosuggestions may impact performance on slower systems, zsh-completions generally has minimal performance overhead. Both plugins can be used together to create a more powerful and user-friendly command-line experience in Zsh.

Fish shell like syntax highlighting for Zsh.

Pros of zsh-syntax-highlighting

  • Enhances command-line readability with real-time syntax highlighting
  • Helps identify syntax errors and typos as you type
  • Improves overall shell experience with visual cues

Cons of zsh-syntax-highlighting

  • May slightly impact performance, especially on slower systems
  • Requires additional configuration for optimal customization
  • Limited to syntax highlighting, doesn't provide completion functionality

Code comparison

zsh-syntax-highlighting:

ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
ZSH_HIGHLIGHT_STYLES[command]='fg=blue,bold'
ZSH_HIGHLIGHT_STYLES[alias]='fg=magenta,bold'

zsh-completions:

fpath=(path/to/zsh-completions/src $fpath)
autoload -U compinit && compinit

Summary

zsh-syntax-highlighting focuses on enhancing the visual experience of the command line by providing real-time syntax highlighting. It helps users identify errors and improves overall readability. On the other hand, zsh-completions is dedicated to expanding Zsh's tab completion capabilities, offering a wider range of completion options for various commands and tools. While zsh-syntax-highlighting may have a slight performance impact, zsh-completions primarily affects the completion functionality without visual enhancements. Both plugins complement each other and can be used together to create a more powerful and user-friendly Zsh environment.

A Zsh theme

Pros of powerlevel10k

  • Highly customizable and feature-rich prompt theme for Zsh
  • Fast and efficient, with instant prompt feature for quicker shell startup
  • Extensive configuration options and easy setup wizard

Cons of powerlevel10k

  • Focused solely on prompt customization, not shell completions
  • May require additional configuration for optimal performance
  • Can be overwhelming for users who prefer simpler prompts

Code comparison

powerlevel10k:

source ~/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

zsh-completions:

fpath=(path/to/zsh-completions/src $fpath)

autoload -U compinit
compinit

Summary

powerlevel10k is a powerful Zsh theme that offers extensive customization options for your prompt, while zsh-completions focuses on providing additional completion definitions for various commands. powerlevel10k excels in creating visually appealing and informative prompts, but it doesn't address shell completions. zsh-completions, on the other hand, enhances the Zsh completion system without modifying the prompt appearance. Users often combine both projects to achieve a fully customized Zsh environment with both an attractive prompt and comprehensive command completions.

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

zsh-completions GitHub release GitHub contributors IRC Gitter

Additional completion definitions for Zsh.

This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.

Usage

Using packages

SystemPackage
Debian / Ubuntuzsh-completions OBS repository
Fedora / CentOS / RHEL / Scientific Linuxzsh-completions OBS repository
OpenSUSE / SLEzsh-completions OBS repository
Arch Linux / Manjaro / Antergos / Hyperbolazsh-completions, zsh-completions-git
Gentoo / Funtooapp-shells/zsh-completions
NixOSzsh-completions
Void Linuxzsh-completions
SlackwareSlackbuilds
macOShomebrew, MacPorts
NetBSDpkgsrc
FreeBSDshells/zsh-completions

Using zsh frameworks

antigen

Add antigen bundle zsh-users/zsh-completions to your ~/.zshrc.

oh-my-zsh

  • Clone the repository inside your oh-my-zsh repo:

      git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
    
  • Add it to FPATH in your .zshrc by adding the following line before source "$ZSH/oh-my-zsh.sh":

      fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
    

Note: adding it as a regular Oh My ZSH! plugin will not work properly (see #603).

zinit

Add zinit light zsh-users/zsh-completions to your ~/.zshrc.

Manual installation

  • Clone the repository:

      git clone https://github.com/zsh-users/zsh-completions.git
    
  • Include the directory in your $fpath, for example by adding in ~/.zshrc:

      fpath=(path/to/zsh-completions/src $fpath)
    
  • You may have to force rebuild zcompdump:

      rm -f ~/.zcompdump; compinit
    

Contributing

Contributions are welcome, see CONTRIBUTING.

License

Completions use the Zsh license, unless explicitly mentioned in the file header. See LICENSE for more information.