My personal configuration settings for both bash and zsh shells.
- Cross-shell compatibility: Works seamlessly with both bash and zsh
- Custom prompt: Beautiful colored prompt with git integration
- Git integration: Shows current branch and dirty status (💩 when uncommitted changes)
- 256-color support: Uses extended color palette for modern terminals
- Smart aliases: Shell-aware aliases that work correctly in both environments
- Enhanced zsh features: History management, auto-completion, and navigation improvements
-
Clone this repository:
git clone <your-repo-url> ~/dotfiles cd ~/dotfiles
-
Run the installation script:
./install.sh
-
If you had previous git completion issues, clean up:
rm -f ~/.git-completion.zsh -
Switch to zsh (if necessary):
chsh -s $(which zsh) -
Start a new terminal session or reload your configuration:
reload
.bashrc/.zshrc: Main shell configuration files.loader: Smart loader that detects your shell and sources appropriate files.alias: Shell-agnostic aliases and shortcuts.prompt: Custom prompt with git integration and 256-color support.completion: Tab completion enhancements for both shells.function: Useful shell functions.zsh_config: Zsh-specific optimizations and options
Your prompt will show:
hostname:/current/path (git-branch) [💩] $
Colors:
- Hostname: Medium grey (256-color: 244)
- Path: Lavender purple (256-color: 141)
- Git branch: Dark orange (256-color: 166)
- Dirty indicator: Deep orange (256-color: 202)
The 💩 emoji appears when you have uncommitted git changes.
reload: Reloads your shell configuration (shell-aware)ports: Shows listening network portsgb: Git branchgc: Git checkoutgl: Git loggs: Git statusforce: Git push with force-with-lease
When using zsh, you'll get:
- Smart history: 10,000 commands with duplicate removal and timestamp tracking
- Auto-completion: Enhanced tab completion with case-insensitive matching
- Directory navigation: Type directory name to cd, auto-pushd functionality
- Extended globbing: Advanced pattern matching for file operations
- Error correction: Typo suggestions for commands
Edit /system/.prompt and modify the color codes:
# For zsh (256-color format)
PROMPT='%F{244}%m%f:%F{141}%~%f%F{166}$vcs_info_msg_0_%f%F{202}$(__git_dirty)%f $ '
# For bash (256-color format)
PS1="\[\033[38;5;244m\]\h\[\033[0m\]:\[\033[38;5;141m\]\w\[\033[38;5;166m\]\$(__git_branch)\[\033[38;5;202m\]\$(__git_dirty)\[\033[0m\] $ "Add your aliases to /system/.alias:
alias myalias="command here"All configuration files use shell detection to provide the best experience:
if [ -n "$ZSH_VERSION" ]; then
# Zsh-specific code
else
# Bash-specific code
fi- Git: For git integration in the prompt
- Zsh (optional): For enhanced features
- Modern terminal: That supports 256-color palette
dotfiles/
├── install.sh # Installation script
├── README.md # This file
├── runcom/
│ ├── .bashrc # Bash configuration
│ └── .zshrc # Zsh configuration
└── system/
├── .loader # Main configuration loader
├── .alias # Shell aliases
├── .prompt # Custom prompt configuration
├── .completion # Tab completion setup
├── .function # Custom shell functions
└── .zsh_config # Zsh-specific options
Optimized for modern terminal workflows with cross-shell compatibility.