https://github.com/remcostoeten/my-shell-setup
My personal "architecture" for my shell enviorment wether it's .bashrc or .zshrc. Trying to maintain a scalable, modular and easy to navigate/understand flow.
https://github.com/remcostoeten/my-shell-setup
bash bashrc config modules shell shell-script
Last synced: 7 months ago
JSON representation
My personal "architecture" for my shell enviorment wether it's .bashrc or .zshrc. Trying to maintain a scalable, modular and easy to navigate/understand flow.
- Host: GitHub
- URL: https://github.com/remcostoeten/my-shell-setup
- Owner: remcostoeten
- Created: 2024-09-03T19:19:05.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-12-14T19:18:38.000Z (7 months ago)
- Last Synced: 2024-12-14T19:25:34.710Z (7 months ago)
- Topics: bash, bashrc, config, modules, shell, shell-script
- Language: Shell
- Homepage:
- Size: 80.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## ZSH Configuration Help Script

This script provides a comprehensive help system for your ZSH configuration. It includes functions for displaying general help, task help, search help, category-specific help, listing all commands, and searching for specific commands.
### Features
- Colorful output for better readability
- Multiple help categories
- Search functionality for commands and aliases
- Easy to extend and customize### Installation
Save the script as `_zsh-help-menu.sh` in your ZSH setup directory (e.g., `~/projects/zsh-setup/initialize/`).
Make the script executable:
```bash
chmod +x ~/projects/zsh-setup/initialize/_zsh-help-menu.sh
```Source the script in your `.zshrc` file:
```bash
source ~/projects/zsh-setup/initialize/_zsh-help-menu.sh
```### Usage
After installation, you can use the `zshhelp` command to access the help menu:
```bash
zshhelp
```For specific help topics:
```bash
zshhelp --category git
zshhelp search
zshhelp task
```### Script Overview
Here's a brief overview of the main components of the script:
```bash
#!/usr/bin/env zsh# Color definitions using tput
if [ -t 1 ]; then
COLOR_RESET=$(tput sgr0)
COLOR_BOLD=$(tput bold)
# ... (other color definitions)
fi# Function to display general help menu
display_help_menu() {
echo "${COLOR_BOLD}${COLOR_BLUE}╔════════════════════════════════════════════════════════════════╗${COLOR_RESET}"
echo "${COLOR_BOLD}${COLOR_BLUE}║ ZSH Configuration Help ║${COLOR_RESET}"
echo "${COLOR_BOLD}${COLOR_BLUE}╚════════════════════════════════════════════════════════════════╝${COLOR_RESET}"
# ... (help menu content)
}# Main zsh_help function
zsh_help() {
case $1 in
--category)
display_category_help $2
;;
# ... (other cases)
esac
}# Define the zshhelp function
zshhelp() {
if [ $# -eq 0 ]; then
zsh_help --help
else
zsh_help "$@"
fi
}
```### Customization
You can easily extend this script by adding new categories or modifying existing ones. Simply update the `display_help_menu()` function and add corresponding case statements in the `zsh_help()` function.
### Contributing
Feel free to fork this repository and submit pull requests for any enhancements or bug fixes.
### License
This project is open source and available under the MIT License.
### Author
Created by Remco Stoeten (@remcostoeten)
Last updated: 2024-07-28For more information, visit [https://github.com/remcostoeten/my-shell-setup](https://github.com/remcostoeten/my-shell-setup)