https://github.com/mrz07/multi-zsh
A micro framework to run the same zsh configuration on multiple operating systems
https://github.com/mrz07/multi-zsh
bash bash-profile zsh zsh-configuration zsh-plugin zsh-profile zsh-prompt zshell zshrc
Last synced: 7 months ago
JSON representation
A micro framework to run the same zsh configuration on multiple operating systems
- Host: GitHub
- URL: https://github.com/mrz07/multi-zsh
- Owner: MRZ07
- Created: 2022-03-31T22:27:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-06T13:00:59.000Z (8 months ago)
- Last Synced: 2025-03-10T22:59:07.549Z (7 months ago)
- Topics: bash, bash-profile, zsh, zsh-configuration, zsh-plugin, zsh-profile, zsh-prompt, zshell, zshrc
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-ZSH: The Ultimate Cross-Platform ZSH Configuration Framework
## π Introduction
**Multi-ZSH** is a powerful, lightweight, and flexible framework that enables you to maintain a single, unified ZSH configuration across **Linux, macOS, and Windows**. Designed for developers, system administrators, and power users, Multi-ZSH ensures a **consistent shell experience** across all operating systems.
## π₯ Why Choose Multi-ZSH?
- β **Seamless Cross-Platform Support**: Works flawlessly on **Linux, macOS, and Windows**.
- β **Portable & Unified ZSH Configuration**: Manage all your shell settings from one place.
- β **Customizable & Modular**: Use preloaded configurations and extend functionality with custom modules.
- β **Compatible with All ZSH Frameworks**: Supports **Oh-My-Zsh, Prezto, Antigen, and Zim**.
- β **Lightweight & Fast**: Minimal dependencies, designed for performance.
- β **Effortless Synchronization**: Easily sync your settings via **Git, Dropbox, or cloud services**.
- β **Automated Setup**: Quickly set up using the provided **symlink script**.## ποΈ Directory Structure
```
multi-zsh/
βββ README.md # Documentation
βββ run-to-symlink.sh # Setup script to symlink .zshrc
βββ .zshrc # Main ZSH configuration file
βββ preload_configs/ # OS-specific preloaded configurations
β βββ common/ # Shared configurations
β βββ linux/ # Linux-specific configs
β β βββ path.sh # Linux-specific path configurations
β βββ macos/ # macOS-specific modules
β β βββ path.sh # macOS-specific path configurations
β βββ windows/ # Windows-specific configs
β β βββ path.sh # Windows-specific path configurations
βββ modules/ # Custom modules (aliases, functions, etc.)
β βββ common/ # Cross-platform modules
β βββ linux/ # Linux-specific modules
β βββ macos/ # macOS-specific modules
β βββ windows/ # Windows-specific modules
```## π¦ Installation & Setup
### 1οΈβ£ Clone the Repository
```bash
git clone https://github.com/yourusername/mrz07-multi-zsh.git
```### 2οΈβ£ Move Your Existing ZSH Configuration
Move your existing `.zshrc` file to the frameworkβs root folder### 3οΈβ£ Run the Setup Script
```bash
./run-to-symlink.sh
```
This script will create a **symlink** to the recently moved configuration in the frameworkβs root folder.### 4οΈβ£ Customize Your Configuration
- Add **OS-specific** preloaded configs in `preload_configs/`
- Add **OS-specific** Environment/Path configs in `preload_configs/*os*/path.sh"`
- Extend functionality with **custom modules** in `modules/`## βοΈ How Multi-ZSH Works
### **1οΈβ£ Dynamic Configuration Loading**
Multi-ZSH **automatically detects your operating system** and loads the appropriate configurations.- **Common settings** (`preload_configs/common/`) are loaded first.
- **OS-specific settings** (`preload_configs/linux/`, `macos/`, `windows/`) are applied afterward.### **2οΈβ£ Modular Architecture**
- Store **custom functions, aliases, and scripts** in `modules/`.
- Modules are categorized into **common** and **OS-specific** folders.
- Ignore specific modules or configurations by **prefixing folder names with `#`** (e.g., `#ignored_module/`).### **3οΈβ£ Symlink-Based Setup**
- The **setup script** (`run-to-symlink.sh`) automatically links `.zshrc` to the framework.
- This allows **easy switching** between configurations without modifying system files.## π― Key Features
### π **Cross-Platform Compatibility**
- Works seamlessly on **Linux, macOS, and Windows (WSL, Git Bash, Cygwin, MSYS2)**.### π **Auto-Loading of Preloaded Configurations**
- Automatically loads common and OS-specific **aliases, functions, and environment variables**.### π¨ **Custom Modules & Plugins Support**
- Organize your scripts with a modular structure.
- Supports **any additional ZSH plugins or external tools**.### ποΈ **Optimized for Speed & Performance**
- **Lightweight** with minimal overhead.
- **Fast execution** with optimized loading logic.### βοΈ **Sync Anywhere**
- Easily sync configurations across devices using **Git, Dropbox, or cloud services**.### π οΈ **Works with Any ZSH Framework**
- Compatible with **Oh-My-Zsh, Prezto, Antigen, Zim, and more**.### π§© **Fully Customizable**
- Add, remove, or modify configurations as needed.
- Ignore specific scripts or modules by naming them with `#`.## π οΈ Usage
### **Adding Custom Modules**
Place your custom ZSH scripts inside the corresponding **modules/** folder:```bash
modules/
βββ common/
β βββ aliases.sh # Shared aliases
β βββ functions.sh # Shared functions
β βββ style/
β β βββ starship.toml # Custom Starship prompt config
βββ linux/
β βββ linux_aliases.sh # Linux-specific aliases
βββ macos/
β βββ macos_shortcuts.sh # macOS-specific functions
βββ windows/
β βββ win_helpers.sh # Windows-specific helpers
```### **Ignoring Folders & Scripts**
To prevent specific scripts from being loaded, **prefix the filename or folder with `#`**:```bash
modules/
βββ common/
β βββ aliases.sh
β βββ #deprecated_aliases.sh # This file will be ignored
β βββ #old_scripts/ # This folder will be ignored
```## π€ Contributing
We welcome contributions! Feel free to submit issues, feature requests, or pull requests.## π License
Multi-ZSH is open-source and available under the **MIT License**.---
π₯ **Start using Multi-ZSH today and streamline your ZSH configuration across all platforms!** π