Skip to content
An elegant way to manage dotfiles, commands, completions, configurations for terminal players.
Shell Perl JavaScript Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
bash refactor(bash): add enabled loaded time for debug Mar 29, 2020
bin update submodules Mar 22, 2020
cheat @ bf4f016

Awesome Bash Dotfiles

An elegant way to manage dotfiles, commands, completions, configurations for terminal players.

Make Bash Great Again!

Currently, it is only a personal workplace rather than a framework. So you should FORK the REPO first before using it. The framework is coming soon.



  • iTerm2 Build 3.0.14 ( compatible)
  • GNU bash 4.4+ and 5.0+ (Not support Bash 4.3 and lower versions)
  • Tmux 2.7+ (Not necessary. Tmux compatible)
  • MacOS
  • Linux/Unix system
  • 🚫 Windows system
  • 🚫 Zsh. This project is just for Bash players. Zsh players should use Oh My Zsh.




The prompt is implemented by a-bash-prompt. See ./plugins/prompt.bash.

Responsive prompt. Press Enter to auto adjust with window width.


Show last command exit status


Highlight Backgound jobs:


Use sub commands:



See releases.

Core Dependencies

  • python: It is required. Make sure it available before installation. Python 2 and 3 are both supported.
  • git: It is required. Make sure it available before installation.
    • git-prompt: If omitted, PS1 will not show git prompt.
  • dotbot: To create symbolic links and manage them by dotbot.conf.yaml. No need to install it manually. It is a submodule of project.

Related Projects

  • dotbot: A tool that bootstraps your dotfiles.
  • lobash: A modern, safe, powerful utility library for Bash script development.
  • a-bash-prompt: A Bash prompt written by pure Bash script.
  • bash-sensible: An attempt at saner Bash defaults.
  • tmux: An awesome terminal multiplexer!
  • neovim: Vim-fork focused on extensibility and usability
  • neovim-config: My neovim config

Inspired By

  • sub: A delicious way to organize programs created by basecamp. But no more maintained.
  • bash-it: A community Bash framework.


# Set your Dotfiles directory path

# Clone this repo
git clone --depth 1 $DOTFILES_DIR
# Clone submodules and initialize them
git submodule update --init --recursive

# You may check the content of `dotbot.conf.yaml` file,
# It creates soft-links based on dotbot.conf.yaml.
# Checkout the output

# Restart your shell

# Enable recommend plugs
. ${DOTFILES_DIR}/bootstraps/recommends/plugs

And then read the Configuration - User Modifications section.



Run ./bootstrap to initialize in a new environment.

Do not call the script under sudo.


User Modifications

These parts of below files you should modify.


    name = <your-username>
    email = <your-email>


$TERM should be xterm-256color or screen-256color for best appearance.


Edit the dotbot.conf.yaml file.



The bashrc file is managed by yourself. You must export DOTFILES_DIR points to dotfiles directory.

For example,

# ~/.bashrc: executed by bash(1) for non-login shells.

# Only execute this file once
[[ -n "${_BASHRC_LOADED:-}" ]] && return

export DOTFILES_DIR=$HOME/dotfiles
readonly DOTFILES_SUB=a
source "$DOTFILES_DIR/bash/entry.bash"

Binary executables

All your own binary executables should be put in bin folder, which has been added to $PATH.


Executable commands could be put in bin/sub/ . These commands are referred as sub-command. Example:

  • $SUB_NAME help
  • $SUB_NAME bins to show all commands in ./bin/
  • $SUB_NAME comments to show all commands in ./bin/sub/
  • $SUB_NAME 256color
  • $SUB_NAME debug open and a debug close to open/close debug mode

All sub-commands are auto-completed. Type a <Tab> to see all sub-commands.

You can modify SUB_NAME in bashrc. Suck like readonly DOTFILES_SUB=b. If DOTFILES_SUB not set, default to SUB_NAME=sub-bin.

The path 'bin/sub/' is not included in $PATH.

Enable custom plugins

The framework provides many custom plugins, aliases, completions. and some sub-commands to manage them.

  • a enable <type> <name>... to enable plugins in bash-custom/available/
  • a disable <type> <plugin-name>... to disable plugins in bash-custom/enabled/
  • a disable-all <type> to disable all plugins in bash-custom/enabled/
  • a list <type> to show all enabled plugins in bash-custom/enabled/
  • a list <type> -a to show all plugins in bash-custom/available/
  • a backup <type> to backup all enabled plugins to custom_plugins.
  • a recover <type> to re-enable all plugins saved in custom_plugins.

Plugin Load Priority

Use # BASH_IT_LOAD_PRIORITY: 500 to set load priority. Defaults to 500.

  • Plugin: 300~499, default 400
  • Completion: 500~699, default 600
  • Alias: 700~899, default 800

File Structure

├── aliases/                        # Available aliases
├── bash/
│   ├── inputrc                     # Set shortcut Key Character Sequence (keyseq). Link to ~/.inputrc
├── bash/
│   ├── bash_it.lib.bash            # Store essential helper functions for all dotfiles modules
│   ├── bash_profile                # Link to ~/.bash_profile
│   ├── bashrc                      # Link to ~/.bashrc
│   ├── bashrc.failover.bash        # failover for ~/.bashrc
│   ├── check-environment.bash
│   ├── debug.bash
│   ├── enable-plugs.bash
│   ├── entry.bash                  # The entrypoint of dotfiles
│   ├── failover.bash
│   ├── inputrc                     # Link to ~/.inputrc
│   ├── plugable.bash
│   ├── profile                     # Link to ~/.profile
│   ├── sub.bash                    # The entrypoint of SUB command
│   └── xdg.bash                    # Set XDG_ variables
├── bin/                            # Link to ~/bin
├── bootstraps/                     # Scripts for bootstraping
│   └── recommends/
│       └── plugs                   # Enabled recommended plugins/completions/aliaes
├── bootstrap.bash*
├── cheat/                          # It is ignored in git. git clone cheat
├── completions/                    # Available completions
├── configs/                        # Application configuration
├── docs/                           # The documents of this project
├── dotbot*                         # Create soft-links based on dotbot.conf.yaml
├── dotbot.conf.yaml                # Dotbot configurations
├── deps/                           # Git submodules
│   ├── a-bash-prompt/              #
│   ├── dotbot/                     #
│   ├── nvim/                       # My neovim configurations.
│   ├── z.lua/                      #
│   ├── colors.bash
│   ├── dotfiles_l.bash             # Similar to lobash.bash. Work for dotfiles scripts.
│   └── lobash.bash                 #
├── enabled/                        # Enabled plugins/completions/aliases. soft-link files
│   └── 140---shell.plugin.bash -> ../plugins/shell.bash
├── plugins/                        # Available plugins
│   ├── completions.bash            # General completions and tab complete keymap
│   ├── preexec.bash                # Enable bash-preexec library
│   └── prompt.bash                 # Enable a-bash-prompt
└── secrets/                        # This folder is ignored by git. Put your secret data here.

Bash initialization process

It will execute scripts in order:

  1. ./bash/bashrc
  2. ./bash/entry.bash
  3. ./enabled/*.bash

Advanced Usage

If you want to extend the framework. See this document.

There are many tricks you may be interested.

Suggestion, Bug Reporting, Contributing

Any comments and suggestions are always welcome. Please open an issue to contact with me.

Copyright and License

Copyright (c) 2017-2020 ADoyle. The project is licensed under the BSD 3-clause License.

See the LICENSE file for the specific language governing permissions and limitations under the License.

See the NOTICE file distributed with this work for additional information regarding copyright ownership.

You can’t perform that action at this time.