ShellX Shell Compatibility Guide
March 26, 2026 · View on GitHub
Overview
ShellX is designed to work with Bash 4.0+, Zsh 4.0+, and Fish 3.2+. Bash and Zsh are natively supported. Fish Shell is supported via a dedicated shellx.fish bootstrap file.
Supported Shells
✅ Bash 4.0 or Higher
- Full support for all ShellX features
- Required for plugin management, arrays, and advanced configurations
- Installation: Available by default on most Linux systems; on macOS use
brew install bash
✅ Zsh 4.0 or Higher
- Full support for all ShellX features
- Required for plugin management, arrays, and advanced configurations
- Installation: Available by default on modern macOS; on Linux:
apt install zshor equivalent
✅ Fish 3.2 or Higher
- Supported via
shellx.fish— do not sourceshellx.shdirectly - Two modes depending on whether
bassis installed:- Full mode (bass installed): plugin-exported env vars (
GOPATH,JAVA_HOME, …) propagate into the Fish session - Basic mode (no bass):
shellxCLI command + PATH setup only
- Full mode (bass installed): plugin-exported env vars (
- Installation:
brew install fish(macOS) orapt install fish(Debian/Ubuntu)
Fish Setup
-
Add
SHELLX_HOMEand sourceshellx.fishin~/.config/fish/config.fish:set -gx SHELLX_HOME /path/to/.shellx source $SHELLX_HOME/shellx.fish -
(Optional) Install
bassfor full environment propagation:# With Fisher fisher install edc/bass -
To silence the basic-mode notice without installing bass:
set -gx SHELLX_FISH_QUIET 1
Partially Supported / Unsupported Shells
⚠️ POSIX sh
- ShellX will load but plugin management will not work
- Reason: POSIX sh lacks associative arrays and advanced array operations
- Use only for basic shell initialization if absolutely necessary
❌ Ksh (Korn Shell)
- Not fully compatible with ShellX
- Reason: Limited array support and different syntax
- Not tested or supported
Why Bash/Zsh?
ShellX uses several advanced shell features that are only available in Bash 4+ and Zsh:
-
Associative Arrays: For managing plugin metadata and configuration
- Bash:
declare -A my_array - Zsh:
typeset -A my_array - POSIX sh: ❌ Not available
- Bash:
-
Array Operations: For iterating and manipulating plugin lists
- Bash:
for item in "${array[@]}"; do ... - Zsh:
for item in "${array[@]}"; do ... - POSIX sh: ❌ Not available
- Bash:
-
String Parameter Expansion: Advanced variable manipulation
- Bash/Zsh: Full support for
${var:offset:length},${var//pattern/replacement}, etc. - POSIX sh: Limited support
- Bash/Zsh: Full support for
Checking Your Shell Compatibility
Check Your Current Shell
echo $SHELL
# or
echo \$0
Check Your Shell Version
# Bash
bash --version
# Zsh
zsh --version
# Fish
fish --version
Test ShellX Compatibility
When ShellX loads, it will check your shell automatically:
# If using a non-compatible shell, you'll see:
# ShellX: WARNING - This shell may not be fully compatible with ShellX.
# ShellX: Requires Bash 4+ or Zsh for full functionality.
# ShellX: Current shell: /bin/sh
# If Fish is detected on a wrong entrypoint, you'll see:
# ShellX: Fish Shell detected. Source shellx.fish instead of shellx.sh.
# ShellX: Add to ~/.config/fish/config.fish:
# ShellX: source /path/to/.shellx/shellx.fish
Recommended Setup
Linux
- Primary: Bash 4.0+ (usually pre-installed)
- Alternative: Zsh (install via package manager)
- Alternative: Fish 3.2+ (install via package manager, use
shellx.fish)
macOS
- Primary: Zsh (default since macOS Catalina)
- Alternative: Bash 4.0+ (via Homebrew, since system Bash 3.x is too old)
- Alternative: Fish 3.2+ (via Homebrew, use
shellx.fish)
# Install Bash 4+ on macOS
brew install bash
# Add to ~/.zshrc or ~/.bashrc
export SHELL=$(which bash) # if using Bash
Migration from Unsupported Shells
If you're currently using an unsupported shell:
-
Switch to Bash, Zsh, or Fish:
chsh -s /bin/zsh # Set default shell to Zsh # or chsh -s /usr/local/bin/bash # Set default shell to Bash (Homebrew) # or chsh -s /usr/local/bin/fish # Set default shell to Fish (Homebrew) -
Restart your terminal for changes to take effect
-
Source ShellX in your new shell's rc file:
- Bash: add
source /path/to/shellx.shto.bashrc - Zsh: add
source /path/to/shellx.shto.zshrc - Fish: add
source /path/to/shellx.fishto~/.config/fish/config.fish
- Bash: add
Troubleshooting
"ShellX: WARNING - This shell may not be fully compatible"
- You're using an unsupported shell
- Switch to Bash 4+ or Zsh
- See "Migration from Unsupported Shells" above
Plugin features not working
- Verify you're using Bash 4+ or Zsh 4+
- Run:
bash --versionorzsh --version - Ensure you're sourcing ShellX from your correct shell rc file
ShellX loads but no plugins appear
- Check shell compatibility first
- Verify plugins are installed:
ls -la ~/.shellx.plugins.d/ - Enable debug mode:
shellx debug enabledand check output
Future Compatibility Plans
ShellX may consider alternative data storage mechanisms (YAML, JSON files) to reduce array dependency, but this would require significant refactoring and is not planned in the near term.