zsh extension to output an insult to the user if they write wrong command
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
MohamedElashri 3afcbd2973
Fix condition syntax error and array slicing for non-English roasts
- Fix unescaped space in pattern matching causing 'condition expected: "$typed"'

- Use (@) flag when slicing ZSH_ROAST_NON_ENGLISH_MESSAGES array
2026-11-01 13:17:38 +01:00
tests Add a shared English roast pool for non-English commands (#1) 2026-10-21 17:02:20 +02:00
insult-zsh.plugin.zsh Fix condition syntax error and array slicing for non-English roasts 2026-11-01 13:17:38 +01:00
README.md Delete non-English command roasts section 2026-10-25 01:51:43 +02:00

Insult ZSH Plugin

Insult ZSH is a fun and entertaining plugin for ZSH that displays random insults in your terminal. It adds a touch of humor to your command-line experience.

Features

  • Displays configurable roasts when Zsh cannot find a command.
  • Provides context-aware messages, typo suggestions, and a shared English-language roast pool for non-English commands.
  • Preserves an existing command_not_found_handler and needs no external dependencies.

Installation

There are several ways to install the Insult ZSH plugin:

Using Oh My Zsh

  1. Clone the repository into your Oh My Zsh custom plugins directory:

    git clone https://github.com/MohamedElashri/insult-zsh.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/insult-zsh
    
  2. Add insult-zsh to the plugins array in your .zshrc file:

    plugins=(... insult-zsh)
    
  3. Restart your terminal or run source ~/.zshrc to reload the configuration.

Using Antigen

  1. Add the following line to your .zshrc file:

    antigen bundle MohamedElashri/insult-zsh
    
  2. Restart your terminal or run source ~/.zshrc to reload the configuration.

Using Zinit

  1. Add the following line to your .zshrc file:

    zinit light MohamedElashri/insult-zsh
    
  2. Restart your terminal or run source ~/.zshrc to apply the changes.

Manual Installation

  1. Clone the repository to a directory of your choice:

    git clone https://github.com/MohamedElashri/insult-zsh.git /path/to/insult-zsh
    
  2. Add the following line to your .zshrc file:

    source /path/to/insult-zsh/insult-zsh.plugin.zsh
    
  3. Restart your terminal or run source ~/.zshrc to reload the configuration.

Usage

Once installed, the plugin responds when you enter a command that cannot be found, for example gti instead of git. It does not display a roast merely from opening a terminal, nor does it provide an insult command.

Customization

If you want to add your own insults or modify the existing ones, you can edit the insult-zsh.plugin.zsh file. The messages are stored in ZSH_ROAST_* arrays. Feel free to add, remove, or customize the insults to your liking.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or new insults to add, please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

Disclaimer

Please note that the insults provided by this plugin are intended for humorous purposes only. Use them responsibly and ensure that they align with your workplace or environment's code of conduct.

Enjoy the fun and laughter that Insult ZSH brings to your terminal!