No description
- Shell 100%
| bash.d | ||
| .bashrc | ||
| .gitignore | ||
| c4a7e7.svg | ||
| gitconfig | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
⚡chadsh
Modern bash configuration for daily development
Installation • Usage • Features • Configuration • Contributing
📖 Description
A simple modular bash configuration with symlink-based installation — no clutter in your home directory. Works on VPS, local machines, and WSL.
✨ Features
- Modular structure —
bash.d/with logical numbering (00-99) - One-command installation — auto OS detection and package installation
- Smart prompt — shows Git status with color indicators
- Git integration — aliases, interactive functions, and auto-commits
- Modern tools — integration with
eza,bat,fzf,zoxide,lazygit,yazi - Interactive widgets —
Ctrl+Rfor history search,Ctrl+Yfor yazi - Auto-start tmux — automatically creates a session on terminal launch
- Cross-platform — works on Linux, macOS, and WSL
📦 Included Tools
| Category | Tools |
|---|---|
| File Management | eza (modern ls), bat (better cat), yazi (file manager) |
| Search & Find | ripgrep (rg), fd-find (fd), fzf (fuzzy finder) |
| Git | lazygit (TUI), custom aliases, interactive commands |
| System | btop (monitoring), ncdu (disk usage), tmux (terminal multiplexer) |
| Navigation | zoxide (smart cd), custom CDPATH |
| Network | curl, wget, aria2 (download accelerator) |
🛠️ Installation
Quick start
# Clone the repository
git clone https://github.com/masaji-ef/chadsh.git
# Enter the directory
cd chadsh
# Run the installer
./install.sh
# Apply changes
source ~/.bashrc
Installation options
# Skip package installation (useful if you already have tools)
./install.sh --no-packages
What gets installed
📦 Click to see package list
| Category | Packages |
|---|---|
| Base | bash, bash-completion, curl, wget, git, vim, tmux, ncdu, jq, less |
| Tools | btop, ripgrep, fd-find, bat, eza, fzf, lazygit, zoxide, direnv, aria2, yazi |
Installation process
- Backup — creates a timestamped backup of existing
~/.bashrc,~/.bash.d, and~/.gitconfig - Symlinks — creates symbolic links from repository to home directory
- Packages — detects your OS and installs required packages (optional)
- Shell — optionally changes default shell to bash
🚀 Usage
Core aliases
# Navigation
.. ... .... ..... # Quick directory traversal
~ # Go to home directory
# Git workflow
gst # Git status (short)
gcm "message" # Git commit with message
gacp "message" # Git add all + commit + push
gacpa "message" # Git add --all + commit + push
gl # Beautiful log with graph
gp # Git push
gpl # Git pull
gco # Git checkout
gb # Git branch list
gd # Git diff
gundo # Git reset --soft HEAD~1
# File viewing
ls # eza with icons and Git status
cat # bat with syntax highlighting
tree # Directory tree with icons
# System
top # btop (beautiful monitoring)
du # ncdu (interactive disk usage)
df # Human-readable disk info
free # Human-readable memory info
ps # Process list with tree
ss # Socket statistics
Git chains
gacp "message" # git add . + commit + push
gacpa "message" # git add --all + commit + push
gacpi # Interactive add + commit + push
gpull-all # git pull + submodule update
gpush-all # Add all + commit + push
gsync # Pull + update + commit if needed
gsync-all # Sync all git repos in subdirectories
gpush-everything # Push submodules + main repo
Interactive Git commands
| Command | Description |
|---|---|
gacpi |
Interactive add → commit → push |
gcoi |
Interactive checkout with branch selection |
grebasei |
Interactive rebase |
greseti |
Interactive reset (soft/mixed/hard) |
gmergei |
Interactive merge |
glogi |
Interactive log format selection |
gstashi |
Interactive stash management |
gdiffi |
Interactive diff by file |
Keyboard shortcuts
| Key | Action |
|---|---|
Ctrl+R |
Search command history with fzf |
Ctrl+Y |
Open yazi file manager |
↑/↓ |
Search history by command prefix |
Ctrl+P |
History search backward |
Ctrl+N |
History search forward |
Utility functions
mkcd dir/ # Create directory and cd into it
extract archive.zip # Extract any archive (12 formats supported)
backup file.txt # Create timestamped backup
killport 8080 # Kill process on port
portcheck 8080 # Check if port is open
findfile "*.go" # Search for files (uses fd)
finddir "src" # Search for directories (uses fd)
histgrep "command" # Search history with grep/rg
histdate # Show today's history
copypath # Copy path to clipboard
copyfile file.txt # Copy file contents to clipboard
mkpy script.py # Create executable Python script
mksh script.sh # Create executable bash script
log "message" # Log to ~/.bash_log
📁 Project Structure
📂 Click to expand
chadsh/
├── .bashrc # Main config (loads all modules)
├── bash.d/ # Modular configuration
│ ├── 00-env.sh # Environment variables (EDITOR, PAGER, LANG, etc.)
│ ├── 01-path.sh # PATH and CDPATH configuration
│ ├── 02-prompt.sh # Custom prompt with Git status and colors
│ ├── 03-history.sh # History settings (size, timestamps, ignore)
│ ├── 04-options.sh # Bash options and autocomplete settings
│ ├── 05-aliases-core.sh # Core aliases (cp, mv, rm, mkdir, etc.)
│ ├── 06-tools.sh # Modern tools integration (eza, bat, fzf, etc.)
│ ├── 07-aliases-net.sh # Network aliases (dig, myip, traceroute)
│ ├── 08-aliases-git.sh # Basic Git aliases
│ ├── 09-aliases-docker.sh # Docker and docker-compose aliases
│ ├── 10-aliases-k8s.sh # Kubernetes kubectl aliases
│ ├── 11-functions.sh # Utility functions (mkcd, extract, backup, etc.)
│ ├── 13-git-aliases.sh # Git command chains (gacp, gsync, etc.)
│ ├── 14-interactive.sh # Interactive Git functions
│ ├── 15-interactive-features.sh # Widgets (fzf, yazi, tmux auto-start)
│ └── 99-completion.sh # Bash autocompletion loading
├── gitconfig # Git configuration with custom aliases
├── install.sh # Installer with OS detection
├── .gitignore # Git ignore rules
└── README.md
⚙️ Configuration
Git setup
Edit gitconfig to set your identity:
[user]
email = your_email@example.com
name = Your Name
🔧 Git aliases included
[alias]
co = checkout
br = branch
ci = commit -v
st = status -s
amend = commit --amend
lg = log --graph --oneline --decorate
lol = log --graph --oneline --decorate --all
l = log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset %s %C(yellow)%d%Creset" --date=relative
sup = submodule update --init --recursive
pull-all = !git pull && git submodule update --init --recursive
sub-status = submodule foreach 'echo "$name: $(git rev-parse --short HEAD)"'
df = !git log --pretty=format:"%h %cd [%cn] %s%d" --date=relative | fzf | awk '{print $1}' | xargs -I {} git diff {}^ {}
editmerge = !f() { git ls-files --unmerged | cut -f2 | sort -u ; }; nvim `f`
addmerge = !f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`
Environment variables
Adjust in bash.d/00-env.sh:
export EDITOR=vim # Change default editor
export PAGER=less # Change default pager
export LANG=en_US.UTF-8
export TERM=xterm-256color
Prompt customization
In bash.d/02-prompt.sh, you can customize:
# Production environment indicator
if [[ $HOSTNAME == *"prod"* ]]; then
PS1="\n${BOLD}${RED}[PROD] ${BLUE}\u@\h${RESET}:${YELLOW}\w${RESET}\$ "
else
PS1="\n${GREEN}\u${RESET}@${BLUE}\h${RESET}:${YELLOW}\w${RESET}\$(__git_ps1)${RESET}\n\$ "
fi
🖥️ Supported Platforms
| OS | Status | Package Manager |
|---|---|---|
| 🐧 Linux (Debian/Ubuntu) | ✅ Full support | apt |
| 🐧 Linux (Fedora/RHEL) | ✅ Full support | dnf/yum |
| 🐧 Linux (Arch) | ✅ Full support | pacman |
| 🐧 Linux (Alpine) | ✅ Full support | apk |
| 🐧 Linux (openSUSE) | ✅ Full support | zypper |
| 🍎 macOS | ✅ Full support | brew |
| 🪟 WSL2 | ✅ Full support | - |
🧪 Testing
Verify everything works:
# Check installed tools
which eza bat fzf rg fd zoxide lazygit btop ncdu tmux
# Test aliases
type ls cat top git
# Test prompt
echo $PS1
# Test Git integration
git status
# Test keyboard shortcuts
# Press Ctrl+R - should open fzf window
# Press Ctrl+Y - should open yazi
🤝 Contributing
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
Development guidelines
- Keep modules numbered (00-99)
- Add comments for complex functions
- Test on at least one Linux distribution
- Update README if adding features
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Inspired by various dotfile repositories
- Built with tools from the amazing open-source community
- Thanks to all contributors and users