Oh Gash, was it really necessary?
Gash is a no-fuss, colorful, and feature-rich replacement for your standard Bash configuration files. It packs everything you need to make your terminal experience faster, prettier, and more productive—all while keeping it simple and minimalistic.
- 🚀 Faster workflows: Jump between directories, manage Git repos, and stop services in one-liners.
- 🎨 Colorful output: Command-line information that stands out and helps you focus.
- 💡 Smarter shell: Aliases, functions, and an informative prompt that simplifies tasks.
- ⚡ Lightweight: No bloat—just the tools you need.
- Intelligent Prompt: See everything you need (username, Git branch, jobs, etc.) at a glance.
- Productivity Aliases: Shortcuts for file operations, Git commands, and service management.
- Convenient Functions: One-liners to extract archives, list the largest files, or kill processes by port.
- Colorful Output: Enhanced color schemes for better visibility (with
LS_COLORS
, Git status, etc.). - Cross-platform: Works seamlessly on Linux, macOS, and Windows (WSL).
Check out the full features list for a detailed breakdown.
Get Gash up and running in under 60 seconds:
curl -fsSL https://raw.githubusercontent.com/mauriziofonte/gash/refs/heads/main/install.sh | bash
wget -qO- https://raw.githubusercontent.com/mauriziofonte/gash/refs/heads/main/install.sh | bash
The automated installer will add a new section to your .bash_profile
with:
...
# Load the Gash Environment
if [ -f ~/.gashrc ]; then
source ~/.gashrc
fi
...
If no .bash_profile
is found, the installer will create one for you.
Your new prompt shows:
- Username (colored by user type)
- Current directory (shortened to
~
for home) - Git branch & status if you're inside a Git repo (shows unstaged changes, ahead/behind status)
- Background jobs and last command exit code for easy debugging.
# Example:
[maurizio@server]:~/projects (main*)[j2] $ # Git branch, jobs, exit code
Gash improves everyday commands:
..
: Go up one directory,...
for two, etc.ll
,la
,lash
: Enhanced directory listings.g
: Shortcut forgit
, withga
,gst
,gl
for common actions.hgrep
: Search Bash history with color-coded output.
And many more!
Save time with these built-in utilities:
mkcd dir_name
: Make a directory andcd
into it.extract file.tar.gz [output_dir]
: Extract almost any archive to a directory.largest_files [path]
: Show the largest files in a directory.pskill process_name
: Kill all processes by name.portkill port_number
: Kill processes running on a specific port.stop_services
: Stop well-known services like Apache, MySQL, Redis, Docker, etc.
And many more!
Gash works out of the box, but it shines when you install these optional tools:
Original Command | Replacement | Description |
---|---|---|
df |
pydf |
Enhanced disk usage output |
less |
most |
Better paging for long files |
top |
htop |
Enhanced process viewer |
traceroute |
mtr |
Interactive network diagnostics |
sudo apt install most multitail pydf mtr htop colordiff
brew install most multitail pydf mtr htop colordiff
Gash is fully customizable. Want to add your own aliases or functions? Easy!
# ~/.bash_local example:
alias cls='clear' # Custom alias
greet() { echo "Hello, $USER!" }
Gash will load your custom settings automatically.
Gash comes with an automated uninstaller.
To remove Gash and restore your original configuration:
gash_uninstall
Then, restart your terminal.
To upgrade Gash to the latest version, run the dedicated Gash Helper function
gash_upgrade
This will fetch the latest version from the repository and update your local configuration.
Remember to restart your terminal to apply the changes.
- Directory Navigation:
..
,...
,....
,.....
: Quickly move up multiple directory levels.cd..
,.4
,.5
: Alternate ways to move up multiple directory levels.
- File Operations:
cp
,mv
,rm
: Aliased with safer interactive options (-iv
,-I
) to prevent accidental overwrites or deletions.mkdir
: Aliased with-pv
to create parent directories and show verbose output.bc
: Launchesbc
with the-l
option for floating point calculations.
- Git Shortcuts:
g
,ga
,gst
,gco
,gb
,gd
,gl
,gcm
,gp
: Common Git commands, shortened for convenience.gl
,glog
: A more visual and color-enhanced log of commits.gst
,gstatus
: Colorized and compact view of the repository's status.gadd_tag
,gdel_tag
,gtags
: Tag management commands.ga
,gadd
: Quickly adds files to staging.gc
,gcommit
: Shortcut for committing changes.
- Network Utilities:
ping
,traceroute
,tracepath
: Aliased with-c 5
for a limited number of packets.mtr
: Launchesmtr
with the-c 5
option for a limited number of packets.
- System Monitoring:
df
,du
,free
,ps
,top
: Aliased with human-readable output and color-coded columns.htop
: Launcheshtop
with color-coded output for better process monitoring.pydf
: Displays disk usage with color-coded output.
- Docker:
dcls
,dclsr
: Lists all or running Docker containers.dils
: Lists all Docker images.dcrm
,dirm
: Removes all Docker containers or images.dstop
,dstart
: Stops or starts a Docker container.dexec
,drm
,drmi
: Executes a command, removes a container, or an image.dlogs
,dinspect
,dnetls
: Shows logs, inspects an object, or lists networks.docker_stop_all
,dstopall
,dstartall
: Stops or starts all Docker containers.dpruneall
,docker_prune_all
: Removes all Docker containers, images, volumes, and networks.
- Miscellaneous:
ll
,la
,lash
: Enhanced directory listings with color-coded output.hgrep
: Searches Bash history for a pattern and removes duplicates.myip
: Displays your public IP address.stop_services
: Stops well-known services like Apache, MySQL, Redis, Docker, etc.
- Cross-Platform Commands:
explorer
,taskmanager
: For Windows WSL users, opens Windows Explorer and Task Manager.wslrestart
,wslshutdown
: Restarts or shuts down WSL.
- System Commands:
cls
: Clears the terminal screen.quit
: Stops well-known services (apache2
,nginx
,mysql
, etc.) with the--force
flag.ports
: Lists open network ports.all_colors
: Prints all available terminal colors with ANSI escape codes.
- Gash Helper Functions:
gash_help
: Displays a list of available Gash commands. (Also, help is shown if you typehelp
, at the end of the prompt.)gash_upgrade
: Upgrades Gash to the latest version.gash_inspiring_quote
: Displays an inspiring quote.gash_uninstall
: Uninstalls Gash and cleans up configurations.
- File and Directory Management:
mkcd
: Creates a directory and changes into it.extract
: Extracts archive files (.tar.gz
,.zip
,.7z
, etc.) into the current or specified output directory.backup_file
: Creates a backup of a file with a timestamp suffix.list_empty_dirs
: Lists all empty directories in the specified path.
- System Monitoring:
largest_files
: Lists the top 100 largest files in a directory.largest_dirs
: Lists the top 100 largest directories.find_large_dirs
: Finds directories larger than a specified size and lists their largest file's modification time.disk_usage_fs
: Displays disk usage for specific filesystem types, formatted for readability.all_colors
: Prints all available terminal colors with ANSI escape codes.
- Process Management:
pskill
: Kills all processes matching a given name.portkill
: Kills processes running on a specified port.psgrep
: Searches for processes by name and displays details with color-coded output.
- Git Utilities:
git_dump_revisions
: Dumps all revisions of a Git-tracked file into separate files.git_apply_feature_patch
: Creates and applies patches from a feature branch to the main branch.
- History and Permissions:
hgrep
: Searches Bash history for a pattern and removes duplicates, only showing the last occurrence.please
: Runs the last command or a given command withsudo
.
- Command Replacements:
- less →
most
: Provides a more feature-rich pager with better handling for non-text input files. - tail →
multitail
: Displays multiple log files in real-time. - df →
pydf
: Shows disk usage with color-coded output. - top →
htop
: An interactive system-monitoring tool with a more user-friendly interface. - traceroute/tracepath →
mtr
: A network diagnostic tool combining the functionality of traceroute and ping. - diff →
colordiff
: Colorizes the output ofdiff
for easier readability.
- less →
- PHP & Composer Versions:
php83
,composer83
,php82
,composer82
, etc.: Aliases for specific versions of PHP and Composer, allowing easy switching between different environments. Uses memory limits andallow_url_fopen
enabled for Composer.
- Git Enhancements:
- git log →
gl
: A more visual and color-enhanced log of commits. - git status →
gst
: Colorized and compact view of the repository's status. - git add →
ga
: Quickly adds files to staging. - git commit →
gc
: Shortcut for committing changes.
- git log →
Gash is open-source and distributed under the Apache License 2.0.
We welcome contributions! Fork the repo, open issues, or submit pull requests to help improve Gash.