{"id":13492401,"url":"https://github.com/ohmybash/oh-my-bash","last_synced_at":"2025-05-12T15:28:55.902Z","repository":{"id":37726863,"uuid":"85459264","full_name":"ohmybash/oh-my-bash","owner":"ohmybash","description":"A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.","archived":false,"fork":false,"pushed_at":"2025-05-06T07:47:02.000Z","size":5203,"stargazers_count":6520,"open_issues_count":123,"forks_count":707,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-05-06T08:49:16.024Z","etag":null,"topics":["bash-configuration","oh-my-bash","productivity","shell","terminal","theme"],"latest_commit_sha":null,"homepage":"https://ohmybash.github.io","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ohmybash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":"nntoan","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.buymeacoffee.com/nntoan"]}},"created_at":"2017-03-19T07:46:10.000Z","updated_at":"2025-05-06T07:47:06.000Z","dependencies_parsed_at":"2023-12-28T03:24:27.169Z","dependency_job_id":"2400b21c-2f05-44e9-ac91-a2f7612c77c2","html_url":"https://github.com/ohmybash/oh-my-bash","commit_stats":{"total_commits":590,"total_committers":143,"mean_commits":4.125874125874126,"dds":0.4576271186440678,"last_synced_commit":"410b6c943fc9af635ad80cdc3537e9e5c42f99e5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmybash%2Foh-my-bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmybash%2Foh-my-bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmybash%2Foh-my-bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohmybash%2Foh-my-bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohmybash","download_url":"https://codeload.github.com/ohmybash/oh-my-bash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253765386,"owners_count":21960721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash-configuration","oh-my-bash","productivity","shell","terminal","theme"],"created_at":"2024-07-31T19:01:05.665Z","updated_at":"2025-05-12T15:28:55.852Z","avatar_url":"https://github.com/ohmybash.png","language":"Shell","readme":"Oh My Bash is an open source, community-driven framework for managing your [bash](https://www.gnu.org/software/bash/) configuration.\n\nSounds boring. Let's try again.\n\nOh My Bash will not make you a 10x developer...but you might feel like one.\n\nOnce installed, your terminal shell will become the talk of the town or your money back! With each keystroke in your command prompt, you'll take advantage of the hundreds of powerful plugins and beautiful themes. Strangers will come up to you in cafés and ask you, \"that is amazing! are you some sort of genius?\"\n\nFinally, you'll begin to get the sort of attention that you have always felt you deserved. ...or maybe you'll use the time that you're saving to start flossing more often.\n\n## Getting Started\n\n### Prerequisites\n\n__Disclaimer:__ _Oh My Bash works best on macOS and Linux._\n\n* Unix-like operating system (macOS or Linux)\n* `curl` or `wget` should be installed\n* `git` should be installed\n\n### Basic Installation\n\nOh My Bash is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`.\n\n#### via curl\n\n```shell\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)\"\n```\n\n#### via wget\n\n```shell\nbash -c \"$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)\"\n```\n\nThis replaces `~/.bashrc` with the version provided by Oh My Bash. The original `.bashrc` is backed up with the name `~/.bashrc.omb-TIMESTAMP`.\nIf `~/.bash_profile` does not exist, this also creates a new file `~/.bash_profile` with the default contents.\n\n⚠️ If `~/.bash_profile` already existed before Oh My Bash is installed, please make sure that`~/.bash_profile` contains the line `source ~/.bashrc` or `. ~/.bashrc`.\nIf not, please add the following three lines in `~/.bash_profile`:\n```bash\nif [[ -f ~/.bashrc ]]; then\n  source ~/.bashrc\nfi\n```\n\n## Using Oh My Bash\n\n### Plugins\n\nOh My Bash comes with a shit load of plugins to take advantage of. You can take a look in the [plugins](https://github.com/ohmybash/oh-my-bash/tree/master/plugins) directory and/or the [wiki](https://github.com/ohmybash/oh-my-bash/wiki/Plugins) to see what's currently available.\n\n#### Enabling Plugins\n\nOnce you spot a plugin (or several) that you'd like to use with Oh My Bash, you'll need to enable them in the `.bashrc` file. You'll find the bashrc file in your `$HOME` directory. Open it with your favorite text editor and you'll see a spot to list all the plugins you want to load.\n\nFor example, this line might begin to look like this:\n\n```shell\nplugins=(git bundler osx rake ruby)\n```\n\n##### With Conditionals\n\nYou may want to control when and/or how plugins should be enabled.\n\nFor example, if you want the `tmux-autoattach` plugin to only run on SSH sessions, you could employ a trivial conditional that checks for the `$SSH_TTY` variable. Just make sure to remove the plugin from the larger plugin list.\n\n``` bash\n[ \"$SSH_TTY\" ] \u0026\u0026 plugins+=(tmux-autoattach)\n```\n\n#### Using Plugins\n\nMost plugins (should! we're working on this) include a __README__, which documents how to use them.\n\n### Themes\n\nWe'll admit it. Early in the Oh My Bash world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://github.com/ohmybash/oh-my-bash/wiki/Themes) on our wiki or alternatively [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh/wiki/themes) wiki.\n\n#### Selecting a Theme\n\n_The font theme is the default one. It's not the fanciest one. It's not the simplest one. It's just the right one for the original maintainer of Oh My Bash._\n\nOnce you find a theme that you want to use, you will need to edit the `~/.bashrc` file. You'll see an environment variable (all caps) in there that looks like:\n\n```shell\nOSH_THEME=\"font\"\n```\n\nTo use a different theme, simply change the value to match the name of your desired theme. For example:\n\n```shell\nOSH_THEME=\"agnoster\" # (this is one of the fancy ones)\n# you might need to install a special Powerline font on your console's host for this to work\n# see https://github.com/ohmybash/oh-my-bash/wiki/Themes#agnoster\n```\n\nOpen up a new terminal window and your prompt should look something like this:\n\n![Font theme](themes/font/font-dark.png)\n\nIn case you did not find a suitable theme for your needs, please have a look\nat the wiki for [more of them](https://github.com/ohmybash/oh-my-bash/wiki/Themes).\n\nIf you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.\n\n```shell\nOSH_THEME=\"random\" # (...please let it be pie... please be some pie..)\n```\n\nIf you want to randomly select a theme from a specified list, you can set the\nlist in the following array:\n\n```shell\nOMB_THEME_RANDOM_CANDIDATES=(\"font\" \"powerline-light\" \"minimal\")\n```\n\nIf there are themes you don't like, you can add them to an ignored list:\n\n```shell\nOMB_THEME_RANDOM_IGNORED=(\"powerbash10k\" \"wanelo\")\n```\n\nThe selected theme name can be checked by the following command:\n\n```shell\n$ echo \"$OMB_THEME_RANDOM_SELECTED\"\n```\n\n## Advanced Topics\n\nIf you're the type that likes to get their hands dirty, these sections might resonate.\n\n### Advanced Installation\n\nSome users may want to change the default path, or manually install Oh My Bash.\n\n#### Custom Directory\n\nThe default location is `~/.oh-my-bash` (hidden in your home directory)\n\nIf you'd like to change the install directory with the `OSH` environment variable, either by running `export OSH=/your/path` before installing, or by setting it before the end of the install pipeline like this:\n\n```shell\nexport OSH=\"$HOME/.dotfiles/oh-my-bash\"; bash -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)\"\n```\n\n#### Unattended install\n\nIf you're running the Oh My Bash install script as part of an automated install, you can pass the\nflag `--unattended` to the `install.sh` script. This will have the effect of not trying to change\nthe default shell, and also won't run `bash` when the installation has finished.\n\n```sh\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)\" --unattended\n```\n\n#### System-wide installation\n\nFor example, Oh My Bash can be installed to `/usr/local/share/oh-my-bash` for the system-wide installation by specifying the option `--prefix=PREFIX`.\n\n```sh\nbash -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)\" --prefix=/usr/local\n```\n\nTo enable Oh My Bash, the Bash startup file `.bashrc` needs to be manually set up by each user.\nThe template of `.bashrc` is available in `PREFIX/share/oh-my-bash/bashrc`.\nThe users can copy the template file to `~/.bashrc` and edit it.\n\n```bash\ncp /usr/local/share/oh-my-bash/bashrc ~/.bashrc\n```\n\n#### Manual Installation\n\n##### 1. Clone the repository:\n\n```shell\ngit clone https://github.com/ohmybash/oh-my-bash.git ~/.oh-my-bash\n```\n\n##### 2. *Optionally*, backup your existing `~/.bashrc` file:\n\n```shell\ncp ~/.bashrc ~/.bashrc.orig\n```\n\n##### 3. Create a new sh configuration file\n\nYou can create a new sh config file by copying the template that we have included for you.\n\n```shell\ncp ~/.oh-my-bash/templates/bashrc.osh-template ~/.bashrc\n```\n\n##### 4. Reload your .bashrc\n\n```shell\nsource ~/.bashrc\n```\n\n##### 5. Initialize your new bash configuration\n\nOnce you open up a new terminal window, it should load sh with Oh My Bash's configuration.\n\n### Installation Problems\n\nIf you have any hiccups installing, here are a few common fixes.\n\n* You _might_ need to modify your `PATH` in `~/.bashrc` if you're not able to find some commands after switching to `oh-my-bash`.\n* If you installed manually or changed the install location, check the `OSH` environment variable in `~/.bashrc`.\n\n### Customization of  Plugins and Themes\n\nIf you want to override any of the default behaviors, just add a new file (ending in `.sh`) in the `custom/` directory.\n\nIf you have many functions that go well together, you can put them as a\n`XYZ.plugin.sh` file in the `custom/plugins/XYZ` directory and then enable this\nplugin by adding the name to the `plugins` array in `~/.bashrc`.\n\nIf you would like to modify an existing module\n(theme/plugin/aliases/completion) bundled with Oh My Bash, first copy the\noriginal module to `custom/` directory and modify it.  It will be loaded\ninstead of the original one when it is enabled through\n`OSH_THEME`/`plugins`/`aliases`/`completions` in `~/.bashrc`.\n\n```bash\n$ mkdir -p \"$OSH_CUSTOM/themes\"\n$ cp -r {\"$OSH\",\"$OSH_CUSTOM\"}/themes/agnoster\n$ EDIT \"$OSH_CUSTOM/themes/agnoster/agnoster.theme.sh\"\n```\n\nIf you would like to track the upstream changes for your customized version of\nmodules, you can optionally directly edit the original files and commit them.\nIn this case, you need to handle possible conflicts with the upstream\n(`github.com/ohmybash/oh-my-bash`) in upgrading.\n\nIf you want to replace an existing module (theme/plugin/aliases/complet)\nbundled with Oh My Bash, create a module of the same name in the `custom/`\ndirectory so that it will be loaded instead of the original one.\n\n### Configuration\n\n#### Enable/disable python venv\n\nThe python virtualenv/condaenv information in the prompt may be enabled by the following line in `~/.bashrc`.\n\n```bash\nOMB_PROMPT_SHOW_PYTHON_VENV=true\n```\n\nSome themes turn on it by default.  If you would like to turn it off, you may disable it by the following line in `~/.bashrc`:\n\n```bash\nOMB_PROMPT_SHOW_PYTHON_VENV=false\n```\n\n#### Enable/disable Spack environment information\n\nTo enable the Spack environment information in the prompt, please set the\nfollowing shell variable in `~/.bashrc`:\n\n```bash\nOMB_PROMPT_SHOW_SPACK_ENV=true\n```\n\nIf the theme supports it, the information of the currently active Spack\nenvironment will be shown.  If the theme you use does not support the Spack\nenvironment information, a pull request to add it is welcome.  See the `font`\ntheme as an example implementation of including the Spack environment.\n\n#### Disable internal uses of `sudo`\n\nSome plugins of oh-my-bash internally use `sudo` when it is necessary.  However, this might clutter with the `sudo` log.  To disable the use of `sudo` by oh-my-bash, `OMB_USE_SUDO` can be set to `false` in `~/.bashrc`.\n\n```bash\nOMB_USE_SUDO=false\n```\n\nEach plugin might provides finer configuration variables to control the use of `sudo` by each plugin.\n\n## Getting Updates\n\nBy default, you will be prompted to check for upgrades every few weeks. If you would like `oh-my-bash` to automatically upgrade itself without prompting you, set the following in your `~/.bashrc`:\n\n```shell\nDISABLE_UPDATE_PROMPT=true\n```\n\nTo disable automatic upgrades, set the following in your `~/.bashrc`:\n\n```shell\nDISABLE_AUTO_UPDATE=true\n```\n\n### Manual Updates\n\nIf you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run:\n\n```shell\nupgrade_oh_my_bash\n```\n\nMagic!\n\n## Uninstalling Oh My Bash\n\nOh My Bash isn't for everyone. We'll miss you, but we want to make this an easy breakup.\n\nIf you want to uninstall `oh-my-bash`, just run `uninstall_oh_my_bash` from the command-line. It will remove itself and revert your previous `bash` configuration.\n\n## Contributing\n\nCheck out [`CONTRIBUTING.md`](CONTRIBUTING.md) and also [Code of\nConduct](CODE_OF_CONDUCT.md).\n\nThis project is initially ported from Oh My Zsh and Bash-it by `@nntoan` and\nhas been developed in a community-driven way.  Most of the contributors are far\nfrom being [Bash](https://www.gnu.org/software/bash/) experts, and there are\nmany ways to improve the codebase.  We are looking for more people with\nexpertise in Bash scripting.  If you have ideas on how to make the\nconfiguration easier to maintain (and faster), don't hesitate to fork and send\npull requests!\n\nWe also need people to test out pull-requests.  Take a look through [the open\nissues](https://github.com/ohmybash/oh-my-bash/issues) and help where you can.\n\n## Contributors\n\nOh My Bash has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn't be so awesome.\n\nThank you so much!\n\n## License\n\nSee [`LICENSE.md`](License.md).\nOh My Bash is derived from [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh).\nOh My Bash is released under the [MIT license](LICENSE.md).\n","funding_links":["https://patreon.com/nntoan","https://www.buymeacoffee.com/nntoan"],"categories":["Shell","Ports and Programs","Recently Updated","Customization","theme","Oh-My","Frameworks","Profile Initialization Frameworks","productivity"],"sub_categories":["UNIX Shells","[Sep 04, 2024](/content/2024/09/04/README.md)","Other","Learning resources","Reusable Things"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmybash%2Foh-my-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohmybash%2Foh-my-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohmybash%2Foh-my-bash/lists"}