- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Fix unescaped space in pattern matching causing 'condition expected: "$typed"' - Use (@) flag when slicing ZSH_ROAST_NON_ENGLISH_MESSAGES array |
||
| tests | ||
| insult-zsh.plugin.zsh | ||
| README.md | ||
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_handlerand needs no external dependencies.
Installation
There are several ways to install the Insult ZSH plugin:
Using Oh My Zsh
-
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 -
Add
insult-zshto the plugins array in your.zshrcfile:plugins=(... insult-zsh) -
Restart your terminal or run
source ~/.zshrcto reload the configuration.
Using Antigen
-
Add the following line to your
.zshrcfile:antigen bundle MohamedElashri/insult-zsh -
Restart your terminal or run
source ~/.zshrcto reload the configuration.
Using Zinit
-
Add the following line to your
.zshrcfile:zinit light MohamedElashri/insult-zsh -
Restart your terminal or run
source ~/.zshrcto apply the changes.
Manual Installation
-
Clone the repository to a directory of your choice:
git clone https://github.com/MohamedElashri/insult-zsh.git /path/to/insult-zsh -
Add the following line to your
.zshrcfile:source /path/to/insult-zsh/insult-zsh.plugin.zsh -
Restart your terminal or run
source ~/.zshrcto 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!