[
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: http://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n# Matches multiple files with brace expansion notation\n[*.{sh,py,yml}]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".git-blame-ignore-revs",
    "content": "# style: Remove trailing whitespace and add missing final newlines\n5cd1f0eb1668f06bf20378d6d4308fd4a1890581\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: nntoan\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: ['https://www.buymeacoffee.com/nntoan']# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/workflows/format.yml",
    "content": "name: \"Check EditorConfig Format\"\non:\n  push:\n    branches:\n      - \"*\"\n  pull_request:\n    branches:\n      - \"*\"\njobs:\n  lint:\n    runs-on: \"ubuntu-22.04\"\n    steps:\n      - name: \"Get Changed Files\"\n        id: \"files\"\n        uses: \"masesgroup/retrieve-changed-files@v2\"\n        with:\n          format: \"json\"\n      - name: Check out code.\n        uses: actions/checkout@v2\n      - uses: 'actions/setup-go@v4'\n        with:\n          go-version: '1.20'\n      - name: \"Check EditorConfig Lint\"\n        env:\n          EDITORCONFIG_FLAGS: '-disable-indent-size -disable-indentation'\n        run: |\n          sudo apt install -y jq\n          go install 'github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@latest'\n          readarray -t changed_files <<<\"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')\"\n          ~/go/bin/editorconfig-checker ${{ env.EDITORCONFIG_FLAGS }} ${changed_files[@]}\n"
  },
  {
    "path": ".github/workflows/test.sh",
    "content": "#!/usr/bin/env bash\n\nset -e\n\ntmpdir=$(mktemp -d)\n\nexport OSH=\"$tmpdir/path with space\"\nexport HOME=\"$tmpdir/home with space\"\nmkdir -p \"$HOME\"\n\nOSH_REPOSITORY=\"$PWD\" ./tools/install.sh\n\nsource \"$HOME/.bashrc\"\n\nset | grep -aE \"^OSH\"\n\nif [[ \"$OSH_THEME\" == \"font\" ]]; then\n  echo \"Installation succeeded\"\nelse\n  echo \"Installation failed, \\$OSH_THEME is not set to 'font'\"\n  exit 1\nfi\n"
  },
  {
    "path": ".github/workflows/test.yml",
    "content": "name: Test\n\non:\n  push:\n    branches:\n      - '*'\n  pull_request:\n    branches:\n      - '*'\n\njobs:\n  test:\n    runs-on: ${{ matrix.os }}\n    strategy:\n      matrix:\n        # ubuntu-20.04 available: https://github.com/actions/virtual-environments/issues/1816\n        os: [ubuntu-latest, windows-latest, macos-latest]\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 1\n          submodules: false\n      - name: Upgrade bash on Mac\n        if: runner.os == 'macOs'\n        run: brew install bash\n      - name: Install oh-my-bash\n        shell: bash\n        run: bash --noprofile --norc -i \"$PWD/.github/workflows/test.sh\"\n"
  },
  {
    "path": ".gitignore",
    "content": "# custom files\n!/custom/aliases/example.aliases.sh\n!/custom/completions/example.completion.sh\n!/custom/plugins/example/\n!/custom/themes/example/\n!/custom/example.sh\n/custom/\n\n# temp files directories\n/cache/\n/log/\n!/cache/.gitkeep\n!/log/.gitkeep\n\n# disabled files\n*.swp\n*.disabled\n.idea/\n*.tmp\n"
  },
  {
    "path": ".shellcheckrc",
    "content": "disable=SC1087 # Use braces when expanding arrays -- needed for Zsh, not Bash\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at OhMyBasher@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# CONTRIBUTING GUIDELINES\n\nOh-My-Bash is a community-driven project. Contribution is welcome, encouraged and appreciated.\nIt is also essential for the development of the project.\n\nThese guidelines are an attempt at better addressing the huge amount of pending\nissues and pull requests. Please read them closely.\n\nForemost, be so kind as to [search](#use-the-search-luke). This ensures any contribution\nyou would make is not already covered.\n\n* [Issues](#reporting-issues)\n  * [You have a problem](#you-have-a-problem)\n  * [You have a suggestion](#you-have-a-suggestion)\n* [Pull Requests](#pull-requests)\n  * [Getting started](#getting-started)\n  * [You have a solution](#you-have-a-solution)\n  * [New Theme](#new-theme)\n  * [New Plugin](#new-plugin)\n  * [Copyright and responsibility](#copyright-and-responsibility)\n  * [Improving PR](#improving-pr)\n* [Information sources (_aka_ search)](#use-the-search-luke)\n\n**BONUS:** [Volunteering](#you-have-spare-time-to-volunteer)\n\n## Reporting Issues\n\n### You have a problem\n\nPlease be so kind as to [search](#use-the-search-luke) for any open issue already covering\nyour problem.\n\nIf you find one, comment on it so we can know there are more people experiencing it.\n\nIf not, look at the [Troubleshooting](https://github.com/ohmybash/oh-my-bash/wiki/Troubleshooting)\npage for instructions on how to gather data to better debug your problem.\n\nThen, you can go ahead and create an issue with as much detail as you can provide.\nIt should include the data gathered as indicated above, along with:\n\n1. How to reproduce the problem\n2. What the correct behavior should be\n3. What the actual behavior is\n\nPlease copy to anyone relevant (e.g. plugin maintainers) by mentioning their GitHub handle\n(starting with `@`) in your message.\n\nWe will do our very best to help you.\n\n### You have a suggestion\n\nPlease be so kind as to [search](#use-the-search-luke) for any open issue already covering\nyour suggestion.\n\nIf you find one, comment on it so we can know there are more people supporting it.\n\nIf not, you can go ahead and create an issue. Please copy to anyone relevant (_eg_ plugin\nmaintainers) by mentioning their GitHub handle (starting with `@`) in your message.\n\n## Pull Requests\n\nThe code should work with Bash 3.2.  Make all the changes to be\nPOSIX-compatible for external tools unless it is related to a plugin that\nclearly targets specific tools or environment such as \"GNU make\" or \"macOS\".\n\n### Getting started\n\nBefore starting to work on it, please be so kind as to\n[search](#use-the-search-luke) for any open issues, and any\npending/merged/rejected PRs covering or related to what you are going to\nchange.\n\n- If you try to solve a [problem](#you-have-a-problem) and a solution to the\n  problem is already reported, try it out and +1 the pull request if the\n  solution works OK. On the other hand, if you think your solution is better,\n  post it with a reference to the other one so we can have both solutions to\n  compare.\n- If you find an existing PR that is related, try it out and work with the\n  author on a common solution.\n- If not, then go ahead and submit a PR. Please copy to anyone relevant\n  (e.g. plugin maintainers) by mentioning their GitHub handle (starting with\n  `@`) in your message.\n\nYou should be familiar with the basics of\n[contributing on GitHub](https://help.github.com/articles/using-pull-requests) and have a fork\n[properly set up](https://github.com/ohmybash/oh-my-bash/wiki/Contribution-Technical-Practices).\n\nYou MUST always create a PR with _a dedicated branch_ (i.e., a branch that is\nNOT `master`) based on the latest upstream tree.\n\nThe commit message typically has the following form (with the first word in the\nverbal phrase being in the infinitive and capitalized):\n\n```\n<section>: <Verb phrase to describe the change>\n\n<detailed description if any>\n```\n\nThe conventional commits are also accepted:\n\n```\n<type>(<section>): <verb phrase to describe the change>\n\n<detailed description if any>\n```\n\nWhen you open a new PR, please make sure you do it right. Also, reference in\nthe PR description body any issues that would be solved by the PR, [for\ninstance](https://help.github.com/articles/closing-issues-via-commit-messages/)\n_\"Fixes #XXXX\"_ for issue number XXXX.\n\n### You have a solution\n\nIf you try to fix a problem or solve an issue in a specific\nplugin/theme/aliases, please also check the other modules if they have a\nsimilar issue or can be improved in a similar way.\n\n### New Theme\n\nA new theme is often created by modifying an existing theme.  In that case,\nplease clarify from which theme the new theme is derived from.  If possible, it\nis recommended to source the original theme file\n`\"$OSH\"/themes/<original>/<original>.base.sh` or\n`\"$OSH\"/themes/<original>/<original>.theme.sh` in the new theme file\n`\"$OSH\"/themes/<new>/<new>.theme.sh` and include only the new parts in the new\ntheme file.\n\nThe theme needs to have exactly one image file.  The image size needs to be\nheight ~290px and width 600..800px to make the theme gallery aligned and also\nto keep the repository size small. The filename should be `<theme\nname>-dark.png` or `<theme name>-light.png` depending on the dark or light\nbackground of the terminal used to make the image.  The image should be\nunscaled screen shot of a terminal.  If the terminal size is larger than the\nexpected image size, the image should be clipped instead of being resized and\ndownscaled.\n\nWhen you add a new theme, please also update\n[themes/THEMES.md](https://github.com/ohmybash/oh-my-bash/blob/master/themes/THEMES.md).\nAfter your new theme is merged, the list in\n[Themes](https://github.com/ohmybash/oh-my-bash/wiki/Themes) in the wiki also\nneeds to be updated.\n\n### New Plugin\n\nA new plugin is accepted when it is needed to implement features in themes or\nwhen it provides significantly useful tools for interactive uses.  To show that\nit is worth including in Oh My Bash, you will have to find testers to +1 your\nPR.\n\nWhen you add a new plugin, please also update\n[plugins/README.md](https://github.com/ohmybash/oh-my-bash/blob/master/plugins/README.md).\n\n### Copyright and responsibility\n\nIf you submit codes derived from other's work, please confirm that the license\nis compatible with the MIT license.  Please clarify which part is your own work\nand which is not in the code and include **the copyright notice of the original\nauthors**.  You may also include your own copyright notice, but we may omit\nthem because we can track them in the Git history.\n\nYou can provide codes under any licenses which are compatible with the MIT\nlicense.  When you submit and update a PR (*NOT when the PR is merged*), unless\notherwise specified, **we assume that you provide the codes/texts under the MIT\nlicense**.  If you would like to provide the codes/texts with another license,\nplease specify it in the codes/texts.  If you forgot to declare the license\nthat is not MIT, you can later declare it for the part you contributed.\n\nDo not submit AI-generated codes/documentation unless you understand both the\ngenerated codes/documentation and the related **exiting codebase**.  You are\nrequired to be responsible for requests to the changes and reports of the\nissues for the submitted codes/documentation.  Also, please confirm that the\ngenerated codes/texts can be included in Oh My Bash **with your own copyright\nunder the MIT license**.\n\n### Improving PR\n\nAfter opening PRs, you will usually receive requests for changes.  It is rare\nfor a PR to be merged without any modifications.  Please be so kind as to\nrespond to the requests.  If you have any questions, please feel free to ask\nfurther.  If you become busy, please tell us that instead of ignoring our\nmessages.  You are expected to notify when you will be available again, hand\nover the PR to others, or to notify that you would discard the PR.\n\nAfter the final version of the PR is settled, the fix-up commits that fix\nproblems introduced in earlier commits in the same PR will be squashed.  Also,\nthe commits whose purposes heavily overlap will be squashed.\n\nFor this reason, a weight of one commit is not equal for different types of\ncontributions.  For the new theme/plugin/aliases, the PR is likely to be\nsquashed into a single commit unless the changes are properly separated into\ncommits for respective purposes.  On the other hand, PRs including several\nminor fixes to the exiting codebase will not be squashed because each commit\ngives a separate fix to the exiting code.\n\n### Naming convention of functions and global variables\n\nInitially, we haven't cared about the naming convention very much, but we now\ntry to improve it.  In particular, the new codes should follow this naming\nconvention.  The contributions to improve old codes are also welcome, but we\nalso need to keep the backward compatibility.  See [Discussion\n#280](https://github.com/ohmybash/oh-my-bash/discussions/280) for background.\n\nThe functions/aliases that are supposed to be used as interactive commands can\nhave arbitrary names including short ones.\n\nThe functions that are used from the other functions have the names of the form\n`_omb_*`.\n\n* The functions defined by libraries has the form `_omb_${namespace}_${funcname}`\n* The functions defined by a specific plugin has the form `_omb_plugin_${plugin_name}_${funcname}`\n* The functions defined by a specific theme has the form `_omb_theme_${theme_name}_${funcname}`\n* Some important functions might have the name `_omb_${funcname}` directly put under `_omb` namespace.\n\nPublic global variables that can be used to configure the behavior of\noh-my-bash have the form `OMB_*`.\n\n* The settings for the main oh-my-bash behavior have the names of the form `OMB_${config^^}`\n* The settings for the detailed behavior have the names of the form `OMB_${namespace^^}_${config^^}`\n* The settings for a specific plugin has the form `OMB_PLUGIN_${plugin_name^^}_${config^^}`\n* The settings for a specific theme has the form `OMB_THEME_${theme_name^^}_${config^^}`\n\nInternal global variables put into global variables used by oh-my-bash has the\nform `_omb_*`.\n\n* The internal variables defined by libraries has the form `_omb_${namespace}_${varname}`\n* The internal variables used by a specific plugin has the form `_omb_plugin_${plugin_name}_${varname}`\n* The internal variables used by a specific theme has the form `_omb_theme_${theme_name}_${varname}`\n* Some important variables might have the name `_omb_${varname}` directly put under `_omb` namespace.\n\nThere are no restrictions on the local variable names.  A prefix like\n`_omb_${namespace}_` is unnecessary because the namespace of the local\nvariables is separated for each function call.\n\n----\n\n## Use the Search, Luke\n\n_May the Force (of past experiences) be with you_\n\nGitHub offers [many search features](https://help.github.com/articles/searching-github/)\nto help you check whether a similar contribution to yours already exists. Please search\nbefore making any contribution, it avoids duplicates and eases maintenance. Trust me,\nthat works 90% of the time.\n\nYou can also take a look at the [FAQ](https://github.com/ohmybash/oh-my-bash/wiki/FAQ)\nto be sure your contribution has not already come up.\n\nIf all fails, your thing has probably not been reported yet, so you can go ahead\nand [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-requests).\n\n----\n\n### You have spare time to volunteer\n\nVery nice!! :)\n\nPlease have a look at the [Volunteer](https://github.com/ohmybash/oh-my-bash/wiki/Volunteers)\npage for instructions on where to start and more.\n"
  },
  {
    "path": "LICENSE.md",
    "content": "Copyright (c) 2009-2017 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors)\n\nCopyright 2017-present Toan Nguyen and contributors (https://github.com/ohmybash/oh-my-bash/graphs/contributors)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "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\" ] && 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"
  },
  {
    "path": "aliases/README.md",
    "content": "# aliases\n\nAn `aliases` module define a set of aliases closely related with each other.\nTo activate an `aliases` module, add the name of the module in the `aliases`\narray in your `~/.bashrc`:\n\n```bash\naliases=(... <ALIASES_NAME>)\n```\n\nwhere `<ALIASES_NAME>` should be related by the name of the module to activate.\n\n## List of aliases modules\n\nSee the respective pages for details.\n\n- `chmod`\n- [`debian`](debian.aliases.md)\n- [`docker`](docker.aliases.md)\n- [`general`](general.aliases.md)\n- `ls`\n- `misc`\n- [`package-manager`](package-manager.aliases.md)\n- [`terraform`](terraform.aliases.md)\n- [`cargo`](cargo.aliases.md)\n"
  },
  {
    "path": "aliases/cargo.aliases.md",
    "content": "# Aliases `cargo`\n\n| Alias | Command                 | Description                                    |\n|-------|-------------------------|------------------------------------------------|\n| cg    | 'cargo'                 | launch cargo                                   |\n| cgr   | 'cargo run'             | run project                                    |\n| cgt   | 'cargo test'            | run tests                                      |\n| cgb   | 'cargo build'           | building a project                             |\n| cgbr  | 'cargo build --release' | building a project with compiler optimizations |\n| cgi   | 'cargo init'            | initialize the project inside the directory    |\n| cgn   | 'cargo new'             | create a new project                           |\n| cga   | 'cargo add'             | add a new dependency to the project            |\n| cgf   | 'cargo fmt'             | start formatting linters                       |\n"
  },
  {
    "path": "aliases/cargo.aliases.sh",
    "content": "#! bash oh-my-bash.module\n\nalias cg='cargo'\nalias cgr='cargo run'\nalias cgt='cargo test'\nalias cgb='cargo build'\nalias cgbr='cargo build --release'\nalias cgi='cargo init'\nalias cgn='cargo new'\nalias cga='cargo add'\nalias cgf='cargo fmt'\n"
  },
  {
    "path": "aliases/chmod.aliases.sh",
    "content": "#! bash oh-my-bash.module\n#  ---------------------------------------------------------------------------\n\nalias perm='stat --printf \"%a %n \\n \"'      # perm: Show permission of target in number\nalias 000='chmod 000'                       # ---------- (nobody)\nalias 640='chmod 640'                       # -rw-r----- (user: rw, group: r)\nalias 644='chmod 644'                       # -rw-r--r-- (user: rw, group: r, other: r)\nalias 755='chmod 755'                       # -rwxr-xr-x (user: rwx, group: rx, other: rx)\nalias 775='chmod 775'                       # -rwxrwxr-x (user: rwx, group: rwx, other: rx)\nalias mx='chmod a+x'                        # ---x--x--x (user: --x, group: --x, other: --x)\nalias ux='chmod u+x'                        # ---x------ (user: --x, group: -, other: -)\n"
  },
  {
    "path": "aliases/debian.aliases.bash",
    "content": "#!/usr/bin/env bash\n# Short aliases for most used debian specific commands.\n\nalias apup='sudo apt update'\nalias apug='sudo apt upgrade'\nalias apuu='sudo apt update && sudo apt upgrade'\nalias apfu='sudo apt full-upgrade'\n\nalias apin='sudo apt install'\nalias apri='sudo apt install --reinstall'\n\nalias aprm='sudo apt remove'\nalias apur='sudo apt purge'\nalias apar='sudo apt autoremove'\nalias apcl='sudo apt-get autoclean'\n\nalias apse='apt search'\nalias apsh='apt show'\nalias apsc='apt-get source'\nalias apesr='sudo apt edit-sources'\nalias apdl='apt-get download'\n\nalias apbd='sudo apt build-deb'\nalias aphst='cat /var/log/apt/history.log | less'\n\nalias drcf='sudo dpkg-reconfigure'\n\nalias upgrb='sudo update-grub'\nalias uirfs='sudo update-initramfs -u'\n"
  },
  {
    "path": "aliases/debian.aliases.md",
    "content": "# Aliases `debian`\n\nShorted aliases for most used Debian specific commands.\nTo activate it, add `debian` to `aliases=(...)` in your `.bashrc` file:\n\n```bash\naliases=(... debian)`\n```\n\n## Basic Commands\n\n| Alias  | Command                               |\n| ------ | ------------------------------------- |\n| `apup` | `sudo apt update`                     |\n| `apug` | `sudo apt upgrade`                    |\n| `apuu` | `sudo apt update && sudo apt upgrade` |\n| `apfu` | `sudo apt full-upgrade`               |\n| `apin` | `sudo apt install`                    |\n| `apri` | `sudo apt install --reinstall `       |\n| `aprm` | `sudo apt remove`                     |\n| `apur` | `sudo apt purge`                      |\n| `apse` | `apt search`                          |\n| `apdl` | `apt-get download`                    |\n\n## APT Maintainance & Diagnostic Commands\n\n| Alias   | Command                                                |\n| ------- | ------------------------------------------------------ |\n| `apar`  | `sudo apt autoremove`                                  |\n| `apcl`  | `sudo apt-get autoclean`                               |\n| `apesr` | `sudo apt edit-sources`                                |\n| `apsh`  | `apt show`                                             |\n| `aphst` | <code>cat /var/log/apt/history.log &#124; less </code> |\n| `drcf`  | `sudo dpkg-reconfigure`                                |\n\n## APT Source & Building Commands\n\n| Alias  | Command              |\n| ------ | -------------------- |\n| `apsc` | `apt-get source`     |\n| `apbd` | `sudo apt build-deb` |\n\n## Debian's update-\\* commands\n\n| Alias   | Command                    |\n| ------- | -------------------------- |\n| `upgrb` | `sudo update-grub`         |\n| `uirfs` | `sudo update-initramfs -u` |\n"
  },
  {
    "path": "aliases/docker.aliases.md",
    "content": "# Aliases `Docker`\n\n|  Alias    |  Command                      |  Description                                                                             |\n| :------   | :---------------------------- | :--------------------------------------------------------------------------------------- |\n| `dbl`     | `docker build`                | Build an image from a Dockerfile                                                         |\n| `dcin`    | `docker container inspect`    | Display detailed information on one or more containers                                   |\n| `dcls`    | `docker container ls`         | List all the running docker containers                                                   |\n| `dclsa`   | `docker container ls -a`      | List all running and stopped containers                                                  |\n| `dib`     | `docker image build`          | Build an image from a Dockerfile (same as docker build)                                  |\n| `dii`     | `docker image inspect`        | Display detailed information on one or more images                                       |\n| `dils`    | `docker image ls`             | List docker images                                                                       |\n| `dipu`    | `docker image push`           | Push an image or repository to a remote registry                                         |\n| `dirm`    | `docker image rm`             | Remove one or more images                                                                |\n| `dit`     | `docker image tag`            | Add a name and tag to a particular image                                                 |\n| `dlo`     | `docker container logs`       | Fetch the logs of a docker container                                                     |\n| `dnc`     | `docker network create`       | Create a new network                                                                     |\n| `dncn`    | `docker network connect`      | Connect a container to a network                                                         |\n| `dndcn`   | `docker network disconnect`   | Disconnect a container from a network                                                    |\n| `dni`     | `docker network inspect`      | Return information about one or more networks                                            |\n| `dnls`    | `docker network ls`           | List all networks the engine daemon knows about, including those spanning multiple hosts |\n| `dnrm`    | `docker network rm`           | Remove one or more networks                                                              |\n| `dpo`     | `docker container port`       | List port mappings or a specific mapping for the container                               |\n| `dpu`     | `docker pull`                 | Pull an image or a repository from a registry                                            |\n| `dr`      | `docker container run`        | Create a new container and start it using the specified command                          |\n| `drit`    | `docker container run -it`    | Create a new container and start it in an interactive shell                              |\n| `drm`     | `docker container rm`         | Remove the specified container(s)                                                        |\n| `drm!`    | `docker container rm -f`      | Force the removal of a running container (uses SIGKILL)                                  |\n| `dst`     | `docker container start`      | Start one or more stopped containers                                                     |\n| `drs`     | `docker container restart`    | Restart one or more containersa                                                          |\n| `dsta`    | `docker stop $(docker ps -q)` | Stop all running containers                                                              |\n| `dstp`    | `docker container stop`       | Stop one or more running containers                                                      |\n| `dtop`    | `docker top`                  | Display the running processes of a container                                             |\n| `dvi`     | `docker volume inspect`       | Display detailed information about one or more volumes                                   |\n| `dvls`    | `docker volume ls`            | List all the volumes known to docker                                                     |\n| `dvprune` | `docker volume prune`         | Cleanup dangling volumes                                                                 |\n| `dxc`     | `docker container exec`       | Run a new command in a running container                                                 |\n| `dxcit`   | `docker container exec -it`   | Run a new command in a running container in an interactive shell                         |\n"
  },
  {
    "path": "aliases/docker.aliases.sh",
    "content": "# This is a direct copy of https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/docker/docker.plugin.zsh\nalias dbl='docker build'\nalias dcin='docker container inspect'\nalias dcls='docker container ls'\nalias dclsa='docker container ls -a'\nalias dib='docker image build'\nalias dii='docker image inspect'\nalias dils='docker image ls'\nalias dipu='docker image push'\nalias dirm='docker image rm'\nalias dit='docker image tag'\nalias dlo='docker container logs'\nalias dnc='docker network create'\nalias dncn='docker network connect'\nalias dndcn='docker network disconnect'\nalias dni='docker network inspect'\nalias dnls='docker network ls'\nalias dnrm='docker network rm'\nalias dpo='docker container port'\nalias dpu='docker pull'\nalias dr='docker container run'\nalias drit='docker container run -it'\nalias drm='docker container rm'\nalias 'drm!'='docker container rm -f'\nalias dst='docker container start'\nalias drs='docker container restart'\nalias dsta='docker stop $(docker ps -q)'\nalias dstp='docker container stop'\nalias dtop='docker top'\nalias dvi='docker volume inspect'\nalias dvls='docker volume ls'\nalias dvprune='docker volume prune'\nalias dxc='docker container exec'\nalias dxcit='docker container exec -it'\n"
  },
  {
    "path": "aliases/general.aliases.md",
    "content": "# Aliases `general`\n\nThis plugin provides aliases originally introduced in a blog post by Nathaniel\nLandau (2013-07-02) [1] and later modified:\n\n- [1] Nathaniel Landau, [\"My Mac OSX Bash Profile\"](https://natelandau.com/my-mac-osx-bash_profile/), 2013-07-02.\n\n## Basic Commands\n\n| Alias          | Command                                | Description                                                                        |\n|----------------|----------------------------------------|------------------------------------------------------------------------------------|\n| `c`            | `clear`                                | Clear terminal display                                                             |\n| `cic`          | `bind \"set completion-ignore-case on\"` | Make tab-completion case-insensitive                                               |\n| `cp`           | `cp -iv`                               | `cp` with confirmation on overwriting (option `-v` is added if supported)          |\n| `fix_stty`     | `stty sane`                            | Restore terminal settings when screwed up                                          |\n| `fix_term`     | `echo -e \"\\033c\"`                      | Reset the conosle.  Similar to the reset command                                   |\n| `less`         | `less -FSRXc`                          | Preferred `less` implementation                                                    |\n| `ll`           | `ls -lAFh`                             | Preferred `ls` implementation                                                      |\n| `mkdir`        | `mkdir -pv`                            | Recursive `mkdir` if the target does not exist (option `-v` is added if supported) |\n| `mv`           | `mv -iv`                               | `mv` with confirmation on overwriting (option `-v` is added if supported)          |\n| `nano`         | `nano -W`                              | (option `-W` is added if supported)                                                |\n| `path`         | `echo -e ${PATH//:/\\\\n}`               | Echo all executable Paths                                                          |\n| `show_options` | `shopt`                                | display bash options settings                                                      |\n| `src`          | `source ~/.bashrc`                     | Reload `.bashrc` file                                                              |\n| `wget`         | `wget -c`                              | Preferred `wget` implementation (resume download)                                  |\n"
  },
  {
    "path": "aliases/general.aliases.sh",
    "content": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copyright (2022-08-23): The aliases defined in this file seems to\n# originally come from a blog post [1].  See also the comments in lib/base.sh.\n#\n# [1] Nathaniel Landau, \"My Mac OSX Bash Profile\",\n#     https://natelandau.com/my-mac-osx-bash_profile/, 2013-07-02.\n#\n#------------------------------------------------------------------------------\n#  Description:  This file holds all general BASH aliases\n#\n#  For your own benefit, we won't load all aliases in the general, we will\n#  keep the very generic command here and enough for daily basis tasks.\n#\n#  If you are looking for the more sexier aliases, we suggest you take a look\n#  into other core alias files which installed by default.\n#\n#------------------------------------------------------------------------------\n\n#   -----------------------------\n#   1.  MAKE TERMINAL BETTER\n#   -----------------------------\n\n# Preferred 'cp' implementation.  Determines the use of the option `-v' on the\n# first call Ref. https://github.com/ohmybash/oh-my-bash/issues/351\nfunction _omb_util_alias_select_cp {\n  if (tmp=$(_omb_util_mktemp); trap 'rm -f \"$tmp\"{,.2}' EXIT; command cp -v \"$tmp\" \"$tmp.2\" &>/dev/null); then\n    _omb_command='cp -iv'\n  else\n    _omb_command='cp -i'\n  fi\n}\n_omb_util_alias_delayed cp force\n\n# Preferred 'mv' implementation\nfunction _omb_util_alias_select_mv {\n  if (tmp=$(_omb_util_mktemp); trap 'rm -f \"$tmp.2\"' EXIT; command mv -v \"$tmp\" \"$tmp.2\" &>/dev/null); then\n    _omb_command='mv -iv'\n  else\n    _omb_command='mv -i'\n  fi\n}\n_omb_util_alias_delayed mv force\n\n# Preferred 'mkdir' implementation\nfunction _omb_util_alias_select_mkdir {\n  if command mkdir -pv . &>/dev/null; then\n    _omb_command='mkdir -pv'\n  else\n    _omb_command='mkdir -p'\n  fi\n}\n_omb_util_alias_delayed mkdir force\n\n# Preferred 'nano' implementation\nfunction _omb_util_alias_select_nano {\n  if LANG=C command nano --help 2>/dev/null | grep -q '^[[:space:]]*[-]W'; then\n    _omb_command='nano -W'\n  else\n    _omb_command='nano'\n  fi\n}\n_omb_util_alias_delayed nano force\n\nalias ll='ls -lAFh'                         # Preferred 'ls' implementation\nalias less='less -FSRXc'                    # Preferred 'less' implementation\nalias wget='wget -c'                        # Preferred 'wget' implementation (resume download)\nalias c='clear'                             # c:            Clear terminal display\nalias path='echo -e ${PATH//:/\\\\n}'         # path:         Echo all executable Paths\nalias show_options='shopt'                  # Show_options: display bash options settings\nalias fix_stty='stty sane'                  # fix_stty:     Restore terminal settings when screwed up\nalias fix_term='echo -e \"\\033c\"'            # fix_term:     Reset the conosle.  Similar to the reset command\nalias cic='bind \"set completion-ignore-case on\"' # cic:          Make tab-completion case-insensitive\nalias src='source ~/.bashrc'                # src:          Reload .bashrc file\n"
  },
  {
    "path": "aliases/ls.aliases.sh",
    "content": "#! bash oh-my-bash.module\n#  ---------------------------------------------------------------------------\n\n# Directory Listing aliases\nalias dir='ls -hFx'\nalias l.='ls -d .* --color=tty' # short listing, only hidden files - .*\nalias l='ls -lathF'             # long, sort by newest to oldest\nalias L='ls -latrhF'            # long, sort by oldest to newest\nalias la='ls -Al'               # show hidden files\nalias lc='ls -lcr'              # sort by change time\nalias lk='ls -lSr'              # sort by size\nalias lh='ls -lSrh'             # sort by size human readable\nalias lm='ls -al | more'        # pipe through 'more'\nalias lo='ls -laSFh'            # sort by size largest to smallest\nalias lr='ls -lR'               # recursive ls\nalias lt='ls -ltr'              # sort by date\nalias lu='ls -lur'              # sort by access time\n\n\n#   lr:  Full Recursive Directory Listing\n#   ------------------------------------------\nalias lr='ls -R | grep \":$\" | sed -e '\\''s/:$//'\\'' -e '\\''s/[^-][^\\/]*\\//--/g'\\'' -e '\\''s/^/   /'\\'' -e '\\''s/-/|/'\\'' | less'\n\nalias dud='du -d 1 -h'                      # Short and human-readable directory listing\nalias duf='du -sh *'                        # Short and human-readable file listing\n"
  },
  {
    "path": "aliases/misc.aliases.sh",
    "content": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copyright (2022-08-23): The aliases defined in this file seems to\n# originally come from a blog post [1].  See also the comments in lib/base.sh.\n#\n# [1] Nathaniel Landau, \"My Mac OSX Bash Profile\",\n#     https://natelandau.com/my-mac-osx-bash_profile/, 2013-07-02.\n#\n#------------------------------------------------------------------------------\n#  Description:  This file holds many useful BASH aliases and save our lives!\n#\n#  Sections:\n#  1.   File and Folder Management\n#  2.   Searching\n#  3.   Process Management\n#  4.   Networking\n#  5.   System Operations & Information\n#  6.   Date & Time Management\n#  7.   Web Development\n#  8.   <your_section>\n#\n#  X.   Reminders & Notes\n#\n#------------------------------------------------------------------------------\n\n#   -------------------------------\n#   1.  FILE AND FOLDER MANAGEMENT\n#   -------------------------------\n\nalias numFiles='_omb_util_print $(ls -1 | wc -l)'       # numFiles:     Count of non-hidden files in current dir\nalias make1mb='truncate -s 1m ./1MB.dat'     # make1mb:      Creates a file of 1mb size (all zeros)\nalias make5mb='truncate -s 5m ./5MB.dat'     # make5mb:      Creates a file of 5mb size (all zeros)\nalias make10mb='truncate -s 10m ./10MB.dat'  # make10mb:     Creates a file of 10mb size (all zeros)\n\n\n#   ---------------------------\n#   2.  SEARCHING\n#   ---------------------------\n\nalias qfind=\"find . -name \"                 # qfind:    Quickly search for file\n\n\n#   ---------------------------\n#   3.  PROCESS MANAGEMENT\n#   ---------------------------\n\n#   memHogsTop, memHogsPs:  Find memory hogs\n#   -----------------------------------------------------\n    alias memHogsTop='top -l 1 -o rsize | head -20'\n    alias memHogsPs='ps wwaxm -o pid,stat,vsize,rss,time,command | head -10'\n\n#   cpuHogs:  Find CPU hogs\n#   -----------------------------------------------------\n    alias cpu_hogs='ps wwaxr -o pid,stat,%cpu,time,command | head -10'\n\n#   topForever:  Continual 'top' listing (every 10 seconds)\n#   -----------------------------------------------------\n    alias topForever='top -l 9999999 -s 10 -o cpu'\n\n#   ttop:  Recommended 'top' invocation to minimize resources\n#   ------------------------------------------------------------\n#       Taken from this macosxhints article\n#       http://www.macosxhints.com/article.php?story=20060816123853639\n#   ------------------------------------------------------------\n    alias ttop=\"top -R -F -s 10 -o rsize\"\n\n\n#   ---------------------------\n#   4.  NETWORKING\n#   ---------------------------\n\nalias netCons='lsof -i'                         # netCons:      Show all open TCP/IP sockets\nalias lsock='sudo lsof -i -P'                   # lsock:        Display open sockets\nalias lsockU='sudo lsof -nP | grep UDP'         # lsockU:       Display only open UDP sockets\nalias lsockT='sudo lsof -nP | grep TCP'         # lsockT:       Display only open TCP sockets\nalias openPorts='sudo lsof -i | grep LISTEN'    # openPorts:    All listening connections\nalias showBlocked='sudo ipfw list'              # showBlocked:  All ipfw rules inc/ blocked IPs\nif _omb_util_binary_exists ifconfig; then\n  alias ipInfo0='ifconfig getpacket en0'          # ipInfo0:      Get info on connections for en0\n  alias ipInfo1='ifconfig getpacket en1'          # ipInfo1:      Get info on connections for en1\nfi\n\n\n#   ---------------------------------------\n#   5.  SYSTEMS OPERATIONS & INFORMATION\n#   ---------------------------------------\n\nalias mountReadWrite='mount -uw /'    # mountReadWrite:   For use when booted into single-user\n\n\n#   ---------------------------------------\n#   6.  DATE & TIME MANAGEMENT\n#   ---------------------------------------\n\nalias bdate=\"date '+%a, %b %d %Y %T %Z'\"\nalias cal3='cal -3'\nalias da='date \"+%Y-%m-%d %A    %T %Z\"'\nalias daysleft='_omb_util_print \"There are $(($(date +%j -d\"Dec 31, $(date +%Y)\")-$(date +%j))) left in year $(date +%Y).\"'\nalias epochtime='date +%s'\nalias mytime='date +%H:%M:%S'\nalias secconvert='date -d@1234567890'\nalias stamp='date \"+%Y%m%d%a%H%M\"'\nalias timestamp='date \"+%Y%m%dT%H%M%S\"'\nalias today='date +\"%A, %B %-d, %Y\"'\nalias weeknum='date +%V'\n\n\n#   ---------------------------------------\n#   8.  WEB DEVELOPMENT\n#   ---------------------------------------\n\nalias editHosts='sudo edit /etc/hosts'                  # editHosts:        Edit /etc/hosts file\n\nif _omb_util_binary_exists apachectl; then\n  alias apacheEdit='sudo edit /etc/httpd/httpd.conf'      # apacheEdit:       Edit httpd.conf\n  alias apacheRestart='sudo apachectl graceful'           # apacheRestart:    Restart Apache\n  alias herr='tail /var/log/httpd/error_log'              # herr:             Tails HTTP error logs\n  alias apacheLogs=\"less +F /var/log/apache2/error_log\"   # Apachelogs:       Shows apache error logs\nfi\n\n#   ---------------------------------------\n#   9.  OTHER ALIASES\n#   ---------------------------------------\n\n# Aliases by Jacob Hrbek\n# Outputs List of Loadable Modules (llm) for current kernel\nalias llm=\"find /lib/modules/$(uname -r) -type f -name '*.ko*'\"\n# Used for piping to remote pastebin from cmdline to generate a url\n_omb_util_binary_exists curl && ix() { curl -n -F 'f:1=<-' http://ix.io ; }\n# Used for piping to clipboard\n_omb_util_binary_exists xclip && alias xcopy=\"xclip -se c\"\n"
  },
  {
    "path": "aliases/package-manager.aliases.bash",
    "content": "#!/usr/bin/env bash\n# Created by Jacob Hrbek github.com in 2019\n\n# A local temporary variable\ndeclare _omb_tmp_sudo\n\n# Switch for the use of \"sudo\"\n_omb_tmp_sudo=\nif [[ ${OMB_ALIAS_PACKAGE_MANAGER_SUDO+set} ]]; then\n  _omb_tmp_sudo=${OMB_ALIAS_PACKAGE_MANAGER_SUDO:+$OMB_ALIAS_PACKAGE_MANAGER_SUDO }\nelif [[ ${OMB_USE_SUDO-true} == true ]]; then\n  if ((EUID != 0)) && _omb_util_binary_exists sudo; then\n    _omb_tmp_sudo='sudo '\n  fi\nfi\n\n# Portage - Enoch Merge\nif _omb_util_binary_exists emerge; then\n  alias em=\"${_omb_tmp_sudo}emerge\" # Enoch Merge\n  alias es=\"${_omb_tmp_sudo}emerge --search\" # Enoch Search\n  alias esync=\"${_omb_tmp_sudo}emerge --sync\" # Enoch SYNC\n  alias eb=\"${_omb_tmp_sudo}ebuild\" # Enoch Build\n  alias er=\"${_omb_tmp_sudo}emerge -c\" # Enoch Remove\n  alias emfu=\"${_omb_tmp_sudo}emerge --sync && ${_omb_tmp_sudo}emerge -uDN @world\" # Enoch Update & Upgrade System\n  alias eu=\"${_omb_tmp_sudo}emerge -uDN @world\" # Enoch Upgrade System\n  alias ei=\"${_omb_tmp_sudo}emerge --info\" # Enoch Display Information\n  alias ep=\"${_omb_tmp_sudo}emerge -p\" # Enoch Display What Would Have Been Installed\n  alias e1=\"${_omb_tmp_sudo}emerge -1\" # Enoch Merge Without Adding the Packages to the World File\n  # Deprecated, retained for backward compatibility. Use `er` instead.\n  alias ers=\"${_omb_tmp_sudo}emerge -c\"\nfi\nif _omb_util_binary_exists eclean; then\n  alias ecd=\"${_omb_tmp_sudo}eclean-dist -d\" # Enoch Clean Repository Source Files\n  alias ecp=\"${_omb_tmp_sudo}eclean-pkg -d\" # Enoch Clean Binary Packages\nfi\nif _omb_util_binary_exists eix; then\n  alias elip=\"${_omb_tmp_sudo}eix-installed -a\" # Enoch List Installed Packages\nfi\nif _omb_util_binary_exists equery; then\n  alias eq=\"${_omb_tmp_sudo}equery\" # Enoch Query\nfi\n\n# Paludis - Cave\nif _omb_util_binary_exists cave; then\n  alias cave=\"${_omb_tmp_sudo}cave\"\n  alias cr=\"${_omb_tmp_sudo}cave resolve\" # Cave Resolve\n  alias cui=\"${_omb_tmp_sudo}cave uninstall\" # Cave UnInstall\n  alias cs=\"${_omb_tmp_sudo}cave show\" # Cave Show\n  alias cli=\"${_omb_tmp_sudo}cave print-ids --matching '*/*::/'\" # Cave List Installed\nfi\n\n# Snap Package manager - Snap\nif _omb_util_binary_exists snap; then\n  alias snap=\"${_omb_tmp_sudo}snap\"\n  alias snapfu=\"${_omb_tmp_sudo}snap refresh\" # Update all installed snaps\n  alias snapi=\"${_omb_tmp_sudo}snap install\" # Installs the named snaps\n  alias snaps=\"${_omb_tmp_sudo}snap find\" # Queries the store for available packages\n  alias snapr=\"${_omb_tmp_sudo}snap remove --terminate --purge\" # Performs a full, clean and data remove\n  alias snapli=\"${_omb_tmp_sudo}snap list --all\" # List all installed snaps and revisions in the current system\nfi\n\n# Advanced Packaging Tool - APT\nif _omb_util_binary_exists apt; then\n  alias apt=\"${_omb_tmp_sudo}apt\" # Advanced Packaging Tool\n  alias aptfu=\"${_omb_tmp_sudo}apt update -y && ${_omb_tmp_sudo}apt upgrade -y && ${_omb_tmp_sudo}apt dist-upgrade -y && ${_omb_tmp_sudo}apt autoremove -y\"\n  alias apti=\"${_omb_tmp_sudo}apt install -y\" # Apt install\n  alias apts=\"${_omb_tmp_sudo}apt-cache search\" # Apt search\n  alias aptr=\"${_omb_tmp_sudo}apt remove -y\" # Apt remove\n  alias aptar=\"${_omb_tmp_sudo}apt autoremove -y\" # Apt Auto Remove\n  alias aptli=\"${_omb_tmp_sudo}apt list --installed\"\nfi\n\n# Debian PacKaGe - DPKG\nif _omb_util_binary_exists dpkg; then\n  alias dpkg=\"${_omb_tmp_sudo}dpkg\"\nfi\n\n# Volian - Nala\nif _omb_util_binary_exists nala; then\n  alias nala=\"${_omb_tmp_sudo}nala\" # A faster, prettier front-end for libapt->\n  alias nalaf=\"${_omb_tmp_sudo}nala fetch\" # Nala Fastest Mirror\n  alias nalau=\"${_omb_tmp_sudo}nala update\" # Nala Update\n  alias nalafu=\"${_omb_tmp_sudo}nala upgrade -y\" # Nala Update & Full-Upgrade >\n  alias nalai=\"${_omb_tmp_sudo}nala install -y\" # Nala Install\n  alias nalar=\"${_omb_tmp_sudo}nala remove -y\" # Nala Remove\n  alias nalaa=\"${_omb_tmp_sudo}nala autoremove -y\" # Nala Auto Remove\n  alias nalah=\"${_omb_tmp_sudo}nala history\" # Nala History\n  alias nalal=\"${_omb_tmp_sudo}nala list\" # Nala List\n  alias nalas=\"${_omb_tmp_sudo}nala search\" # Nala Search\n  alias nalav=\"${_omb_tmp_sudo}nala show\" # Nala View Package Info\nfi\n\n# # Zypper = Zen Yast Package Program (ZYPP?)\n# if _omb_util_binary_exists zypper; then\n#   # Yast = Yet Another Silly/Setup Thing/Thing\n#   alias lcp=\"${_omb_tmp_sudo}zypper\"\n#   alias lcpi=\"${_omb_tmp_sudo}zypper install\"\n#   alias lcps=\"${_omb_tmp_sudo}zypper search\"\n#   alias lcpsi=\"${_omb_tmp_sudo}zypper source-install\"\n#   alias lcpr=\"${_omb_tmp_sudo}zypper remove\"\n#   if grep -q 'openSUSE Tumbleweed' /etc/os-release; then\n#     # Zypper update kills the system - LCP\n#     alias lcpfu=\"${_omb_tmp_sudo}zypper dup\"\n#     # Because Geeko uses sublime3 to call sublime_text instead of something that makes sence like 'subl'..\n#     alias subl=\"${_omb_tmp_sudo}sublime3\"\n#   fi\n# fi\n\n# Fedora Package - dnf\nif _omb_util_binary_exists dnf; then\n  alias dnf=\"${_omb_tmp_sudo}dnf\" # DNF Packaging Tool\n  alias dnfl=\"${_omb_tmp_sudo}dnf list\" # List\n  alias dnfli=\"${_omb_tmp_sudo}dnf list installed\" # List Installed\n  alias dnfgl=\"${_omb_tmp_sudo}dnf grouplist\" # Group List\n  alias dnfmc=\"${_omb_tmp_sudo}dnf makecache\" # Make Cache\n  alias dnfp=\"${_omb_tmp_sudo}dnf info\" # Show Package Info\n  alias dnfs=\"${_omb_tmp_sudo}dnf search\" # Search\n\n  alias dnfu=\"${_omb_tmp_sudo}dnf upgrade\" # Update\n  alias dnfi=\"${_omb_tmp_sudo}dnf install\" # Install\n  alias dnfgi=\"${_omb_tmp_sudo}dnf group install\" # Group Install\n  alias dnfr=\"${_omb_tmp_sudo}dnf remove\" # Remove\n  alias dnfgr=\"${_omb_tmp_sudo}dnf groupremove\" # Group Remove\n  alias dnfc=\"${_omb_tmp_sudo}dnf clean all\" # Clean All\nfi\n\nunset -v _omb_tmp_sudo\n"
  },
  {
    "path": "aliases/package-manager.aliases.md",
    "content": "# Aliases `package-manager`\n\nThis plugin provides the set of aliases that can be used to control package\nmanagers.  Here is the list of the supported aliases for each package manager.\nYou can find the details of each alias in the source\n[`package-manager.aliases.bash`](package-manager.aliases.bash).\n\n- `emerge` (Portage Enoch Merge) ... `em`, `es`, `esync`, `eb`, `er`, `emfu`, `ecd`, `ecp`, `elip`\n- `cave` (Paludis Cave) ... `cave`, `cr`, `cui`, `cs`, `cli`\n- `apt` (Advanced Packaging Tool) ... `apt`, `aptfu`, `apti`, `apts`, `aptr`, `aptar`, `aptli`\n- `dpkg` (Debian Package) ... `dpkg`\n- `nala` (Nala APT Wrapper) ... `nala`, `nalaf`, `nalau`, `nalafu`, `nalai`, `nalar`, `nalaa`, `nalah`, `nalal`, `nalas`, `nalav`\n- `snap` (Snap Package Manager) ... `snap`, `snapfu`, `snapi`, `snaps`, `snapr`, `snapli`\n\nThe command to use to call these package manager can be specified in the\nvariable `OMB_ALIAS_PACKAGE_MANAGER_SUDO`.  By default, `sudo` is used when the\ncurrent use is not root and the command `sudo` is available.\n\n```bash\n# Use sudo to run the package manager\nOMB_ALIAS_PACKAGE_MANAGER_SUDO=sudo\n\n# Do not use sudo but directly run the package manager\nOMB_ALIAS_PACKAGE_MANAGER_SUDO=\n```\n\n## Emerge Package Manager\n\n| Alias   | Command                                          | Description                                                                                                                      |\n| ------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |\n| `em`    | `sudo emerge`                                    | Emerge is the definitive command-line interface to the Portage system.                                                           |\n| `es`    | `sudo emerge --search`                           | Searches for matches of the supplied string in the ebuild repository.                                                            |\n| `esync` | `sudo emerge --sync`                             | Updates repositories, for which auto-sync, sync-type and sync-uri attributes are set in repos.conf.                              |\n| `eb`    | `sudo ebuild`                                    | An ebuild must be, at a minimum, a valid Portage package directory name without a version or category, such as portage or python.|\n| `er`    | `sudo emerge -c`                                 | Cleans the system by removing packages that are not associated with explicitly merged packages.                                  |\n| `emfu`  | `sudo emerge --sync && sudo emerge -uDN @world`  | Emerge update & upgrade system.                                                                                                  |\n| `eu`    | `sudo emerge -uDN @world`                        | Emerge upgrade system.                                                                                                           |\n| `ei`    | `sudo emerge --info`                             | Emerge display information.                                                                                                      |\n| `ep`    | `sudo emerge -p`                                 | Emerge display what would have been installed.                                                                                   |\n| `e1`    | `sudo emerge -1`                                 | Emerge merge without adding the packages to the world file.                                                                      |\n| `ecp`   | `sudo eclean-pkg -d`                             | Cleans binary packages.                                                                                                          |\n| `elip`  | `sudo eix-installed -a`                          | Lists all installed programs.                                                                                                    |\n| `ecd`   | `sudo eclean-dist -d`                            | Cleans repository source files.                                                                                                  |\n| `eq`    | `sudo equery`                                    | Package query tool.                                                                                                              |\n| `ers`   | `sudo emerge -c`                                 | (Deprecated, retained for backward compatibility. Use `er` instead.)                                                             |\n\n## Paludis Package Manager (`cave`)\n\n| Alias  | Command               | Description                                                                                             |\n| ------ | --------------------- | ------------------------------------------------------------------------------------------------------- |\n| `cave` | `sudo cave`           | The Other Package Manager.                                                                              |\n| `cr`   | `sudo cave resolve`   | Solve the dependencies and print out the results. Pass the `-x` option to actually install the package. |\n| `cui`  | `sudo cave uninstall` | Uninstall a package.                                                                                    |\n| `cs`   | `sudo cave show`      | Show the dependencies of a package.                                                                     |\n| `cli`  | `sudo cave list`      | List all available Packages.                                                                            |\n\n## APT Package Manager\n\n| Alias   | Command                                                                                           | Description                                                                                                          |\n| ------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |\n| `apt`   | `sudo apt`                                                                                        | Advanced Packaging Tool.                                                                                             |\n| `aptfu` | `sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y` | Automatically update package lists, fully upgrade all packages, and remove any orphaned packages.                    |\n| `apti`  | `sudo apt install -y`                                                                             | Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match.                |\n| `apts`  | `sudo apt-cache search`                                                                           | Search can be used to search for the given regex(7) term(s) in the list of available packages and display matches.   |\n| `aptr`  | `sudo apt remove -y`                                                                              | Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match.                |\n| `aptar` | `sudo apt autoremove -y`                                                                          | Remove packages that were automatically installed for dependencies but are now no longer needed.                     |\n| `aptli` | `sudo apt list`                                                                                   | List is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. |\n\n## Debian Package Manager (`dpkg`)\n\n| Alias  | Command     | Description                 |\n| ------ | ----------- | --------------------------- |\n| `dpkg` | `sudo dpkg` | Package manager for Debian. |\n\n## Nala Package Manager\n\n| Alias   | Command                   | Description                                                                                              |\n| ------- | ------------------------- | -------------------------------------------------------------------------------------------------------- |\n| `nala`  | `sudo nala`               | Nala is a prettier front-end for libapt-pkg, doubles as --help.                                          |\n| `nalaf` | `sudo nala fetch`         | Fetch fast mirrors to improve download speed.                                                            |\n| `nalau` | `sudo nala update`        | Update the list of available packages.                                                                   |\n| `nalafu`| `sudo nala upgrade -y`    | The equivalent of apt update && apt full-upgrade --auto-remove.                                          |\n| `nalai` | `sudo nala install -y`    | Takes multiple packages as arguments and will install all of them.                                       |\n| `nalar` | `sudo nala remove -y`     | Remove or purge packages that are no longer needed.                                                      |\n| `nalaa` | `sudo nala autoremove -y` | Automatically remove or purge any packages that are no longer needed.                                    |\n| `nalah` | `sudo nala history`       | Nala history with no subcommands will show a summary of all transactions made.                           |\n| `nalal` | `sudo nala list`          | List all packages or only packages based on the provided name, glob or regex. By default will only glob. |\n| `nalas` | `sudo nala search`        | Search package names and descriptions using a word, regex or glob.                                       |\n| `nalav` | `sudo nala show`          | Show information about a package such as the name, version, dependencies etc.                            |\n\n## Snap Package Manager\n\n| Alias    | Command                                | Description                                                                                                                                              |\n| -------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `snap`   | `sudo snap`                            | The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions.          |\n| `snapfu` | `sudo snap refresh`                    | Update all installed snaps.                                                                                                                              |\n| `snapi`  | `sudo snap install`                    | Installs the named snaps.                                                                                                                                |\n| `snaps`  | `sudo snap find`                       | Queries the store for available packages.                                                                                                                |\n| `snapr`  | `sudo snap remove --terminate --purge` | Performs a full and clean remove. Remove the snap without saving a snapshot of its data. Remove all the snap revisions without the option `--revision=`. |\n| `snapli` | `sudo snap list --all`                 | List all installed snaps and revisions in the current system.                                                                                            |\n"
  },
  {
    "path": "aliases/terraform.aliases.md",
    "content": "# Aliases `terraform`\n\nThis defines aliases for `terraform`.\n\n| Alias    | Command                      |\n| -------- | ---------------------------- |\n| `t`      | `terraform`                  |\n| `tinit`  | `terraform init`             |\n| `tplan`  | `terraform plan`             |\n| `tapply` | `terraform apply`            |\n| `tfmt`   | `terraform fmt`              |\n"
  },
  {
    "path": "aliases/terraform.aliases.sh",
    "content": "# Aliases\n# (sorted alphabetically)\n#\n\nalias t='terraform'\n\nalias tapply='terraform apply'\nalias tfmt='terraform fmt'\nalias tinit='terraform init'\nalias tplan='terraform plan'\n"
  },
  {
    "path": "cache/.gitkeep",
    "content": ""
  },
  {
    "path": "completions/apm.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# apm-bash-completion is written by Ugur Ozyilmazel\n# repo: https://github.com/vigo/apm-bash-completion\n\nfunction __apm {\n    local cur prev options apm_command\n    COMPREPLY=()\n    cur=\"${COMP_WORDS[COMP_CWORD]}\"\n    prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n    __apm_get_command\n    if [[ $cur = -* ]]; then\n        options=\"--color\"\n        if [[ -z $apm_command ]]; then\n            options=\"$options --version --help\"\n        fi\n        if [[ $apm_command && $apm_command = publish ]]; then\n            options=\"--tag --rename\"\n        fi\n    else\n        if [[ -z $apm_command || $apm_command = help ]]; then\n            options=\"help clean config dedupe deinstall delete dev develop docs erase featured home init install link linked links list ln lns login ls open outdated publish rebuild rebuild-module-cache remove rm search show star starred stars test uninstall unlink unpublish unstar update upgrade view\"\n        fi\n        if [[ $apm_command && $apm_command = publish ]]; then\n            options=\"major minor patch build\"\n        fi\n        if [[ $apm_command && $apm_command = config ]]; then\n            options=\"set get delete list edit\"\n        fi\n    fi\n    COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n}\nfunction __apm_get_command {\n    local i\n    for ((i=1; i < $COMP_CWORD; ++i)); do\n        local arg=${COMP_WORDS[$i]}\n        case $arg in\n        [^-]*)\n            apm_command=$arg\n            return;;\n        --version)\n            apm_command=-\n            return;;\n        --help)\n            apm_command=help\n            return;;\n        publish)\n            apm_command=publish\n            return;;\n        config)\n            apm_command=config\n            return;;\n        esac\n    done\n}\ncomplete -F __apm -o bashdefault -o default apm\n"
  },
  {
    "path": "completions/asdf.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion support for the `asdf` command.\n# Depends on the `asdf` plugin.\n\n# Only load the completions if the ASDF_DIR variable was set.\nif [[ ${ASDF_DIR+set} ]]; then\n  . \"$ASDF_DIR/completions/asdf.bash\"\nfi\n"
  },
  {
    "path": "completions/awscli.completion.sh",
    "content": "#! bash oh-my-bash.module\n_omb_util_binary_exists aws_completer && complete -C \"$(type -P aws_completer)\" aws\n"
  },
  {
    "path": "completions/brew.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_command_exists brew; then\n  _omb_completion_brew_prefix=$(brew --prefix)\n  if [[ $_omb_completion_brew_prefix ]]; then\n    if [[ -f $_omb_completion_brew_prefix/etc/bash_completion ]]; then\n      source \"$_omb_completion_brew_prefix\"/etc/bash_completion\n    fi\n\n    if [[ -f $_omb_completion_brew_prefix/Library/Contributions/brew_bash_completion.sh ]]; then\n      source \"$_omb_completion_brew_prefix\"/Library/Contributions/brew_bash_completion.sh\n    fi\n  fi\n  unset -v _omb_completion_brew_prefix\nfi\n"
  },
  {
    "path": "completions/bundler.completion.sh",
    "content": "#! bash oh-my-bash.module\n# bash completion for the `bundle` command.\n#\n# Copyright (c) 2011-2013 Daniel Luz <dev at mernen dot com>.\n# Distributed under the MIT license.\n# http://mernen.com/projects/completion-ruby\n#\n# To use, source this file on bash:\n#   . completion-bundle\n\nfunction __bundle {\n  local cur=$2\n  local prev=$3\n  local bundle_command\n  __bundle_get_command\n  COMPREPLY=()\n\n  local options\n  if [[ $cur = -* ]]; then\n      options=\"--no-color --verbose\"\n      if [[ -z $bundle_command ]]; then\n          options=\"$options --version --help\"\n      fi\n  else\n      if [[ -z $bundle_command || $bundle_command = help ]]; then\n          options=\"help install update package exec config check list show\n                   console open viz init gem\"\n      fi\n  fi\n  COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n}\n\nfunction __bundle_get_command {\n    local i\n    for ((i=1; i < $COMP_CWORD; ++i)); do\n        local arg=${COMP_WORDS[$i]}\n\n        case $arg in\n        [^-]*)\n            bundle_command=$arg\n            return;;\n        --version)\n            # command-killer\n            bundle_command=-\n            return;;\n        --help)\n            bundle_command=help\n            return;;\n        esac\n    done\n}\n\n\ncomplete -F __bundle -o bashdefault -o default bundle\n# vim: ai ft=sh sw=4 sts=2 et\n"
  },
  {
    "path": "completions/capistrano.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion support for Capistrano.\n\n_omb_module_require lib:omb-completion\n\nfunction _omb_completion_cap {\n  local cur\n  _omb_completion_reassemble_breaks :\n\n  if [[ -f Capfile ]]; then\n    local recent=$(ls -t .cap_tasks~ Capfile **/*.cap 2> /dev/null | head -n 1)\n    if [[ $recent != '.cap_tasks~' ]]; then\n      if cap --version | grep 'Capistrano v2.' > /dev/null; then\n        # Capistrano 2.x\n        cap --tool --verbose --tasks | cut -d \" \" -f 2 > .cap_tasks~\n      else\n        # Capistrano 3.x\n        cap --all --tasks | cut -d \" \" -f 2 > .cap_tasks~\n      fi\n    fi\n    COMPREPLY=($(compgen -W '$(< .cap_tasks)' -- \"$cur\"))\n  fi\n\n  _omb_completion_resolve_breaks\n}\n\ncomplete -o default -o nospace -F _omb_completion_cap cap\n"
  },
  {
    "path": "completions/chezmoi.completion.sh",
    "content": "#! bash oh-my-bash.module\n\nif _omb_util_command_exists chezmoi; then\n    eval -- \"$(chezmoi completion bash)\"\nfi\n"
  },
  {
    "path": "completions/composer.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n_composer()\n{\n    local cur script coms opts com\n    COMPREPLY=()\n    _get_comp_words_by_ref -n : cur words\n\n    # for an alias, get the real script behind it\n    if [[ $(type -t ${words[0]}) == \"alias\" ]]; then\n        script=$(alias ${words[0]} | sed -E \"s/alias ${words[0]}='(.*)'/\\1/\")\n    else\n        script=${words[0]}\n    fi\n\n    # lookup for command\n    for word in ${words[@]:1}; do\n        if [[ $word != -* ]]; then\n            com=$word\n            break\n        fi\n    done\n\n    # completing for an option\n    if [[ ${cur} == --* ]] ; then\n        opts=\"--help --quiet --verbose --version --ansi --no-ansi --no-interaction --profile --no-plugins --working-dir\"\n\n        case \"$com\" in\n            about)\n            opts=\"${opts} \"\n            ;;\n            archive)\n            opts=\"${opts} --format --dir --file\"\n            ;;\n            browse)\n            opts=\"${opts} --homepage --show\"\n            ;;\n            clear-cache)\n            opts=\"${opts} \"\n            ;;\n            config)\n            opts=\"${opts} --global --editor --auth --unset --list --file --absolute\"\n            ;;\n            create-project)\n            opts=\"${opts} --stability --prefer-source --prefer-dist --repository --repository-url --dev --no-dev --no-custom-installers --no-scripts --no-progress --no-secure-http --keep-vcs --no-install --ignore-platform-reqs\"\n            ;;\n            depends)\n            opts=\"${opts} --recursive --tree\"\n            ;;\n            diagnose)\n            opts=\"${opts} \"\n            ;;\n            dump-autoload)\n            opts=\"${opts} --no-scripts --optimize --classmap-authoritative --apcu --no-dev\"\n            ;;\n            exec)\n            opts=\"${opts} --list\"\n            ;;\n            global)\n            opts=\"${opts} \"\n            ;;\n            help)\n            opts=\"${opts} --xml --format --raw\"\n            ;;\n            init)\n            opts=\"${opts} --name --description --author --type --homepage --require --require-dev --stability --license --repository\"\n            ;;\n            install)\n            opts=\"${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --no-custom-installers --no-autoloader --no-scripts --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --apcu-autoloader --ignore-platform-reqs\"\n            ;;\n            licenses)\n            opts=\"${opts} --format --no-dev\"\n            ;;\n            list)\n            opts=\"${opts} --xml --raw --format\"\n            ;;\n            outdated)\n            opts=\"${opts} --outdated --all --direct --strict\"\n            ;;\n            prohibits)\n            opts=\"${opts} --recursive --tree\"\n            ;;\n            remove)\n            opts=\"${opts} --dev --no-progress --no-update --no-scripts --update-no-dev --update-with-dependencies --no-update-with-dependencies --ignore-platform-reqs --optimize-autoloader --classmap-authoritative --apcu-autoloader\"\n            ;;\n            require)\n            opts=\"${opts} --dev --prefer-source --prefer-dist --no-progress --no-suggest --no-update --no-scripts --update-no-dev --update-with-dependencies --ignore-platform-reqs --prefer-stable --prefer-lowest --sort-packages --optimize-autoloader --classmap-authoritative --apcu-autoloader\"\n            ;;\n            run-script)\n            opts=\"${opts} --timeout --dev --no-dev --list\"\n            ;;\n            search)\n            opts=\"${opts} --only-name --type\"\n            ;;\n            self-update)\n            opts=\"${opts} --rollback --clean-backups --no-progress --update-keys --stable --preview --snapshot\"\n            ;;\n            show)\n            opts=\"${opts} --all --installed --platform --available --self --name-only --path --tree --latest --outdated --minor-only --direct --strict\"\n            ;;\n            status)\n            opts=\"${opts} \"\n            ;;\n            suggests)\n            opts=\"${opts} --by-package --by-suggestion --no-dev\"\n            ;;\n            update)\n            opts=\"${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --lock --no-custom-installers --no-autoloader --no-scripts --no-progress --no-suggest --with-dependencies --optimize-autoloader --classmap-authoritative --apcu-autoloader --ignore-platform-reqs --prefer-stable --prefer-lowest --interactive --root-reqs\"\n            ;;\n            validate)\n            opts=\"${opts} --no-check-all --no-check-lock --no-check-publish --with-dependencies --strict\"\n            ;;\n\n        esac\n\n        COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n        __ltrim_colon_completions \"$cur\"\n\n        return 0;\n    fi\n\n    # completing for a command\n    if [[ $cur == $com ]]; then\n        coms=\"about archive browse clear-cache config create-project depends diagnose dump-autoload exec global help init install licenses list outdated prohibits remove require run-script search self-update show status suggests update validate\"\n\n        COMPREPLY=($(compgen -W \"${coms}\" -- ${cur}))\n        __ltrim_colon_completions \"$cur\"\n\n        return 0\n    fi\n}\n\ncomplete -o default -F _composer composer\n"
  },
  {
    "path": "completions/conda.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_binary_exists register-python-argcomplete; then\n  eval -- \"$(register-python-argcomplete conda)\"\nelif _omb_util_binary_exists register-python-argcomplete3; then\n  eval -- \"$(register-python-argcomplete3 conda)\"\nelif _omb_util_binary_exists register-python-argcomplete2; then\n  eval -- \"$(register-python-argcomplete2 conda)\"\nelse\n  echo \"Please install argcomplete to use conda completion\" >&2\nfi\n"
  },
  {
    "path": "completions/crc.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_command_exists crc; then\n  eval -- \"$(crc completion bash)\"\nfi\n"
  },
  {
    "path": "completions/defaults.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Note: I could not find the true original source of this completion, but we\n# can find several versions at the following places:\n#\n# * https://gist.github.com/mbauman/839902\n# * https://github.com/taylanpince/wiki/blob/master/scripts/bash_completion_scripts/defaults (Version 1.0)\n# * https://github.com/gaelicWizard/bash-progcomp/tree/main (Version 2.0)\n#\n# The v2 script seems to be a complete rewrite of the original v1.0, though it\n# retains the original copyright notice.  The current version is based on\n# Version 1.0.\n#\n#------------------------------------------------------------------------------\n# defaults\n# Bash command line completion for defaults\n#\n# Created by Jonathon Mah on 2006-11-08.\n# Copyright 2006 Playhaus. All rights reserved.\n#\n# Version 1.0 (2006-11-08)\n\nfunction _defaults_domains {\n  local cur\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n\n  local domains=$(defaults domains | sed -e 's/, /:/g' | tr : '\\n' | sed -e 's/ /\\\\ /g' | grep -i \"^$cur\")\n  _omb_util_split COMPREPLY \"$domains\" $'\\n'\n  if grep -q \"^$cur\" <<< '-app'; then\n    COMPREPLY[${#COMPREPLY[@]}]=\"-app\"\n  fi\n  return 0\n}\n\nfunction _defaults {\n  local cur prev host_opts cmds cmd domain keys key_index\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n\n  host_opts='-currentHost -host'\n  cmds='read read-type write rename delete domains find help'\n\n  if ((COMP_CWORD == 1)); then\n    COMPREPLY=( $(compgen -W \"$host_opts $cmds\" -- \"$cur\") )\n    return 0\n  elif ((COMP_CWORD == 2)); then\n    if [[ $prev == \"-currentHost\" ]]; then\n      COMPREPLY=( $(compgen -W \"$cmds\" -- \"$cur\") )\n      return 0\n    elif [[ $prev == \"-host\" ]]; then\n      if _omb_util_function_exists _known_hosts; then\n        _known_hosts -a\n      fi\n      return 0\n    else\n      _defaults_domains\n      return 0\n    fi\n  elif ((COMP_CWORD == 3)); then\n    if [[ ${COMP_WORDS[1]} == \"-host\" ]]; then\n      _defaults_domains\n      return 0\n    fi\n  fi\n\n  # Both a domain and command have been specified\n\n  if [[ ${COMP_WORDS[1]} == @(${cmds// /|}) ]]; then\n    cmd=${COMP_WORDS[1]}\n    domain=${COMP_WORDS[2]}\n    key_index=3\n    if [[ $domain == \"-app\" ]]; then\n      if ((COMP_CWORD == 3)); then\n        # Completing application name. Can't help here, sorry\n        return 0\n      fi\n      domain=\"-app ${COMP_WORDS[3]}\"\n      key_index=4\n    fi\n  elif [[ ${COMP_WORDS[2]} == \"-currentHost\" && ${COMP_WORDS[2]} == @(${cmds// /|}) ]]; then\n    cmd=${COMP_WORDS[2]}\n    domain=${COMP_WORDS[3]}\n    key_index=4\n    if [[ \"$domain\" == \"-app\" ]]; then\n      if [[ $COMP_CWORD -eq 4 ]]; then\n        # Completing application name. Can't help here, sorry\n        return 0\n      fi\n      domain=\"-app ${COMP_WORDS[4]}\"\n      key_index=5\n    fi\n  elif [[ ${COMP_WORDS[3]} == \"-host\" && ${COMP_WORDS[3]} == @(${cmds// /|}) ]]; then\n    cmd=${COMP_WORDS[3]}\n    domain=${COMP_WORDS[4]}\n    key_index=5\n    if [[ $domain == \"-app\" ]]; then\n      if ((COMP_CWORD == 5)); then\n        # Completing application name. Can't help here, sorry\n        return 0\n      fi\n      domain=\"-app ${COMP_WORDS[5]}\"\n      key_index=6\n    fi\n  fi\n\n  keys=$(defaults read $domain 2>/dev/null |\n           sed -ne '/^    [^}) ]/p' |\n           sed -e 's/^    \\([^\" ]\\{1,\\}\\) = .*$/\\1/g' -e 's/^    \"\\([^\"]\\{1,\\}\\)\" = .*$/\\1/g' |\n           sed -e 's/ /\\\\ /g' )\n\n  case $cmd in\n  read|read-type)\n    # Complete key\n    local IFS=$'\\n'\n    COMPREPLY=( $(grep -i \"^${cur//\\\\/\\\\\\\\}\" <<< \"$keys\") )\n    ;;\n  write)\n    if ((key_index == COMP_CWORD)); then\n      # Complete key\n      local IFS=$'\\n'\n      COMPREPLY=( $(grep -i \"^${cur//\\\\/\\\\\\\\}\" <<< \"$keys\") )\n    elif ((key_index + 1 == COMP_CWORD)); then\n      # Complete value type\n      # Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces\n      local value_types='-string -data -integer -float -boolean -date -array -array-add -dict -dict-add'\n      local cur_type=$(defaults read-type $domain ${COMP_WORDS[key_index]} 2>/dev/null | sed -e 's/^Type is \\(.*\\)/-\\1/' -e's/dictionary/dict/' | grep \"^$cur\")\n      if [[ $cur_type ]]; then\n        COMPREPLY=( $cur_type )\n      else\n        COMPREPLY=( $(compgen -W \"$value_types\" -- \"$cur\") )\n      fi\n    elif ((key_index + 2 == COMP_CWORD)); then\n      # Complete value\n      # Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces\n      COMPREPLY=( $(defaults read $domain ${COMP_WORDS[key_index]} 2>/dev/null | grep -i \"^${cur//\\\\/\\\\\\\\}\") )\n    fi\n    ;;\n  rename)\n    if ((key_index == COMP_CWORD || key_index + 1 == COMP_CWORD)); then\n      # Complete source and destination keys\n      local IFS=$'\\n'\n      COMPREPLY=( $(grep -i \"^${cur//\\\\/\\\\\\\\}\" <<< \"$keys\") )\n    fi\n    ;;\n  delete)\n    if ((key_index == COMP_CWORD)); then\n      # Complete key\n      local IFS=$'\\n'\n      COMPREPLY=( $(grep -i \"^${cur//\\\\/\\\\\\\\}\" <<< \"$keys\") )\n    fi\n    ;;\n  esac\n\n  return 0\n}\n\ncomplete -F _defaults -o default defaults\n\n\n# This file is licensed under the BSD license, as follows:\n#\n# Copyright (c) 2006, Playhaus\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n#   list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the name of the Playhaus nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# This software is provided by the copyright holders and contributors \"as is\"\n# and any express or implied warranties, including, but not limited to, the\n# implied warranties of merchantability and fitness for a particular purpose are\n# disclaimed. In no event shall the copyright owner or contributors be liable\n# for any direct, indirect, incidental, special, exemplary, or consequential\n# damages (including, but not limited to, procurement of substitute goods or\n# services; loss of use, data, or profits; or business interruption) however\n# caused and on any theory of liability, whether in contract, strict liability,\n# or tort (including negligence or otherwise) arising in any way out of the use\n# of this software, even if advised of the possibility of such damage.\n"
  },
  {
    "path": "completions/dirs.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion support for the 'dirs' plugin (commands G, R).\n\nfunction _dirs-complete {\n    local CURRENT_PROMPT=\"${COMP_WORDS[COMP_CWORD]}\"\n\n    # parse all defined shortcuts from ~/.dirs\n    if [ -r \"$HOME/.dirs\" ]; then\n        COMPREPLY=($(compgen -W \"$(grep -v '^#' ~/.dirs | sed -e 's/\\(.*\\)=.*/\\1/')\" -- ${CURRENT_PROMPT}) )\n    fi\n\n    return 0\n}\n\ncomplete -o default -o nospace -F _dirs-complete G R\n"
  },
  {
    "path": "completions/django.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Upstream: https://github.com/django/django/blob/90c59b4e12e6ff41407694a460f5f30c4688dbfd/extras/django_bash_completion\n#\n# #########################################################################\n# This bash script adds tab-completion feature to django-admin and manage.py.\n#\n# Testing it out without installing\n# =================================\n#\n# To test out the completion without \"installing\" this, just run this file\n# directly, like so:\n#\n#     . ~/path/to/django_bash_completion\n#\n# Note: There's a dot ('.') at the beginning of that command.\n#\n# After you do that, tab completion will immediately be made available in your\n# current Bash shell. But it won't be available next time you log in.\n#\n# Installing\n# ==========\n#\n# To install this, point to this file from your .bash_profile, like so:\n#\n#     . ~/path/to/django_bash_completion\n#\n# Do the same in your .bashrc if .bashrc doesn't invoke .bash_profile.\n#\n# Settings will take effect the next time you log in.\n#\n# Uninstalling\n# ============\n#\n# To uninstall, just remove the line from your .bash_profile and .bashrc.\n\nfunction _omb_completion_django {\n  COMPREPLY=($(COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n    COMP_CWORD=$COMP_CWORD \\\n\t  DJANGO_AUTO_COMPLETE=1 \"$1\"))\n}\n# When the django-admin.py deprecation ends, remove django-admin.py.\ncomplete -F _omb_completion_django -o default manage.py django-admin\n\nfunction _omb_completion_django_python {\n  if ((COMP_CWORD >= 2)); then\n    if command grep -qE \"python([3-9]\\.[0-9])?\" <<< \"${COMP_WORDS[0]##*/}\"; then\n      if command grep -qE \"manage\\.py|django-admin\" <<< \"${COMP_WORDS[1]##*/}\"; then\n        COMPREPLY=($(COMP_WORDS=\"${COMP_WORDS[*]:1}\" \\\n          COMP_CWORD=$((COMP_CWORD - 1)) \\\n          DJANGO_AUTO_COMPLETE=1 \"${COMP_WORDS[@]}\"))\n      fi\n    fi\n  fi\n}\n\nfunction _omb_completion_django_init {\n  # Support for multiple interpreters.\n  local -a pythons=(python)\n  if _omb_util_command_exists whereis; then\n    local python_interpreters\n    _omb_util_split python_interpreters \"$(whereis python | cut -d \" \" -f 2-)\"\n    local python\n    for python in \"${python_interpreters[@]}\"; do\n      [[ -x $python ]] || continue\n      [[ $python == *-config ]] || continue\n      python=${python##*/}\n      [[ $python ]] && pythons+=(\"$python\")\n    done\n    _omb_util_split pythons \"$(_omb_util_print_lines \"${pythons[@]}\" | sort -u)\" $'\\n'\n  fi\n\n  complete -F _omb_completion_django_python -o default \"${pythons[@]}\"\n  unset -f \"$FUNCNAME\"\n}\n_omb_completion_django_init\n"
  },
  {
    "path": "completions/docker-compose.completion.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_completion_docker_compose_has_completion {\n  local complete\n  complete=$(complete -p docker-compose 2>/dev/null) && [[ $complete ]] || return 1\n\n  unset -f _omb_completion_docker_compose_has_completion\n  unset -f _omb_completion_docker_compose_try\n  return 0\n}\n\nfunction _omb_completion_docker_compose_try {\n  if [[ -s $1 ]]; then\n    source \"$1\"\n    _omb_completion_docker_compose_has_completion && return 0\n  elif [[ -s $1.sh ]]; then\n    source \"$1.sh\"\n    _omb_completion_docker_compose_has_completion && return 0\n  elif [[ -s $1.bash ]]; then\n    source \"$1.bash\"\n    _omb_completion_docker_compose_has_completion && return 0\n  fi\n  return 1\n}\n\n_omb_completion_docker_compose_has_completion && return 0\n\nif _omb_util_function_exists _comp_load; then\n  # bash-completion 2.12\n  _comp_load -- docker-compose\n  _omb_completion_docker_compose_has_completion && return 0\nelif _omb_util_function_exists __load_completion; then\n  # bash-completion <= 2.11\n  __load_completion docker-compose\n  _omb_completion_docker_compose_has_completion && return 0\nfi\n\n_omb_completion_docker_compose_try /usr/share/bash-completion/completions/docker-compose && return 0\n_omb_completion_docker_compose_try /etc/bash_completion.d/docker-compose && return 0\n\nunset -f _omb_completion_docker_compose_has_completion\nunset -f _omb_completion_docker_compose_try\nsource \"$OSH/completions/fallback/docker-compose.bash\"\n"
  },
  {
    "path": "completions/docker-machine.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# bash completion file for docker-machine commands\n#\n# This script provides completion of:\n#  - commands and their options\n#  - machine names\n#  - filepaths\n#\n# To enable the completions either:\n#  - place this file in /etc/bash_completion.d\n#  or\n#  - copy this file to e.g. ~/.docker-machine-completion.sh and add the line\n#    below to your .bashrc after bash completion features are loaded\n#    . ~/.docker-machine-completion.sh\n#\n\nfunction _docker_machine_active {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=()\n    fi\n}\n\nfunction _docker_machine_config {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--swarm --help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_create {\n    # cheating, b/c there are approximately one zillion options to create\n    COMPREPLY=($(compgen -W \"$(docker-machine create --help | grep '^   -' | sed 's/^   //; s/[^a-z0-9-].*$//')\" -- \"${cur}\"))\n}\n\nfunction _docker_machine_env {\n    case \"${prev}\" in\n        --shell)\n            # What are the options for --shell?\n            COMPREPLY=()\n            ;;\n        *)\n            if [[ \"${cur}\" == -* ]]; then\n                COMPREPLY=($(compgen -W \"--swarm --shell --unset --no-proxy --help\" -- \"${cur}\"))\n            else\n                COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n            fi\n    esac\n}\n\n# See docker-machine-wrapper.bash for the use command\nfunction _docker_machine_use {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--swarm --unset --help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_inspect {\n    case \"${prev}\" in\n        -f|--format)\n            COMPREPLY=()\n            ;;\n        *)\n            if [[ \"${cur}\" == -* ]]; then\n                COMPREPLY=($(compgen -W \"--format --help\" -- \"${cur}\"))\n            else\n                COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n            fi\n            ;;\n    esac\n}\n\nfunction _docker_machine_ip {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_kill {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_ls {\n    case \"${prev}\" in\n        --filter)\n            COMPREPLY=()\n            ;;\n        *)\n            COMPREPLY=($(compgen -W \"--quiet --filter --format --timeout --help\" -- \"${cur}\"))\n            ;;\n    esac\n}\n\nfunction _docker_machine_regenerate_certs {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help --force\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_restart {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_rm {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help --force -y\" -- \"${cur}\"))\n    else\n        # For rm, it's best to be explicit\n        COMPREPLY=()\n    fi\n}\n\nfunction _docker_machine_ssh {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_scp {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help --recursive\" -- \"${cur}\"))\n    else\n        _filedir\n        # It would be really nice to ssh to the machine and ls to complete\n        # remote files.\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q | sed 's/$/:/')\" -- \"${cur}\") \"${COMPREPLY[@]}\")\n    fi\n}\n\nfunction _docker_machine_start {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_status {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_stop {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_upgrade {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_url {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_version {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"$(docker-machine ls -q)\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_help {\n    if [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"--help\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"${commands[*]}\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine_docker_machine {\n    if [[ \" ${wants_file[*]} \" =~ \" ${prev} \" ]]; then\n        _filedir\n    elif [[ \" ${wants_dir[*]} \" =~ \" ${prev} \" ]]; then\n        _filedir -d\n    elif [[ \"${cur}\" == -* ]]; then\n        COMPREPLY=($(compgen -W \"${flags[*]} ${wants_dir[*]} ${wants_file[*]}\" -- \"${cur}\"))\n    else\n        COMPREPLY=($(compgen -W \"${commands[*]}\" -- \"${cur}\"))\n    fi\n}\n\nfunction _docker_machine {\n    COMPREPLY=()\n    local commands=(active config create env inspect ip kill ls regenerate-certs restart rm ssh scp start status stop upgrade url version help)\n\n    local flags=(--debug --native-ssh --github-api-token --bugsnag-api-token --help --version)\n    local wants_dir=(--storage-path)\n    local wants_file=(--tls-ca-cert --tls-ca-key --tls-client-cert --tls-client-key)\n\n    # Add the use subcommand, if we have an alias loaded\n    if [[ ${DOCKER_MACHINE_WRAPPED} = true ]]; then\n        commands=(\"${commands[@]}\" use)\n    fi\n\n    local cur prev words cword\n    _get_comp_words_by_ref -n : cur prev words cword\n    local i\n    local command=docker-machine\n\n    for (( i=1; i < ${cword}; ++i)); do\n        local word=${words[i]}\n        if [[ \" ${wants_file[*]} ${wants_dir[*]} \" =~ \" ${word} \" ]]; then\n            # skip the next option\n            (( ++i ))\n        elif [[ \" ${commands[*]} \" =~ \" ${word} \" ]]; then\n            command=${word}\n        fi\n    done\n\n    local completion_func=_docker_machine_\"${command//-/_}\"\n    if _omb_util_function_exists \"${completion_func}\"; then\n        \"${completion_func}\"\n    fi\n\n    return 0\n}\n\ncomplete -F _docker_machine docker-machine\n"
  },
  {
    "path": "completions/docker.completion.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_completion_docker_has_completion {\n  local complete\n  complete=$(complete -p docker 2>/dev/null) && [[ $complete ]] || return 1\n\n  # bash-completion runs $(docker completion bash) as a fallback, but the\n  # official docker completion is not provided through $(docker completion\n  # bash), which is automatically generated by cobra's bash completion V2.  In\n  # this case, we can instead use the completion file bundled with OMB.\n  if [[ $complete == *__start_docker* ]]; then\n    complete -r docker\n    return 1\n  fi\n\n  unset -f _omb_completion_docker_has_completion\n  unset -f _omb_completion_docker_try\n  return 0\n}\n\nfunction _omb_completion_docker_try {\n  if [[ -s $1 ]]; then\n    source \"$1\"\n    _omb_completion_docker_has_completion && return 0\n  elif [[ -s $1.sh ]]; then\n    source \"$1.sh\"\n    _omb_completion_docker_has_completion && return 0\n  elif [[ -s $1.bash ]]; then\n    source \"$1.bash\"\n    _omb_completion_docker_has_completion && return 0\n  fi\n  return 1\n}\n\n_omb_completion_docker_has_completion && return 0\n\nif _omb_util_function_exists _comp_load; then\n  # bash-completion 2.12\n  _comp_load -- docker-compose\n  _omb_completion_docker_has_completion && return 0\nelif _omb_util_function_exists __load_completion; then\n  # bash-completion <= 2.11\n  __load_completion docker-compose\n  _omb_completion_docker_has_completion && return 0\nfi\n\n_omb_completion_docker_try /usr/share/bash-completion/completions/docker && return 0\n_omb_completion_docker_try /etc/bash_completion.d/docker && return 0\n\nunset -f _omb_completion_docker_has_completion\nunset -f _omb_completion_docker_try\nsource \"$OSH/completions/fallback/docker.bash\"\n"
  },
  {
    "path": "completions/drush.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# bash completion support for Drush:\n#   https://github.com/drush-ops/drush\n#\n# Originally from:\n#   http://github.com/drush-ops/drush/blob/master/drush.complete.sh\n\n# Ensure drush is available.\n_omb_util_command_exists drush || return\n\nfunction __drush_ps1 {\n  f=\"${TMPDIR:-/tmp/}/drush-env/drush-drupal-site-$$\"\n  if [ -f $f ]\n  then\n    __DRUPAL_SITE=$(cat \"$f\")\n  else\n    __DRUPAL_SITE=\"$DRUPAL_SITE\"\n  fi\n\n  [[ -n \"$__DRUPAL_SITE\" ]] && printf \"${1:- (%s)}\" \"$__DRUPAL_SITE\"\n}\n\n# Completion function, uses the \"drush complete\" command to retrieve\n# completions for a specific command line COMP_WORDS.\nfunction _drush_completion {\n  # Set IFS to newline (locally), since we only use newline separators, and\n  # need to retain spaces (or not) after completions.\n  local IFS=$'\\n'\n  # The '< /dev/null' is a work around for a bug in php libedit stdin handling.\n  # Note that libedit in place of libreadline in some distributions. See:\n  # https://bugs.launchpad.net/ubuntu/+source/php5/+bug/322214\n  COMPREPLY=( $(drush --early=includes/complete.inc \"${COMP_WORDS[@]}\" < /dev/null 2> /dev/null) )\n}\n\n# Register our completion function. We include common short aliases for Drush.\ncomplete -o bashdefault -o default -o nospace -F _drush_completion d dr drush drush5 drush6 drush6 drush.php\n"
  },
  {
    "path": "completions/fabric-completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Bash completion support for Fabric (http://fabfile.org/)\n#\n#\n# Copyright (C) 2011 by Konstantin Bakulin\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n# Thanks to:\n# - Adam Vandenberg,\n#   https://github.com/adamv/dotfiles/blob/master/completion_scripts/fab_completion.bash\n#\n# - Enrico Batista da Luz,\n#   https://github.com/ricobl/dotfiles/blob/master/bin/fab_bash_completion\n#\n\n\n# Use cache files for fab tasks or not.\n# If set to \"false\" command \"fab --shortlist\" will be executed every time.\nexport FAB_COMPLETION_CACHE_TASKS=true\n\n# File name where tasks cache will be stored (in current dir).\nexport FAB_COMPLETION_CACHED_TASKS_FILENAME=\".fab_tasks~\"\n\n\n# Set command to get time of last file modification as seconds since Epoch\ncase `uname` in\n    Darwin|FreeBSD)\n        __FAB_COMPLETION_MTIME_COMMAND=\"stat -f '%m'\"\n        ;;\n    *)\n        __FAB_COMPLETION_MTIME_COMMAND=\"stat -c '%Y'\"\n        ;;\nesac\n\n\n#\n# Get time of last fab cache file modification as seconds since Epoch\n#\nfunction __fab_chache_mtime() {\n    ${__FAB_COMPLETION_MTIME_COMMAND} \\\n        $FAB_COMPLETION_CACHED_TASKS_FILENAME | xargs -n 1 expr\n}\n\n\n#\n# Get time of last fabfile file/module modification as seconds since Epoch\n#\nfunction __fab_fabfile_mtime() {\n    local f=\"fabfile\"\n    if [[ -e \"$f.py\" ]]; then\n        ${__FAB_COMPLETION_MTIME_COMMAND} \"$f.py\" | xargs -n 1 expr\n    else\n        # Suppose that it's a fabfile dir\n        find $f/*.py -exec ${__FAB_COMPLETION_MTIME_COMMAND} {} + \\\n            | xargs -n 1 expr | sort -n -r | head -1\n    fi\n}\n\n\n#\n# Completion for \"fab\" command\n#\nfunction __fab_completion() {\n    # Return if \"fab\" command doesn't exists\n    _omb_util_binary_exists fab || return 0\n\n    # Variables to hold the current word and possible matches\n    local cur=\"${COMP_WORDS[COMP_CWORD]}\"\n    local opts=()\n\n    # Generate possible matches and store them in variable \"opts\"\n    case \"${cur}\" in\n        -*)\n            if [[ -z \"${__FAB_COMPLETION_LONG_OPT}\" ]]; then\n                export __FAB_COMPLETION_LONG_OPT=$(\n                    fab --help | command grep -Eo \"\\-\\-[A-Za-z_\\-]+\\=?\" | sort -u)\n            fi\n            opts=\"${__FAB_COMPLETION_LONG_OPT}\"\n            ;;\n\n        # Completion for short options is not nessary.\n        # It's left here just for history.\n        # -*)\n        #     if [[ -z \"${__FAB_COMPLETION_SHORT_OPT}\" ]]; then\n        #         export __FAB_COMPLETION_SHORT_OPT=$(\n        #             fab --help | command grep -Eo \"^ +\\-[A-Za-z_\\]\" | sort -u)\n        #     fi\n        #     opts=\"${__FAB_COMPLETION_SHORT_OPT}\"\n        #     ;;\n\n        *)\n            # If \"fabfile.py\" or \"fabfile\" dir with \"__init__.py\" file exists\n            local f=\"fabfile\"\n            if [[ -e \"$f.py\" || (-d \"$f\" && -e \"$f/__init__.py\") ]]; then\n                # Build a list of the available tasks\n                if $FAB_COMPLETION_CACHE_TASKS; then\n                    # If use cache\n                    if [[ ! -s ${FAB_COMPLETION_CACHED_TASKS_FILENAME} ||\n                          $(__fab_fabfile_mtime) -gt $(__fab_chache_mtime) ]]; then\n                        fab --shortlist > ${FAB_COMPLETION_CACHED_TASKS_FILENAME} \\\n                            2> /dev/null\n                    fi\n                    opts=$(cat ${FAB_COMPLETION_CACHED_TASKS_FILENAME})\n                else\n                    # Without cache\n                    opts=$(fab --shortlist 2> /dev/null)\n                fi\n            fi\n            ;;\n    esac\n\n    # Set possible completions\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n}\ncomplete -o default -o nospace -F __fab_completion fab\n"
  },
  {
    "path": "completions/fallback/docker-compose.bash",
    "content": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note by OMB: This file is taken from the following version of Docker Compose\n# v1:\n#\n# https://github.com/docker/compose/blob/30fcb72cf3b136598883752edfa6ea4f3b8643d4/contrib/completion/bash/docker-compose\n#\n# Licence: Apache-2.0 license\n# Copyright: original authors of Docker Compose v1\n#------------------------------------------------------------------------------\n#\n# bash completion for docker-compose\n#\n# This work is based on the completion for the docker command.\n#\n# This script provides completion of:\n#  - commands and their options\n#  - service names\n#  - filepaths\n#\n# To enable the completions either:\n#  - place this file in /etc/bash_completion.d\n#  or\n#  - copy this file to e.g. ~/.docker-compose-completion.sh and add the line\n#    below to your .bashrc after bash completion features are loaded\n#    . ~/.docker-compose-completion.sh\n\n__docker_compose_previous_extglob_setting=$(shopt -p extglob)\nshopt -s extglob\n\nfunction __docker_compose_q {\n\tdocker-compose 2>/dev/null \"${top_level_options[@]}\" \"$@\"\n}\n\n# Transforms a multiline list of strings into a single line string\n# with the words separated by \"|\".\nfunction __docker_compose_to_alternatives {\n\tlocal parts=( $1 )\n\tlocal IFS='|'\n\techo \"${parts[*]}\"\n}\n\n# Transforms a multiline list of options into an extglob pattern\n# suitable for use in case statements.\nfunction __docker_compose_to_extglob {\n\tlocal extglob=$( __docker_compose_to_alternatives \"$1\" )\n\techo \"@($extglob)\"\n}\n\n# Determines whether the option passed as the first argument exist on\n# the commandline. The option may be a pattern, e.g. `--force|-f`.\nfunction __docker_compose_has_option {\n\tlocal pattern=\"$1\"\n\tfor (( i=2; i < $cword; ++i)); do\n\t\tif [[ ${words[$i]} =~ ^($pattern)$ ]] ; then\n\t\t\treturn 0\n\t\tfi\n\tdone\n\treturn 1\n}\n\n# Returns `key` if we are currently completing the value of a map option (`key=value`)\n# which matches the extglob passed in as an argument.\n# This function is needed for key-specific completions.\nfunction __docker_compose_map_key_of_current_option {\n        local glob=\"$1\"\n\n        local key glob_pos\n        if [ \"$cur\" = \"=\" ] ; then        # key= case\n                key=\"$prev\"\n                glob_pos=$((cword - 2))\n        elif [[ $cur == *=* ]] ; then     # key=value case (OSX)\n                key=${cur%=*}\n                glob_pos=$((cword - 1))\n        elif [ \"$prev\" = \"=\" ] ; then\n                key=${words[$cword - 2]}  # key=value case\n                glob_pos=$((cword - 3))\n        else\n                return\n        fi\n\n        [ \"${words[$glob_pos]}\" = \"=\" ] && ((glob_pos--))  # --option=key=value syntax\n\n        [[ ${words[$glob_pos]} == @($glob) ]] && echo \"$key\"\n}\n\n# suppress trailing whitespace\nfunction __docker_compose_nospace {\n\t# compopt is not available in ancient bash versions\n\t_omb_util_command_exists compopt && compopt -o nospace\n}\n\n\n# Outputs a list of all defined services, regardless of their running state.\n# Arguments for `docker-compose ps` may be passed in order to filter the service list,\n# e.g. `status=running`.\nfunction __docker_compose_services {\n\t__docker_compose_q ps --services \"$@\"\n}\n\n# Applies completion of services based on the current value of `$cur`.\n# Arguments for `docker-compose ps` may be passed in order to filter the service list,\n# see `__docker_compose_services`.\nfunction __docker_compose_complete_services {\n\tCOMPREPLY=( $(compgen -W \"$(__docker_compose_services \"$@\")\" -- \"$cur\") )\n}\n\n# The services for which at least one running container exists\nfunction __docker_compose_complete_running_services {\n\tlocal names=$(__docker_compose_services --filter status=running)\n\tCOMPREPLY=( $(compgen -W \"$names\" -- \"$cur\") )\n}\n\n\nfunction _docker_compose_build {\n\tcase \"$prev\" in\n\t\t--build-arg)\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--memory|-m)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--build-arg --compress --force-rm --help --memory -m --no-cache --no-rm --pull --parallel -q --quiet\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter source=build\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_config {\n\tcase \"$prev\" in\n\t\t--hash)\n\t\t\tif [[ $cur == \\\\* ]] ; then\n\t\t\t\tCOMPREPLY=( '\\*' )\n\t\t\telse\n\t\t\t\tCOMPREPLY=( $(compgen -W \"$(__docker_compose_services) \\\\\\* \" -- \"$cur\") )\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tCOMPREPLY=( $( compgen -W \"--hash --help --no-interpolate --profiles --quiet -q --resolve-image-digests --services --volumes\" -- \"$cur\" ) )\n}\n\n\nfunction _docker_compose_create {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--build --force-recreate --help --no-build --no-recreate\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_docker_compose {\n\tcase \"$prev\" in\n\t\t--tlscacert|--tlscert|--tlskey)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--file|-f)\n\t\t\t_filedir \"y?(a)ml\"\n\t\t\treturn\n\t\t\t;;\n\t\t--ansi)\n\t\t\tCOMPREPLY=( $( compgen -W \"never always auto\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--log-level)\n\t\t\tCOMPREPLY=( $( compgen -W \"debug info warning error critical\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--profile)\n\t\t\tCOMPREPLY=( $( compgen -W \"$(__docker_compose_q config --profiles)\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--project-directory)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\t\t--env-file)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_compose_to_extglob \"$daemon_options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$daemon_boolean_options $daemon_options_with_args $top_level_options_with_args --help -h --no-ansi --verbose --version -v\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"${commands[*]}\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_down {\n\tcase \"$prev\" in\n\t\t--rmi)\n\t\t\tCOMPREPLY=( $( compgen -W \"all local\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --rmi --timeout -t --volumes -v --remove-orphans\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_events {\n\tcase \"$prev\" in\n\t\t--json)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --json\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_exec {\n\tcase \"$prev\" in\n\t\t--index|--user|-u|--workdir|-w)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"-d --detach --help --index --privileged -T --user -u --workdir -w\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_help {\n\tCOMPREPLY=( $( compgen -W \"${commands[*]}\" -- \"$cur\" ) )\n}\n\nfunction _docker_compose_images {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_compose_kill {\n\tcase \"$prev\" in\n\t\t-s)\n\t\t\tCOMPREPLY=( $( compgen -W \"SIGHUP SIGINT SIGKILL SIGUSR1 SIGUSR2\" -- \"$(echo $cur | tr '[:lower:]' '[:upper:]')\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help -s\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_logs {\n\tcase \"$prev\" in\n\t\t--tail)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--follow -f --help --no-color --no-log-prefix --tail --timestamps -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_pause {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_port {\n\tcase \"$prev\" in\n\t\t--protocol)\n\t\t\tCOMPREPLY=( $( compgen -W \"tcp udp\" -- \"$cur\" ) )\n\t\t\treturn;\n\t\t\t;;\n\t\t--index)\n\t\t\treturn;\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --index --protocol\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_ps {\n\tlocal key=$(__docker_compose_map_key_of_current_option '--filter')\n\tcase \"$key\" in\n\t\tsource)\n\t\t\tCOMPREPLY=( $( compgen -W \"build image\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tstatus)\n\t\t\tCOMPREPLY=( $( compgen -W \"paused restarting running stopped\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"source status\" -S \"=\" -- \"$cur\" ) )\n\t\t\t__docker_compose_nospace\n\t\t\treturn;\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --filter --help --quiet -q --services\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_pull {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --ignore-pull-failures --include-deps --no-parallel --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter source=image\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_push {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --ignore-push-failures\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_restart {\n\tcase \"$prev\" in\n\t\t--timeout|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --timeout -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help --stop -s -v\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tif __docker_compose_has_option \"--stop|-s\" ; then\n\t\t\t\t__docker_compose_complete_services\n\t\t\telse\n\t\t\t\t__docker_compose_complete_services --filter status=stopped\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_run {\n\tcase \"$prev\" in\n\t\t-e)\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--entrypoint|--label|-l|--name|--user|-u|--volume|-v|--workdir|-w)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--detach -d --entrypoint -e --help --label -l --name --no-deps --publish -p --rm --service-ports -T --use-aliases --user -u --volume -v --workdir -w\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_scale {\n\tcase \"$prev\" in\n\t\t=)\n\t\t\tCOMPREPLY=(\"$cur\")\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --timeout -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $(compgen -S \"=\" -W \"$(__docker_compose_services)\" -- \"$cur\") )\n\t\t\t__docker_compose_nospace\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_start {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter status=stopped\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_stop {\n\tcase \"$prev\" in\n\t\t--timeout|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --timeout -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_top {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_unpause {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter status=paused\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_up {\n\tcase \"$prev\" in\n\t\t=)\n\t\t\tCOMPREPLY=(\"$cur\")\n\t\t\treturn\n\t\t\t;;\n\t\t--exit-code-from)\n\t\t\t__docker_compose_complete_services\n\t\t\treturn\n\t\t\t;;\n\t\t--scale)\n\t\t\tCOMPREPLY=( $(compgen -S \"=\" -W \"$(__docker_compose_services)\" -- \"$cur\") )\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--abort-on-container-exit --always-recreate-deps --attach-dependencies --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-log-prefix --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose_version {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--short\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_compose {\n\tlocal previous_extglob_setting=$(shopt -p extglob)\n\tshopt -s extglob\n\n\tlocal commands=(\n\t\tbuild\n\t\tconfig\n\t\tcreate\n\t\tdown\n\t\tevents\n\t\texec\n\t\thelp\n\t\timages\n\t\tkill\n\t\tlogs\n\t\tpause\n\t\tport\n\t\tps\n\t\tpull\n\t\tpush\n\t\trestart\n\t\trm\n\t\trun\n\t\tscale\n\t\tstart\n\t\tstop\n\t\ttop\n\t\tunpause\n\t\tup\n\t\tversion\n\t)\n\n\t# Options for the docker daemon that have to be passed to secondary calls to\n\t# docker-compose executed by this script.\n\tlocal daemon_boolean_options=\"\n\t\t--skip-hostname-check\n\t\t--tls\n\t\t--tlsverify\n\t\"\n\tlocal daemon_options_with_args=\"\n\t\t--context -c\n\t\t--env-file\n\t\t--file -f\n\t\t--host -H\n\t\t--project-directory\n\t\t--project-name -p\n\t\t--tlscacert\n\t\t--tlscert\n\t\t--tlskey\n\t\"\n\n\t# These options require special treatment when searching the command.\n\tlocal top_level_options_with_args=\"\n\t\t--ansi\n\t\t--log-level\n\t\t--profile\n\t\"\n\n\tCOMPREPLY=()\n\tlocal cur prev words cword\n\t_get_comp_words_by_ref -n : cur prev words cword\n\n\t# search subcommand and invoke its handler.\n\t# special treatment of some top-level options\n\tlocal command='docker_compose'\n\tlocal top_level_options=()\n\tlocal counter=1\n\n\twhile [ $counter -lt $cword ]; do\n\t\tcase \"${words[$counter]}\" in\n\t\t\t$(__docker_compose_to_extglob \"$daemon_boolean_options\") )\n\t\t\t\tlocal opt=${words[counter]}\n\t\t\t\ttop_level_options+=($opt)\n\t\t\t\t;;\n\t\t\t$(__docker_compose_to_extglob \"$daemon_options_with_args\") )\n\t\t\t\tlocal opt=${words[counter]}\n\t\t\t\tlocal arg=${words[++counter]}\n\t\t\t\ttop_level_options+=($opt $arg)\n\t\t\t\t;;\n\t\t\t$(__docker_compose_to_extglob \"$top_level_options_with_args\") )\n\t\t\t\t(( counter++ ))\n\t\t\t\t;;\n\t\t\t-*)\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tcommand=\"${words[$counter]}\"\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\t\t(( counter++ ))\n\tdone\n\n\tlocal completions_func=_docker_compose_${command//-/_}\n\t_omb_util_function_exists \"$completions_func\" && \"$completions_func\"\n\n\teval \"$previous_extglob_setting\"\n\treturn 0\n}\n\neval \"$__docker_compose_previous_extglob_setting\"\nunset __docker_compose_previous_extglob_setting\n\ncomplete -F _docker_compose docker-compose docker-compose.exe\n"
  },
  {
    "path": "completions/fallback/docker.bash",
    "content": "#! bash oh-my-bash.module\n# shellcheck disable=SC2016,SC2119,SC2155,SC2206,SC2207,SC2254\n#------------------------------------------------------------------------------\n# Note by OMB: This file is taken from the following version of Docker CLI:\n#\n# https://github.com/docker/cli/blob/34797d167891c11d2e10c1339b072166b77a3378/contrib/completion/bash/docker\n#\n# Licence: Apache-2.0 license\n# Copyright: original authors of Docker CLI\n#------------------------------------------------------------------------------\n#\n# Shellcheck ignore list:\n#  - SC2016: Expressions don't expand in single quotes, use double quotes for that.\n#  - SC2119: Use foo \"$@\" if function's $1 should mean script's $1.\n#  - SC2155: Declare and assign separately to avoid masking return values.\n#  - SC2206: Quote to prevent word splitting, or split robustly with mapfile or read -a.\n#  - SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).\n#  - SC2254: Quote expansions in case patterns to match literally rather than as a glob.\n#\n# You can find more details for each warning at the following page:\n#    https://github.com/koalaman/shellcheck/wiki/<SCXXXX>\n#\n# bash completion file for core docker commands\n#\n# This script provides completion of:\n#  - commands and their options\n#  - container ids and names\n#  - image repos and tags\n#  - filepaths\n#\n# To enable the completions either:\n#  - place this file in /etc/bash_completion.d\n#  or\n#  - copy this file to e.g. ~/.docker-completion.sh and add the line\n#    below to your .bashrc after bash completion features are loaded\n#    . ~/.docker-completion.sh\n#\n# Configuration:\n#\n# For several commands, the amount of completions can be configured by\n# setting environment variables.\n#\n# DOCKER_COMPLETION_SHOW_CONFIG_IDS\n# DOCKER_COMPLETION_SHOW_CONTAINER_IDS\n# DOCKER_COMPLETION_SHOW_NETWORK_IDS\n# DOCKER_COMPLETION_SHOW_NODE_IDS\n# DOCKER_COMPLETION_SHOW_PLUGIN_IDS\n# DOCKER_COMPLETION_SHOW_SECRET_IDS\n# DOCKER_COMPLETION_SHOW_SERVICE_IDS\n#   \"no\"  - Show names only (default)\n#   \"yes\" - Show names and ids\n#\n# You can tailor completion for the \"events\", \"history\", \"inspect\", \"run\",\n# \"rmi\" and \"save\" commands by settings the following environment\n# variables:\n#\n# DOCKER_COMPLETION_SHOW_IMAGE_IDS\n#   \"none\" - Show names only (default)\n#   \"non-intermediate\" - Show names and ids, but omit intermediate image IDs\n#   \"all\" - Show names and ids, including intermediate image IDs\n#\n# DOCKER_COMPLETION_SHOW_TAGS\n#   \"yes\" - include tags in completion options (default)\n#   \"no\"  - don't include tags in completion options\n\n#\n# Note:\n# Currently, the completions will not work if the docker daemon is not\n# bound to the default communication port/socket\n# If the docker daemon is using a unix socket for communication your user\n# must have access to the socket for the completions to function correctly\n#\n# Note for developers:\n# Please arrange options sorted alphabetically by long name with the short\n# options immediately following their corresponding long form.\n# This order should be applied to lists, alternatives and code blocks.\n\n__docker_previous_extglob_setting=$(shopt -p extglob)\nshopt -s extglob\n\nfunction __docker_q {\n\tdocker ${host:+--host \"$host\"} ${config:+--config \"$config\"} ${context:+--context \"$context\"} 2>/dev/null \"$@\"\n}\n\n# __docker_configs returns a list of configs. Additional options to\n# `docker config ls` may be specified in order to filter the list, e.g.\n# `__docker_configs --filter label=stage=production`.\n# By default, only names are returned.\n# Set DOCKER_COMPLETION_SHOW_CONFIG_IDS=yes to also complete IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\nfunction __docker_configs {\n\tlocal format\n\tif [ \"${1-}\" = \"--id\" ] ; then\n\t\tformat='{{.ID}}'\n\t\tshift\n\telif [ \"${1-}\" = \"--name\" ] ; then\n\t\tformat='{{.Name}}'\n\t\tshift\n\telif [ \"${DOCKER_COMPLETION_SHOW_CONFIG_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Name}}'\n\telse\n\t\tformat='{{.Name}}'\n\tfi\n\n\t__docker_q config ls --format \"$format\" \"$@\"\n}\n\n# __docker_complete_configs applies completion of configs based on the current value\n# of `$cur` or the value of the optional first option `--cur`, if given.\nfunction __docker_complete_configs {\n\tlocal current=\"$cur\"\n\tif [ \"$1\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_configs \"$@\")\" -- \"$current\") )\n}\n\n# __docker_containers returns a list of containers. Additional options to\n# `docker ps` may be specified in order to filter the list, e.g.\n# `__docker_containers --filter status=running`\n# By default, only names are returned.\n# Set DOCKER_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\nfunction __docker_containers {\n\tlocal format\n\tif [ \"${1-}\" = \"--id\" ] ; then\n\t\tformat='{{.ID}}'\n\t\tshift\n\telif [ \"${1-}\" = \"--name\" ] ; then\n\t\tformat='{{.Names}}'\n\t\tshift\n\telif [ \"${DOCKER_COMPLETION_SHOW_CONTAINER_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Names}}'\n\telse\n\t\tformat='{{.Names}}'\n\tfi\n\t__docker_q ps --format \"$format\" \"$@\"\n}\n\n# __docker_complete_containers applies completion of containers based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_containers`.\nfunction __docker_complete_containers {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_containers \"$@\")\" -- \"$current\") )\n}\n\nfunction __docker_complete_containers_all {\n\t__docker_complete_containers \"$@\" --all\n}\n\n# shellcheck disable=SC2120\nfunction __docker_complete_containers_removable {\n\t__docker_complete_containers \"$@\" --filter status=created --filter status=exited\n}\n\nfunction __docker_complete_containers_running {\n\t__docker_complete_containers \"$@\" --filter status=running\n}\n\n# shellcheck disable=SC2120\nfunction __docker_complete_containers_stoppable {\n\t__docker_complete_containers \"$@\" --filter status=running --filter status=paused\n}\n\n# shellcheck disable=SC2120\nfunction __docker_complete_containers_stopped {\n\t__docker_complete_containers \"$@\" --filter status=exited\n}\n\n# shellcheck disable=SC2120\nfunction __docker_complete_containers_unpauseable {\n\t__docker_complete_containers \"$@\" --filter status=paused\n}\n\nfunction __docker_complete_container_names {\n\tlocal containers=( $(__docker_q ps -aq --no-trunc) )\n\tlocal names=( $(__docker_q inspect --format '{{.Name}}' \"${containers[@]}\") )\n\tnames=( \"${names[@]#/}\" ) # trim off the leading \"/\" from the container names\n\tCOMPREPLY=( $(compgen -W \"${names[*]}\" -- \"$cur\") )\n}\n\nfunction __docker_complete_container_ids {\n\tlocal containers=( $(__docker_q ps -aq) )\n\tCOMPREPLY=( $(compgen -W \"${containers[*]}\" -- \"$cur\") )\n}\n\n# __docker_contexts returns a list of contexts without the special \"default\" context.\n# Completions may be added with `--add`, e.g. `--add default`.\nfunction __docker_contexts {\n\tlocal add=()\n\twhile true ; do\n\t\tcase \"${1-}\" in\n\t\t\t--add)\n\t\t\t\tadd+=(\"$2\")\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\tdone\n\t__docker_q context ls -q\n\techo \"${add[@]}\"\n}\n\nfunction __docker_complete_contexts {\n\tlocal contexts=( $(__docker_contexts \"$@\") )\n\tCOMPREPLY=( $(compgen -W \"${contexts[*]}\" -- \"$cur\") )\n}\n\n\n# __docker_images returns a list of images. For each image, up to three representations\n# can be generated: the repository (e.g. busybox), repository:tag (e.g. busybox:latest)\n# and the ID (e.g. sha256:ee22cbbd4ea3dff63c86ba60c7691287c321e93adfc1009604eb1dde7ec88645).\n#\n# The optional arguments `--repo`, `--tag` and `--id` select the representations that\n# may be returned. Whether or not a particular representation is actually returned\n# depends on the user's customization through several environment variables:\n# - image IDs are only shown if DOCKER_COMPLETION_SHOW_IMAGE_IDS=all|non-intermediate.\n# - tags can be excluded by setting DOCKER_COMPLETION_SHOW_TAGS=no.\n# - repositories are always shown.\n#\n# In cases where an exact image specification is needed, `--force-tag` can be used.\n# It ignores DOCKER_COMPLETION_SHOW_TAGS and only lists valid repository:tag combinations,\n# avoiding repository names that would default to a potentially missing default tag.\n#\n# Additional arguments to `docker image ls` may be specified in order to filter the list,\n# e.g. `__docker_images --filter dangling=true`.\n#\nfunction __docker_images {\n\tlocal repo_format='{{.Repository}}'\n\tlocal tag_format='{{.Repository}}:{{.Tag}}'\n\tlocal id_format='{{.ID}}'\n\tlocal all\n\tlocal format\n\n\tif [ \"${DOCKER_COMPLETION_SHOW_IMAGE_IDS-}\" = \"all\" ] ; then\n\t\tall='--all'\n\tfi\n\n\twhile true ; do\n\t\tcase \"${1-}\" in\n\t\t\t--repo)\n\t\t\t\tformat+=\"$repo_format\\n\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--tag)\n\t\t\t\tif [ \"${DOCKER_COMPLETION_SHOW_TAGS:-yes}\" = \"yes\" ]; then\n\t\t\t\t\tformat+=\"$tag_format\\n\"\n\t\t\t\tfi\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--id)\n\t\t\t\tif [[ ${DOCKER_COMPLETION_SHOW_IMAGE_IDS-} =~ ^(all|non-intermediate)$ ]] ; then\n\t\t\t\t\tformat+=\"$id_format\\n\"\n\t\t\t\tfi\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--force-tag)\n\t\t\t\t# like `--tag` but ignores environment setting\n\t\t\t\tformat+=\"$tag_format\\n\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\t__docker_q image ls --no-trunc --format \"${format%\\\\n}\" ${all-} \"$@\" | grep -v '<none>$'\n}\n\n# __docker_complete_images applies completion of images based on the current value of `$cur` or\n# the value of the optional first option `--cur`, if given.\n# See __docker_images for customization of the returned items.\nfunction __docker_complete_images {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_images \"$@\")\" -- \"$current\") )\n\t__ltrim_colon_completions \"$current\"\n}\n\n# __docker_networks returns a list of all networks. Additional options to\n# `docker network ls` may be specified in order to filter the list, e.g.\n# `__docker_networks --filter type=custom`\n# By default, only names are returned.\n# Set DOCKER_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\nfunction __docker_networks {\n\tlocal format\n\tif [ \"${1-}\" = \"--id\" ] ; then\n\t\tformat='{{.ID}}'\n\t\tshift\n\telif [ \"${1-}\" = \"--name\" ] ; then\n\t\tformat='{{.Name}}'\n\t\tshift\n\telif [ \"${DOCKER_COMPLETION_SHOW_NETWORK_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Name}}'\n\telse\n\t\tformat='{{.Name}}'\n\tfi\n\t__docker_q network ls --format \"$format\" \"$@\"\n}\n\n# __docker_complete_networks applies completion of networks based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_networks`.\nfunction __docker_complete_networks {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_networks \"$@\")\" -- \"$current\") )\n}\n\nfunction __docker_complete_containers_in_network {\n\tlocal containers=($(__docker_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' \"$1\"))\n\tCOMPREPLY=( $(compgen -W \"${containers[*]}\" -- \"$cur\") )\n}\n\n# __docker_volumes returns a list of all volumes. Additional options to\n# `docker volume ls` may be specified in order to filter the list, e.g.\n# `__docker_volumes --filter dangling=true`\n# Because volumes do not have IDs, this function does not distinguish between\n# IDs and names.\nfunction __docker_volumes {\n\t__docker_q volume ls -q \"$@\"\n}\n\n# __docker_complete_volumes applies completion of volumes based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_volumes`.\nfunction __docker_complete_volumes {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_volumes \"$@\")\" -- \"$current\") )\n}\n\n# __docker_plugins_bundled returns a list of all plugins of a given type.\n# The type has to be specified with the mandatory option `--type`.\n# Valid types are: Network, Volume, Authorization.\n# Completions may be added or removed with `--add` and `--remove`\n# This function only deals with plugins that come bundled with Docker.\n# For plugins managed by `docker plugin`, see `__docker_plugins_installed`.\nfunction __docker_plugins_bundled {\n\tlocal type add=() remove=()\n\twhile true ; do\n\t\tcase \"${1-}\" in\n\t\t\t--type)\n\t\t\t\ttype=\"$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t--add)\n\t\t\t\tadd+=(\"$2\")\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t--remove)\n\t\t\t\tremove+=(\"$2\")\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tlocal plugins=($(__docker_q info --format \"{{range \\$i, \\$p := .Plugins.$type}}{{.}} {{end}}\"))\n\tfor del in \"${remove[@]}\" ; do\n\t\tplugins=(${plugins[@]/$del/})\n\tdone\n\techo \"${plugins[@]}\" \"${add[@]}\"\n}\n\n# __docker_complete_plugins_bundled applies completion of plugins based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# The plugin type has to be specified with the next option `--type`.\n# This function only deals with plugins that come bundled with Docker.\n# For completion of plugins managed by `docker plugin`, see\n# `__docker_complete_plugins_installed`.\nfunction __docker_complete_plugins_bundled {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_plugins_bundled \"$@\")\" -- \"$current\") )\n}\n\n# __docker_plugins_installed returns a list of all plugins that were installed with\n# the Docker plugin API.\n# By default, only names are returned.\n# Set DOCKER_COMPLETION_SHOW_PLUGIN_IDS=yes to also complete IDs.\n# Additional options to `docker plugin ls` may be specified in order to filter the list,\n# e.g. `__docker_plugins_installed --filter enabled=true`\n# For built-in pugins, see `__docker_plugins_bundled`.\nfunction __docker_plugins_installed {\n\tlocal format\n\tif [ \"${DOCKER_COMPLETION_SHOW_PLUGIN_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Name}}'\n\telse\n\t\tformat='{{.Name}}'\n\tfi\n\t__docker_q plugin ls --format \"$format\" \"$@\"\n}\n\n# __docker_complete_plugins_installed applies completion of plugins that were installed\n# with the Docker plugin API, based on the current value of `$cur` or the value of\n# the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_plugins_installed`.\n# For completion of built-in pugins, see `__docker_complete_plugins_bundled`.\nfunction __docker_complete_plugins_installed {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_plugins_installed \"$@\")\" -- \"$current\") )\n}\n\nfunction __docker_runtimes {\n\t__docker_q info | sed -n 's/^Runtimes: \\(.*\\)/\\1/p'\n}\n\nfunction __docker_complete_runtimes {\n\tCOMPREPLY=( $(compgen -W \"$(__docker_runtimes)\" -- \"$cur\") )\n}\n\n# __docker_secrets returns a list of secrets. Additional options to\n# `docker secret ls` may be specified in order to filter the list, e.g.\n# `__docker_secrets --filter label=stage=production`\n# By default, only names are returned.\n# Set DOCKER_COMPLETION_SHOW_SECRET_IDS=yes to also complete IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\nfunction __docker_secrets {\n\tlocal format\n\tif [ \"${1-}\" = \"--id\" ] ; then\n\t\tformat='{{.ID}}'\n\t\tshift\n\telif [ \"${1-}\" = \"--name\" ] ; then\n\t\tformat='{{.Name}}'\n\t\tshift\n\telif [ \"${DOCKER_COMPLETION_SHOW_SECRET_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Name}}'\n\telse\n\t\tformat='{{.Name}}'\n\tfi\n\n\t__docker_q secret ls --format \"$format\" \"$@\"\n}\n\n# __docker_complete_secrets applies completion of secrets based on the current value\n# of `$cur` or the value of the optional first option `--cur`, if given.\nfunction __docker_complete_secrets {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_secrets \"$@\")\" -- \"$current\") )\n}\n\n# __docker_stacks returns a list of all stacks.\nfunction __docker_stacks {\n\t__docker_q stack ls | awk 'NR>1 {print $1}'\n}\n\n# __docker_complete_stacks applies completion of stacks based on the current value\n# of `$cur` or the value of the optional first option `--cur`, if given.\nfunction __docker_complete_stacks {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_stacks \"$@\")\" -- \"$current\") )\n}\n\n# __docker_nodes returns a list of all nodes. Additional options to\n# `docker node ls` may be specified in order to filter the list, e.g.\n# `__docker_nodes --filter role=manager`\n# By default, only node names are returned.\n# Set DOCKER_COMPLETION_SHOW_NODE_IDS=yes to also complete node IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\n# Completions may be added with `--add`, e.g. `--add self`.\nfunction __docker_nodes {\n\tlocal format\n\tif [ \"${DOCKER_COMPLETION_SHOW_NODE_IDS-}\" = yes ] ; then\n\t\tformat='{{.ID}} {{.Hostname}}'\n\telse\n\t\tformat='{{.Hostname}}'\n\tfi\n\n\tlocal add=()\n\n\twhile true ; do\n\t\tcase \"${1-}\" in\n\t\t\t--id)\n\t\t\t\tformat='{{.ID}}'\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--name)\n\t\t\t\tformat='{{.Hostname}}'\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--add)\n\t\t\t\tadd+=(\"$2\")\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\techo \"$(__docker_q node ls --format \"$format\" \"$@\")\" \"${add[@]}\"\n}\n\n# __docker_complete_nodes applies completion of nodes based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_nodes`.\nfunction __docker_complete_nodes {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(compgen -W \"$(__docker_nodes \"$@\")\" -- \"$current\") )\n}\n\n# __docker_services returns a list of all services. Additional options to\n# `docker service ls` may be specified in order to filter the list, e.g.\n# `__docker_services --filter name=xxx`\n# By default, only node names are returned.\n# Set DOCKER_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs.\n# An optional first option `--id|--name` may be used to limit the\n# output to the IDs or names of matching items. This setting takes\n# precedence over the environment setting.\nfunction __docker_services {\n\tlocal format='{{.Name}}'  # default: service name only\n\t[ \"${DOCKER_COMPLETION_SHOW_SERVICE_IDS-}\" = yes ] && format='{{.ID}} {{.Name}}' # ID & name\n\n\tif [ \"${1-}\" = \"--id\" ] ; then\n\t\tformat='{{.ID}}' # IDs only\n\t\tshift\n\telif [ \"${1-}\" = \"--name\" ] ; then\n\t\tformat='{{.Name}}' # names only\n\t\tshift\n\tfi\n\n\t__docker_q service ls --quiet --format \"$format\" \"$@\"\n}\n\n# __docker_complete_services applies completion of services based on the current\n# value of `$cur` or the value of the optional first option `--cur`, if given.\n# Additional filters may be appended, see `__docker_services`.\nfunction __docker_complete_services {\n\tlocal current=\"$cur\"\n\tif [ \"${1-}\" = \"--cur\" ] ; then\n\t\tcurrent=\"$2\"\n\t\tshift 2\n\tfi\n\tCOMPREPLY=( $(__docker_services \"$@\" --filter \"name=$current\") )\n}\n\n# __docker_tasks returns a list of all task IDs.\nfunction __docker_tasks {\n\t__docker_q service ps --format '{{.ID}}' \"\"\n}\n\n# __docker_complete_services_and_tasks applies completion of services and task IDs.\n# shellcheck disable=SC2120\nfunction __docker_complete_services_and_tasks {\n\tCOMPREPLY=( $(compgen -W \"$(__docker_services \"$@\") $(__docker_tasks)\" -- \"$cur\") )\n}\n\n# __docker_append_to_completions appends the word passed as an argument to every\n# word in `$COMPREPLY`.\n# Normally you do this with `compgen -S` while generating the completions.\n# This function allows you to append a suffix later. It allows you to use\n# the __docker_complete_XXX functions in cases where you need a suffix.\nfunction __docker_append_to_completions {\n\tCOMPREPLY=( ${COMPREPLY[@]/%/\"$1\"} )\n}\n\n# __docker_fetch_info fetches information about the configured Docker server and updates\n# several variables with the results.\n# The result is cached for the duration of one invocation of bash completion.\nfunction __docker_fetch_info {\n\tif [ -z \"${info_fetched-}\" ] ; then\n\t\tread -r server_experimental server_os <<< \"$(__docker_q version -f '{{.Server.Experimental}} {{.Server.Os}}')\"\n\t\tinfo_fetched=true\n\tfi\n}\n\n# __docker_server_is_experimental tests whether the currently configured Docker\n# server runs in experimental mode. If so, the function exits with 0 (true).\n# Otherwise, or if the result cannot be determined, the exit value is 1 (false).\nfunction __docker_server_is_experimental {\n\t__docker_fetch_info\n\t[ \"$server_experimental\" = \"true\" ]\n}\n\n# __docker_server_os_is tests whether the currently configured Docker server runs\n# on the operating system passed in as the first argument.\n# Known operating systems: linux, windows.\nfunction __docker_server_os_is {\n\tlocal expected_os=\"$1\"\n\t__docker_fetch_info\n\t[ \"$server_os\" = \"$expected_os\" ]\n}\n\n# __docker_pos_first_nonflag finds the position of the first word that is neither\n# option nor an option's argument. If there are options that require arguments,\n# you should pass a glob describing those options, e.g. \"--option1|-o|--option2\"\n# Use this function to restrict completions to exact positions after the argument list.\nfunction __docker_pos_first_nonflag {\n\tlocal argument_flags=${1-}\n\n\tlocal counter=$((${subcommand_pos:-${command_pos}} + 1))\n\twhile [ \"$counter\" -le \"$cword\" ]; do\n\t\tif [ -n \"$argument_flags\" ] && eval \"case '${words[$counter]}' in $argument_flags) true ;; *) false ;; esac\"; then\n\t\t\t(( counter++ ))\n\t\t\t# eat \"=\" in case of --option=arg syntax\n\t\t\t[ \"${words[$counter]}\" = \"=\" ] && (( counter++ ))\n\t\telse\n\t\t\tcase \"${words[$counter]}\" in\n\t\t\t\t-*)\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tfi\n\n\t\t# Bash splits words at \"=\", retaining \"=\" as a word, examples:\n\t\t# \"--debug=false\" => 3 words, \"--log-opt syslog-facility=daemon\" => 4 words\n\t\twhile [ \"${words[$counter + 1]}\" = \"=\" ] ; do\n\t\t\tcounter=$(( counter + 2))\n\t\tdone\n\n\t\t(( counter++ ))\n\tdone\n\n\techo \"$counter\"\n}\n\n# __docker_map_key_of_current_option returns `key` if we are currently completing the\n# value of a map option (`key=value`) which matches the extglob given as an argument.\n# This function is needed for key-specific completions.\nfunction __docker_map_key_of_current_option {\n\tlocal glob=\"$1\"\n\n\tlocal key glob_pos\n\tif [ \"$cur\" = \"=\" ] ; then        # key= case\n\t\tkey=\"$prev\"\n\t\tglob_pos=$((cword - 2))\n\telif [[ $cur == *=* ]] ; then     # key=value case (OSX)\n\t\tkey=${cur%=*}\n\t\tglob_pos=$((cword - 1))\n\telif [ \"$prev\" = \"=\" ] ; then\n\t\tkey=${words[$cword - 2]}  # key=value case\n\t\tglob_pos=$((cword - 3))\n\telse\n\t\treturn\n\tfi\n\n\t[ \"${words[$glob_pos]}\" = \"=\" ] && ((glob_pos--))  # --option=key=value syntax\n\n\t[[ ${words[$glob_pos]} == @($glob) ]] && echo \"$key\"\n}\n\n# __docker_value_of_option returns the value of the first option matching `option_glob`.\n# Valid values for `option_glob` are option names like `--log-level` and globs like\n# `--log-level|-l`\n# Only positions between the command and the current word are considered.\nfunction __docker_value_of_option {\n\tlocal option_extglob=$(__docker_to_extglob \"$1\")\n\n\tlocal counter=$((command_pos + 1))\n\twhile [ \"$counter\" -lt \"$cword\" ]; do\n\t\tcase ${words[$counter]} in\n\t\t\t$option_extglob )\n\t\t\t\techo \"${words[$counter + 1]}\"\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\t\t(( counter++ ))\n\tdone\n}\n\n# __docker_to_alternatives transforms a multiline list of strings into a single line\n# string with the words separated by `|`.\n# This is used to prepare arguments to __docker_pos_first_nonflag().\nfunction __docker_to_alternatives {\n\tlocal parts=( $1 )\n\tlocal IFS='|'\n\techo \"${parts[*]}\"\n}\n\n# __docker_to_extglob transforms a multiline list of options into an extglob pattern\n# suitable for use in case statements.\nfunction __docker_to_extglob {\n\tlocal extglob=$( __docker_to_alternatives \"$1\" )\n\techo \"@($extglob)\"\n}\n\n# __docker_subcommands processes subcommands\n# Locates the first occurrence of any of the subcommands contained in the\n# first argument. In case of a match, calls the corresponding completion\n# function and returns 0.\n# If no match is found, 1 is returned. The calling function can then\n# continue processing its completion.\n#\n# TODO if the preceding command has options that accept arguments and an\n# argument is equal ot one of the subcommands, this is falsely detected as\n# a match.\nfunction __docker_subcommands {\n\tlocal subcommands=\"$1\"\n\n\tlocal counter=$((command_pos + 1))\n\twhile [ \"$counter\" -lt \"$cword\" ]; do\n\t\tcase \"${words[$counter]}\" in\n\t\t\t$(__docker_to_extglob \"$subcommands\") )\n\t\t\t\tsubcommand_pos=$counter\n\t\t\t\tlocal subcommand=${words[$counter]}\n\t\t\t\tlocal completions_func=_docker_${command}_${subcommand//-/_}\n\t\t\t\t_omb_util_function_exists \"$completions_func\" && \"$completions_func\"\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\tesac\n\t\t(( counter++ ))\n\tdone\n\treturn 1\n}\n\n# __docker_nospace suppresses trailing whitespace\nfunction __docker_nospace {\n\t# compopt is not available in ancient bash versions\n\t_omb_util_command_exists compopt && compopt -o nospace\n}\n\nfunction __docker_complete_resolved_hostname {\n\t_omb_util_command_exists host || return\n\tCOMPREPLY=( $(host 2>/dev/null \"${cur%:}\" | awk '/has address/ {print $4}') )\n}\n\n# __docker_local_interfaces returns a list of the names and addresses of all\n# local network interfaces.\n# If `--ip-only` is passed as a first argument, only addresses are returned.\nfunction __docker_local_interfaces {\n\t_omb_util_command_exists ip || return\n\n\tlocal format\n\tif [ \"${1-}\" = \"--ip-only\" ] ; then\n\t\tformat='\\1'\n\t\tshift\n\telse\n\t\t format='\\1 \\2'\n\tfi\n\n\tip addr show scope global 2>/dev/null | sed -n \"s| \\+inet \\([0-9.]\\+\\).* \\([^ ]\\+\\)|$format|p\"\n}\n\n# __docker_complete_local_interfaces applies completion of the names and addresses of all\n# local network interfaces based on the current value of `$cur`.\n# An additional value can be added to the possible completions with an `--add` argument.\nfunction __docker_complete_local_interfaces {\n\tlocal additional_interface\n\tif [ \"${1-}\" = \"--add\" ] ; then\n\t\tadditional_interface=\"$2\"\n\t\tshift 2\n\tfi\n\n\tCOMPREPLY=( $( compgen -W \"$(__docker_local_interfaces \"$@\") $additional_interface\" -- \"$cur\" ) )\n}\n\n# __docker_complete_local_ips applies completion of the addresses of all local network\n# interfaces based on the current value of `$cur`.\nfunction __docker_complete_local_ips {\n\t__docker_complete_local_interfaces --ip-only\n}\n\n# __docker_complete_capabilities_addable completes Linux capabilities which are\n# not granted by default and may be added.\n# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities\nfunction __docker_complete_capabilities_addable {\n  local capabilities=(\n\t\tALL\n\t\tCAP_AUDIT_CONTROL\n\t\tCAP_AUDIT_READ\n\t\tCAP_BLOCK_SUSPEND\n\t\tCAP_BPF\n\t\tCAP_CHECKPOINT_RESTORE\n\t\tCAP_DAC_READ_SEARCH\n\t\tCAP_IPC_LOCK\n\t\tCAP_IPC_OWNER\n\t\tCAP_LEASE\n\t\tCAP_LINUX_IMMUTABLE\n\t\tCAP_MAC_ADMIN\n\t\tCAP_MAC_OVERRIDE\n\t\tCAP_NET_ADMIN\n\t\tCAP_NET_BROADCAST\n\t\tCAP_PERFMON\n\t\tCAP_SYS_ADMIN\n\t\tCAP_SYS_BOOT\n\t\tCAP_SYSLOG\n\t\tCAP_SYS_MODULE\n\t\tCAP_SYS_NICE\n\t\tCAP_SYS_PACCT\n\t\tCAP_SYS_PTRACE\n\t\tCAP_SYS_RAWIO\n\t\tCAP_SYS_RESOURCE\n\t\tCAP_SYS_TIME\n\t\tCAP_SYS_TTY_CONFIG\n\t\tCAP_WAKE_ALARM\n\t\tRESET\n  )\n\tCOMPREPLY=( $( compgen -W \"${capabilities[*]} ${capabilities[*]#CAP_}\" -- \"$cur\" ) )\n}\n\n# __docker_complete_capabilities_droppable completes Linux capability options which are\n# allowed by default and can be dropped.\n# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities\nfunction __docker_complete_capabilities_droppable {\n\tlocal capabilities=(\n\t\tALL\n\t\tCAP_AUDIT_WRITE\n\t\tCAP_CHOWN\n\t\tCAP_DAC_OVERRIDE\n\t\tCAP_FOWNER\n\t\tCAP_FSETID\n\t\tCAP_KILL\n\t\tCAP_MKNOD\n\t\tCAP_NET_BIND_SERVICE\n\t\tCAP_NET_RAW\n\t\tCAP_SETFCAP\n\t\tCAP_SETGID\n\t\tCAP_SETPCAP\n\t\tCAP_SETUID\n\t\tCAP_SYS_CHROOT\n\t\tRESET\n\t)\n\tCOMPREPLY=( $( compgen -W \"${capabilities[*]} ${capabilities[*]#CAP_}\" -- \"$cur\" ) )\n}\n\nfunction __docker_complete_detach_keys {\n\tcase \"$prev\" in\n\t\t--detach-keys)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*,)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${cur}ctrl-\" -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"ctrl-\" -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\tesac\n\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\nfunction __docker_complete_isolation {\n\tCOMPREPLY=( $( compgen -W \"default hyperv process\" -- \"$cur\" ) )\n}\n\nfunction __docker_complete_log_drivers {\n\tCOMPREPLY=( $( compgen -W \"\n\t\tawslogs\n\t\tetwlogs\n\t\tfluentd\n\t\tgcplogs\n\t\tgelf\n\t\tjournald\n\t\tjson-file\n\t\tlocal\n\t\tnone\n\t\tsplunk\n\t\tsyslog\n\t\" -- \"$cur\" ) )\n}\n\nfunction __docker_complete_log_options {\n\t# see https://docs.docker.com/config/containers/logging/configure/\n\n\t# really global options, defined in https://github.com/moby/moby/blob/master/daemon/logger/factory.go\n\tlocal common_options1=\"max-buffer-size mode\"\n\t# common options defined in https://github.com/moby/moby/blob/master/daemon/logger/loginfo.go\n\t# but not implemented in all log drivers\n\tlocal common_options2=\"env env-regex labels\"\n\n\t# awslogs does not implement the $common_options2.\n\tlocal awslogs_options=\"$common_options1 awslogs-create-group awslogs-credentials-endpoint awslogs-datetime-format awslogs-group awslogs-multiline-pattern awslogs-region awslogs-stream tag\"\n\n\tlocal fluentd_options=\"$common_options1 $common_options2 fluentd-address fluentd-async fluentd-buffer-limit fluentd-request-ack fluentd-retry-wait fluentd-max-retries fluentd-sub-second-precision tag\"\n\tlocal gcplogs_options=\"$common_options1 $common_options2 gcp-log-cmd gcp-meta-id gcp-meta-name gcp-meta-zone gcp-project\"\n\tlocal gelf_options=\"$common_options1 $common_options2 gelf-address gelf-compression-level gelf-compression-type gelf-tcp-max-reconnect gelf-tcp-reconnect-delay tag\"\n\tlocal journald_options=\"$common_options1 $common_options2 tag\"\n\tlocal json_file_options=\"$common_options1 $common_options2 compress max-file max-size\"\n\tlocal local_options=\"$common_options1 compress max-file max-size\"\n\tlocal splunk_options=\"$common_options1 $common_options2 splunk-caname splunk-capath splunk-format splunk-gzip splunk-gzip-level splunk-index splunk-insecureskipverify splunk-source splunk-sourcetype splunk-token splunk-url splunk-verify-connection tag\"\n\tlocal syslog_options=\"$common_options1 $common_options2 syslog-address syslog-facility syslog-format syslog-tls-ca-cert syslog-tls-cert syslog-tls-key syslog-tls-skip-verify tag\"\n\n\tlocal all_options=\"$fluentd_options $gcplogs_options $gelf_options $journald_options $json_file_options $syslog_options $splunk_options\"\n\n\tcase $(__docker_value_of_option --log-driver) in\n\t\t'')\n\t\t\tCOMPREPLY=( $( compgen -W \"$all_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tawslogs)\n\t\t\tCOMPREPLY=( $( compgen -W \"$awslogs_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tfluentd)\n\t\t\tCOMPREPLY=( $( compgen -W \"$fluentd_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tgcplogs)\n\t\t\tCOMPREPLY=( $( compgen -W \"$gcplogs_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tgelf)\n\t\t\tCOMPREPLY=( $( compgen -W \"$gelf_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tjournald)\n\t\t\tCOMPREPLY=( $( compgen -W \"$journald_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tjson-file)\n\t\t\tCOMPREPLY=( $( compgen -W \"$json_file_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tlocal)\n\t\t\tCOMPREPLY=( $( compgen -W \"$local_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tsyslog)\n\t\t\tCOMPREPLY=( $( compgen -W \"$syslog_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\tsplunk)\n\t\t\tCOMPREPLY=( $( compgen -W \"$splunk_options\" -S = -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\t__docker_nospace\n}\n\nfunction __docker_complete_log_driver_options {\n\tlocal key=$(__docker_map_key_of_current_option '--log-opt')\n\tcase \"$key\" in\n\t\tawslogs-create-group)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tawslogs-credentials-endpoint)\n\t\t\tCOMPREPLY=( $( compgen -W \"/\" -- \"${cur##*=}\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\tcompress|fluentd-async-connect)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tfluentd-sub-second-precision)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tgelf-address)\n\t\t\tCOMPREPLY=( $( compgen -W \"tcp udp\" -S \"://\" -- \"${cur##*=}\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\tgelf-compression-level)\n\t\t\tCOMPREPLY=( $( compgen -W \"1 2 3 4 5 6 7 8 9\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tgelf-compression-type)\n\t\t\tCOMPREPLY=( $( compgen -W \"gzip none zlib\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tline-only)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tmode)\n\t\t\tCOMPREPLY=( $( compgen -W \"blocking non-blocking\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tsyslog-address)\n\t\t\tCOMPREPLY=( $( compgen -W \"tcp:// tcp+tls:// udp:// unix://\" -- \"${cur##*=}\" ) )\n\t\t\t__docker_nospace\n\t\t\t__ltrim_colon_completions \"${cur}\"\n\t\t\treturn\n\t\t\t;;\n\t\tsyslog-facility)\n\t\t\tCOMPREPLY=( $( compgen -W \"\n\t\t\t\tauth\n\t\t\t\tauthpriv\n\t\t\t\tcron\n\t\t\t\tdaemon\n\t\t\t\tftp\n\t\t\t\tkern\n\t\t\t\tlocal0\n\t\t\t\tlocal1\n\t\t\t\tlocal2\n\t\t\t\tlocal3\n\t\t\t\tlocal4\n\t\t\t\tlocal5\n\t\t\t\tlocal6\n\t\t\t\tlocal7\n\t\t\t\tlpr\n\t\t\t\tmail\n\t\t\t\tnews\n\t\t\t\tsyslog\n\t\t\t\tuser\n\t\t\t\tuucp\n\t\t\t\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tsyslog-format)\n\t\t\tCOMPREPLY=( $( compgen -W \"rfc3164 rfc5424 rfc5424micro\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tsyslog-tls-ca-cert|syslog-tls-cert|syslog-tls-key)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\tsyslog-tls-skip-verify)\n\t\t\tCOMPREPLY=( $( compgen -W \"true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tsplunk-url)\n\t\t\tCOMPREPLY=( $( compgen -W \"http:// https://\" -- \"${cur##*=}\" ) )\n\t\t\t__docker_nospace\n\t\t\t__ltrim_colon_completions \"${cur}\"\n\t\t\treturn\n\t\t\t;;\n\t\tsplunk-gzip|splunk-insecureskipverify|splunk-verify-connection)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tsplunk-format)\n\t\t\tCOMPREPLY=( $( compgen -W \"inline json raw\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\nfunction __docker_complete_log_levels {\n\tCOMPREPLY=( $( compgen -W \"debug info warn error fatal\" -- \"$cur\" ) )\n}\n\nfunction __docker_complete_restart {\n\tcase \"$prev\" in\n\t\t--restart)\n\t\t\tcase \"$cur\" in\n\t\t\t\ton-failure:*)\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"always no on-failure on-failure: unless-stopped\" -- \"$cur\") )\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n# __docker_complete_signals returns a subset of the available signals that is most likely\n# relevant in the context of docker containers\nfunction __docker_complete_signals {\n\tlocal signals=(\n\t\tSIGCONT\n\t\tSIGHUP\n\t\tSIGINT\n\t\tSIGKILL\n\t\tSIGQUIT\n\t\tSIGSTOP\n\t\tSIGTERM\n\t\tSIGUSR1\n\t\tSIGUSR2\n\t)\n\tCOMPREPLY=( $( compgen -W \"${signals[*]} ${signals[*]#SIG}\" -- \"$( echo \"$cur\" | tr '[:lower:]' '[:upper:]')\" ) )\n}\n\nfunction __docker_complete_ulimits {\n\tlocal limits=\"\n\t\tas\n\t\tchroot\n\t\tcore\n\t\tcpu\n\t\tdata\n\t\tfsize\n\t\tlocks\n\t\tmaxlogins\n\t\tmaxsyslogins\n\t\tmemlock\n\t\tmsgqueue\n\t\tnice\n\t\tnofile\n\t\tnproc\n\t\tpriority\n\t\trss\n\t\trtprio\n\t\tsigpending\n\t\tstack\n\t\"\n\tif [ \"${1-}\" = \"--rm\" ] ; then\n\t\tCOMPREPLY=( $( compgen -W \"$limits\" -- \"$cur\" ) )\n\telse\n\t\tCOMPREPLY=( $( compgen -W \"$limits\" -S = -- \"$cur\" ) )\n\t\t__docker_nospace\n\tfi\n}\n\nfunction __docker_complete_user_group {\n\tif [[ $cur == *:* ]] ; then\n\t\tCOMPREPLY=( $(compgen -g -- \"${cur#*:}\") )\n\telse\n\t\tCOMPREPLY=( $(compgen -u -S : -- \"$cur\") )\n\t\t__docker_nospace\n\tfi\n}\n\nfunction __docker_plugins_path {\n\tlocal docker_plugins_path=$(docker info --format '{{range .ClientInfo.Plugins}}{{.Path}}:{{end}}')\n\techo \"${docker_plugins_path//:/ }\"\n}\n\nfunction __docker_complete_plugin {\n\tlocal path=$1\n\tlocal completionCommand=\"__completeNoDesc\"\n\tlocal resultArray=($path $completionCommand)\n\tfor value in \"${words[@]:2}\"; do\n\t\tif [ -z \"$value\" ]; then\n\t\t\tresultArray+=( \"''\" )\n\t\telse\n\t\t\tresultArray+=( \"$value\" )\n\t\tfi\n\tdone\n\tlocal rawResult=$(eval \"${resultArray[*]}\" 2> /dev/null)\n\tlocal result=$(grep -v '^:[0-9]*$' <<< \"$rawResult\")\n\n\t# Compose V2 completions sometimes returns returns `:8` (ShellCompDirectiveFilterFileExt)\n\t# with the expected file extensions (such as `yml`, `yaml`) to indicate that the shell should\n\t# provide autocompletions for files with matching extensions\n\tlocal completionFlag=$(tail -1 <<< \"$rawResult\")\n\tif [ \"$completionFlag\" == \":8\" ]; then\n\t\t# format a valid glob pattern for the provided file extensions\n\t\tlocal filePattern=$(tr '\\n' '|' <<< \"$result\")\n\n\t\t_filedir \"$filePattern\"\n\t\treturn\n\tfi\n\n\t# if result empty, just use filename completion as fallback\n\tif [ -z \"$result\" ]; then\n\t\t_filedir\n\telse\n\t\tCOMPREPLY=( $(compgen -W \"${result}\" -- \"${current-}\") )\n\tfi\n}\n\nfunction _docker_docker {\n\t# global options that may appear after the docker command\n\tlocal boolean_options=\"\n\t\t$global_boolean_options\n\t\t--help\n\t\t--version -v\n\t\"\n\n\tcase \"$prev\" in\n\t\t--config)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\t\t--context|-c)\n\t\t\t__docker_complete_contexts\n\t\t\treturn\n\t\t\t;;\n\t\t--log-level|-l)\n\t\t\t__docker_complete_log_levels\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$global_options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$boolean_options $global_options_with_args\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"$(__docker_to_extglob \"$global_options_with_args\")\" )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_server_is_experimental && commands+=(${experimental_server_commands[*]})\n\t\t\t\tCOMPREPLY=( $( compgen -W \"${commands[*]} help\" -- \"$cur\" ) )\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_attach {\n\t_docker_container_attach\n}\n\nfunction _docker_build {\n\t_docker_image_build\n}\n\n\nfunction _docker_builder {\n\tlocal subcommands=\"\n\t\tbuild\n\t\tprune\n\t\"\n\t__docker_subcommands \"$subcommands\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_builder_build {\n\t_docker_image_build\n}\n\nfunction _docker_builder_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"description id inuse parent private shared type until unused-for\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--keep-storage)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --filter --force -f --help --keep-storage\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_checkpoint {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tls\n\t\trm\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_checkpoint_create {\n\tcase \"$prev\" in\n\t\t--checkpoint-dir)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--checkpoint-dir --help --leave-running\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--checkpoint-dir')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_running\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_checkpoint_ls {\n\tcase \"$prev\" in\n\t\t--checkpoint-dir)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--checkpoint-dir --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--checkpoint-dir')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_checkpoint_rm {\n\tcase \"$prev\" in\n\t\t--checkpoint-dir)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--checkpoint-dir --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--checkpoint-dir')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"$(__docker_q checkpoint ls \"$prev\" | sed 1d)\" -- \"$cur\" ) )\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_config {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tinspect\n\t\tls\n\t\trm\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_config_create {\n\tcase \"$prev\" in\n\t\t--label|-l)\n\t\t\treturn\n\t\t\t;;\n\t\t--template-driver)\n\t\t\tCOMPREPLY=( $( compgen -W \"golang\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --label -l --template-driver\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--label|-l|--template-driver')\n\t\t\tif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t_filedir\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_config_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --pretty\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_configs\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_config_list {\n\t_docker_config_ls\n}\n\nfunction _docker_config_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tid)\n\t\t\t__docker_complete_configs --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_configs --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"id label name\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format --filter -f --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_config_remove {\n\t_docker_config_rm\n}\n\nfunction _docker_config_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_configs\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_container {\n\tlocal subcommands=\"\n\t\tattach\n\t\tcommit\n\t\tcp\n\t\tcreate\n\t\tdiff\n\t\texec\n\t\texport\n\t\tinspect\n\t\tkill\n\t\tlogs\n\t\tls\n\t\tpause\n\t\tport\n\t\tprune\n\t\trename\n\t\trestart\n\t\trm\n\t\trun\n\t\tstart\n\t\tstats\n\t\tstop\n\t\ttop\n\t\tunpause\n\t\tupdate\n\t\twait\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tps\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_attach {\n\t__docker_complete_detach_keys && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--detach-keys --help --no-stdin --sig-proxy=false\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--detach-keys')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_running\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_commit {\n\tcase \"$prev\" in\n\t\t--author|-a|--change|-c|--message|-m)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--author -a --change -c --help --message -m --pause=false -p=false\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--author|-a|--change|-c|--message|-m')\n\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\t\treturn\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_cp {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--archive -a --follow-link -L --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\tcase \"$cur\" in\n\t\t\t\t\t*:)\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\t# combined container and filename completion\n\t\t\t\t\t\t_filedir\n\t\t\t\t\t\tlocal files=( ${COMPREPLY[@]} )\n\n\t\t\t\t\t\t__docker_complete_containers_all\n\t\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${COMPREPLY[*]}\" -S ':' ) )\n\t\t\t\t\t\tlocal containers=( ${COMPREPLY[@]} )\n\n\t\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${files[*]} ${containers[*]}\" -- \"$cur\" ) )\n\t\t\t\t\t\tif [[ \"${COMPREPLY[*]}\" = *: ]]; then\n\t\t\t\t\t\t\t__docker_nospace\n\t\t\t\t\t\tfi\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tfi\n\t\t\t(( counter++ ))\n\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\tif [ -e \"$prev\" ]; then\n\t\t\t\t\t__docker_complete_containers_all\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${COMPREPLY[*]}\" -S ':' ) )\n\t\t\t\t\t__docker_nospace\n\t\t\t\telse\n\t\t\t\t\t_filedir\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_create {\n\t_docker_container_run_and_create\n}\n\nfunction _docker_container_diff {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_exec {\n\t__docker_complete_detach_keys && return\n\n\tcase \"$prev\" in\n\t\t--env|-e)\n\t\t\t# we do not append a \"=\" here because \"-e VARNAME\" is legal syntax, too\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--env-file)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--user|-u)\n\t\t\t__docker_complete_user_group\n\t\t\treturn\n\t\t\t;;\n\t\t--workdir|-w)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--detach -d --detach-keys --env -e --env-file --help --interactive -i --privileged -t --tty -u --user --workdir -w\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_running\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_export {\n\tcase \"$prev\" in\n\t\t--output|-o)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --output -o\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_inspect {\n\t_docker_inspect --type container\n}\n\nfunction _docker_container_kill {\n\tcase \"$prev\" in\n\t\t--signal|-s)\n\t\t\t__docker_complete_signals\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --signal -s\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_running\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_logs {\n\tcase \"$prev\" in\n\t\t--since|--tail|-n|--until)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--details --follow -f --help --since --tail -n --timestamps -t --until\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--since|--tail|-n|--until')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_list {\n\t_docker_container_ls\n}\n\nfunction _docker_container_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tancestor)\n\t\t\t__docker_complete_images --cur \"${cur##*=}\" --repo --tag --id\n\t\t\treturn\n\t\t\t;;\n\t\tbefore)\n\t\t\t__docker_complete_containers_all --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\texpose|publish)\n\t\t\treturn\n\t\t\t;;\n\t\tid)\n\t\t\t__docker_complete_containers_all --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\thealth)\n\t\t\tCOMPREPLY=( $( compgen -W \"healthy starting none unhealthy\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tis-task)\n\t\t\tCOMPREPLY=( $( compgen -W \"true false\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_containers_all --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\t\tnetwork)\n\t\t\t__docker_complete_networks --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\tsince)\n\t\t\t__docker_complete_containers_all --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\tstatus)\n\t\t\tCOMPREPLY=( $( compgen -W \"created dead exited paused restarting running removing\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tvolume)\n\t\t\t__docker_complete_volumes --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"ancestor before exited expose health id is-task label name network publish since status volume\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format|--last|-n)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --filter -f --format --help --last -n --latest -l --no-trunc --quiet -q --size -s\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_pause {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_running\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_port {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"label label! until\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --filter --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_ps {\n\t_docker_container_ls\n}\n\nfunction _docker_container_rename {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_restart {\n\tcase \"$prev\" in\n\t\t--time|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --time -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_all\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help --link -l --volumes -v\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tfor arg in \"${COMP_WORDS[@]}\"; do\n\t\t\t\tcase \"$arg\" in\n\t\t\t\t\t--force|-f)\n\t\t\t\t\t\t__docker_complete_containers_all\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t\t__docker_complete_containers_removable\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_run {\n\t_docker_container_run_and_create\n}\n\n# _docker_container_run_and_create is the combined completion for `_docker_container_run`\n# and `_docker_container_create`\nfunction _docker_container_run_and_create {\n\tlocal options_with_args=\"\n\t\t--add-host\n\t\t--annotation\n\t\t--attach -a\n\t\t--blkio-weight\n\t\t--blkio-weight-device\n\t\t--cap-add\n\t\t--cap-drop\n\t\t--cgroupns\n\t\t--cgroup-parent\n\t\t--cidfile\n\t\t--cpu-period\n\t\t--cpu-quota\n\t\t--cpu-rt-period\n\t\t--cpu-rt-runtime\n\t\t--cpuset-cpus\n\t\t--cpus\n\t\t--cpuset-mems\n\t\t--cpu-shares -c\n\t\t--device\n\t\t--device-cgroup-rule\n\t\t--device-read-bps\n\t\t--device-read-iops\n\t\t--device-write-bps\n\t\t--device-write-iops\n\t\t--dns\n\t\t--dns-option\n\t\t--dns-search\n\t\t--domainname\n\t\t--entrypoint\n\t\t--env -e\n\t\t--env-file\n\t\t--expose\n\t\t--gpus\n\t\t--group-add\n\t\t--health-cmd\n\t\t--health-interval\n\t\t--health-retries\n\t\t--health-start-period\n\t\t--health-timeout\n\t\t--hostname -h\n\t\t--ip\n\t\t--ip6\n\t\t--ipc\n\t\t--kernel-memory\n\t\t--label-file\n\t\t--label -l\n\t\t--link\n\t\t--link-local-ip\n\t\t--log-driver\n\t\t--log-opt\n\t\t--mac-address\n\t\t--memory -m\n\t\t--memory-swap\n\t\t--memory-swappiness\n\t\t--memory-reservation\n\t\t--mount\n\t\t--name\n\t\t--network\n\t\t--network-alias\n\t\t--oom-score-adj\n\t\t--pid\n\t\t--pids-limit\n\t\t--platform\n\t\t--publish -p\n\t\t--pull\n\t\t--restart\n\t\t--runtime\n\t\t--security-opt\n\t\t--shm-size\n\t\t--stop-signal\n\t\t--stop-timeout\n\t\t--storage-opt\n\t\t--tmpfs\n\t\t--sysctl\n\t\t--ulimit\n\t\t--user -u\n\t\t--userns\n\t\t--uts\n\t\t--volume-driver\n\t\t--volumes-from\n\t\t--volume -v\n\t\t--workdir -w\n\t\"\n\t__docker_server_os_is windows && options_with_args+=\"\n\t\t--cpu-count\n\t\t--cpu-percent\n\t\t--io-maxbandwidth\n\t\t--io-maxiops\n\t\t--isolation\n\t\"\n\n\tlocal boolean_options=\"\n\t\t--disable-content-trust=false\n\t\t--help\n\t\t--init\n\t\t--interactive -i\n\t\t--no-healthcheck\n\t\t--oom-kill-disable\n\t\t--privileged\n\t\t--publish-all -P\n\t\t--quiet -q\n\t\t--read-only\n\t\t--tty -t\n\t\"\n\n\tif [ \"$command\" = \"run\" ] || [ \"$subcommand\" = \"run\" ] ; then\n\t\toptions_with_args=\"$options_with_args\n\t\t\t--detach-keys\n\t\t\"\n\t\tboolean_options=\"$boolean_options\n\t\t\t--detach -d\n\t\t\t--rm\n\t\t\t--sig-proxy=false\n\t\t\"\n\t\t__docker_complete_detach_keys && return\n\tfi\n\n\tlocal all_options=\"$options_with_args $boolean_options\"\n\n\n\t__docker_complete_log_driver_options && return\n\t__docker_complete_restart && return\n\n\tlocal key=$(__docker_map_key_of_current_option '--security-opt')\n\tcase \"$key\" in\n\t\tlabel)\n\t\t\t[[ $cur == *: ]] && return\n\t\t\tCOMPREPLY=( $( compgen -W \"user: role: type: level: disable\" -- \"${cur##*=}\") )\n\t\t\tif [ \"${COMPREPLY[*]}\" != \"disable\" ] ; then\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\t\tseccomp)\n\t\t\tlocal cur=${cur##*=}\n\t\t\t_filedir\n\t\t\tCOMPREPLY+=( $( compgen -W \"unconfined\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--add-host)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:)\n\t\t\t\t\t__docker_complete_resolved_hostname\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\t--attach|-a)\n\t\t\tCOMPREPLY=( $( compgen -W 'stdin stdout stderr' -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--cap-add)\n\t\t\t__docker_complete_capabilities_addable\n\t\t\treturn\n\t\t\t;;\n\t\t--cap-drop)\n\t\t\t__docker_complete_capabilities_droppable\n\t\t\treturn\n\t\t\t;;\n\t\t--cidfile|--env-file|--label-file)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--cgroupns)\n\t\t\tCOMPREPLY=( $( compgen -W \"host private\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--device|--tmpfs|--volume|-v)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:*)\n\t\t\t\t\t# TODO somehow do _filedir for stuff inside the image, if it's already specified (which is also somewhat difficult to determine)\n\t\t\t\t\t;;\n\t\t\t\t'')\n\t\t\t\t\tCOMPREPLY=( $( compgen -W '/' -- \"$cur\" ) )\n\t\t\t\t\t__docker_nospace\n\t\t\t\t\t;;\n\t\t\t\t/*)\n\t\t\t\t\t_filedir\n\t\t\t\t\t__docker_nospace\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--env|-e)\n\t\t\t# we do not append a \"=\" here because \"-e VARNAME\" is legal syntax, too\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--ipc)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:*)\n\t\t\t\t\tcur=\"${cur#*:}\"\n\t\t\t\t\t__docker_complete_containers_running\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W 'none host private shareable container:' -- \"$cur\" ) )\n\t\t\t\t\tif [ \"${COMPREPLY[*]}\" = \"container:\" ]; then\n\t\t\t\t\t\t__docker_nospace\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--isolation)\n\t\t\tif __docker_server_os_is windows ; then\n\t\t\t\t__docker_complete_isolation\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\t\t--link)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:*)\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\t__docker_complete_containers_running\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${COMPREPLY[*]}\" -S ':' ) )\n\t\t\t\t\t__docker_nospace\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--log-driver)\n\t\t\t__docker_complete_log_drivers\n\t\t\treturn\n\t\t\t;;\n\t\t--log-opt)\n\t\t\t__docker_complete_log_options\n\t\t\treturn\n\t\t\t;;\n\t\t--network)\n\t\t\tcase \"$cur\" in\n\t\t\t\tcontainer:*)\n\t\t\t\t\t__docker_complete_containers_all --cur \"${cur#*:}\"\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$(__docker_plugins_bundled --type Network) $(__docker_networks) container:\" -- \"$cur\") )\n\t\t\t\t\tif [ \"${COMPREPLY[*]}\" = \"container:\" ] ; then\n\t\t\t\t\t\t__docker_nospace\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--pid)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:*)\n\t\t\t\t\t__docker_complete_containers_running --cur \"${cur#*:}\"\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W 'host container:' -- \"$cur\" ) )\n\t\t\t\t\tif [ \"${COMPREPLY[*]}\" = \"container:\" ]; then\n\t\t\t\t\t\t__docker_nospace\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--pull)\n\t\t  COMPREPLY=( $( compgen -W 'always missing never' -- \"$cur\" ) )\n\t\t  return\n\t\t  ;;\n\t\t--runtime)\n\t\t\t__docker_complete_runtimes\n\t\t\treturn\n\t\t\t;;\n\t\t--security-opt)\n\t\t\tCOMPREPLY=( $( compgen -W \"apparmor= label= no-new-privileges seccomp= systempaths=unconfined\" -- \"$cur\") )\n\t\t\tif [[ ${COMPREPLY[*]} = *= ]] ; then\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\t\t--stop-signal)\n\t\t\t__docker_complete_signals\n\t\t\treturn\n\t\t\t;;\n\t\t--storage-opt)\n\t\t\tCOMPREPLY=( $( compgen -W \"size\" -S = -- \"$cur\") )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--ulimit)\n\t\t\t__docker_complete_ulimits\n\t\t\treturn\n\t\t\t;;\n\t\t--user|-u)\n\t\t\t__docker_complete_user_group\n\t\t\treturn\n\t\t\t;;\n\t\t--userns)\n\t\t\tCOMPREPLY=( $( compgen -W \"host\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--volume-driver)\n\t\t\t__docker_complete_plugins_bundled --type Volume\n\t\t\treturn\n\t\t\t;;\n\t\t--volumes-from)\n\t\t\t__docker_complete_containers_all\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$all_options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"$( __docker_to_alternatives \"$options_with_args\" )\" )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_start {\n\t__docker_complete_detach_keys && return\n\tcase \"$prev\" in\n\t\t--checkpoint)\n\t\t\tif __docker_server_is_experimental ; then\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\t\t--checkpoint-dir)\n\t\t\tif __docker_server_is_experimental ; then\n\t\t\t\t_filedir -d\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tlocal options=\"--attach -a --detach-keys --help --interactive -i\"\n\t\t\t__docker_server_is_experimental && options+=\" --checkpoint --checkpoint-dir\"\n\t\t\tCOMPREPLY=( $( compgen -W \"$options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_stopped\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_stats {\n\tcase \"$prev\" in\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --format --help --no-stream --no-trunc\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_running\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_stop {\n\tcase \"$prev\" in\n\t\t--time|-t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --time -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_stoppable\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_top {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_running\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_unpause {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_containers_unpauseable\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_update {\n\tlocal options_with_args=\"\n\t\t--blkio-weight\n\t\t--cpu-period\n\t\t--cpu-quota\n\t\t--cpu-rt-period\n\t\t--cpu-rt-runtime\n\t\t--cpus\n\t\t--cpuset-cpus\n\t\t--cpuset-mems\n\t\t--cpu-shares -c\n\t\t--kernel-memory\n\t\t--memory -m\n\t\t--memory-reservation\n\t\t--memory-swap\n\t\t--pids-limit\n\t\t--restart\n\t\"\n\n\tlocal boolean_options=\"\n\t\t--help\n\t\"\n\n\tlocal all_options=\"$options_with_args $boolean_options\"\n\n\t__docker_complete_restart && return\n\n\tcase \"$prev\" in\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$all_options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_all\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_container_wait {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_containers_all\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_context {\n\tlocal subcommands=\"\n\t\tcreate\n\t\texport\n\t\timport\n\t\tinspect\n\t\tls\n\t\trm\n\t\tupdate\n\t\tuse\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_create {\n\tcase \"$prev\" in\n\t\t--description|--docker)\n\t\t\treturn\n\t\t\t;;\n\t\t--from)\n\t\t\t__docker_complete_contexts\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--description --docker --from --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_export {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_contexts\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t_filedir\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_import {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t:\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t_filedir\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_contexts\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_list {\n\t_docker_context_ls\n}\n\nfunction _docker_context_ls {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_remove {\n\t_docker_context_rm\n}\n\nfunction _docker_context_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_contexts\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_update {\n\tcase \"$prev\" in\n\t\t--description|--docker)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--description --docker --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_contexts\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_context_use {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_contexts --add default\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_commit {\n\t_docker_container_commit\n}\n\nfunction _docker_cp {\n\t_docker_container_cp\n}\n\nfunction _docker_create {\n\t_docker_container_create\n}\n\nfunction _docker_daemon {\n\tlocal boolean_options=\"\n\t\t$global_boolean_options\n\t\t--experimental\n\t\t--help\n\t\t--icc=false\n\t\t--init\n\t\t--ip-forward=false\n\t\t--ip-masq=false\n\t\t--iptables=false\n\t\t--ip6tables\n\t\t--ipv6\n\t\t--live-restore\n\t\t--no-new-privileges\n\t\t--raw-logs\n\t\t--selinux-enabled\n\t\t--userland-proxy=false\n\t\t--validate\n\t\t--version -v\n\t\"\n\tlocal options_with_args=\"\n\t\t$global_options_with_args\n\t\t--add-runtime\n\t\t--allow-nondistributable-artifacts\n\t\t--api-cors-header\n\t\t--authorization-plugin\n\t\t--bip\n\t\t--bridge -b\n\t\t--cgroup-parent\n\t\t--config-file\n\t\t--containerd\n\t\t--containerd-namespace\n\t\t--containerd-plugins-namespace\n\t\t--cpu-rt-period\n\t\t--cpu-rt-runtime\n\t\t--data-root\n\t\t--default-address-pool\n\t\t--default-gateway\n\t\t--default-gateway-v6\n\t\t--default-runtime\n\t\t--default-shm-size\n\t\t--default-ulimit\n\t\t--dns\n\t\t--dns-search\n\t\t--dns-opt\n\t\t--exec-opt\n\t\t--exec-root\n\t\t--fixed-cidr\n\t\t--fixed-cidr-v6\n\t\t--group -G\n\t\t--init-path\n\t\t--insecure-registry\n\t\t--ip\n\t\t--label\n\t\t--log-driver\n\t\t--log-opt\n\t\t--max-concurrent-downloads\n\t\t--max-concurrent-uploads\n\t\t--max-download-attempts\n\t\t--metrics-addr\n\t\t--mtu\n\t\t--network-control-plane-mtu\n\t\t--node-generic-resource\n\t\t--oom-score-adjust\n\t\t--pidfile -p\n\t\t--registry-mirror\n\t\t--seccomp-profile\n\t\t--shutdown-timeout\n\t\t--storage-driver -s\n\t\t--storage-opt\n\t\t--swarm-default-advertise-addr\n\t\t--userland-proxy-path\n\t\t--userns-remap\n\t\"\n\n\t__docker_complete_log_driver_options && return\n\n \tlocal key=$(__docker_map_key_of_current_option '--storage-opt')\n \tcase \"$key\" in\n \t\tdm.blkdiscard|dm.override_udev_sync_check|dm.use_deferred_removal|dm.use_deferred_deletion)\n \t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n \t\t\treturn\n \t\t\t;;\n\t\tdm.directlvm_device|dm.thinpooldev)\n\t\t\tcur=${cur##*=}\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\tdm.fs)\n\t\t\tCOMPREPLY=( $( compgen -W \"ext4 xfs\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tdm.libdm_log_level)\n\t\t\tCOMPREPLY=( $( compgen -W \"2 3 4 5 6 7\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n \tesac\n\n\tcase \"$prev\" in\n\t\t--authorization-plugin)\n\t\t\t__docker_complete_plugins_bundled --type Authorization\n\t\t\treturn\n\t\t\t;;\n\t\t--config-file|--containerd|--init-path|--pidfile|-p|--tlscacert|--tlscert|--tlskey|--userland-proxy-path)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--default-ulimit)\n\t\t\t__docker_complete_ulimits\n\t\t\treturn\n\t\t\t;;\n\t\t--exec-root|--data-root)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\t\t--log-driver)\n\t\t\t__docker_complete_log_drivers\n\t\t\treturn\n\t\t\t;;\n\t\t--storage-driver|-s)\n\t\t\tCOMPREPLY=( $( compgen -W \"btrfs overlay2 vfs zfs\" -- \"$(echo \"$cur\" | tr '[:upper:]' '[:lower:]')\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--storage-opt)\n\t\t\tlocal btrfs_options=\"btrfs.min_space\"\n\t\t\tlocal overlay2_options=\"overlay2.size\"\n\t\t\tlocal zfs_options=\"zfs.fsname\"\n\n\t\t\tlocal all_options=\"$btrfs_options $overlay2_options $zfs_options\"\n\n\t\t\tcase $(__docker_value_of_option '--storage-driver|-s') in\n\t\t\t\t'')\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$all_options\" -S = -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\t\tbtrfs)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$btrfs_options\" -S = -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\t\toverlay2)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$overlay2_options\" -S = -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\t\tzfs)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$zfs_options\" -S = -- \"$cur\" ) )\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--log-level|-l)\n\t\t\t__docker_complete_log_levels\n\t\t\treturn\n\t\t\t;;\n\t\t--log-opt)\n\t\t\t__docker_complete_log_options\n\t\t\treturn\n\t\t\t;;\n\t\t--metrics-addr)\n\t\t\t__docker_complete_local_ips\n\t\t\t__docker_append_to_completions \":\"\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--seccomp-profile)\n\t\t\t_filedir json\n\t\t\treturn\n\t\t\t;;\n\t\t--swarm-default-advertise-addr)\n\t\t\t__docker_complete_local_interfaces\n\t\t\treturn\n\t\t\t;;\n\t\t--userns-remap)\n\t\t\t__docker_complete_user_group\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$boolean_options $options_with_args\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_diff {\n\t_docker_container_diff\n}\n\n\nfunction _docker_events {\n\t_docker_system_events\n}\n\nfunction _docker_exec {\n\t_docker_container_exec\n}\n\nfunction _docker_export {\n\t_docker_container_export\n}\n\nfunction _docker_help {\n\tlocal counter=$(__docker_pos_first_nonflag)\n\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\tCOMPREPLY=( $( compgen -W \"${commands[*]}\" -- \"$cur\" ) )\n\tfi\n}\n\nfunction _docker_history {\n\t_docker_image_history\n}\n\n\nfunction _docker_image {\n\tlocal subcommands=\"\n\t\tbuild\n\t\thistory\n\t\timport\n\t\tinspect\n\t\tload\n\t\tls\n\t\tprune\n\t\tpull\n\t\tpush\n\t\trm\n\t\tsave\n\t\ttag\n\t\"\n\tlocal aliases=\"\n\t\timages\n\t\tlist\n\t\tremove\n\t\trmi\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_build {\n\tlocal options_with_args=\"\n\t\t--add-host\n\t\t--build-arg\n\t\t--cache-from\n\t\t--cgroup-parent\n\t\t--cpuset-cpus\n\t\t--cpuset-mems\n\t\t--cpu-shares -c\n\t\t--cpu-period\n\t\t--cpu-quota\n\t\t--file -f\n\t\t--iidfile\n\t\t--label\n\t\t--memory -m\n\t\t--memory-swap\n\t\t--network\n\t\t--platform\n\t\t--shm-size\n\t\t--tag -t\n\t\t--target\n\t\t--ulimit\n\t\"\n\t__docker_server_os_is windows && options_with_args+=\"\n\t\t--isolation\n\t\"\n\n\tlocal boolean_options=\"\n\t\t--disable-content-trust=false\n\t\t--force-rm\n\t\t--help\n\t\t--no-cache\n\t\t--pull\n\t\t--quiet -q\n\t\t--rm\n\t\"\n\n\tif __docker_server_is_experimental ; then\n\t\tboolean_options+=\"\n\t\t\t--squash\n\t\t\"\n\tfi\n\n\tif [ \"${DOCKER_BUILDKIT-}\" = \"1\" ] ; then\n\t\toptions_with_args+=\"\n\t\t\t--output -o\n\t\t\t--progress\n\t\t\t--secret\n\t\t\t--ssh\n\t\t\"\n\telse\n\t\tboolean_options+=\"\n\t\t\t--compress\n\t\t\"\n\tfi\n\n\tlocal all_options=\"$options_with_args $boolean_options\"\n\n\tcase \"$prev\" in\n\t\t--add-host)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:)\n\t\t\t\t\t__docker_complete_resolved_hostname\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\t--build-arg)\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--cache-from)\n\t\t\t__docker_complete_images --repo --tag --id\n\t\t\treturn\n\t\t\t;;\n\t\t--file|-f|--iidfile)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--isolation)\n\t\t\tif __docker_server_os_is windows ; then\n\t\t\t\t__docker_complete_isolation\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\t\t--network)\n\t\t\tcase \"$cur\" in\n\t\t\t\tcontainer:*)\n\t\t\t\t\t__docker_complete_containers_all --cur \"${cur#*:}\"\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"$(__docker_plugins_bundled --type Network) $(__docker_networks) container:\" -- \"$cur\") )\n\t\t\t\t\tif [ \"${COMPREPLY[*]}\" = \"container:\" ] ; then\n\t\t\t\t\t\t__docker_nospace\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t--progress)\n\t\t\tCOMPREPLY=( $( compgen -W \"auto plain tty\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--tag|-t)\n\t\t\t__docker_complete_images --repo --tag\n\t\t\treturn\n\t\t\t;;\n\t\t--target)\n\t\t\tlocal context_pos=$( __docker_pos_first_nonflag \"$( __docker_to_alternatives \"$options_with_args\" )\" )\n\t\t\tlocal context=\"${words[$context_pos]}\"\n\t\t\tcontext=\"${context:-.}\"\n\n\t\t\tlocal file=\"$( __docker_value_of_option '--file|f' )\"\n\t\t\tlocal default_file=\"${context%/}/Dockerfile\"\n\t\t\tlocal dockerfile=\"${file:-$default_file}\"\n\n\t\t\tlocal targets=\"$( sed -n 's/^FROM .\\+ AS \\(.\\+\\)/\\1/p' \"$dockerfile\" 2>/dev/null )\"\n\t\t\tCOMPREPLY=( $( compgen -W \"$targets\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--ulimit)\n\t\t\t__docker_complete_ulimits\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$all_options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"$( __docker_to_alternatives \"$options_with_args\" )\" )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t_filedir -d\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_history {\n\tcase \"$prev\" in\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format --help --human=false -H=false --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--format')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_images {\n\t_docker_image_ls\n}\n\nfunction _docker_image_import {\n\tcase \"$prev\" in\n\t\t--change|-c|--message|-m|--platform)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tlocal options=\"--change -c --help --message -m --platform\"\n\t\t\tCOMPREPLY=( $( compgen -W \"$options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--change|-c|--message|-m')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t_filedir\n\t\t\t\treturn\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_inspect {\n\t_docker_inspect --type image\n}\n\nfunction _docker_image_load {\n\tcase \"$prev\" in\n\t\t--input|-i|\"<\")\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --input -i --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_list {\n\t_docker_image_ls\n}\n\nfunction _docker_image_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tbefore|since)\n\t\t\t__docker_complete_images --cur \"${cur##*=}\" --force-tag --id\n\t\t\treturn\n\t\t\t;;\n\t\tdangling)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tlabel)\n\t\t\treturn\n\t\t\t;;\n\t\treference)\n\t\t\t__docker_complete_images --cur \"${cur##*=}\" --repo --tag\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"before dangling label reference since\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n                --format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --digests --filter -f --format --help --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t=)\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_images --repo --tag\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"label label! until\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --force -f --filter --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_pull {\n\tcase \"$prev\" in\n\t\t--platform)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tlocal options=\"--all-tags -a --disable-content-trust=false --help --platform --quiet -q\"\n\t\t\tCOMPREPLY=( $( compgen -W \"$options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag --platform)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\tfor arg in \"${COMP_WORDS[@]}\"; do\n\t\t\t\t\tcase \"$arg\" in\n\t\t\t\t\t\t--all-tags|-a)\n\t\t\t\t\t\t\t__docker_complete_images --repo\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t;;\n\t\t\t\t\tesac\n\t\t\t\tdone\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_push {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all-tags -a --disable-content-trust=false --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_remove {\n\t_docker_image_rm\n}\n\nfunction _docker_image_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help --no-prune\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_images --force-tag --id\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_rmi {\n\t_docker_image_rm\n}\n\nfunction _docker_image_save {\n\tcase \"$prev\" in\n\t\t--output|-o|\">\")\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --output -o\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_images --repo --tag --id\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_image_tag {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\t\treturn\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_images {\n\t_docker_image_ls\n}\n\nfunction _docker_import {\n\t_docker_image_import\n}\n\nfunction _docker_info {\n\t_docker_system_info\n}\n\nfunction _docker_inspect {\n\tlocal preselected_type\n\tlocal type\n\n\tif [ \"${1-}\" = \"--type\" ] ; then\n\t\tpreselected_type=yes\n\t\ttype=\"$2\"\n\telse\n\t\ttype=$(__docker_value_of_option --type)\n\tfi\n\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\t\t--type)\n\t\t\tif [ -z \"$preselected_type\" ] ; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"container image network node plugin secret service volume\" -- \"$cur\" ) )\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tlocal options=\"--format -f --help --size -s\"\n\t\t\tif [ -z \"$preselected_type\" ] ; then\n\t\t\t\toptions+=\" --type\"\n\t\t\tfi\n\t\t\tCOMPREPLY=( $( compgen -W \"$options\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tcase \"$type\" in\n\t\t\t\t'')\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"\n\t\t\t\t\t\t$(__docker_containers --all)\n\t\t\t\t\t\t$(__docker_images --force-tag --id)\n\t\t\t\t\t\t$(__docker_networks)\n\t\t\t\t\t\t$(__docker_nodes)\n\t\t\t\t\t\t$(__docker_plugins_installed)\n\t\t\t\t\t\t$(__docker_secrets)\n\t\t\t\t\t\t$(__docker_services)\n\t\t\t\t\t\t$(__docker_volumes)\n\t\t\t\t\t\" -- \"$cur\" ) )\n\t\t\t\t\t__ltrim_colon_completions \"$cur\"\n\t\t\t\t\t;;\n\t\t\t\tcontainer)\n\t\t\t\t\t__docker_complete_containers_all\n\t\t\t\t\t;;\n\t\t\t\timage)\n\t\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\t\t\t;;\n\t\t\t\tnetwork)\n\t\t\t\t\t__docker_complete_networks\n\t\t\t\t\t;;\n\t\t\t\tnode)\n\t\t\t\t\t__docker_complete_nodes\n\t\t\t\t\t;;\n\t\t\t\tplugin)\n\t\t\t\t\t__docker_complete_plugins_installed\n\t\t\t\t\t;;\n\t\t\t\tsecret)\n\t\t\t\t\t__docker_complete_secrets\n\t\t\t\t\t;;\n\t\t\t\tservice)\n\t\t\t\t\t__docker_complete_services\n\t\t\t\t\t;;\n\t\t\t\tvolume)\n\t\t\t\t\t__docker_complete_volumes\n\t\t\t\t\t;;\n\t\t\tesac\n\tesac\n}\n\nfunction _docker_kill {\n\t_docker_container_kill\n}\n\nfunction _docker_load {\n\t_docker_image_load\n}\n\nfunction _docker_login {\n\tcase \"$prev\" in\n\t\t--password|-p|--username|-u)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --password -p --password-stdin --username -u\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_logout {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_logs {\n\t_docker_container_logs\n}\n\nfunction _docker_network_connect {\n\tlocal options_with_args=\"\n\t\t--alias\n\t\t--ip\n\t\t--ip6\n\t\t--link\n\t\t--link-local-ip\n\t\"\n\n\tlocal boolean_options=\"\n\t\t--help\n\t\"\n\n\tcase \"$prev\" in\n\t\t--link)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:*)\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\t__docker_complete_containers_running\n\t\t\t\t\tCOMPREPLY=( $( compgen -W \"${COMPREPLY[*]}\" -S ':' ) )\n\t\t\t\t\t__docker_nospace\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$boolean_options $options_with_args\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"$( __docker_to_alternatives \"$options_with_args\" )\" )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_networks\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_containers_all\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_network_create {\n\tcase \"$prev\" in\n\t\t--aux-address|--gateway|--ip-range|--ipam-opt|--ipv6|--opt|-o|--subnet)\n\t\t\treturn\n\t\t\t;;\n\t\t--config-from)\n\t\t\t__docker_complete_networks\n\t\t\treturn\n\t\t\t;;\n\t\t--driver|-d)\n\t\t\t# remove drivers that allow one instance only, add drivers missing in `docker info`\n\t\t\t__docker_complete_plugins_bundled --type Network --remove host --remove null --add macvlan\n\t\t\treturn\n\t\t\t;;\n\t\t--ipam-driver)\n\t\t\tCOMPREPLY=( $( compgen -W \"default\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--label)\n\t\t\treturn\n\t\t\t;;\n\t\t--scope)\n\t\t\tCOMPREPLY=( $( compgen -W \"local swarm\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--attachable --aux-address --config-from --config-only --driver -d --gateway --help --ingress --internal --ip-range --ipam-driver --ipam-opt --ipv6 --label --opt -o --scope --subnet\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_network_disconnect {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_networks\n\t\t\telif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_containers_in_network \"$prev\"\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_network_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --verbose\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_networks\n\tesac\n}\n\nfunction _docker_network_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tdangling)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tdriver)\n\t\t\t__docker_complete_plugins_bundled --cur \"${cur##*=}\" --type Network --add macvlan\n\t\t\treturn\n\t\t\t;;\n\t\tid)\n\t\t\t__docker_complete_networks --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_networks --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\t\tscope)\n\t\t\tCOMPREPLY=( $( compgen -W \"global local swarm\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\ttype)\n\t\t\tCOMPREPLY=( $( compgen -W \"builtin custom\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"dangling driver id label name scope type\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_network_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"label label! until\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --filter --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_network_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_networks --filter type=custom\n\tesac\n}\n\nfunction _docker_network {\n\tlocal subcommands=\"\n\t\tconnect\n\t\tcreate\n\t\tdisconnect\n\t\tinspect\n\t\tls\n\t\tprune\n\t\trm\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tinspect\n\t\tlogs\n\t\tls\n\t\trm\n\t\trollback\n\t\tscale\n\t\tps\n\t\tupdate\n\t\"\n\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_create {\n\t_docker_service_update_and_create\n}\n\nfunction _docker_service_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --pretty\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_services\n\tesac\n}\n\nfunction _docker_service_logs {\n\tcase \"$prev\" in\n\t\t--since|--tail|-n)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--details --follow -f --help --no-resolve --no-task-ids --no-trunc --raw --since --tail -n --timestamps -t\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--since|--tail|-n')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_services_and_tasks\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_list {\n\t_docker_service_ls\n}\n\nfunction _docker_service_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tid)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tmode)\n\t\t\tCOMPREPLY=( $( compgen -W \"global global-job replicated replicated-job\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -W \"id label mode name\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_remove {\n\t_docker_service_rm\n}\n\nfunction _docker_service_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_services\n\tesac\n}\n\nfunction _docker_service_rollback {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--detach -d --help --quit -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_services\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_scale {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--detach -d --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_services\n\t\t\t__docker_append_to_completions \"=\"\n\t\t\t__docker_nospace\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_ps {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tdesired-state)\n\t\t\tCOMPREPLY=( $( compgen -W \"accepted running shutdown\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\t\tnode)\n\t\t\t__docker_complete_nodes --cur \"${cur##*=}\" --add self\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -W \"desired-state id name node\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --no-resolve --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_services\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_service_update {\n\t_docker_service_update_and_create\n}\n\n# _docker_service_update_and_create is the combined completion for `docker service create`\n# and `docker service update`\nfunction _docker_service_update_and_create {\n\tlocal options_with_args=\"\n\t\t--cap-add\n\t\t--cap-drop\n\t\t--endpoint-mode\n\t\t--entrypoint\n\t\t--health-cmd\n\t\t--health-interval\n\t\t--health-retries\n\t\t--health-start-period\n\t\t--health-timeout\n\t\t--hostname\n\t\t--isolation\n\t\t--limit-cpu\n\t\t--limit-memory\n\t\t--limit-pids\n\t\t--log-driver\n\t\t--log-opt\n\t\t--max-replicas\n\t\t--replicas\n\t\t--replicas-max-per-node\n\t\t--reserve-cpu\n\t\t--reserve-memory\n\t\t--restart-condition\n\t\t--restart-delay\n\t\t--restart-max-attempts\n\t\t--restart-window\n\t\t--rollback-delay\n\t\t--rollback-failure-action\n\t\t--rollback-max-failure-ratio\n\t\t--rollback-monitor\n\t\t--rollback-order\n\t\t--rollback-parallelism\n\t\t--stop-grace-period\n\t\t--stop-signal\n\t\t--update-delay\n\t\t--update-failure-action\n\t\t--update-max-failure-ratio\n\t\t--update-monitor\n\t\t--update-order\n\t\t--update-parallelism\n\t\t--user -u\n\t\t--workdir -w\n\t\"\n\t__docker_server_os_is windows && options_with_args+=\"\n\t\t--credential-spec\n\t\"\n\n\tlocal boolean_options=\"\n\t\t--detach -d\n\t\t--help\n\t\t--init\n\t\t--no-healthcheck\n\t\t--no-resolve-image\n\t\t--read-only\n\t\t--tty -t\n\t\t--with-registry-auth\n\t\"\n\n\t__docker_complete_log_driver_options && return\n\n\tif [ \"$subcommand\" = \"create\" ] ; then\n\t\toptions_with_args=\"$options_with_args\n\t\t\t--config\n\t\t\t--constraint\n\t\t\t--container-label\n\t\t\t--dns\n\t\t\t--dns-option\n\t\t\t--dns-search\n\t\t\t--env -e\n\t\t\t--env-file\n\t\t\t--generic-resource\n\t\t\t--group\n\t\t\t--host\n\t\t\t--label -l\n\t\t\t--mode\n\t\t\t--mount\n\t\t\t--name\n\t\t\t--network\n\t\t\t--placement-pref\n\t\t\t--publish -p\n\t\t\t--secret\n\t\t\t--sysctl\n\t\t\t--ulimit\n\t\t\"\n\n\t\tcase \"$prev\" in\n\t\t\t--env-file)\n\t\t\t\t_filedir\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\t--mode)\n\t\t\t\tCOMPREPLY=( $( compgen -W \"global global-job replicated replicated-job\" -- \"$cur\" ) )\n\t\t\t\treturn\n\t\t\t\t;;\n\t\tesac\n\tfi\n\tif [ \"$subcommand\" = \"update\" ] ; then\n\t\toptions_with_args=\"$options_with_args\n\t\t\t--args\n\t\t\t--config-add\n\t\t\t--config-rm\n\t\t\t--constraint-add\n\t\t\t--constraint-rm\n\t\t\t--container-label-add\n\t\t\t--container-label-rm\n\t\t\t--dns-add\n\t\t\t--dns-option-add\n\t\t\t--dns-option-rm\n\t\t\t--dns-rm\n\t\t\t--dns-search-add\n\t\t\t--dns-search-rm\n\t\t\t--env-add\n\t\t\t--env-rm\n\t\t\t--generic-resource-add\n\t\t\t--generic-resource-rm\n\t\t\t--group-add\n\t\t\t--group-rm\n\t\t\t--host-add\n\t\t\t--host-rm\n\t\t\t--image\n\t\t\t--label-add\n\t\t\t--label-rm\n\t\t\t--mount-add\n\t\t\t--mount-rm\n\t\t\t--network-add\n\t\t\t--network-rm\n\t\t\t--placement-pref-add\n\t\t\t--placement-pref-rm\n\t\t\t--publish-add\n\t\t\t--publish-rm\n\t\t\t--rollback\n\t\t\t--secret-add\n\t\t\t--secret-rm\n\t\t\t--sysctl-add\n\t\t\t--sysctl-rm\n\t\t\t--ulimit-add\n\t\t\t--ulimit-rm\n\t\t\"\n\n\t\tboolean_options=\"$boolean_options\n\t\t\t--force\n\t\t\"\n\n\t\tcase \"$prev\" in\n\t\t\t--env-rm)\n\t\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\t--image)\n\t\t\t\t__docker_complete_images --repo --tag --id\n\t\t\t\treturn\n\t\t\t\t;;\n\t\tesac\n\tfi\n\n\tlocal strategy=$(__docker_map_key_of_current_option '--placement-pref|--placement-pref-add|--placement-pref-rm')\n\tcase \"$strategy\" in\n\t\tspread)\n\t\t\tCOMPREPLY=( $( compgen -W \"engine.labels node.labels\" -S . -- \"${cur##*=}\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--cap-add)\n\t\t\t__docker_complete_capabilities_addable\n\t\t\treturn\n\t\t\t;;\n\t\t--cap-drop)\n\t\t\t__docker_complete_capabilities_droppable\n\t\t\treturn\n\t\t\t;;\n\t\t--config|--config-add|--config-rm)\n\t\t\t__docker_complete_configs\n\t\t\treturn\n\t\t\t;;\n\t\t--endpoint-mode)\n\t\t\tCOMPREPLY=( $( compgen -W \"dnsrr vip\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--env|-e|--env-add)\n\t\t\t# we do not append a \"=\" here because \"-e VARNAME\" is legal systax, too\n\t\t\tCOMPREPLY=( $( compgen -e -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--group|--group-add|--group-rm)\n\t\t\tCOMPREPLY=( $(compgen -g -- \"$cur\") )\n\t\t\treturn\n\t\t\t;;\n\t\t--host|--host-add|--host-rm)\n\t\t\tcase \"$cur\" in\n\t\t\t\t*:)\n\t\t\t\t\t__docker_complete_resolved_hostname\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\t--isolation)\n\t\t\t__docker_complete_isolation\n\t\t\treturn\n\t\t\t;;\n\t\t--log-driver)\n\t\t\t__docker_complete_log_drivers\n\t\t\treturn\n\t\t\t;;\n\t\t--log-opt)\n\t\t\t__docker_complete_log_options\n\t\t\treturn\n\t\t\t;;\n\t\t--network|--network-add|--network-rm)\n\t\t\t__docker_complete_networks\n\t\t\treturn\n\t\t\t;;\n\t\t--placement-pref|--placement-pref-add|--placement-pref-rm)\n\t\t\tCOMPREPLY=( $( compgen -W \"spread\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--restart-condition)\n\t\t\tCOMPREPLY=( $( compgen -W \"any none on-failure\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--rollback-failure-action)\n\t\t\tCOMPREPLY=( $( compgen -W \"continue pause\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--secret|--secret-add|--secret-rm)\n\t\t\t__docker_complete_secrets\n\t\t\treturn\n\t\t\t;;\n\t\t--stop-signal)\n\t\t\t__docker_complete_signals\n\t\t\treturn\n\t\t\t;;\n\t\t--update-failure-action)\n\t\t\tCOMPREPLY=( $( compgen -W \"continue pause rollback\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--ulimit|--ulimit-add)\n\t\t\t__docker_complete_ulimits\n\t\t\treturn\n\t\t\t;;\n\t\t--ulimit-rm)\n\t\t\t__docker_complete_ulimits --rm\n\t\t\treturn\n\t\t\t;;\n\t\t--update-order|--rollback-order)\n\t\t\tCOMPREPLY=( $( compgen -W \"start-first stop-first\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--user|-u)\n\t\t\t__docker_complete_user_group\n\t\t\treturn\n\t\t\t;;\n\t\t$(__docker_to_extglob \"$options_with_args\") )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$boolean_options $options_with_args\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"$( __docker_to_alternatives \"$options_with_args\" )\" )\n\t\t\tif [ \"$subcommand\" = \"update\" ] ; then\n\t\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t\t__docker_complete_services\n\t\t\t\tfi\n\t\t\telse\n\t\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t\t__docker_complete_images --repo --tag --id\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm {\n\tlocal subcommands=\"\n\t\tca\n\t\tinit\n\t\tjoin\n\t\tjoin-token\n\t\tleave\n\t\tunlock\n\t\tunlock-key\n\t\tupdate\n\t\"\n\t__docker_subcommands \"$subcommands\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_ca {\n\tcase \"$prev\" in\n\t\t--ca-cert|--ca-key)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--cert-expiry|--external-ca)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--ca-cert --ca-key --cert-expiry --detach -d --external-ca --help --quiet -q --rotate\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_init {\n\tcase \"$prev\" in\n\t\t--advertise-addr)\n\t\t\tif [[ $cur == *: ]] ; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"2377\" -- \"${cur##*:}\" ) )\n\t\t\telse\n\t\t\t\t__docker_complete_local_interfaces\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\t\t--availability)\n\t\t\tCOMPREPLY=( $( compgen -W \"active drain pause\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--cert-expiry|--data-path-port|--default-addr-pool|--default-addr-pool-mask-length|--dispatcher-heartbeat|--external-ca|--max-snapshots|--snapshot-interval|--task-history-limit )\n\t\t\treturn\n\t\t\t;;\n\t\t--data-path-addr)\n\t\t\t__docker_complete_local_interfaces\n\t\t\treturn\n\t\t\t;;\n\t\t--listen-addr)\n\t\t\tif [[ $cur == *: ]] ; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"2377\" -- \"${cur##*:}\" ) )\n\t\t\telse\n\t\t\t\t__docker_complete_local_interfaces --add 0.0.0.0\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--advertise-addr --autolock --availability --cert-expiry --data-path-addr --data-path-port --default-addr-pool --default-addr-pool-mask-length --dispatcher-heartbeat --external-ca --force-new-cluster --help --listen-addr --max-snapshots --snapshot-interval --task-history-limit \" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_join {\n\tcase \"$prev\" in\n\t\t--advertise-addr)\n\t\t\tif [[ $cur == *: ]] ; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"2377\" -- \"${cur##*:}\" ) )\n\t\t\telse\n\t\t\t\t__docker_complete_local_interfaces\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\t\t--availability)\n\t\t\tCOMPREPLY=( $( compgen -W \"active drain pause\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--data-path-addr)\n\t\t\t__docker_complete_local_interfaces\n\t\t\treturn\n\t\t\t;;\n\t\t--listen-addr)\n\t\t\tif [[ $cur == *: ]] ; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"2377\" -- \"${cur##*:}\" ) )\n\t\t\telse\n\t\t\t\t__docker_complete_local_interfaces --add 0.0.0.0\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\t\t--token)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--advertise-addr --availability --data-path-addr --help --listen-addr --token\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*:)\n\t\t\tCOMPREPLY=( $( compgen -W \"2377\" -- \"${cur##*:}\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_join_token {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --quiet -q --rotate\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\tCOMPREPLY=( $( compgen -W \"manager worker\" -- \"$cur\" ) )\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_leave {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_unlock {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_unlock_key {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --quiet -q --rotate\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_swarm_update {\n\tcase \"$prev\" in\n\t\t--cert-expiry|--dispatcher-heartbeat|--external-ca|--max-snapshots|--snapshot-interval|--task-history-limit)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--autolock --cert-expiry --dispatcher-heartbeat --external-ca --help --max-snapshots --snapshot-interval --task-history-limit\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest {\n\tlocal subcommands=\"\n\t\tannotate\n\t\tcreate\n\t\tinspect\n\t\tpush\n\t\trm\n\t\"\n\t__docker_subcommands \"$subcommands\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest_annotate {\n\tcase \"$prev\" in\n\t\t--arch)\n\t\t\tCOMPREPLY=( $( compgen -W \"\n\t\t\t\t386\n\t\t\t\tamd64\n\t\t\t\tarm\n\t\t\t\tarm64\n\t\t\t\tmips64\n\t\t\t\tmips64le\n\t\t\t\tppc64le\n\t\t\t\triscv64\n\t\t\t\ts390x\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--os)\n\t\t\tCOMPREPLY=( $( compgen -W \"\n\t\t\t\tdarwin\n\t\t\t\tdragonfly\n\t\t\t\tfreebsd\n\t\t\t\tlinux\n\t\t\t\tnetbsd\n\t\t\t\topenbsd\n\t\t\t\tplan9\n\t\t\t\tsolaris\n\t\t\t\twindows\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--os-features|--variant)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--arch --help --os --os-features --variant\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag \"--arch|--os|--os-features|--variant\" )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ] || [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest_create {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--amend -a --help --insecure\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_images --force-tag --id\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest_inspect {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --insecure --verbose -v\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ] || [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest_push {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --insecure --purge -p\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$( __docker_pos_first_nonflag )\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_manifest_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_images --force-tag --id\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_node {\n\tlocal subcommands=\"\n\t\tdemote\n\t\tinspect\n\t\tls\n\t\tpromote\n\t\trm\n\t\tps\n\t\tupdate\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_node_demote {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_nodes --filter role=manager\n\tesac\n}\n\nfunction _docker_node_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --pretty\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_nodes --add self\n\tesac\n}\n\nfunction _docker_node_list {\n\t_docker_node_ls\n}\n\nfunction _docker_node_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tid)\n\t\t\t__docker_complete_nodes --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tlabel|node.label)\n\t\t\treturn\n\t\t\t;;\n\t\tmembership)\n\t\t\tCOMPREPLY=( $( compgen -W \"accepted pending\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_nodes --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\t\trole)\n\t\t\tCOMPREPLY=( $( compgen -W \"manager worker\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -W \"id label membership name node.label role\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_node_promote {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_nodes --filter role=worker\n\tesac\n}\n\nfunction _docker_node_remove {\n\t_docker_node_rm\n}\n\nfunction _docker_node_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_nodes\n\tesac\n}\n\nfunction _docker_node_ps {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tdesired-state)\n\t\t\tCOMPREPLY=( $( compgen -W \"accepted running shutdown\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -W \"desired-state id label name\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --no-resolve --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_nodes --add self\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_node_update {\n\tcase \"$prev\" in\n\t\t--availability)\n\t\t\tCOMPREPLY=( $( compgen -W \"active drain pause\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--role)\n\t\t\tCOMPREPLY=( $( compgen -W \"manager worker\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\t--label-add|--label-rm)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--availability --help --label-add --label-rm --role\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--availability|--label-add|--label-rm|--role')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_nodes\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_pause {\n\t_docker_container_pause\n}\n\nfunction _docker_plugin {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tdisable\n\t\tenable\n\t\tinspect\n\t\tinstall\n\t\tls\n\t\tpush\n\t\trm\n\t\tset\n\t\tupgrade\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_create {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--compress --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t# reponame\n\t\t\t\treturn\n\t\t\telif [ \"$cword\" -eq  \"$((counter + 1))\" ]; then\n\t\t\t\t_filedir -d\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_disable {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_plugins_installed --filter enabled=true\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_enable {\n\tcase \"$prev\" in\n\t\t--timeout)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --timeout\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--timeout')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_plugins_installed --filter enabled=false\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_inspect {\n\tcase \"$prev\" in\n\t\t--format|f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_plugins_installed\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_install {\n\tcase \"$prev\" in\n\t\t--alias)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--alias --disable --disable-content-trust=false --grant-all-permissions --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_list {\n\t_docker_plugin_ls\n}\n\nfunction _docker_plugin_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tcapability)\n\t\t\tCOMPREPLY=( $( compgen -W \"authz ipamdriver logdriver metricscollector networkdriver volumedriver\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tenabled)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"capability enabled\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_push {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_plugins_installed\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_remove {\n\t_docker_plugin_rm\n}\n\nfunction _docker_plugin_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_plugins_installed\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_set {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_plugins_installed\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_plugin_upgrade {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--disable-content-trust --grant-all-permissions --help --skip-remote-check\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_plugins_installed\n\t\t\t\t__ltrim_colon_completions \"$cur\"\n\t\t\telif [ \"$cword\" -eq  \"$((counter + 1))\" ]; then\n\t\t\t\tlocal plugin_images=\"$(__docker_plugins_installed)\"\n\t\t\t\tCOMPREPLY=( $(compgen -S : -W \"${plugin_images%:*}\" -- \"$cur\") )\n\t\t\t\t__docker_nospace\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_port {\n\t_docker_container_port\n}\n\nfunction _docker_ps {\n\t_docker_container_ls\n}\n\nfunction _docker_pull {\n\t_docker_image_pull\n}\n\nfunction _docker_push {\n\t_docker_image_push\n}\n\nfunction _docker_rename {\n\t_docker_container_rename\n}\n\nfunction _docker_restart {\n\t_docker_container_restart\n}\n\nfunction _docker_rm {\n\t_docker_container_rm\n}\n\nfunction _docker_rmi {\n\t_docker_image_rm\n}\n\nfunction _docker_run {\n\t_docker_container_run\n}\n\nfunction _docker_save {\n\t_docker_image_save\n}\n\n\nfunction _docker_secret {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tinspect\n\t\tls\n\t\trm\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_secret_create {\n\tcase \"$prev\" in\n\t\t--driver|-d|--label|-l)\n\t\t\treturn\n\t\t\t;;\n\t\t--template-driver)\n\t\t\tCOMPREPLY=( $( compgen -W \"golang\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--driver -d --help --label -l --template-driver\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--driver|-d|--label|-l|--template-driver')\n\t\t\tif [ \"$cword\" -eq \"$((counter + 1))\" ]; then\n\t\t\t\t_filedir\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_secret_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help --pretty\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_secrets\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_secret_list {\n\t_docker_secret_ls\n}\n\nfunction _docker_secret_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tid)\n\t\t\t__docker_complete_secrets --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_secrets --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"id label name\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format --filter -f --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_secret_remove {\n\t_docker_secret_rm\n}\n\nfunction _docker_secret_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_secrets\n\t\t\t;;\n\tesac\n}\n\n\n\nfunction _docker_search {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tis-automated)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tis-official)\n\t\t\tCOMPREPLY=( $( compgen -W \"false true\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"is-automated is-official stars\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format|--limit)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --limit --no-trunc\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_stack {\n\tlocal subcommands=\"\n\t\tconfig\n\t\tdeploy\n\t\tls\n\t\tps\n\t\trm\n\t\tservices\n\t\"\n\tlocal aliases=\"\n\t\tdown\n\t\tlist\n\t\tremove\n\t\tup\n\t\"\n\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_config {\n\tcase \"$prev\" in\n\t\t--compose-file|-c)\n\t\t\t_filedir yml\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--compose-file -c --help --skip-interpolation\" -- \"$cur\" ) )\n\t\t\t;;\n  esac\n}\n\nfunction _docker_stack_deploy {\n\tcase \"$prev\" in\n\t\t--compose-file|-c)\n\t\t\t_filedir yml\n\t\t\treturn\n\t\t\t;;\n\t\t--resolve-image)\n\t\t\tCOMPREPLY=( $( compgen -W \"always changed never\" -- \"$cur\" ) )\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--compose-file -c --help --prune --resolve-image --with-registry-auth\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--compose-file|-c|--resolve-image')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_stacks\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_down {\n\t_docker_stack_rm\n}\n\nfunction _docker_stack_list {\n\t_docker_stack_ls\n}\n\nfunction _docker_stack_ls {\n\tcase \"$prev\" in\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_ps {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tdesired-state)\n\t\t\tCOMPREPLY=( $( compgen -W \"accepted running shutdown\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tid)\n\t\t\t__docker_complete_stacks --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_stacks --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"id name desired-state\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --no-resolve --no-trunc --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--filter|-f|--format')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_stacks\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_remove {\n\t_docker_stack_rm\n}\n\nfunction _docker_stack_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_stacks\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_services {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tid)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --id\n\t\t\treturn\n\t\t\t;;\n\t\tlabel)\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_services --cur \"${cur##*=}\" --name\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"id label name\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag '--filter|-f|--format')\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_stacks\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_stack_up {\n\t_docker_stack_deploy\n}\n\n\nfunction _docker_start {\n\t_docker_container_start\n}\n\nfunction _docker_stats {\n\t_docker_container_stats\n}\n\nfunction _docker_stop {\n\t_docker_container_stop\n}\n\n\nfunction _docker_system {\n\tlocal subcommands=\"\n\t\tdf\n\t\tevents\n\t\tinfo\n\t\tprune\n\t\"\n\t__docker_subcommands \"$subcommands\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_system_df {\n\tcase \"$prev\" in\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format --help --verbose -v\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_system_events {\n\tlocal key=$(__docker_map_key_of_current_option '-f|--filter')\n\tcase \"$key\" in\n\t\tcontainer)\n\t\t\t__docker_complete_containers_all --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\tdaemon)\n\t\t\tlocal name=$(__docker_q info | sed -n 's/^\\(ID\\|Name\\): //p')\n\t\t\tCOMPREPLY=( $( compgen -W \"$name\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tevent)\n\t\t\tCOMPREPLY=( $( compgen -W \"\n\t\t\t\tattach\n\t\t\t\tcommit\n\t\t\t\tconnect\n\t\t\t\tcopy\n\t\t\t\tcreate\n\t\t\t\tdelete\n\t\t\t\tdestroy\n\t\t\t\tdetach\n\t\t\t\tdie\n\t\t\t\tdisable\n\t\t\t\tdisconnect\n\t\t\t\tenable\n\t\t\t\texec_create\n\t\t\t\texec_detach\n\t\t\t\texec_die\n\t\t\t\texec_start\n\t\t\t\texport\n\t\t\t\thealth_status\n\t\t\t\timport\n\t\t\t\tinstall\n\t\t\t\tkill\n\t\t\t\tload\n\t\t\t\tmount\n\t\t\t\toom\n\t\t\t\tpause\n\t\t\t\tpull\n\t\t\t\tpush\n\t\t\t\treload\n\t\t\t\tremove\n\t\t\t\trename\n\t\t\t\tresize\n\t\t\t\trestart\n\t\t\t\tsave\n\t\t\t\tstart\n\t\t\t\tstop\n\t\t\t\ttag\n\t\t\t\ttop\n\t\t\t\tunmount\n\t\t\t\tunpause\n\t\t\t\tuntag\n\t\t\t\tupdate\n\t\t\t\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\timage)\n\t\t\t__docker_complete_images --cur \"${cur##*=}\" --repo --tag\n\t\t\treturn\n\t\t\t;;\n\t\tnetwork)\n\t\t\t__docker_complete_networks --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\tnode)\n\t\t\t__docker_complete_nodes --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\t\tscope)\n\t\t\tCOMPREPLY=( $( compgen -W \"local swarm\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\ttype)\n\t\t\tCOMPREPLY=( $( compgen -W \"config container daemon image network node plugin secret service volume\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tvolume)\n\t\t\t__docker_complete_volumes --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"container daemon event image label network node scope type volume\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--since|--until)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --help --since --until --format\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_system_info {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_system_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"label label! until\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --force -f --filter --help --volumes\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_tag {\n\t_docker_image_tag\n}\n\n\nfunction _docker_trust {\n\tlocal subcommands=\"\n\t\tinspect\n\t\trevoke\n\t\tsign\n\t\"\n\t__docker_subcommands \"$subcommands\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_trust_inspect {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --pretty\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_trust_revoke {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --yes -y\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --repo --tag\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_trust_sign {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help --local\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tlocal counter=$(__docker_pos_first_nonflag)\n\t\t\tif [ \"$cword\" -eq \"$counter\" ]; then\n\t\t\t\t__docker_complete_images --force-tag --id\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n\nfunction _docker_unpause {\n\t_docker_container_unpause\n}\n\nfunction _docker_update {\n\t_docker_container_update\n}\n\nfunction _docker_top {\n\t_docker_container_top\n}\n\nfunction _docker_version {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume_create {\n\tcase \"$prev\" in\n\t\t--driver|-d)\n\t\t\t__docker_complete_plugins_bundled --type Volume\n\t\t\treturn\n\t\t\t;;\n\t\t--label|--opt|-o)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--driver -d --help --label --opt -o\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume_inspect {\n\tcase \"$prev\" in\n\t\t--format|-f)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--format -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_volumes\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume_list {\n\t_docker_volume_ls\n}\n\nfunction _docker_volume_ls {\n\tlocal key=$(__docker_map_key_of_current_option '--filter|-f')\n\tcase \"$key\" in\n\t\tdangling)\n\t\t\tCOMPREPLY=( $( compgen -W \"true false\" -- \"${cur##*=}\" ) )\n\t\t\treturn\n\t\t\t;;\n\t\tdriver)\n\t\t\t__docker_complete_plugins_bundled --cur \"${cur##*=}\" --type Volume\n\t\t\treturn\n\t\t\t;;\n\t\tname)\n\t\t\t__docker_complete_volumes --cur \"${cur##*=}\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter|-f)\n\t\t\tCOMPREPLY=( $( compgen -S = -W \"dangling driver label name\" -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--format)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--filter -f --format --help --quiet -q\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume_prune {\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=( $( compgen -W \"label label!\" -S = -- \"$cur\" ) )\n\t\t\t__docker_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--all -a --filter --force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume_remove {\n\t_docker_volume_rm\n}\n\nfunction _docker_volume_rm {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--force -f --help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_complete_volumes\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_volume {\n\tlocal subcommands=\"\n\t\tcreate\n\t\tinspect\n\t\tls\n\t\tprune\n\t\trm\n\t\"\n\tlocal aliases=\"\n\t\tlist\n\t\tremove\n\t\"\n\t__docker_subcommands \"$subcommands $aliases\" && return\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=( $( compgen -W \"--help\" -- \"$cur\" ) )\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=( $( compgen -W \"$subcommands\" -- \"$cur\" ) )\n\t\t\t;;\n\tesac\n}\n\nfunction _docker_wait {\n\t_docker_container_wait\n}\n\nfunction _docker {\n\tlocal previous_extglob_setting=$(shopt -p extglob)\n\tshopt -s extglob\n\n\tlocal management_commands=(\n\t\tbuilder\n\t\tconfig\n\t\tcontainer\n\t\tcontext\n\t\timage\n\t\tmanifest\n\t\tnetwork\n\t\tnode\n\t\tplugin\n\t\tsecret\n\t\tservice\n\t\tstack\n\t\tswarm\n\t\tsystem\n\t\ttrust\n\t\tvolume\n\t)\n\n\tlocal top_level_commands=(\n\t\tbuild\n\t\tlogin\n\t\tlogout\n\t\trun\n\t\tsearch\n\t\tversion\n\t)\n\n\tlocal legacy_commands=(\n\t\tattach\n\t\tcommit\n\t\tcp\n\t\tcreate\n\t\tdiff\n\t\tevents\n\t\texec\n\t\texport\n\t\thistory\n\t\timages\n\t\timport\n\t\tinfo\n\t\tinspect\n\t\tkill\n\t\tload\n\t\tlogs\n\t\tpause\n\t\tport\n\t\tps\n\t\tpull\n\t\tpush\n\t\trename\n\t\trestart\n\t\trm\n\t\trmi\n\t\tsave\n\t\tstart\n\t\tstats\n\t\tstop\n\t\ttag\n\t\ttop\n\t\tunpause\n\t\tupdate\n\t\twait\n\t)\n\n\t# Create completion functions for all registered plugins\n\tlocal known_plugin_commands=()\n\tlocal plugin_name=\"\"\n\tfor plugin_path in $(__docker_plugins_path); do\n\t\tplugin_name=$(basename \"$plugin_path\" | sed 's/ *$//')\n\t\tplugin_name=${plugin_name#docker-}\n\t\tplugin_name=${plugin_name%%.*}\n\t\teval \"_docker_${plugin_name}() { __docker_complete_plugin \\\"${plugin_path}\\\"; }\"\n\t\tknown_plugin_commands+=(${plugin_name})\n\tdone\n\n\tlocal experimental_server_commands=(\n\t\tcheckpoint\n\t)\n\n\tlocal commands=(${management_commands[*]} ${top_level_commands[*]} ${known_plugin_commands[*]})\n\t[ -z \"${DOCKER_HIDE_LEGACY_COMMANDS-}\" ] && commands+=(${legacy_commands[*]})\n\n\t# These options are valid as global options for all client commands\n\t# and valid as command options for `docker daemon`\n\tlocal global_boolean_options=\"\n\t\t--debug -D\n\t\t--tls\n\t\t--tlsverify\n\t\"\n\tlocal global_options_with_args=\"\n\t\t--config\n\t\t--context -c\n\t\t--host -H\n\t\t--log-level -l\n\t\t--tlscacert\n\t\t--tlscert\n\t\t--tlskey\n\t\"\n\n\t# variables to cache server info, populated on demand for performance reasons\n\tlocal info_fetched server_experimental server_os\n\n\tlocal host config context\n\n\tCOMPREPLY=()\n\tlocal cur prev words cword\n\t_get_comp_words_by_ref -n : cur prev words cword\n\n\tlocal command='docker' command_pos=0 subcommand_pos\n\tlocal counter=1\n\twhile [ \"$counter\" -lt \"$cword\" ]; do\n\t\tcase \"${words[$counter]}\" in\n\t\t\tdocker)\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t# save host so that completion can use custom daemon\n\t\t\t--host|-H)\n\t\t\t\t(( counter++ ))\n\t\t\t\thost=\"${words[$counter]}\"\n\t\t\t\t;;\n\t\t\t# save config so that completion can use custom configuration directories\n\t\t\t--config)\n\t\t\t\t(( counter++ ))\n\t\t\t\tconfig=\"${words[$counter]}\"\n\t\t\t\t;;\n\t\t\t# save context so that completion can use custom daemon\n\t\t\t--context|-c)\n\t\t\t\t(( counter++ ))\n\t\t\t\tcontext=\"${words[$counter]}\"\n\t\t\t\t;;\n\t\t\t$(__docker_to_extglob \"$global_options_with_args\") )\n\t\t\t\t(( counter++ ))\n\t\t\t\t;;\n\t\t\t-*)\n\t\t\t\t;;\n\t\t\t=)\n\t\t\t\t(( counter++ ))\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tcommand=\"${words[$counter]}\"\n\t\t\t\tcommand_pos=$counter\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\t\t(( counter++ ))\n\tdone\n\n\tlocal binary=\"${words[0]}\"\n\tif [[ $binary == ?(*/)dockerd ]] ; then\n\t\t# for the dockerd binary, we reuse completion of `docker daemon`.\n\t\t# dockerd does not have subcommands and global options.\n\t\tcommand=daemon\n\t\tcommand_pos=0\n\tfi\n\n\tlocal completions_func=_docker_${command//-/_}\n\t_omb_util_function_exists \"$completions_func\" && \"$completions_func\"\n\n\teval \"$previous_extglob_setting\"\n\treturn 0\n}\n\neval \"$__docker_previous_extglob_setting\"\nunset __docker_previous_extglob_setting\n\ncomplete -F _docker docker docker.exe dockerd dockerd.exe\n"
  },
  {
    "path": "completions/gem.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Completion for gem\n\nfunction _installcomp {\n  if [ -z \"$REMOTE_GEMS\" ]\n  then\n    REMOTE_GEMS=( $(gem list --remote --no-versions | tr '\\n' ' ') )\n  fi\n\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  COMPREPLY=( $(compgen -W \"${REMOTE_GEMS[*]}\" -- $cur) )\n}\n\nfunction _uninstallcomp {\n  if [ -z \"$LOCAL_GEMS\" ]\n  then\n    LOCAL_GEMS=( $(gem list --no-versions | sed 's/\\*\\*\\* LOCAL GEMS \\*\\*\\*//' | tr '\\n' ' ') )\n  fi\n\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  COMPREPLY=( $(compgen -W \"${LOCAL_GEMS[*]}\" -- $cur) )\n}\n\nfunction _gem {\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local prev=${COMP_WORDS[COMP_CWORD-1]}\n  case $prev in\n    install)\n      _installcomp\n      return 0\n      ;;\n    uninstall)\n      _uninstallcomp\n      return 0\n      ;;\n  esac\n  local commands=(build cert check cleanup contents dependency environment fetch generate_index help install list lock outdated owner pristine push query rdoc search server sources specification stale uninstall unpack update which)\n  COMPREPLY=( $(compgen -W \"${commands[*]}\" -- $cur) )\n}\n\ncomplete -F _gem gem\n"
  },
  {
    "path": "completions/gh.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/owenthereal/gh/blob/04a7985fa9a1c1d4d63738f4edb7b07d228bdb12/etc/gh.bash_completion.sh\n#------------------------------------------------------------------------------\n# hub tab-completion script for bash.\n# This script complements the completion script that ships with git.\n\n# Check that git tab completion is available\nif _omb_util_function_exists _git; then\n  # Duplicate and rename the 'list_all_commands' function\n  eval \"$(declare -f __git_list_all_commands | \\\n        sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')\"\n\n  # Wrap the 'list_all_commands' function with extra hub commands\n  function __git_list_all_commands {\n    cat <<-EOF\nalias\npull-request\nfork\ncreate\nbrowse\ncompare\nci-status\nrelease\nissue\nupdate\nEOF\n    __git_list_all_commands_without_hub\n  }\n\n  # Ensure cached commands are cleared\n  __git_all_commands=\"\"\n\n  ##########################\n  # hub command completions\n  ##########################\n\n  # hub alias [-s] [SHELL]\n  function _git_alias {\n    local i c=2 s=-s sh shells=\"bash zsh sh ksh csh fish\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -s)\n        unset s\n        ;;\n      *)\n        for sh in $shells; do\n          if [ \"$sh\" = \"$i\" ]; then\n            unset shells\n            break\n          fi\n        done\n        ;;\n      esac\n      ((c++))\n    done\n    __gitcomp \"$s $shells\"\n  }\n\n  # hub browse [-u] [--|[USER/]REPOSITORY] [SUBPAGE]\n  function _git_browse {\n    local i c=2 u=-u repo subpage\n    local subpages_=\"commits issues tree wiki pulls branches stargazers\n      contributors network network/ graphs graphs/\"\n    local subpages_network=\"members\"\n    local subpages_graphs=\"commit-activity code-frequency punch-card\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -u)\n        unset u\n        ;;\n      *)\n        if [ -z \"$repo\" ]; then\n          repo=$i\n        else\n          subpage=$i\n        fi\n        ;;\n      esac\n      ((c++))\n    done\n    if [ -z \"$repo\" ]; then\n      __gitcomp \"$u -- $(__hub_github_repos '\\p')\"\n    elif [ -z \"$subpage\" ]; then\n      case \"$cur\" in\n      */*)\n        local pfx=\"${cur%/*}\" cur_=\"${cur#*/}\"\n        local subpages_var=\"subpages_$pfx\"\n        __gitcomp \"${!subpages_var}\" \"$pfx/\" \"$cur_\"\n        ;;\n      *)\n        __gitcomp \"$u ${subpages_}\"\n        ;;\n      esac\n    else\n      __gitcomp \"$u\"\n    fi\n  }\n\n  # hub compare [-u] [USER[/REPOSITORY]] [[START...]END]\n  function _git_compare {\n    local i c=$((cword - 1)) u=-u user remote owner repo arg_repo rev\n    while [ $c -gt 1 ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -u)\n        unset u\n        ;;\n      *)\n        if [ -z \"$rev\" ]; then\n          # Even though the logic below is able to complete both user/repo\n          # and revision in the right place, when there is only one argument\n          # (other than -u) in the command, that argument will be taken as\n          # revision. For example:\n          # $ hub compare -u upstream\n          # > https://github.com/USER/REPO/compare/upstream\n          if __hub_github_repos '\\p' | grep -Eqx \"^$i(/[^/]+)?\"; then\n            arg_repo=$i\n          else\n            rev=$i\n          fi\n        elif [ -z \"$arg_repo\" ]; then\n          arg_repo=$i\n        fi\n        ;;\n      esac\n      ((c--))\n    done\n\n    # Here we want to find out the git remote name of user/repo, in order to\n    # generate an appropriate revision list\n    if [ -z \"$arg_repo\" ]; then\n      user=$(__hub_github_user)\n      if [ -z \"$user\" ]; then\n        for i in $(__hub_github_repos); do\n          remote=${i%%:*}\n          repo=${i#*:}\n          if [ \"$remote\" = origin ]; then\n            break\n          fi\n        done\n      else\n        for i in $(__hub_github_repos); do\n          remote=${i%%:*}\n          repo=${i#*:}\n          owner=${repo%%/*}\n          if [ \"$user\" = \"$owner\" ]; then\n            break\n          fi\n        done\n      fi\n    else\n      for i in $(__hub_github_repos); do\n        remote=${i%%:*}\n        repo=${i#*:}\n        owner=${repo%%/*}\n        case \"$arg_repo\" in\n          \"$repo\"|\"$owner\")\n            break\n            ;;\n        esac\n      done\n    fi\n\n    local pfx cur_=\"$cur\"\n    case \"$cur_\" in\n    *..*)\n      pfx=\"${cur_%%..*}...\"\n      cur_=\"${cur_##*..}\"\n      __gitcomp_nl \"$(__hub_revlist $remote)\" \"$pfx\" \"$cur_\"\n      ;;\n    *)\n      if [ -z \"${arg_repo}${rev}\" ]; then\n        __gitcomp \"$u $(__hub_github_repos '\\o\\n\\p') $(__hub_revlist $remote)\"\n      elif [ -z \"$rev\" ]; then\n        __gitcomp \"$u $(__hub_revlist $remote)\"\n      else\n        __gitcomp \"$u\"\n      fi\n      ;;\n    esac\n  }\n\n  # hub create [NAME] [-p] [-d DESCRIPTION] [-h HOMEPAGE]\n  function _git_create {\n    local i c=2 name repo flags=\"-p -d -h\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -d|-h)\n        ((c++))\n        flags=${flags/$i/}\n        ;;\n      -p)\n        flags=${flags/$i/}\n        ;;\n      *)\n        name=$i\n        ;;\n      esac\n      ((c++))\n    done\n    if [ -z \"$name\" ]; then\n      repo=$(basename \"$PWD\")\n    fi\n    case \"$prev\" in\n    -d|-h)\n      COMPREPLY=()\n      ;;\n    -p|*)\n      __gitcomp \"$repo $flags\"\n      ;;\n    esac\n  }\n\n  # hub fork [--no-remote]\n  function _git_fork {\n    local i c=2 remote=yes\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      --no-remote)\n        unset remote\n        ;;\n      esac\n      ((c++))\n    done\n    if [ -n \"$remote\" ]; then\n      __gitcomp \"--no-remote\"\n    fi\n  }\n\n  # hub pull-request [-f] [-m <MESSAGE>|-F <FILE>|-i <ISSUE>|<ISSUE-URL>] [-b <BASE>] [-h <HEAD>]\n  function _git_pull_request {\n    local i c=2 flags=\"-f -m -F -i -b -h\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -m|-F|-i|-b|-h)\n        ((c++))\n        flags=${flags/$i/}\n        ;;\n      -f)\n        flags=${flags/$i/}\n        ;;\n      esac\n      ((c++))\n    done\n    case \"$prev\" in\n    -i)\n      COMPREPLY=()\n      ;;\n    -b|-h)\n      # (Doesn't seem to need this...)\n      # Uncomment the following line when 'owner/repo:[TAB]' misbehaved\n      #_get_comp_words_by_ref -n : cur\n      __gitcomp_nl \"$(__hub_heads)\"\n      # __ltrim_colon_completions \"$cur\"\n      ;;\n    -F)\n      COMPREPLY=( \"$cur\"* )\n      ;;\n    -f|*)\n      __gitcomp \"$flags\"\n      ;;\n    esac\n  }\n\n  ###################\n  # Helper functions\n  ###################\n\n  # __hub_github_user [HOST]\n  # Return $GITHUB_USER or the default github user defined in hub config\n  # HOST - Host to be looked-up in hub config. Default is \"github.com\"\n  function __hub_github_user {\n    if [ -n \"$GITHUB_USER\" ]; then\n      _omb_util_print $GITHUB_USER\n      return\n    fi\n    local line h k v host=${1:-github.com} config=${HUB_CONFIG:-~/.config/gh}\n    if [ -f \"$config\" ]; then\n      while read line; do\n        if [ \"$line\" = \"---\" ]; then\n          continue\n        fi\n        k=${line%%:*}\n        v=${line#*:}\n        if [ -z \"$v\" ]; then\n          if [ \"$h\" = \"$host\" ]; then\n            break\n          fi\n          h=$k\n          continue\n        fi\n        k=${k#* }\n        v=${v#* }\n        if [ \"$h\" = \"$host\" ] && [ \"$k\" = \"user\" ]; then\n          _omb_util_print \"$v\"\n          break\n        fi\n      done < \"$config\"\n    fi\n  }\n\n  # __hub_github_repos [FORMAT]\n  # List all github hosted repository\n  # FORMAT - Format string contains multiple of these:\n  #   \\m  remote\n  #   \\p  owner/repo\n  #   \\o  owner\n  #   escaped characters (\\n, \\t ...etc) work\n  # If omitted, prints all github repos in the format of \"remote:owner/repo\"\n  function __hub_github_repos {\n    local f format=$1\n    if [ -z \"$(__gitdir)\" ]; then\n      return\n    fi\n    if [ -z \"$format\" ]; then\n      format='\\1:\\2'\n    else\n      format=${format//\\m/\\1}\n      format=${format//\\p/\\2}\n      format=${format//\\o/\\3}\n    fi\n    _omb_prompt_git config --get-regexp 'remote\\.[^.]*\\.url' |\n    grep -E ' ((https?|git)://|git@)github\\.com[:/][^:/]+/[^/]+$' |\n    sed -E 's#^remote\\.([^.]+)\\.url +.+[:/](([^/]+)/[^.]+)(\\.git)?$#'\"$format\"'#'\n  }\n\n  # __hub_heads\n  # List all local \"branch\", and remote \"owner/repo:branch\"\n  function __hub_heads {\n    local i remote repo branch dir=$(__gitdir)\n    if [ -d \"$dir\" ]; then\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/heads/\"\n      for i in $(__hub_github_repos); do\n        remote=${i%%:*}\n        repo=${i#*:}\n        _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n          \"refs/remotes/${remote}/\" | while read branch; do\n          _omb_util_print \"${repo}:${branch#${remote}/}\"\n        done\n      done\n    fi\n  }\n\n  # __hub_revlist [REMOTE]\n  # List all tags, and branches under REMOTE, without the \"remote/\" prefix\n  # REMOTE - Remote name to search branches from. Default is \"origin\"\n  function __hub_revlist {\n    local i remote=${1:-origin} dir=$(__gitdir)\n    if [ -d \"$dir\" ]; then\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/remotes/${remote}/\" | while read i; do\n        _omb_util_print \"${i#${remote}/}\"\n      done\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/tags/\"\n    fi\n  }\n\n  # Enable completion for hub even when not using the alias\n  complete -o bashdefault -o default -o nospace -F _git gh 2>/dev/null \\\n    || complete -o default -o nospace -F _git gh\nfi\n"
  },
  {
    "path": "completions/git.completion.bash",
    "content": "#! bash oh-my-bash.module\n# bash completion support for Git.\nfunction _omb_completion_git_initialize {\n    if ! _omb_util_function_exists __gitdir; then\n        local git_paths path\n        IFS=$'\\n' read -r -d '' -a git_paths <<< \"$(type -aP git)\"\n        # Note: Falling back on /usr (should already be in the array)\n        git_paths+=(\"/usr/bin/git\")\n        for path in \"${git_paths[@]}\"; do\n            if [[ -L $path ]]; then\n                path=$(_omb_util_readlink \"$path\")\n            fi\n            # Note: In the case of symbolic link, the true binary name can\n            # contain prefix or suffix for architectures and versions.\n            path=\"${path%/*}\"\n            local files\n            local prefix=\"${path%/bin}\" file\n            _omb_util_glob_expand files '\"$prefix\"/share/{bash-completion/completions/git,{,doc/}git-*/contrib/completion/git-completion.bash}'\n            for file in \"${files[@]}\"; do\n                if [[ -f $file && -r $file && -s $file ]]; then\n                    source \"$file\"\n                    return $?\n                fi\n            done\n        done\n        source \"$OSH/tools/git-completion.bash\"\n    fi\n}\n_omb_completion_git_initialize\nunset -f _omb_completion_git_initialize\n"
  },
  {
    "path": "completions/git_flow.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# git-flow-completion\n# ===================\n#\n# Bash completion support for [git-flow](http://github.com/nvie/gitflow)\n#\n# The contained completion routines provide support for completing:\n#\n#  * git-flow init and version\n#  * feature, hotfix and release branches\n#  * remote feature branch names (for `git-flow feature track`)\n#\n#\n# Installation\n# ------------\n#\n# To achieve git-flow completion nirvana:\n#\n#  0. Install git-completion.\n#\n#  1. Install this file. Either:\n#\n#     a. Place it in a `bash-completion.d` folder:\n#\n#        * /etc/bash-completion.d\n#        * /usr/local/etc/bash-completion.d\n#        * ~/bash-completion.d\n#\n#     b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in\n#        your .bashrc:\n#\n#            source ~/.git-flow-completion.sh\n#\n#  2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant\n#     $command case in _git:\n#\n#         flow)        _git_flow ;;\n#\n#\n# The Fine Print\n# --------------\n#\n# Copyright (c) 2010 [Justin Hileman](http://justinhileman.com)\n#\n# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)\n\n_git_flow ()\n{\n\tlocal subcommands=\"init feature release hotfix\"\n\tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\tfeature)\n\t\t__git_flow_feature\n\t\treturn\n\t\t;;\n\trelease)\n\t\t__git_flow_release\n\t\treturn\n\t\t;;\n\thotfix)\n\t\t__git_flow_hotfix\n\t\treturn\n\t\t;;\n\t*)\n\t\tCOMPREPLY=()\n\t\t;;\n\tesac\n}\n\n__git_flow_feature ()\n{\n\tlocal subcommands=\"list start finish publish track diff rebase checkout pull\"\n\tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\tpull)\n\t\t__gitcomp \"$(__git_remotes)\"\n\t\treturn\n\t\t;;\n\tcheckout|finish|diff|rebase)\n\t\t__gitcomp \"$(__git_flow_list_features)\"\n\t\treturn\n\t\t;;\n\tpublish)\n\t\t__gitcomp \"$(comm -23 <(__git_flow_list_features) <(__git_flow_list_remote_features))\"\n\t\treturn\n\t\t;;\n\ttrack)\n\t\t__gitcomp \"$(__git_flow_list_remote_features)\"\n\t\treturn\n\t\t;;\n\t*)\n\t\tCOMPREPLY=()\n\t\t;;\n\tesac\n}\n\n__git_flow_list_features ()\n{\n\t_omb_prompt_git flow feature list 2> /dev/null | tr -d ' |*'\n}\n\n__git_flow_list_remote_features ()\n{\n\t_omb_prompt_git branch -r 2> /dev/null | grep \"origin/$(__git_flow_feature_prefix)\" | awk '{ sub(/^origin\\/$(__git_flow_feature_prefix)/, \"\", $1); print }'\n}\n\n__git_flow_feature_prefix ()\n{\n\t_omb_prompt_git config gitflow.prefix.feature 2> /dev/null || echo \"feature/\"\n}\n\n__git_flow_release ()\n{\n\tlocal subcommands=\"list start finish\"\n\tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\tfinish)\n\t\t__gitcomp \"$(__git_flow_list_releases)\"\n\t\treturn\n\t\t;;\n\t*)\n\t\tCOMPREPLY=()\n\t\t;;\n\tesac\n\n}\n\n__git_flow_list_releases ()\n{\n\t_omb_prompt_git flow release list 2> /dev/null\n}\n\n__git_flow_hotfix ()\n{\n\tlocal subcommands=\"list start finish\"\n\tlocal subcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\tfinish)\n\t\t__gitcomp \"$(__git_flow_list_hotfixes)\"\n\t\treturn\n\t\t;;\n\t*)\n\t\tCOMPREPLY=()\n\t\t;;\n\tesac\n}\n\n__git_flow_list_hotfixes ()\n{\n\t_omb_prompt_git flow hotfix list 2> /dev/null\n}\n\n# temporarily wrap __git_find_on_cmdline() for backwards compatibility\nif [ -z \"`type -t __git_find_subcommand`\" ]; then\n\talias __git_find_subcommand=__git_find_on_cmdline\nfi\n"
  },
  {
    "path": "completions/git_flow_avh.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/petervanderdoes/git-flow-completion/blob/db3c032411c2d6fd897b2bfc52d15a6fc4e3bfa3/git-flow-completion.bash\n#------------------------------------------------------------------------------\n# git-flow-completion\n# ===================\n#\n# Bash completion support for [git-flow (AVH Edition)](http://github.com/petervanderdoes/gitflow)\n#\n# The contained completion routines provide support for completing:\n#\n#  * git-flow init and version\n#  * feature, bugfix, hotfix and release branches\n#  * remote feature, bugfix, hotfix and release branch names\n#\n#\n# Installation\n# ------------\n#\n# To achieve git-flow completion nirvana:\n#\n#  0. Install git-completion.\n#\n#  1. Install this file. Either:\n#\n#     a. Place it in a `bash-completion.d` folder:\n#\n#        * /etc/bash-completion.d\n#        * /usr/local/etc/bash-completion.d\n#        * ~/bash-completion.d\n#\n#     b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in\n#        your .bashrc:\n#\n#            source ~/.git-flow-completion.sh\n#\n#  2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant\n#     $command case in _git:\n#\n#         flow)        _git_flow ;;\n#\n#\n# The Fine Print\n# --------------\n#\n# Author:\n# Copyright 2012-2013 Peter van der Does.\n#\n# Original Author:\n# Copyright (c) 2011 [Justin Hileman](http://justinhileman.com)\n#\n# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)\n\n__git_flow_config_file_options=\"\n    --local --global --system --file=\n  \"\n\n_git_flow ()\n{\n  local subcommands=\"init feature bugfix release hotfix support help version config finish delete publish rebase\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  init)\n    __git_flow_init\n    return\n    ;;\n  feature)\n    __git_flow_feature\n    return\n    ;;\n  bugfix)\n    __git_flow_bugfix\n    return\n    ;;\n  release)\n    __git_flow_release\n    return\n    ;;\n  hotfix)\n    __git_flow_hotfix\n    return\n    ;;\n  support)\n    __git_flow_support\n    return\n    ;;\n  config)\n    __git_flow_config\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_init ()\n{\n  local subcommands=\"help\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n  fi\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n        --nodefaults --defaults\n        --noforce --force\n        $__git_flow_config_file_options\n      \"\n    return\n    ;;\n  esac\n}\n\n__git_flow_feature ()\n{\n  local subcommands=\"list start finish publish track diff rebase checkout pull help delete rename\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  pull)\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n    ;;\n  checkout)\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n    return\n    ;;\n  delete)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --noforce --force\n          --noremote --remote\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n    return\n    ;;\n  finish)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n          --norebase --rebase\n          --nopreserve-merges --preserve-merges\n          --nokeep --keep\n          --keepremote\n          --keeplocal\n          --noforce_delete --force_delete\n          --nosquash --squash\n          --no-ff\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n    return\n    ;;\n  diff)\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n    return\n    ;;\n  rebase)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nointeractive --interactive\n          --nopreserve-merges --preserve-merges\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n    return\n    ;;\n  publish)\n    __gitcomp_nl \"$(__git_flow_list_branches 'feature')\"\n    return\n    ;;\n  track)\n    __gitcomp_nl \"$(__git_flow_list_branches 'feature')\"\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_bugfix ()\n{\n  local subcommands=\"list start finish publish track diff rebase checkout pull help delete rename\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  pull)\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n    ;;\n  checkout)\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'bugfix')\"\n    return\n    ;;\n  delete)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --noforce --force\n          --noremote --remote\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'bugfix')\"\n    return\n    ;;\n  finish)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n          --norebase --rebase\n          --nopreserve-merges --preserve-merges\n          --nokeep --keep\n          --keepremote\n          --keeplocal\n          --noforce_delete --force_delete\n          --nosquash --squash\n          --no-ff\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'bugfix')\"\n    return\n    ;;\n  diff)\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'bugfix')\"\n    return\n    ;;\n  rebase)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nointeractive --interactive\n          --nopreserve-merges --preserve-merges\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'bugfix')\"\n    return\n    ;;\n  publish)\n    __gitcomp_nl \"$(__git_flow_list_branches 'bugfix')\"\n    return\n    ;;\n  track)\n    __gitcomp_nl \"$(__git_flow_list_branches 'bugfix')\"\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_release ()\n{\n  local subcommands=\"list start finish track publish help delete\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  finish)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n          --sign\n          --signingkey\n          --message\n          --nomessagefile --messagefile=\n          --nopush --push\n          --nokeep --keep\n          --keepremote\n          --keeplocal\n          --noforce_delete --force_delete\n          --notag --tag\n          --nonobackmerge --nobackmerge\n          --nosquash --squash\n          --squash-info\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n    return\n    ;;\n  rebase)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nointeractive --interactive\n          --nopreserve-merges --preserve-merges\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n    return\n    ;;\n  delete)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --noforce --force\n          --noremote --remote\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n    return\n    ;;\n  publish)\n    __gitcomp_nl \"$(__git_flow_list_branches 'release')\"\n    return\n    ;;\n  track)\n    __gitcomp_nl \"$(__git_flow_list_branches 'release')\"\n    return\n    ;;\n  start)\n  case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n        \"\n      return\n      ;;\n    esac\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n\n}\n\n__git_flow_hotfix ()\n{\n  local subcommands=\"list start finish track publish help delete rename\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  finish)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n          --sign\n          --signingkey\n          --message\n          --nomessagefile --messagefile=\n          --nopush --push\n          --nokeep --keep\n          --keepremote\n          --keeplocal\n          --noforce_delete --force_delete\n          --notag --tag\n          --nonobackmerge --nobackmerge\n          --nosquash --squash\n          --squash-info\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n    return\n    ;;\n  rebase)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nointeractive --interactive\n          --nopreserve-merges --preserve-merges\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n    return\n    ;;\n  delete)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --noforce --force\n          --noremote --remote\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n    return\n    ;;\n  publish)\n    __gitcomp_nl \"$(__git_flow_list_branches 'hotfix')\"\n    return\n    ;;\n  track)\n    __gitcomp_nl \"$(__git_flow_list_branches 'hotfix')\"\n    return\n    ;;\n  start)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n        \"\n      return\n      ;;\n    esac\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_support ()\n{\n  local subcommands=\"list start help\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  start)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nofetch --fetch\n        \"\n      return\n      ;;\n    esac\n    return\n    ;;\n  rebase)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          --nointeractive --interactive\n          --nopreserve-merges --preserve-merges\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches 'support')\"\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_config ()\n{\n  local subcommands=\"list set base\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  set)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n        $__git_flow_config_file_options\n      \"\n      return\n      ;;\n    esac\n    __gitcomp \"\n        master develop\n        feature bugfix hotfix release support\n        versiontagprefix\n      \"\n    return\n    ;;\n  base)\n    case \"$cur\" in\n    --*)\n      __gitcomp \"\n          set get\n        \"\n      return\n      ;;\n    esac\n    __gitcomp_nl \"$(__git_flow_list_local_branches)\"\n    return\n    ;;\n  *)\n    COMPREPLY=()\n    ;;\n  esac\n}\n\n__git_flow_prefix ()\n{\n  case \"$1\" in\n  feature|bugfix|release|hotfix|support)\n    _omb_prompt_git config \"gitflow.prefix.$1\" 2> /dev/null || _omb_util_print \"$1/\"\n    return\n    ;;\n  esac\n}\n\n__git_flow_list_local_branches ()\n{\n  if [ -n \"$1\" ]; then\n    local prefix=\"$(__git_flow_prefix $1)\"\n    _omb_prompt_git for-each-ref --shell --format=\"ref=%(refname:short)\" refs/heads/$prefix | \\\n      while read -r entry; do\n        eval \"$entry\"\n        ref=\"${ref#$prefix}\"\n        _omb_util_print \"$ref\"\n      done | sort\n  else\n    _omb_prompt_git for-each-ref --format=\"ref=%(refname:short)\" refs/heads/ | sort\n\n  fi\n}\n\n__git_flow_list_remote_branches ()\n{\n  local prefix=\"$(__git_flow_prefix $1)\"\n  local origin=\"$(_omb_prompt_git config gitflow.origin 2> /dev/null || _omb_util_print \"origin\")\"\n  _omb_prompt_git for-each-ref --shell --format='%(refname:short)' refs/remotes/$origin/$prefix | \\\n    while read -r entry; do\n      eval \"$entry\"\n      ref=\"${ref##$prefix}\"\n      _omb_util_print \"$ref\"\n    done | sort\n}\n\n__git_flow_list_branches ()\n{\n  local origin=\"$(_omb_prompt_git config gitflow.origin 2> /dev/null || _omb_util_print \"origin\")\"\n  if [ -n \"$1\" ]; then\n    local prefix=\"$(__git_flow_prefix $1)\"\n    _omb_prompt_git for-each-ref --shell --format=\"ref=%(refname:short)\" refs/heads/$prefix refs/remotes/$origin/$prefix | \\\n      while read -r entry; do\n        eval \"$entry\"\n        ref=\"${ref##$prefix}\"\n        _omb_util_print \"$ref\"\n      done | sort\n  else\n    _omb_prompt_git for-each-ref --format=\"%(refname:short)\" refs/heads/ refs/remotes/$origin | sort\n  fi\n}\n\n# alias __git_find_on_cmdline for backwards compatibility\nif [ -z \"`type -t __git_find_on_cmdline`\" ]; then\n  alias __git_find_on_cmdline=__git_find_subcommand\nfi\n"
  },
  {
    "path": "completions/go.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# bash completion for go tool\n# https://github.com/thomasf/go-bash-completion/blob/73c7543f2a295d27ae9bc71baa1ef1a858447eae/go-bash-completion.bash\n#------------------------------------------------------------------------------\n# install in /etc/bash_completion.d/ or your personal directory\n\ncomplete -f -X '!*.8' 8l\ncomplete -f -X '!*.6' 6l\ncomplete -f -X '!*.5' 5l\ncomplete -f -X '!*.go' 8g 6g 5g gofmt gccgo\n\nfunction _go_clear_cache {\n  unset -v _go_imports\n}\nfunction _go_importpath_cache {\n  if [[ ! ${_go_imports-} ]]; then\n    _go_imports=$(go list all 2>/dev/null)\n    export _go_imports\n  fi\n}\n\nfunction _go_importpath {\n  compgen -W \"$_go_imports\" -- \"$1\"\n}\n\nfunction _go {\n  # TODO: Only allow flags before other arguments. run already does\n  # this.\n\n  local cur=$(_get_cword)\n  local prev=${COMP_WORDS[COMP_CWORD-1]}\n\n  local cmd=${COMP_WORDS[1]}\n\n  local cmds=\"build clean doc env fix fmt get\n    install list run test tool version vet\"\n  local addhelp=\"gopath importpath remote\n    testflag testfunc\"\n  local other=\"help\"\n  local env_vars=\"GOARCH GOBIN GOEXE GOHOSTARCH GOHOSTOS GOOS GOPATH GORACE\n    GOROOT GOTOOLDIR GO15VENDOREXPERIMENT CC GOGCCFLAGS CXX CGO_ENABLED\"\n\n  if ((COMP_CWORD == 1)); then\n    local opt\n    for opt in $cmds; do\n      if [[ $opt == \"$cmd\" ]]; then\n        COMPREPLY=(\"$opt\")\n        return 0\n      fi\n    done\n  fi\n\n  case $cmd in\n  'build')\n    case $prev in\n    '-o')\n      _filedir\n      ;;\n    '-p')\n      ;;\n    *)\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"-a -n -o -p -v -x\" -- \"$cur\"))\n      else\n        local found=0 i\n        for ((i=0; i < ${#COMP_WORDS[@]}; i++)); do\n          case $i in\n          0|1|\"$COMP_CWORD\")\n            continue\n            ;;\n          esac\n          local opt=${COMP_WORDS[i]}\n          if [[ $opt != -* ]]; then\n            if [[ $opt == *.go && -f $opt ]]; then\n              found=1\n              break\n            else\n              found=2\n              break\n            fi\n          fi\n        done\n        case $found in\n        0)\n          _filedir go\n          _go_importpath_cache\n          COMPREPLY+=($(_go_importpath \"$cur\"))\n          ;;\n        1)\n          _filedir go\n          ;;\n        2)\n          _go_importpath_cache\n          COMPREPLY=($(_go_importpath \"$cur\"))\n          ;;\n        esac\n      fi\n      ;;\n    esac\n    ;;\n  'clean')\n    if [[ $cur == -* ]]; then\n      COMPREPLY=($(compgen -W \"-i -r -n -x\" -- \"$cur\"))\n    else\n      _go_importpath_cache\n      COMPREPLY=($(_go_importpath \"$cur\"))\n    fi\n    ;;\n  'doc')\n    _go_importpath_cache\n    COMPREPLY=($(_go_importpath \"$cur\"))\n    ;;\n  'env')\n    COMPREPLY=($(compgen -W \"$env_vars\" -- \"$cur\"))\n    ;;\n  'fix')\n    _go_importpath_cache\n    COMPREPLY=($(_go_importpath \"$cur\"))\n    ;;\n  'fmt')\n    _go_importpath_cache\n    COMPREPLY=($(_go_importpath \"$cur\"))\n    ;;\n  'get')\n    case $prev in\n    '-p')\n    ;;\n    *)\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"-a -d -fix -n -p -u -v -x\" -- \"$cur\"))\n      else\n        _go_importpath_cache\n        COMPREPLY=($(_go_importpath \"$cur\"))\n      fi\n      ;;\n    esac\n    ;;\n  'install')\n    case $prev in\n    '-p')\n    ;;\n    *)\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"-a -n -p -v -x\" -- \"$cur\"))\n      else\n        _go_importpath_cache\n        COMPREPLY=($(_go_importpath \"$cur\"))\n      fi\n      ;;\n    esac\n    ;;\n  'list')\n    case $prev in\n    '-f')\n    ;;\n    *)\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"-e -f -json\" -- \"$cur\"))\n      else\n        _go_importpath_cache\n        COMPREPLY=($(_go_importpath \"$cur\"))\n      fi\n      ;;\n    esac\n    ;;\n  'run')\n    if [[ $cur == -* && $prev != *.go ]]; then\n      COMPREPLY=($(compgen -W \"-a -n -x\" -- \"$cur\"))\n    else\n      _filedir\n    fi\n    ;;\n  'test') # TODO: Support for testflags.\n    case $prev in\n    '-file')\n      _filedir go\n      ;;\n    '-p')\n      ;;\n    *)\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"-c -file -i -p -x\" -- \"$cur\"))\n      else\n        _go_importpath_cache\n        COMPREPLY=($(_go_importpath \"$cur\"))\n      fi\n      ;;\n    esac\n    ;;\n  'tool')\n    if ((COMP_CWORD == 2)); then\n      COMPREPLY=($(compgen -W \"$(go tool)\" -- \"$cur\"))\n    else\n      case ${COMP_WORDS[2]} in\n      [568]a) # TODO: Implement something.\n      #_go_tool_568a\n      ;;\n      [568]c) # TODO: Implement something.\n      #_go_tool_568c\n      ;;\n      [568]g) # TODO: Implement something.\n      #_go_tool_568g\n      ;;\n      [568]l) # TODO: Implement something.\n      #_go_tool_568l\n      ;;\n      'api') # TODO: Implement something.\n      #_go_tool_api\n      ;;\n      'cgo') # TODO: Implement something.\n      #_go_tool_cgo\n      ;;\n      'cov') # TODO: Implement something.\n      #_go_tool_cov\n      ;;\n      'dist') # TODO: Implement something.\n      #_go_tool_dist\n      ;;\n      'ebnflint') # TODO: Implement something.\n      #_go_tool_ebnflint\n      ;;\n      'fix') # TODO: Implement something.\n      #_go_tool_fix\n      ;;\n      'gotype') # TODO: Implement something.\n      #_go_tool_gotype\n      ;;\n      'nm') # TODO: Implement something.\n      #_go_tool_nm\n      ;;\n      'pack') # TODO: Implement something.\n      #_go_tool_pack\n      ;;\n      'pprof') # TODO: Implement something.\n      #_go_tool_pprof\n      ;;\n      'prof') # TODO: Implement something.\n      #_go_tool_prof\n      ;;\n      'vet') # TODO: Implement something.\n      #_go_tool_vet\n      ;;\n      'yacc') # TODO: Implement something.\n      #_go_tool_yacc\n      ;;\n      esac\n      if [[ $cur == -* ]]; then\n        COMPREPLY=($(compgen -W \"${COMPREPLY[*]} -h\" -- \"$cur\"))\n      fi\n    fi\n    ;;\n  'version')\n    ;;\n  'vet')\n    if [[ $cur == -* ]]; then\n      :\n    else\n      _go_importpath_cache\n      COMPREPLY=($(_go_importpath \"$cur\"))\n    fi\n    ;;\n  'help')\n    if ((COMP_CWORD == 2)); then\n      COMPREPLY=($(compgen -W \"$cmds $addhelp\" -- \"$cur\"))\n    fi\n    ;;\n  *)\n    if ((COMP_CWORD == 1)); then\n      COMPREPLY=($(compgen -W \"$cmds $other\" -- \"$cur\"))\n    else\n      _filedir\n    fi\n    ;;\n  esac\n}\n\ncomplete $filenames -F _go go\n\n# vim:ts=2 sw=2 et syn=sh\n"
  },
  {
    "path": "completions/gradle.completion.sh",
    "content": "#! bash oh-my-bash.module\n# This completion setting seems to be only found in Oh My Bash.\n#------------------------------------------------------------------------------\nfunction __gradle {\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local tasks=''\n  local cache_dir=$HOME/.gradle/completion_cache\n\n  case $OSTYPE in\n  darwin*)\n    local checksum_command=\"find . -name build.gradle -print0 | xargs -0 md5 -q | md5 -q\"\n    ;;\n  *)\n    local checksum_command=\"find . -name build.gradle -print0 | xargs -0 md5sum | md5sum | cut -d ' ' -f 1\"\n    ;;\n  esac\n  local parsing_command=\"gradle --console=plain --quiet tasks | grep -v Rules | sed -nE -e 's/^([a-zA-Z]+)($| - .+)/\\1/p'\"\n\n  mkdir -p \"$cache_dir\"\n\n  local gradle_files_checksum='no_cache_file'\n  if [[ -f build.gradle ]]; then\n    gradle_files_checksum=$(eval \"$checksum_command\")\n    if [[ -f $cache_dir/$gradle_files_checksum ]]; then\n      newest_gradle_file=$(find . -type f -name build.gradle -newer \"$cache_dir/$gradle_files_checksum\")\n      if [[ $newest_gradle_file ]]; then\n        tasks=$(eval \"$parsing_command\")\n        [[ $tasks ]] && _omb_util_print \"$tasks\" > \"$cache_dir/$gradle_files_checksum\"\n      else\n        tasks=$(< \"$cache_dir/$gradle_files_checksum\")\n        touch \"$cache_dir/$gradle_files_checksum\"\n      fi\n    else\n      tasks=$(eval \"$parsing_command\")\n      [[ $tasks ]] && _omb_util_print \"$tasks\" > \"$cache_dir/$gradle_files_checksum\"\n    fi\n  else\n    tasks=$(eval \"$parsing_command\")\n    [[ $tasks ]] && _omb_util_print \"$tasks\" > \"$cache_dir/$gradle_files_checksum\"\n  fi\n  COMPREPLY=($(compgen -W \"$tasks\" -- \"$cur\"))\n}\n\nfunction __clear_gradle_cache {\n  local cache_dir=$HOME/.gradle/completion_cache\n  [[ -d $cache_dir ]] && find \"$cache_dir\" -type f -mtime +7 -exec rm -f {} \\;\n}\n\n__clear_gradle_cache\n\ncomplete -F __gradle gradle\ncomplete -F __gradle gradlew\ncomplete -F __gradle ./gradlew\n"
  },
  {
    "path": "completions/grunt.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/gruntjs/grunt-cli/blob/8c791efc931fa8cf80cc98d09d3e20c36501fc0f/completion/bash#L33\n#\n# Note: The upstream version seems to have just updated the copyright year, but\n# that change must be wrong.  Basically, the copyright year should reflect the\n# year of the first release.  The years of later updates are optional.\n#------------------------------------------------------------------------------\n# grunt-cli\n# http://gruntjs.com/\n#\n# Copyright (c) 2012 Tyler Kellen, contributors\n# Licensed under the MIT license.\n# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\n\n# Usage:\n#\n# To enable bash <tab> completion for grunt, add the following line (minus the\n# leading #, which is the bash comment character) to your ~/.bashrc file:\n#\n# eval \"$(grunt --completion=bash)\"\n\n# Search the current directory and all parent directories for a gruntfile.\nfunction _grunt_gruntfile {\n  local curpath=$PWD\n  while [[ $curpath ]]; do\n    local gruntfile\n    for gruntfile in \"$curpath\"/{G,g}runtfile.{js,coffee}; do\n      if [[ -e $gruntfile ]]; then\n        _omb_util_print \"$gruntfile\"\n        return 0\n      fi\n    done\n    curpath=${curpath%/*}\n  done\n  return 1\n}\n\n# Enable bash autocompletion.\nfunction _grunt_completions {\n  # The currently-being-completed word.\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  # The current gruntfile, if it exists.\n  local gruntfile=$(_grunt_gruntfile)\n  # The current grunt version, available tasks, options, etc.\n  local gruntinfo=$(grunt --version --verbose 2>/dev/null)\n  # Options and tasks.\n  local opts=$(awk '/Available options: / {$1=$2=\"\"; print $0}' <<< \"$gruntinfo\")\n  local compls=$(awk '/Available tasks: / {$1=$2=\"\"; print $0}' <<< \"$gruntinfo\")\n  # Only add -- or - options if the user has started typing -\n  [[ $cur == -* ]] && compls=\"$compls $opts\"\n  # Tell complete what stuff to show.\n  COMPREPLY=($(compgen -W \"$compls\" -- \"$cur\"))\n}\n\ncomplete -o default -F _grunt_completions grunt\n"
  },
  {
    "path": "completions/gulp.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Borrowed from grunt-cli\n# http://gruntjs.com/\n#\n# Copyright (c) 2012 Tyler Kellen, contributors\n# Licensed under the MIT license.\n# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT\n# Usage:\n#\n# To enable bash <tab> completion for gulp, add the following line (minus the\n# leading #, which is the bash comment character) to your ~/.bashrc file:\n#\n# eval \"$(gulp --completion=bash)\"\n# Enable bash autocompletion.\nfunction _gulp_completions() {\n# The currently-being-completed word.\nlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n#Grab tasks\nlocal compls=$(gulp --tasks-simple)\n# Tell complete what stuff to show.\nCOMPREPLY=($(compgen -W \"$compls\" -- \"$cur\"))\n}\ncomplete -o default -F _gulp_completions gulp\n"
  },
  {
    "path": "completions/helm.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_command_exists helm; then\n  eval -- \"$(helm completion bash)\"\nfi\n"
  },
  {
    "path": "completions/homesick.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion script for homesick\n#\n# The homebrew bash completion script was used as inspiration.\n# Originally from https://github.com/liborw/homesick-completion\n# https://github.com/liborw/homesick-completion/blob/904d121d1b8f81629f473915a10c9144fdd416dc/homesick_bash_completion.sh\n\n_omb_completion_homesick()\n{\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local options=\"--skip --force --pretend --quiet\"\n  local actions=\"cd clone commit destroy diff generate help list open pull push rc show_path status symlink track unlink version\"\n  local repos=$(\\ls ~/.homesick/repos)\n\n  # Subcommand list\n  if ((COMP_CWORD == 1)); then\n    COMPREPLY=( $(compgen -W \"${options} ${actions}\" -- \"$cur\") )\n    return\n  fi\n\n  # Find the first non-switch word\n  local prev_index=1\n  local prev=${COMP_WORDS[prev_index]}\n  while [[ $prev == -* ]]; do\n    ((++prev_index))\n    prev=${COMP_WORDS[prev_index]}\n  done\n\n  # Find the number of non-\"--\" commands\n  local num=0\n  for word in \"${COMP_WORDS[@]}\"; do\n    if [[ $word != -* ]]; then\n      ((++num))\n    fi\n  done\n\n  case $prev in\n  # Commands that take a castle\n  cd|commit|destroy|diff|open|pull|push|rc|show_path|status|symlink|unlink)\n    COMPREPLY=( $(compgen -W \"${repos}\" -- \"$cur\") )\n    return\n    ;;\n  # Commands that take command\n  help)\n    COMPREPLY=( $(compgen -W \"${actions}\" -- \"$cur\") )\n    return\n    ;;\n  # Track command take file and repo\n  track)\n    if ((num == 2)); then\n      COMPREPLY=( $(compgen -X -f \"$cur\") )\n    elif ((num >= 3)); then\n      COMPREPLY=( $(compgen -W \"${repos}\" -- \"$cur\") )\n    fi\n    return\n    ;;\n  esac\n}\n\ncomplete -o bashdefault -o default -F _omb_completion_homesick homesick\n"
  },
  {
    "path": "completions/hub.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/mislav/hub/blob/5c547ed804368763064e51f3990851e267e88edd/etc/hub.bash_completion.sh\n#------------------------------------------------------------------------------\n# hub tab-completion script for bash.\n# This script complements the completion script that ships with git.\n\n# If there is no git tab completion, but we have the _completion loader try to load it\nif ! _omb_util_function_exists _git && _omb_util_function_exists _completion_loader; then\n  _completion_loader git\nfi\n\n# Check that git tab completion is available and we haven't already set up completion\nif _omb_util_function_exists _git && ! _omb_util_function_exists __git_list_all_commands_without_hub ; then\n  # Duplicate and rename the 'list_all_commands' function\n  eval \"$(declare -f __git_list_all_commands | \\\n        sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')\"\n\n  # Wrap the 'list_all_commands' function with extra hub commands\n  function __git_list_all_commands {\n    cat <<-EOF\nalias\npull-request\npr\nissue\nrelease\nfork\ncreate\ndelete\nbrowse\ncompare\nci-status\nsync\nEOF\n    __git_list_all_commands_without_hub\n  }\n\n  # Ensure cached commands are cleared\n  __git_all_commands=\"\"\n\n  ##########################\n  # hub command completions\n  ##########################\n\n  # hub alias [-s] [SHELL]\n  function _git_alias {\n    local i c=2 s=-s sh shells=\"bash zsh sh ksh csh fish\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -s)\n        unset s\n        ;;\n      *)\n        for sh in $shells; do\n          if [ \"$sh\" = \"$i\" ]; then\n            unset shells\n            break\n          fi\n        done\n        ;;\n      esac\n      ((c++))\n    done\n    __gitcomp \"$s $shells\"\n  }\n\n  # hub browse [-u] [--|[USER/]REPOSITORY] [SUBPAGE]\n  function _git_browse {\n    local i c=2 u=-u repo subpage\n    local subpages_=\"commits issues tree wiki pulls branches stargazers\n      contributors network network/ graphs graphs/\"\n    local subpages_network=\"members\"\n    local subpages_graphs=\"commit-activity code-frequency punch-card\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -u)\n        unset u\n        ;;\n      *)\n        if [ -z \"$repo\" ]; then\n          repo=$i\n        else\n          subpage=$i\n        fi\n        ;;\n      esac\n      ((c++))\n    done\n    if [ -z \"$repo\" ]; then\n      __gitcomp \"$u -- $(__hub_github_repos '\\p')\"\n    elif [ -z \"$subpage\" ]; then\n      case \"$cur\" in\n      */*)\n        local pfx=\"${cur%/*}\" cur_=\"${cur#*/}\"\n        local subpages_var=\"subpages_$pfx\"\n        __gitcomp \"${!subpages_var}\" \"$pfx/\" \"$cur_\"\n        ;;\n      *)\n        __gitcomp \"$u ${subpages_}\"\n        ;;\n      esac\n    else\n      __gitcomp \"$u\"\n    fi\n  }\n\n  # hub compare [-u] [USER[/REPOSITORY]] [[START...]END]\n  function _git_compare {\n    local i c=$((cword - 1)) u=-u user remote owner repo arg_repo rev\n    while [ $c -gt 1 ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -u)\n        unset u\n        ;;\n      *)\n        if [ -z \"$rev\" ]; then\n          # Even though the logic below is able to complete both user/repo\n          # and revision in the right place, when there is only one argument\n          # (other than -u) in the command, that argument will be taken as\n          # revision. For example:\n          # $ hub compare -u upstream\n          # > https://github.com/USER/REPO/compare/upstream\n          if __hub_github_repos '\\p' | command grep -Eqx \"^$i(/[^/]+)?\"; then\n            arg_repo=$i\n          else\n            rev=$i\n          fi\n        elif [ -z \"$arg_repo\" ]; then\n          arg_repo=$i\n        fi\n        ;;\n      esac\n      ((c--))\n    done\n\n    # Here we want to find out the git remote name of user/repo, in order to\n    # generate an appropriate revision list\n    if [ -z \"$arg_repo\" ]; then\n      user=$(__hub_github_user)\n      if [ -z \"$user\" ]; then\n        for i in $(__hub_github_repos); do\n          remote=${i%%:*}\n          repo=${i#*:}\n          if [ \"$remote\" = origin ]; then\n            break\n          fi\n        done\n      else\n        for i in $(__hub_github_repos); do\n          remote=${i%%:*}\n          repo=${i#*:}\n          owner=${repo%%/*}\n          if [ \"$user\" = \"$owner\" ]; then\n            break\n          fi\n        done\n      fi\n    else\n      for i in $(__hub_github_repos); do\n        remote=${i%%:*}\n        repo=${i#*:}\n        owner=${repo%%/*}\n        case \"$arg_repo\" in\n          \"$repo\"|\"$owner\")\n            break\n            ;;\n        esac\n      done\n    fi\n\n    local pfx cur_=\"$cur\"\n    case \"$cur_\" in\n    *..*)\n      pfx=\"${cur_%%..*}...\"\n      cur_=\"${cur_##*..}\"\n      __gitcomp_nl \"$(__hub_revlist $remote)\" \"$pfx\" \"$cur_\"\n      ;;\n    *)\n      if [ -z \"${arg_repo}${rev}\" ]; then\n        __gitcomp \"$u $(__hub_github_repos '\\o\\n\\p') $(__hub_revlist $remote)\"\n      elif [ -z \"$rev\" ]; then\n        __gitcomp \"$u $(__hub_revlist $remote)\"\n      else\n        __gitcomp \"$u\"\n      fi\n      ;;\n    esac\n  }\n\n  # hub create [NAME] [-p] [-d DESCRIPTION] [-h HOMEPAGE]\n  function _git_create {\n    local i c=2 name repo flags=\"-p -d -h\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -d|-h)\n        ((c++))\n        flags=${flags/$i/}\n        ;;\n      -p)\n        flags=${flags/$i/}\n        ;;\n      *)\n        name=$i\n        ;;\n      esac\n      ((c++))\n    done\n    if [ -z \"$name\" ]; then\n      repo=$(basename \"$PWD\")\n    fi\n    case \"$prev\" in\n    -d|-h)\n      COMPREPLY=()\n      ;;\n    -p|*)\n      __gitcomp \"$repo $flags\"\n      ;;\n    esac\n  }\n\n  # hub fork [--no-remote] [--remote-name REMOTE] [--org ORGANIZATION]\n  function _git_fork {\n    local i c=2 flags=\"--no-remote --remote-name --org\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      --org)\n        ((c++))\n        flags=${flags/$i/}\n        ;;\n      --remote-name)\n        ((c++))\n        flags=${flags/$i/}\n        flags=${flags/--no-remote/}\n        ;;\n      --no-remote)\n        flags=${flags/$i/}\n        flags=${flags/--remote-name/}\n        ;;\n      esac\n      ((c++))\n    done\n    case \"$prev\" in\n    --remote-name|--org)\n      COMPREPLY=()\n      ;;\n    *)\n      __gitcomp \"$flags\"\n      ;;\n    esac\n  }\n\n  # hub pull-request [-f] [-m <MESSAGE>|-F <FILE>|-i <ISSUE>|<ISSUE-URL>] [-b <BASE>] [-h <HEAD>] [-a <USER>] [-M <MILESTONE>] [-l <LABELS>]\n  function _git_pull_request {\n    local i c=2 flags=\"-f -m -F -i -b -h -a -M -l\"\n    while [ $c -lt $cword ]; do\n      i=\"${words[c]}\"\n      case \"$i\" in\n      -m|-F|-i|-b|-h|-a|-M|-l)\n        ((c++))\n        flags=${flags/$i/}\n        ;;\n      -f)\n        flags=${flags/$i/}\n        ;;\n      esac\n      ((c++))\n    done\n    case \"$prev\" in\n    -i)\n      COMPREPLY=()\n      ;;\n    -b|-h|-a|-M|-l)\n      # (Doesn't seem to need this...)\n      # Uncomment the following line when 'owner/repo:[TAB]' misbehaved\n      #_get_comp_words_by_ref -n : cur\n      __gitcomp_nl \"$(__hub_heads)\"\n      # __ltrim_colon_completions \"$cur\"\n      ;;\n    -F)\n      COMPREPLY=( \"$cur\"* )\n      ;;\n    -f|*)\n      __gitcomp \"$flags\"\n      ;;\n    esac\n  }\n\n  ###################\n  # Helper functions\n  ###################\n\n  # __hub_github_user [HOST]\n  # Return $GITHUB_USER or the default github user defined in hub config\n  # HOST - Host to be looked-up in hub config. Default is \"github.com\"\n  function __hub_github_user {\n    if [ -n \"$GITHUB_USER\" ]; then\n      _omb_util_print $GITHUB_USER\n      return\n    fi\n    local line h k v host=${1:-github.com} config=${HUB_CONFIG:-~/.config/hub}\n    if [ -f \"$config\" ]; then\n      while read line; do\n        if [ \"$line\" = \"---\" ]; then\n          continue\n        fi\n        k=${line%%:*}\n        v=${line#*:}\n        if [ -z \"$v\" ]; then\n          if [ \"$h\" = \"$host\" ]; then\n            break\n          fi\n          h=$k\n          continue\n        fi\n        k=${k#* }\n        v=${v#* }\n        if [ \"$h\" = \"$host\" ] && [ \"$k\" = \"user\" ]; then\n          _omb_util_print \"$v\"\n          break\n        fi\n      done < \"$config\"\n    fi\n  }\n\n  # __hub_github_repos [FORMAT]\n  # List all github hosted repository\n  # FORMAT - Format string contains multiple of these:\n  #   \\m  remote\n  #   \\p  owner/repo\n  #   \\o  owner\n  #   escaped characters (\\n, \\t ...etc) work\n  # If omitted, prints all github repos in the format of \"remote:owner/repo\"\n  function __hub_github_repos {\n    local f format=$1\n    if [ -z \"$(__gitdir)\" ]; then\n      return\n    fi\n    if [ -z \"$format\" ]; then\n      format='\\1:\\2'\n    else\n      format=${format//\\m/\\1}\n      format=${format//\\p/\\2}\n      format=${format//\\o/\\3}\n    fi\n    _omb_prompt_git config --get-regexp 'remote\\.[^.]*\\.url' |\n    command grep -E ' ((https?|git)://|git@)github\\.com[:/][^:/]+/[^/]+$' |\n    sed -E 's#^remote\\.([^.]+)\\.url +.+[:/](([^/]+)/[^.]+)(\\.git)?$#'\"$format\"'#'\n  }\n\n  # __hub_heads\n  # List all local \"branch\", and remote \"owner/repo:branch\"\n  function __hub_heads {\n    local i remote repo branch dir=$(__gitdir)\n    if [ -d \"$dir\" ]; then\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/heads/\"\n      for i in $(__hub_github_repos); do\n        remote=${i%%:*}\n        repo=${i#*:}\n        _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n          \"refs/remotes/${remote}/\" | while read branch; do\n          _omb_util_print \"${repo}:${branch#${remote}/}\"\n        done\n      done\n    fi\n  }\n\n  # __hub_revlist [REMOTE]\n  # List all tags, and branches under REMOTE, without the \"remote/\" prefix\n  # REMOTE - Remote name to search branches from. Default is \"origin\"\n  function __hub_revlist {\n    local i remote=${1:-origin} dir=$(__gitdir)\n    if [ -d \"$dir\" ]; then\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/remotes/${remote}/\" | while read i; do\n        _omb_util_print \"${i#${remote}/}\"\n      done\n      _omb_prompt_git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n        \"refs/tags/\"\n    fi\n  }\n\n  # Enable completion for hub even when not using the alias\n  complete -o bashdefault -o default -o nospace -F _git hub 2>/dev/null \\\n    || complete -o default -o nospace -F _git hub\nfi\n"
  },
  {
    "path": "completions/jboss7.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Completions for JBoss Application Server 7 (EAP 6)\n# VERSION: 0.6\n# DATE: 2012-10-30\n# rparree-at-edc4it-dot-com\n\n\n\n\nfunction _serverProfiles {\n    if [[ $COMP_WORDS == *standalone.sh* ]]\n    then\n      serverdir=\"../standalone/configuration/\"\n    else\n       # assume is domain.sh\n      serverdir=\"../domain/configuration/\"\n    fi\n\n    for i in  ${!COMP_WORDS[*]}\n    do\n      if [[ \"${COMP_WORDS[i]}\" == \"-Djboss.server.base.dir\" || \"${COMP_WORDS[i]}\" == \"-Djboss.domain.base.dir\" ]]; then\n        serverdir=\"${COMP_WORDS[i+2]}/configuration\"\n      fi\n\n    done\n    if [ -d \"${serverdir}\" ]\n    then\n\n      IFS=$'\\n' tmp=\"$(ls \"${serverdir}\" | grep xml)\"\n        local fls=\"${tmp[@]// /\\ }\"\n      unset IFS\n      COMPREPLY=( $(compgen -W \"${fls} initial boot last v\" -- \"$cur\" ))\n    fi\n}\n\nfunction _bindingAddress {\n  # from /etc/bash_completion.d/ssh\n    COMPREPLY=( \"${COMPREPLY[@]}\" $( compgen -W \\\n    \"0.0.0.0 $( PATH=\"$PATH:/sbin\" ifconfig -a | \\\n    sed -ne 's/.*addr:\\([^[:space:]]*\\).*/\\1/p' \\\n        -ne 's/.*inet[[:space:]]\\{1,\\}\\([^[:space:]]*\\).*/\\1/p' )\" \\\n    -- \"$cur\" ) )\n}\n\nfunction _jboss {\n\n    local cur prev words cword\n    COMPREPLY=()\n    _get_comp_words_by_ref -n = cur prev words cword\n\n    case $cur in\n\n        -Djboss.socket.binding.port-offset=*)\n            cur=${cur#*=}\n            #static list of common bindings sets\n            local bindings=\"100 200 300 400 10000 20000 30000 40000\"\n            COMPREPLY=( $(compgen -W \"${bindings}\" -- ${cur}) )\n            return 0\n            ;;\n        -Djboss.default.jgroups.stack=*)\n            cur=${cur#*=}\n            #static list of standard JGroups stacks\n            local stacks=\"udp udp-async udp-sync tcp tcp-sync\"\n            COMPREPLY=( $(compgen -W \"${stacks}\" -- ${cur}) )\n            return 0\n            ;;\n\n        -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef=*|-Dcom.sun.management.jmxremote.authenticate=*|-Dcom.sun.management.jmxremote.ssl=*)\n            cur=${cur#*=}\n            local booleans=\"true false\"\n            COMPREPLY=( $(compgen -W \"${booleans}\" -- ${cur}) )\n            return 0\n            ;;\n\n        -Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*)\n           cur=${cur#*=}\n           _filedir -d\n           return 0\n           ;;\n\n        -Djboss.domain.master.address=*|-Djboss.bind.address*=*)\n           cur=${cur#*=}\n           _bindingAddress\n           return 0\n           ;;\n        --server-config=*|-c=|--host-config=*)\n\t   cur=${cur#*=}\n           _serverProfiles\n           return 0\n\n\n    esac\n\n\n    case $prev in\n        -u)\n            # a few from RFC 2365 IPv4 Local Scope ()\n           local addresses=\"239.255.0.1 239.255.0.2 239.255.0.3\"\n            COMPREPLY=( $(compgen -W \"${addresses}\" -- ${cur}) )\n            return 0\n            ;;\n        -b*)\n            _bindingAddress\n            return 0\n            ;;\n        -c)\n            _serverProfiles\n            return 0\n            ;;\n        *)\n            ;;\n    esac\n    # *** from jboss5  ********************\n    # *** -modulepath  -c -m  -g -l -d -p -n -B -L -C  -Djboss.platform.mbeanserver -Djboss.server.base.directory\n    # ***  -Djboss.Domain -Djboss.modcluster.proxyList  -Djboss.jvmRoute -Djboss.default.jgroups.stack -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port -Dcom.sun.management.jmxremote.ssl\n    # *************************************\n\n    # standard commands for standalone and domain mode\n    local commandsWithoutEqualSign='-b -bmanagement -bunsecure -bpublic --admin-only -h -help -u -version -V -v'\n    local commandsWithEqualSign='-P -Djboss.node.name -Djboss.home.dir -Djboss.socket.binding.port-offset -Djboss.bind.address.management -Djboss.bind.address -Djboss.bind.address.unsecure'\n\n    if [[ $COMP_WORDS == *standalone.sh* ]]\n    then\n       commandsWithoutEqualSign=\"${commandsWithoutEqualSign} -c\"\n       commandsWithEqualSign=\"${commandsWithEqualSign} --server-config -Djboss.server.base.dir -c\"\n    else\n       # assume is domain.sh\n       commandsWithoutEqualSign=\"${commandsWithoutEqualSign} --backup  --cached-dc\"\n       commandsWithEqualSign=\"${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir \"\n    fi\n\n\n\n\n    COMPREPLY=( $( compgen -W \"$commandsWithoutEqualSign\" -- \"$cur\" )\n                $( compgen -W \"$commandsWithEqualSign\"  -S '=' -- \"$cur\" ) )\n    return 0\n\n\n}\ncomplete -o nospace -F _jboss standalone.sh\ncomplete -o nospace -F _jboss domain.sh\n"
  },
  {
    "path": "completions/jump.completion.sh",
    "content": "#! bash oh-my-bash.module\n\nif _omb_util_command_exists jump; then\n  function _omb_plugin_jump_completion {\n    local JUMP_COMMANDS=$(jump 2>&1 | command grep -E '^ +' | awk '{print $1}')\n    COMPREPLY=( $(compgen -W '$JUMP_COMMANDS' -- \"${COMP_WORDS[1]}\") )\n  }\n  complete -F _omb_plugin_jump_completion jump\nfi\n"
  },
  {
    "path": "completions/jungle.completion.sh",
    "content": "#! bash oh-my-bash.module\n_omb_util_binary_exists jungle && eval \"$(_JUNGLE_COMPLETE=source jungle)\"\n"
  },
  {
    "path": "completions/kontena.completion.sh",
    "content": "#! bash oh-my-bash.module\n_omb_util_binary_exists kontena && . \"$( kontena whoami --bash-completion-path )\"\n"
  },
  {
    "path": "completions/kubectl.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# kubectl (Kubernetes CLI) completion\n\nif _omb_util_command_exists kubectl; then\n  # Note: We set KUBECONFIG=/dev/null to disable any kubectl plugins that take\n  # time to initialize. For example, gke-gcloud-auth-plugin provided by Google\n  # Cloud for GKE (Google Kubernetes Engine) seems to try to connect to an auth\n  # server every time the kubectl command is executed, regardless of whether\n  # the kubectl subcommand requires authentication. Since the generation of the\n  # completion script should not depend on plugins, we temporarily disable all\n  # plugins by setting a temporary environment KUBECONFIG=/dev/null.\n  eval -- \"$(KUBECONFIG=/dev/null kubectl completion bash)\"\nfi\n"
  },
  {
    "path": "completions/makefile.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Add completion for Makefile\n# see http://stackoverflow.com/a/38415982/1472048\ncomplete -W \"\\$(shopt -u nullglob; shopt -s nocaseglob; command grep -oE '^[a-zA-Z0-9_-]+:([^=]|\\$)' *makefile 2>/dev/null | command sed 's/[^a-zA-Z0-9_-]*\\$//')\" make\n"
  },
  {
    "path": "completions/maven.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Bash completion support for maven inspired from:\n#\n#  - https://github.com/juven/maven-bash-completion\n#  - https://github.com/parisjug/maven-bash-completion\n#\n# The current version is based on the following upstream version.\n# https://github.com/juven/maven-bash-completion/blob/216cd667b6119fe200c98b1ac2d030ac002be197/bash_completion.bash\n#------------------------------------------------------------------------------\n\n_omb_deprecate_function 20000 function_exists _omb_util_function_exists\n\n_omb_util_function_exists _get_comp_words_by_ref ||\nfunction _get_comp_words_by_ref {\n  local exclude cur_ words_ cword_;\n  if [[ $1 == \"-n\" ]]; then\n    exclude=$2\n    shift 2\n  fi\n  __git_reassemble_comp_words_by_ref \"$exclude\"\n  cur_=${words_[cword_]}\n  while (($# > 0)); do\n    case $1 in\n    cur)\n      cur=$cur_\n      ;;\n    prev)\n      prev=${words_[$cword_-1]}\n      ;;\n    words)\n      words=(\"${words_[@]}\")\n      ;;\n    cword)\n      cword=$cword_\n      ;;\n    esac;\n    shift\n  done\n}\n\n_omb_util_function_exists __ltrim_colon_completions ||\nfunction __ltrim_colon_completions {\n  if [[ $1 == *:* && $COMP_WORDBREAKS == *:* ]]; then\n    # Remove colon-word prefix from COMPREPLY items\n    local colon_word=${1%${1##*:}}\n    local i=${#COMPREPLY[*]}\n    while ((--i >= 0)); do\n      COMPREPLY[i]=${COMPREPLY[i]#\"$colon_word\"}\n    done\n  fi\n}\n\n_omb_util_function_exists __find_mvn_projects ||\nfunction __find_mvn_projects {\n  find . -name 'pom.xml' -not -path '*/target/*' -prune | while read LINE; do\n    local withoutPom=${LINE%/pom.xml}\n    local module=${withoutPom#./}\n    if [[ ! $module ]]; then\n      _omb_util_print \".\"\n    else\n      _omb_util_print $module\n    fi\n  done\n}\n\n_omb_util_function_exists _realpath ||\nfunction _realpath {\n  if [[ -f $1 ]]; then\n    # file *must* exist\n    if cd \"${1%/*}\" &>/dev/null; then\n      # file *may* not be local\n      # exception is ./file.ext\n      # try 'cd .; cd -;' *works!*\n      local tmppwd=$PWD\n      cd - &>/dev/null\n    else\n      # file *must* be local\n      local tmppwd=$PWD\n    fi\n  else\n    # file *cannot* exist\n    return 1 # failure\n  fi\n\n  # suppress shell session termination messages on macOS\n  function shell_session_save {\n    false\n  }\n\n  # reassemble realpath\n  _omb_util_print \"$tmppwd/${1##*/}\"\n  return 1 #success\n}\n\n_omb_util_function_exists __pom_hierarchy ||\nfunction __pom_hierarchy {\n  local pom=$(_realpath \"pom.xml\")\n  POM_HIERARCHY+=(\"$pom\")\n  while [[ $pom ]] && grep -q \"<parent>\" \"$pom\"; do\n    ## look for a new relativePath for parent pom.xml\n    local parent_pom_relative=$(grep -e \"<relativePath>.*</relativePath>\" \"$pom\" | sed 's/.*<relativePath>//' | sed 's/<\\/relativePath>.*//g')\n\n    ## <parent> is present but not defined, assume ../pom.xml\n    if [[ ! $parent_pom_relative ]]; then\n      parent_pom_relative=../pom.xml\n    fi\n\n    ## if pom exists continue else break\n    parent_pom=$(_realpath \"${pom%/*}/$parent_pom_relative\")\n    if [[ $parent_pom ]]; then\n      pom=$parent_pom\n    else\n      break\n    fi\n    POM_HIERARCHY+=(\"$pom\")\n  done\n}\n\nfunction _mvn {\n  local cur prev\n  COMPREPLY=()\n  POM_HIERARCHY=()\n  __pom_hierarchy\n  _get_comp_words_by_ref -n : cur prev\n\n  local opts=\"-am|-amd|-B|-C|-c|-cpu|-D|-e|-emp|-ep|-f|-fae|-ff|-fn|-gs|-h|-l|-N|-npr|-npu|-nsu|-o|-P|-pl|-q|-rf|-s|-T|-t|-U|-up|-V|-v|-X\"\n  local long_opts=\"--also-make|--also-make-dependents|--batch-mode|--strict-checksums|--lax-checksums|--check-plugin-updates|--define|--errors|--encrypt-master-password|--encrypt-password|--file|--fail-at-end|--fail-fast|--fail-never|--global-settings|--help|--log-file|--non-recursive|--no-plugin-registry|--no-plugin-updates|--no-snapshot-updates|--offline|--activate-profiles|--projects|--quiet|--resume-from|--settings|--threads|--toolchains|--update-snapshots|--update-plugins|--show-version|--version|--debug\"\n\n  local common_clean_lifecycle=\"pre-clean|clean|post-clean\"\n  local common_default_lifecycle=\"validate|initialize|generate-sources|process-sources|generate-resources|process-resources|compile|process-classes|generate-test-sources|process-test-sources|generate-test-resources|process-test-resources|test-compile|process-test-classes|test|prepare-package|package|pre-integration-test|integration-test|post-integration-test|verify|install|deploy\"\n  local common_site_lifecycle=\"pre-site|site|post-site|site-deploy\"\n  local common_lifecycle_phases=\"${common_clean_lifecycle}|${common_default_lifecycle}|${common_site_lifecycle}\"\n\n  local plugin_goals_appengine=\"appengine:backends_configure|appengine:backends_delete|appengine:backends_rollback|appengine:backends_start|appengine:backends_stop|appengine:backends_update|appengine:debug|appengine:devserver|appengine:devserver_start|appengine:devserver_stop|appengine:endpoints_get_client_lib|appengine:endpoints_get_discovery_doc|appengine:enhance|appengine:rollback|appengine:set_default_version|appengine:start_module_version|appengine:stop_module_version|appengine:update|appengine:update_cron|appengine:update_dos|appengine:update_indexes|appengine:update_queues|appengine:vacuum_indexes\"\n  local plugin_goals_android=\"android:apk|android:apklib|android:clean|android:deploy|android:deploy-dependencies|android:dex|android:emulator-start|android:emulator-stop|android:emulator-stop-all|android:generate-sources|android:help|android:instrument|android:manifest-update|android:pull|android:push|android:redeploy|android:run|android:undeploy|android:unpack|android:version-update|android:zipalign|android:devices\"\n  local plugin_goals_ant=\"ant:ant|ant:clean\"\n  local plugin_goals_antrun=\"antrun:run\"\n  local plugin_goals_archetype=\"archetype:generate|archetype:create-from-project|archetype:crawl\"\n  local plugin_goals_assembly=\"assembly:single|assembly:assembly\"\n  local plugin_goals_build_helper=\"build-helper:add-resource|build-helper:add-source|build-helper:add-test-resource|build-helper:add-test-source|build-helper:attach-artifact|build-helper:bsh-property|build-helper:cpu-count|build-helper:help|build-helper:local-ip|build-helper:maven-version|build-helper:parse-version|build-helper:regex-properties|build-helper:regex-property|build-helper:released-version|build-helper:remove-project-artifact|build-helper:reserve-network-port|build-helper:timestamp-property\"\n  local plugin_goals_buildnumber=\"buildnumber:create|buildnumber:create-timestamp|buildnumber:help|buildnumber:hgchangeset\"\n  local plugin_goals_cargo=\"cargo:start|cargo:run|cargo:stop|cargo:deploy|cargo:undeploy|cargo:help\"\n  local plugin_goals_checkstyle=\"checkstyle:checkstyle|checkstyle:check\"\n  local plugin_goals_cobertura=\"cobertura:cobertura\"\n  local plugin_goals_findbugs=\"findbugs:findbugs|findbugs:gui|findbugs:help\"\n  local plugin_goals_dependency=\"dependency:analyze|dependency:analyze-dep-mgt|dependency:analyze-duplicate|dependency:analyze-only|dependency:analyze-report|dependency:build-classpath|dependency:copy|dependency:copy-dependencies|dependency:get|dependency:go-offline|dependency:help|dependency:list|dependency:list-repositories|dependency:properties|dependency:purge-local-repository|dependency:resolve|dependency:resolve-plugins|dependency:sources|dependency:tree|dependency:unpack|dependency:unpack-dependencies\"\n  local plugin_goals_deploy=\"deploy:deploy-file\"\n  local plugin_goals_ear=\"ear:ear|ear:generate-application-xml\"\n  local plugin_goals_eclipse=\"eclipse:clean|eclipse:eclipse\"\n  local plugin_goals_ejb=\"ejb:ejb\"\n  local plugin_goals_enforcer=\"enforcer:enforce|enforcer:display-info\"\n  local plugin_goals_exec=\"exec:exec|exec:java\"\n  local plugin_goals_failsafe=\"failsafe:integration-test|failsafe:verify\"\n  local plugin_goals_flyway=\"flyway:migrate|flyway:clean|flyway:info|flyway:validate|flyway:baseline|flyway:repair\"\n  local plugin_goals_gpg=\"gpg:sign|gpg:sign-and-deploy-file\"\n  local plugin_goals_grails=\"grails:clean|grails:config-directories|grails:console|grails:create-controller|grails:create-domain-class|grails:create-integration-test|grails:create-pom|grails:create-script|grails:create-service|grails:create-tag-lib|grails:create-unit-test|grails:exec|grails:generate-all|grails:generate-controller|grails:generate-views|grails:help|grails:init|grails:init-plugin|grails:install-templates|grails:list-plugins|grails:maven-clean|grails:maven-compile|grails:maven-functional-test|grails:maven-grails-app-war|grails:maven-test|grails:maven-war|grails:package|grails:package-plugin|grails:run-app|grails:run-app-https|grails:run-war|grails:set-version|grails:test-app|grails:upgrade|grails:validate|grails:validate-plugin|grails:war\"\n  local plugin_goals_gwt=\"gwt:browser|gwt:clean|gwt:compile|gwt:compile-report|gwt:css|gwt:debug|gwt:eclipse|gwt:eclipseTest|gwt:generateAsync|gwt:help|gwt:i18n|gwt:mergewebxml|gwt:resources|gwt:run|gwt:run-codeserver|gwt:sdkInstall|gwt:source-jar|gwt:soyc|gwt:test\"\n  local plugin_goals_help=\"help:active-profiles|help:all-profiles|help:describe|help:effective-pom|help:effective-settings|help:evaluate|help:expressions|help:help|help:system\"\n  local plugin_goals_hibernate3=\"hibernate3:hbm2ddl|hibernate3:help\"\n  local plugin_goals_idea=\"idea:clean|idea:idea\"\n  local plugin_goals_install=\"install:install-file\"\n  local plugin_goals_jacoco=\"jacoco:check|jacoco:dump|jacoco:help|jacoco:instrument|jacoco:merge|jacoco:prepare-agent|jacoco:prepare-agent-integration|jacoco:report|jacoco:report-integration|jacoco:restore-instrumented-classes\"\n  local plugin_goals_javadoc=\"javadoc:javadoc|javadoc:jar|javadoc:aggregate\"\n  local plugin_goals_jboss=\"jboss:start|jboss:stop|jboss:deploy|jboss:undeploy|jboss:redeploy\"\n  local plugin_goals_jboss_as=\"jboss-as:add-resource|jboss-as:deploy|jboss-as:deploy-only|jboss-as:deploy-artifact|jboss-as:redeploy|jboss-as:redeploy-only|jboss-as:undeploy|jboss-as:undeploy-artifact|jboss-as:run|jboss-as:start|jboss-as:shutdown|jboss-as:execute-commands\"\n  local plugin_goals_jetty=\"jetty:run|jetty:run-war|jetty:run-exploded|jetty:deploy-war|jetty:run-forked|jetty:start|jetty:stop|jetty:effective-web-xml\"\n  local plugin_goals_jxr=\"jxr:jxr\"\n  local plugin_goals_license=\"license:format|license:check\"\n  local plugin_goals_liquibase=\"liquibase:changelogSync|liquibase:changelogSyncSQL|liquibase:clearCheckSums|liquibase:dbDoc|liquibase:diff|liquibase:dropAll|liquibase:help|liquibase:migrate|liquibase:listLocks|liquibase:migrateSQL|liquibase:releaseLocks|liquibase:rollback|liquibase:rollbackSQL|liquibase:status|liquibase:tag|liquibase:update|liquibase:updateSQL|liquibase:updateTestingRollback\"\n  local plugin_goals_nexus_staging=\"nexus-staging:close|nexus-staging:deploy|nexus-staging:deploy-staged|nexus-staging:deploy-staged-repository|nexus-staging:drop|nexus-staging:help|nexus-staging:promote|nexus-staging:rc-close|nexus-staging:rc-drop|nexus-staging:rc-list|nexus-staging:rc-list-profiles|nexus-staging:rc-promote|nexus-staging:rc-release|nexus-staging:release\"\n  local plugin_goals_pmd=\"pmd:pmd|pmd:cpd|pmd:check|pmd:cpd-check\"\n  local plugin_goals_properties=\"properties:read-project-properties|properties:write-project-properties|properties:write-active-profile-properties|properties:set-system-properties\"\n  local plugin_goals_release=\"release:clean|release:prepare|release:rollback|release:perform|release:stage|release:branch|release:update-versions\"\n  local plugin_goals_repository=\"repository:bundle-create|repository:bundle-pack|repository:help\"\n  local plugin_goals_scala=\"scala:add-source|scala:cc|scala:cctest|scala:compile|scala:console|scala:doc|scala:doc-jar|scala:help|scala:run|scala:script|scala:testCompile\"\n  local plugin_goals_scm=\"scm:add|scm:checkin|scm:checkout|scm:update|scm:status\"\n  local plugin_goals_site=\"site:site|site:deploy|site:run|site:stage|site:stage-deploy\"\n  local plugin_goals_sonar=\"sonar:sonar|sonar:help\"\n  local plugin_goals_source=\"source:aggregate|source:jar|source:jar-no-fork\"\n  local plugin_goals_spotbugs=\"spotbugs:spotbugs|spotbugs:check|spotbugs:gui|spotbugs:help\"\n  local plugin_goals_surefire=\"surefire:test\"\n  local plugin_goals_tomcat6=\"tomcat6:help|tomcat6:run|tomcat6:run-war|tomcat6:run-war-only|tomcat6:stop|tomcat6:deploy|tomcat6:redeploy|tomcat6:undeploy\"\n  local plugin_goals_tomcat7=\"tomcat7:help|tomcat7:run|tomcat7:run-war|tomcat7:run-war-only|tomcat7:deploy|tomcat7:redeploy|tomcat7:undeploy\"\n  local plugin_goals_tomcat=\"tomcat:help|tomcat:start|tomcat:stop|tomcat:deploy|tomcat:undeploy\"\n  local plugin_goals_liberty=\"liberty:create-server|liberty:start-server|liberty:stop-server|liberty:run-server|liberty:deploy|liberty:undeploy|liberty:java-dump-server|liberty:dump-server|liberty:package-server\"\n  local plugin_goals_versions=\"versions:display-dependency-updates|versions:display-plugin-updates|versions:display-property-updates|versions:update-parent|versions:update-properties|versions:update-child-modules|versions:lock-snapshots|versions:unlock-snapshots|versions:resolve-ranges|versions:set|versions:use-releases|versions:use-next-releases|versions:use-latest-releases|versions:use-next-snapshots|versions:use-latest-snapshots|versions:use-next-versions|versions:use-latest-versions|versions:commit|versions:revert\"\n  local plugin_goals_vertx=\"vertx:init|vertx:runMod|vertx:pullInDeps|vertx:fatJar\"\n  local plugin_goals_war=\"war:war|war:exploded|war:inplace|war:manifest\"\n  local plugin_goals_spring_boot=\"spring-boot:run|spring-boot:repackage\"\n  local plugin_goals_jgitflow=\"jgitflow:feature-start|jgitflow:feature-finish|jgitflow:release-start|jgitflow:release-finish|jgitflow:hotfix-start|jgitflow:hotfix-finish|jgitflow:build-number\"\n  local plugin_goals_wildfly=\"wildfly:add-resource|wildfly:deploy|wildfly:deploy-only|wildfly:deploy-artifact|wildfly:redeploy|wildfly:redeploy-only|wildfly:undeploy|wildfly:undeploy-artifact|wildfly:run|wildfly:start|wildfly:shutdown|wildfly:execute-commands\"\n  local plugin_goals_formatter=\"formatter:format|formatter:help|formatter:validate\"\n\n  ## some plugin (like jboss-as) has '-' which is not allowed in shell var name, to use '_' then replace\n  local common_plugins=$(compgen -v | grep \"^plugin_goals_.*\" | sed 's/plugin_goals_//g' | tr '_' '-' | tr '\\n' '|')\n\n  local options=\"-Dmaven.test.skip=true|-DskipTests|-DskipITs|-Dtest|-Dit.test|-DfailIfNoTests|-Dmaven.surefire.debug|-DenableCiProfile|-Dpmd.skip=true|-Dcheckstyle.skip=true|-Dtycho.mode=maven|-Dmaven.javadoc.skip=true|-Dgwt.compiler.skip|-Dcobertura.skip=true|-Dfindbugs.skip=true||-DperformRelease=true|-Dgpg.skip=true|-DforkCount\"\n\n  local profile_settings=$([[ -e ~/.m2/settings.xml ]] && grep -e \"<profile>\" -A 1 ~/.m2/settings.xml | grep -e \"<id>.*</id>\" | sed 's/.*<id>//' | sed 's/<\\/id>.*//g' | tr '\\n' '|')\n\n  local profiles=\"$profile_settings|\"\n  for item in ${POM_HIERARCHY[*]}; do\n    local profile_pom=$([[ -e $item ]] && grep -e \"<profile>\" -A 1 $item | grep -e \"<id>.*</id>\" | sed 's/.*<id>//' | sed 's/<\\/id>.*//g' | tr '\\n' '|')\n    local profiles=\"$profiles|$profile_pom\"\n  done\n\n  local IFS=$'|\\n'\n\n  if [[ $cur == -D* ]] ; then\n    COMPREPLY=( $(compgen -S ' ' -W \"$options\" -- \"$cur\") )\n\n  elif [[ $prev == -P ]] ; then\n    if [[ $cur == *,* ]] ; then\n      COMPREPLY=( $(compgen -S ',' -W \"$profiles\" -P \"${cur%,*},\" -- ${cur##*,}) )\n    else\n      COMPREPLY=( $(compgen -S ',' -W \"$profiles\" -- \"$cur\") )\n    fi\n\n  elif [[ $cur == --* ]] ; then\n    COMPREPLY=( $(compgen -W \"$long_opts\" -S ' ' -- \"$cur\") )\n\n  elif [[ $cur == -* ]] ; then\n    COMPREPLY=( $(compgen -W \"$opts\" -S ' ' -- \"$cur\") )\n\n  elif [[ $prev == -pl ]] ; then\n    if [[ $cur == *,* ]] ; then\n      COMPREPLY=( $(compgen -W \"$(__find_mvn_projects)\" -S ',' -P \"${cur%,*},\" -- ${cur##*,}) )\n    else\n      COMPREPLY=( $(compgen -W \"$(__find_mvn_projects)\" -S ',' -- \"$cur\") )\n    fi\n\n  elif [[ $prev == -rf || $prev == --resume-from ]] ; then\n    COMPREPLY=( $(compgen -d -S ' ' -- \"$cur\") )\n\n  elif [[ $cur == *:* ]] ; then\n    local plugin\n    for plugin in $common_plugins; do\n      if [[ $cur == $plugin:* ]]; then\n        ## note that here is an 'unreplace', see the comment at common_plugins\n        var_name=\"plugin_goals_${plugin//-/_}\"\n        COMPREPLY=( $(compgen -W \"${!var_name}\" -S ' ' -- \"$cur\") )\n      fi\n    done\n\n  else\n    if <<< \"$common_lifecycle_phases\" tr '|' '\\n' | grep -q -e \"^$cur\" ; then\n      COMPREPLY=( $(compgen -S ' ' -W \"$common_lifecycle_phases\" -- \"$cur\") )\n    elif <<< \"$common_plugins\" tr '|' '\\n' | grep -q -e \"^$cur\"; then\n      COMPREPLY=( $(compgen -S ':' -W \"$common_plugins\" -- \"$cur\") )\n    fi\n  fi\n\n  __ltrim_colon_completions \"$cur\"\n}\n\ncomplete -o default -F _mvn -o nospace mvn\ncomplete -o default -F _mvn -o nospace mvnDebug\ncomplete -o default -F _mvn -o nospace mvnw\n"
  },
  {
    "path": "completions/minikube.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# minikube (Kubernetes CLI) completion\n\nif _omb_util_command_exists minikube; then\n  eval -- \"$(minikube completion bash)\"\nfi\n"
  },
  {
    "path": "completions/npm.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# npm (Node Package Manager) completion\n# https://docs.npmjs.com/cli/completion\n\nif _omb_util_command_exists npm; then\n  eval -- \"$(npm completion)\"\nfi\n"
  },
  {
    "path": "completions/nvm.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# nvm (Node Version Manager) completion\n\nif [ \"$NVM_DIR\" ] && [ -r \"$NVM_DIR\"/bash_completion ];\nthen\n  . \"$NVM_DIR\"/bash_completion\nfi\n"
  },
  {
    "path": "completions/oc.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_command_exists oc; then\n  eval -- \"$(oc completion bash)\"\nfi\n"
  },
  {
    "path": "completions/packer.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# Packer (http://www.packer.io) bash completion\n#\n# This script provides bash completion for packer and supports:\n#\n# - template filename completion (*.json) in cwd\n# - support for basic options (i.e.. -debug)\n# - support for complex options (i.e. -parallel=[true|false]\n#\n# The scirpt has been successfully tested with packer-0.6.0 and the\n# following OS:\n#\n# - OS X 10.9\n# - CentOS-6.5\n# - Ubuntu 12.04 Server\n#\n# The script technically is heavily inspired by the git-completion.bash\n# script. Kudos to Shawn O. Pearce <spearce@spearce.org> and all other\n# contributors for the inspiration and especially to the bash-completion\n# team in general.\n#\n# Copyright (c) 2014 IT Services Department, University of Bern\n#\n# This script is licensed under the MIT License (MIT)\n# For licsense details see the LICENSE file included in the repository\n# or read the license text at http://opensource.org/licenses/MIT.\n#\n\n# Generates completion reply, appending a space to possible completion words,\n# if necessary.\n# It accepts 2 arguments though the second is optional:\n# 1: List of possible completion words.\n# 2: Generate possible completion matches for this word (optional).\n__packercomp ()\n{\n    local cur_=\"${2-$cur}\"\n\n    case \"$cur_\" in\n    -*=)\n        ;;\n    *)\n        local c i=0 IFS=$' \\t\\n'\n        for c in $1; do\n            if [[ $c == \"$cur_\"* ]]; then\n                case $c in\n                    -*=*|*.) ;;\n                    *) c=\"$c \" ;;\n                esac\n                COMPREPLY[i++]=\"$c\"\n            fi\n        done\n        ;;\n    esac\n}\n\n# Generates completion reply for template files in cwd.\n__packercomp_template_file ()\n{\n    local IFS=$'\\n'\n\n    COMPREPLY=($(compgen -S \" \" -A file -X '!*.json' -- \"${cur}\"))\n}\n\n# Generates completion for the build command.\n__packer_build ()\n{\n    local builders=\"\n        amazon-ebs amazon-instance amazon-chroot digitalocean docker\n        googlecompute openstack parallels-iso parallels-pvm qemu\n        virtualbox-iso virtualbox-ovf vmware-iso vmware-vmx\"\n\n    case \"$cur\" in\n        -parallel=*)\n            __packercomp \"false true\" \"${cur##-parallel=}\"\n            return\n            ;;\n        -except=*)\n            __packercomp \"$builders\" \"${cur##-except=}\"\n            return\n            ;;\n        -only=*)\n            __packercomp \"$builders\" \"${cur##-only=}\"\n            return\n            ;;\n        -*)\n            __packercomp \"-debug -force -machine-readable -except= -only= -parallel= -var -var-file\"\n            return\n            ;;\n        *)\n    esac\n\n    __packercomp_template_file\n}\n\n# Generates completion for the fix command.\n__packer_fix ()\n{\n    __packercomp_template_file\n}\n\n# Generates completion for the inspect command.\n__packer_inspect ()\n{\n    case \"$cur\" in\n        -*)\n            __packercomp \"-machine-readable\"\n            return\n            ;;\n        *)\n    esac\n\n    __packercomp_template_file\n}\n\n# Generates completion for the validate command.\n__packer_validate ()\n{\n    __packercomp_template_file\n}\n\n# Main function for packer completion.\n#\n# Searches for a command in $COMP_WORDS. If one is found\n# the appropriate function from above is called, if not\n# completion for global options is done.\n_packer_completion ()\n{\n    cur=${COMP_WORDS[COMP_CWORD]}\n    # Words containing an equal sign get split into tokens in bash > 4, which\n    # doesn't come in handy here.\n    # This is handled here. bash < 4 does not split.\n    _omb_util_function_exists _get_comp_words_by_ref && _get_comp_words_by_ref -n = cur\n\n    COMPREPLY=()\n    local i c=1 command=\n\n    while [ $c -lt $COMP_CWORD ]; do\n        i=\"${COMP_WORDS[c]}\"\n        case \"$i\" in\n            -*) ;;\n            *) command=\"$i\"; break ;;\n        esac\n        ((c++))\n    done\n\n    if [ -z \"$command\" ]; then\n        case \"$cur\" in\n            '-'*)\n                __packercomp \"-machine-readable --help --version\"\n                ;;\n            *)\n                __packercomp \"build fix inspect validate\"\n                ;;\n        esac\n        return\n    fi\n\n    local completion_func=\"__packer_${command}\"\n    _omb_util_function_exists \"$completion_func\" && \"$completion_func\"\n}\n\ncomplete -o nospace -F _packer_completion packer\n\n"
  },
  {
    "path": "completions/pip.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# pip bash completion start\n_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n                   COMP_CWORD=$COMP_CWORD \\\n                   PIP_AUTO_COMPLETE=1 $1 ) )\n}\ncomplete -o default -F _pip_completion pip\n# pip bash completion end\n\n"
  },
  {
    "path": "completions/pip3.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# pip bash completion start\n_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n                   COMP_CWORD=$COMP_CWORD \\\n                   PIP_AUTO_COMPLETE=1 $1 ) )\n}\ncomplete -o default -F _pip_completion pip3\n# pip bash completion end\n\n"
  },
  {
    "path": "completions/projects.completion.sh",
    "content": "#! bash oh-my-bash.module\nfunction _pj {\n  [ -z \"$PROJECT_PATHS\" ] && return\n  shift\n  [ \"$1\" == \"open\" ] && shift\n\n  local cur prev words cword\n  _init_completion || return\n\n  local IFS=$'\\n' i j k\n\n  compopt -o filenames\n\n  local -r mark_dirs=$(_rl_enabled mark-directories && echo y)\n  local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)\n\n  for i in ${PROJECT_PATHS//:/$'\\n'}; do\n    # create an array of matched subdirs\n    k=\"${#COMPREPLY[@]}\"\n    for j in $( compgen -d $i/$cur ); do\n      if [[ ( $mark_symdirs && -h $j || $mark_dirs && ! -h $j ) && ! -d ${j#$i/} ]]; then\n        j+=\"/\"\n      fi\n      COMPREPLY[k++]=${j#$i/}\n    done\n  done\n\n  if [[ ${#COMPREPLY[@]} -eq 1 ]]; then\n    i=${COMPREPLY[0]}\n    if [[ \"$i\" == \"$cur\" && $i != \"*/\" ]]; then\n      COMPREPLY[0]=\"${i}/\"\n    fi\n  fi\n\n  return 0\n}\n\ncomplete -F _pj -o nospace pj\ncomplete -F _pj -o nospace pjo\n\n"
  },
  {
    "path": "completions/rake.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion support for Rake, Ruby Make.\n\n_omb_module_require lib:omb-completion\n\nfunction _omb_completion_rake {\n  local cur\n  _omb_completion_reassemble_breaks :\n\n  if [[ -f Rakefile ]]; then\n    local recent=$(ls -t .rake_tasks~ Rakefile **/*.rake 2> /dev/null | head -n 1)\n    if [[ $recent != '.rake_tasks~' ]]; then\n      rake --silent --tasks --all | cut -d \" \" -f 2 > .rake_tasks~\n    fi\n    COMPREPLY=($(compgen -W '$(< .rake_tasks~)' -- \"$cur\"))\n  fi\n\n  _omb_completion_resolve_breaks\n}\n\ncomplete -o default -o nospace -F _omb_completion_rake rake\n"
  },
  {
    "path": "completions/salt.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version corresponds to the following upstream version:\n# https://github.com/saltstack/salt/blob/18ca4fdfa9e9c16fb10006f1221254707bece308/pkg/common/salt.bash\n#------------------------------------------------------------------------------\n# written by David Pravec\n#   - feel free to /msg alekibango on IRC if you want to talk about this file\n\n# TODO: check if --config|-c was used and use configured config file for queries\n# TODO: solve somehow completion for  salt -G pythonversion:[tab]\n#       (not sure what to do with lists)\n# TODO: --range[tab] --   how?\n# TODO: --compound[tab] -- how?\n# TODO: use history to extract some words, esp. if ${cur} is empty\n# TODO: TEST EVERYTHING a lot\n# TODO: is it ok to use '--timeout 2' ?\n\n\nfunction _salt_get_grains {\n  if [[ $1 == 'local' ]]; then\n    salt-call --log-level=error --out=txt -- grains.ls | sed  's/^.*\\[//' | tr -d \",']\" | sed 's:\\([a-z0-9]\\) :\\1\\: :g'\n  else\n    salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.ls | sed  's/^.*\\[//' | tr -d \",']\" | sed 's:\\([a-z0-9]\\) :\\1\\: :g'\n  fi\n}\n\nfunction _salt_get_grain_values {\n  if [[ $1 == 'local' ]]; then\n    salt-call --log-level=error --out=txt -- grains.item $1 |sed 's/^\\S*:\\s//' |grep -v '^\\s*$'\n  else\n    salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.item $1 |sed 's/^\\S*:\\s//' |grep -v '^\\s*$'\n  fi\n}\n\nfunction _salt_get_keys {\n  local type\n  for type in $*; do\n    # remove header from data:\n    salt-key --no-color -l \"$type\" | tail -n+2\n  done\n}\n\nfunction _salt_list_functions {\n  # salt-call: get all functions on this minion\n  # salt: get all functions on all minions\n  # sed: remove all array overhead and convert to newline separated list\n  # sort: chop out doubled entries, so overhead is minimal later during actual completion\n  if [[ $1 == 'local' ]]; then\n    salt-call --log-level=quiet --out=txt -- sys.list_functions |\n      sed \"s/^.*\\[//;s/[],']//g;s/ /\\n/g\" |\n      sort -u\n  else\n    salt '*' --timeout 2 --hide-timeout --log-level=quiet --out=txt -- sys.list_functions |\n      sed \"s/^.*\\[//;s/[],']//g;s/ /\\n/g\" |\n      sort -u\n  fi\n}\n\nfunction _salt_get_coms {\n  CACHE_DIR=$HOME/.cache/salt-$1-comp-cache_functions\n  local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:=$CACHE_DIR}\n  local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:='last hour'}\n\n  if [[ ! -d $(dirname $_salt_cache_functions) ]]; then\n    mkdir -p \"$(dirname $_salt_cache_functions)\"\n  fi\n\n  # Regenerate cache if timed out\n  if [[ $(stat --format=%Z $_salt_cache_functions 2>/dev/null) -lt $(date --date=\"$_salt_cache_timeout\" +%s) ]]; then\n    _salt_list_functions $1 > \"$_salt_cache_functions\"\n  fi\n\n  # filter results, to only print the part to next dot (or end of function)\n  sed 's/^\\('\"$cur\"'\\(\\.\\|[^.]*\\)\\)\\?.*/\\1/' \"$_salt_cache_functions\" | sort -u\n}\n\nfunction _salt {\n  local cur prev opts pprev ppprev\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n  if ((COMP_CWORD > 2)); then\n    pprev=${COMP_WORDS[COMP_CWORD-2]}\n  fi\n  if ((COMP_CWORD > 3)); then\n    ppprev=${COMP_WORDS[COMP_CWORD-3]}\n  fi\n\n  opts=\"-h --help -d --doc --documentation --version --versions-report -c \\\n    --config-dir= -v --verbose -t --timeout= -s --static -b --batch= \\\n    --batch-size= -E --pcre -L --list -G --grain --grain-pcre -N \\\n    --nodegroup -R --range -C --compound -I --pillar \\\n    --return= -a --auth= --eauth= --extended-auth= -T --make-token -S \\\n    --ipcidr --out=pprint --out=yaml --out=overstatestage --out=json \\\n    --out=raw --out=highstate --out=key --out=txt --no-color --out-indent= \"\n\n  if [[ $cur == -* ]] ; then\n    COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n    return 0\n  fi\n\n  # 2 special cases for filling up grain values\n  case $pprev in\n  -G|--grain|--grain-pcre)\n    if [[ $cur == \":\" ]]; then\n      COMPREPLY=($(compgen -W '$(_salt_get_grain_values \"$prev\")'))\n      return 0\n    fi\n    ;;\n  esac\n  case $ppprev in\n  -G|--grain|--grain-pcre)\n    if [[ $prev == \":\" ]]; then\n      COMPREPLY=($(compgen -W '$(_salt_get_grain_values \"$pprev\")' -- \"$cur\"))\n      return 0\n    fi\n    ;;\n  esac\n\n  if [[ $cur == \"=\" && $prev == --* ]]; then\n    cur=\"\"\n  fi\n  if [[ $prev == \"=\" && $pprev == --* ]]; then\n    prev=$pprev\n  fi\n\n  case $prev in\n  -c|--config)\n    COMPREPLY=($(compgen -f -- \"$cur\"))\n    return 0\n    ;;\n  salt)\n    COMPREPLY=($(compgen -W \"\\'*\\' \\$opts \\$(_salt_get_keys acc)\" -- \"$cur\"))\n    return 0\n    ;;\n  -E|--pcre)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys acc)' -- \"$cur\"))\n    return 0\n    ;;\n  -G|--grain|--grain-pcre)\n    COMPREPLY=($(compgen -W '$(_salt_get_grains)' -- \"$cur\"))\n    return 0\n    ;;\n  -C|--compound)\n    COMPREPLY=() # TODO: finish this one? how?\n    return 0\n    ;;\n  -t|--timeout)\n    COMPREPLY=($(compgen -W \"1 2 3 4 5 6 7 8 9 10 15 20 30 40 60 90 120 180\" -- \"$cur\"))\n    return 0\n    ;;\n  -b|--batch|--batch-size)\n    COMPREPLY=($(compgen -W \"1 2 3 4 5 6 7 8 9 10 15 20 30 40 50 60 70 80 90 100 120 150 200\"))\n    return 0\n    ;;\n  -N|--nodegroup)\n    local MASTER_CONFIG='/etc/salt/master'\n    local all=$(awk -F ':'  'BEGIN {print_line = 0};  /^nodegroups/ {print_line = 1;getline } print_line && /^  */ {print $1} /^[^ ]/ {print_line = 0}' < \"$MASTER_CONFIG\")\n    COMPREPLY=($(compgen -W '$all' -- \"$cur\"))\n    return 0\n    ;;\n  esac\n\n  local _salt_coms=$(_salt_get_coms remote)\n\n  # If there are still dots in the suggestion, do not append space\n  grep \"^$cur.*\\.\" \"$_salt_coms\" &>/dev/null && compopt -o nospace\n\n  local all=\"$opts $_salt_coms\"\n  COMPREPLY=($(compgen -W '$all' -- \"$cur\"))\n\n  return 0\n}\n\ncomplete -F _salt salt\n\n\nfunction _saltkey {\n  local cur prev opts prev pprev\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n  opts=\"-c --config-dir= -h --help --version --versions-report -q --quiet \\\n    -y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \\\n    -l --list= -L --list-all -a --accept= -A --accept-all \\\n    -r --reject= -R --reject-all -p --print= -P --print-all \\\n    -d --delete= -D --delete-all -f --finger= -F --finger-all \\\n    --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n    --out=highstate --out=key --out=txt --no-color --out-indent= \"\n  if ((COMP_CWORD > 2)); then\n    pprev=${COMP_WORDS[COMP_CWORD-2]}\n  fi\n  if ((COMP_CWORD > 3)); then\n    ppprev=${COMP_WORDS[COMP_CWORD-3]}\n  fi\n  if [[ $cur == -* ]] ; then\n    COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n    return 0\n  fi\n\n  if [[ $cur == \"=\" && $prev == --* ]]; then\n    cur=\"\"\n  fi\n  if [[ $prev == \"=\" && $pprev == --* ]]; then\n    prev=$pprev\n  fi\n\n  case $prev in\n  -a|--accept)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys un rej)' -- \"$cur\"))\n    return 0\n    ;;\n  -r|--reject)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys acc)' -- \"$cur\"))\n    return 0\n    ;;\n  -d|--delete)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys acc un rej)' -- \"$cur\"))\n    return 0\n    ;;\n  -c|--config)\n    COMPREPLY=($(compgen -f -- \"$cur\"))\n    return 0\n    ;;\n  --keysize)\n    COMPREPLY=($(compgen -W \"2048 3072 4096 5120 6144\" -- \"$cur\"))\n    return 0\n    ;;\n  --gen-keys)\n    return 0\n    ;;\n  --gen-keys-dir)\n    COMPREPLY=($(compgen -d -- \"$cur\"))\n    return 0\n    ;;\n  -p|--print)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys acc un rej)' -- \"$cur\"))\n    return 0\n    ;;\n  -l|--list)\n    COMPREPLY=($(compgen -W \"pre un acc accepted unaccepted rej rejected all\" -- \"$cur\"))\n    return 0\n    ;;\n  --accept-all)\n    return 0\n    ;;\n  esac\n  COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n  return 0\n}\n\ncomplete -F _saltkey salt-key\n\nfunction _saltcall {\n  local cur prev opts pprev ppprev\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n  opts=\"-h --help -d --doc --documentation --version --versions-report \\\n    -m --module-dirs= -g --grains --return= --local -c --config-dir= -l --log-level= \\\n    --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n    --out=highstate --out=key --out=txt --no-color --out-indent= \"\n  if ((COMP_CWORD > 2)); then\n    pprev=${COMP_WORDS[COMP_CWORD-2]}\n  fi\n  if ((COMP_CWORD > 3)); then\n    ppprev=${COMP_WORDS[COMP_CWORD-3]}\n  fi\n  if [[ $cur == -* ]] ; then\n    COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n    return 0\n  fi\n\n  if [[ $cur == \"=\" && $prev == --* ]]; then\n    cur=\"\"\n  fi\n  if [[ $prev == \"=\" && $pprev == --* ]]; then\n    prev=$pprev\n  fi\n\n  case $prev in\n  -m|--module-dirs)\n    COMPREPLY=($(compgen -d -- \"$cur\"))\n    return 0\n    ;;\n  -l|--log-level)\n    COMPREPLY=($(compgen -W \"info none garbage trace warning error debug\" -- \"$cur\"))\n    return 0\n    ;;\n  -g|grains)\n    return 0\n    ;;\n  salt-call)\n    COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n    return 0\n    ;;\n  esac\n\n  local _salt_coms=$(_salt_get_coms local)\n\n  # If there are still dots in the suggestion, do not append space\n  grep \"^$cur.*\\.\" \"$_salt_coms\" &>/dev/null && compopt -o nospace\n\n  COMPREPLY=($(compgen -W '$opts $_salt_coms' -- \"$cur\"))\n  return 0\n}\n\ncomplete -F _saltcall salt-call\n\n\nfunction _saltcp {\n  local cur prev opts target prefpart postpart helper filt pprev ppprev\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n  opts=\"-t --timeout= -s --static -b --batch= --batch-size= \\\n    -h --help --version --versions-report -c --config-dir= \\\n    -E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \\\n    -R --range -C --compound -I --pillar \\\n    --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n    --out=highstate --out=key --out=txt --no-color --out-indent= \"\n  if [[ $cur == -* ]] ; then\n    COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n    return 0\n  fi\n\n  if [[ $cur == \"=\" && $prev == --* ]]; then\n    cur=\"\"\n  fi\n  if [[ $prev == \"=\" && $pprev == --* ]]; then\n    prev=$pprev\n  fi\n\n  case $prev in\n  salt-cp)\n    COMPREPLY=($(compgen -W '$opts $(_salt_get_keys acc)' -- \"$cur\"))\n    return 0\n    ;;\n  -t|--timeout)\n    # those numbers are just a hint\n    COMPREPLY=($(compgen -W \"2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300\" -- \"$cur\"))\n    return 0\n    ;;\n  -E|--pcre)\n    COMPREPLY=($(compgen -W '$(_salt_get_keys acc)' -- \"$cur\"))\n    return 0\n    ;;\n  -L|--list)\n    # IMPROVEMENTS ARE WELCOME\n    prefpart=${cur%,*},\n    postpart=${cur##*,}\n    filt=\"^\\($(sed 's:,:\\\\|:g' <<< \"$cur\")\\)$\"\n    helper=($(_salt_get_keys acc | grep -v \"$filt\" | sed \"s/^/$prefpart/\"))\n    COMPREPLY=($(compgen -W '\"${helper[@]}\"' -- \"$cur\"))\n\n    return 0\n    ;;\n  -G|--grain|--grain-pcre)\n    COMPREPLY=($(compgen -W '$(_salt_get_grains)' -- \"$cur\"))\n    return 0\n    ;;\n  # FIXME\n  -R|--range)\n    # FIXME ??\n    return 0\n    ;;\n  -C|--compound)\n    # FIXME ??\n    return 0\n    ;;\n  -c|--config)\n    COMPREPLY=($(compgen -f -- \"$cur\"))\n    return 0\n    ;;\n  esac\n\n  # default is using opts:\n  COMPREPLY=($(compgen -W '$opts' -- \"$cur\"))\n}\n\ncomplete -F _saltcp salt-cp\n"
  },
  {
    "path": "completions/sdkman.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# This probably originates from Bash-it.\n#------------------------------------------------------------------------------\n\nif ! declare -F __sdkman_build_version_csv &>/dev/null; then\n  # @fn __sdkman_build_version_csv\n  #   Copyright 2021 Marco Vermeulen.\n  #   Licensed under the Apache License, Version 2.0 (the \"License\");\n  #\n  #   This function was taken from \"main/bash/sdkman-list.sh @\n  #   sdkman/sdkman-cli\".\n  #   https://github.com/sdkman/sdkman-cli/blob/19e5c081297d6a8d1ce8a8b54631bb3f8e8e861b/src/main/bash/sdkman-list.sh#L51\n  function __sdkman_build_version_csv {\n    local candidate=$1\n    local versions_csv=\"\"\n    if [[ -d $SDKMAN_CANDIDATES_DIR/$candidate ]]; then\n      for version in $(find \"$SDKMAN_CANDIDATES_DIR/$candidate\" -maxdepth 1 -mindepth 1 \\( -type l -o -type d \\) -exec basename '{}' \\; | sort -r); do\n        if [[ $version != 'current' ]]; then\n          versions_csv=$version,$versions_csv\n        fi\n      done\n      versions_csv=${versions_csv%?}\n    fi\n    _omb_util_print \"$versions_csv\"\n  }\nfi\n\nfunction _omb_completion_sdkman {\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  COMPREPLY=()\n\n  if ((COMP_CWORD == 1)); then\n    COMPREPLY=($(compgen -W \"install uninstall rm list ls use current outdated version default selfupdate broadcast offline help flush\" -- \"$cur\"))\n  elif ((COMP_CWORD == 2)); then\n    case ${COMP_WORDS[COMP_CWORD-1]} in\n    \"install\" | \"uninstall\" | \"rm\" | \"list\" | \"ls\" | \"use\" | \"current\" | \"outdated\")\n      local candidates\n      candidates=$(tr ',' ' ' <<< \"$SDKMAN_CANDIDATES_CSV\")\n      COMPREPLY=($(compgen -W \"$candidates\" -- \"$cur\"))\n      ;;\n    \"offline\")\n      COMPREPLY=($(compgen -W \"enable disable\" -- \"$cur\"))\n      ;;\n    \"selfupdate\")\n      COMPREPLY=($(compgen -W \"force\" -P \"[\" -S \"]\" -- \"$cur\"))\n      ;;\n    \"flush\")\n      COMPREPLY=($(compgen -W \"candidates broadcast archives temp\" -- \"$cur\"))\n      ;;\n    *)\n      ;;\n    esac\n  elif ((COMP_CWORD == 3)); then\n    case ${COMP_WORDS[COMP_CWORD-2]} in\n    \"install\" | \"uninstall\" | \"rm\" | \"use\" | \"default\")\n      local candidate_versions\n      _omb_completion_sdkman__candidate_versions \"${COMP_WORDS[COMP_CWORD-1]}\"\n      COMPREPLY=($(compgen -W \"$candidate_versions\" -- \"$cur\"))\n      ;;\n    *)\n      ;;\n    esac\n  fi\n\n  return 0\n}\n\nfunction _omb_completion_sdkman__candidate_versions {\n  local local_versions=$(_omb_completion_sdkman__cleanup_local_versions \"$1\")\n  if [[ $SDKMAN_OFFLINE_MODE == \"true\" ]]; then\n    candidate_versions=$local_versions\n  else\n    local online_versions=$(curl -s \"$SDKMAN_SERVICE/candidates/$1\" | tr ',' ' ')\n    candidate_versions=\"$(printf '%s\\n' $online_versions $local_versions | sort -u) \"\n  fi\n\n}\n\nfunction _omb_completion_sdkman__cleanup_local_versions {\n  __sdkman_build_version_csv \"$1\"\n  tr ',' ' ' <<< \"$CSV\"\n}\n\ncomplete -F _omb_completion_sdkman sdk\n"
  },
  {
    "path": "completions/ssh.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash completion support for ssh.\n\n_omb_module_require lib:omb-completion\n\nfunction _omb_completion_ssh {\n  local cur\n  _omb_completion_reassemble_breaks :\n\n  local -a options\n  if [[ $cur == *@*  ]] ; then\n    options=(-P \"${cur%%@*}@\" -- \"${cur#*@}\")\n  else\n    options=(-- \"$cur\")\n  fi\n\n  local IFS=$'\\n'\n\n  local -a config_files=()\n  local base_config_file\n  for base_config_file in ~/.ssh/config /etc/ssh/ssh_config; do\n    # parse all defined hosts from config file\n    if [[ -r $base_config_file ]]; then\n      local basedir\n      basedir=${base_config_file%/*}\n      config_files+=(\"$base_config_file\")\n\n      # check if config file contains Include options\n      local -a include_patterns\n      _omb_util_split include_patterns \"$(awk -F' ' '/^Include/{print $2}' \"$base_config_file\" 2>/dev/null)\" $'\\n'\n      local i\n      for i in \"${!include_patterns[@]}\"; do\n        # relative or absolute path, if relative transforms to absolute\n        [[ ${include_patterns[i]} == /* ]] || include_patterns[i]=$basedir/${include_patterns[i]}\n      done\n\n      # interpret possible globbing\n      local -a include_files\n      _omb_util_glob_expand include_files '${include_patterns[*]}'\n      local include_file\n      for include_file in \"${include_files[@]}\";do\n        # parse all defined hosts from that file\n        [[ -s $include_file ]] && config_files+=(\"$include_file\")\n      done\n    fi\n  done\n  if ((${#config_files[@]} != 0)); then\n    COMPREPLY+=($(compgen -W \"$(awk '\n      sub(/^[ \\t]*[Hh][Oo][Ss][Tt]([Nn][Aa][Mm][Ee])?[ \\t=]+/, \"\") {\n        n = split($0, fields, /[ \\t]+/);\n        for (i = 1; i <= n; i++) if (fields[i] != \"\" && !visited[fields[i]]++) print fields[i];\n      }' \"${config_files[@]}\")\" \"${options[@]}\") )\n  fi\n\n  local -a known_hosts_files=()\n  local known_hosts_file\n  for known_hosts_file in ~/.ssh/known_hosts /etc/ssh/ssh_known_hosts; do\n    if [[ -r $known_hosts_file ]]; then\n      known_hosts_files+=(\"$known_hosts_file\")\n    fi\n  done\n  if ((${#known_hosts_files[@]} != 0)); then\n    COMPREPLY+=($(compgen -W \"$(awk '\n      $1 !~ /^\\|/ {\n        gsub(/[][]|[,:].*/, \"\", $1);\n        if ($1 !~ /ssh-rsa/) print $1;\n      }' \"${known_hosts_files[@]}\")\" \"${options[@]}\"))\n  fi\n\n  # parse hosts defined in /etc/hosts\n  if [[ -r /etc/hosts ]]; then\n    COMPREPLY+=($(compgen -W \"$(grep -v '^[[:space:]]*$' /etc/hosts | grep -v '^#' | awk '{for (i=2; i<=NF; i++) print $i}' )\" \"${options[@]}\"))\n  fi\n\n  _omb_completion_resolve_breaks\n}\n\ncomplete -o default -o nospace -F _omb_completion_ssh ssh scp\n"
  },
  {
    "path": "completions/svn.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The completion settings are found in the following places:\n# * https://github.com/Luladjiev/Subversion-Bash-Complete\n# * https://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/bash_completion\n#\n# Change history\n# * 2024-08-13 updated from svn.apache.org.\n#\n# ------------------------------------------------------------\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements.  See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership.  The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n#   http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the License for the\n# specific language governing permissions and limitations\n# under the License.\n# ------------------------------------------------------------\n\n# Programmable completion for the Subversion svn command under bash. Source\n# this file (or on some systems add it to ~/.bash_completion and start a new\n# shell) and bash's completion mechanism will know all about svn's options!\n# Provides completion for the svnadmin, svndumpfilter, svnlook and svnsync\n# commands as well.  Who wants to read man pages/help text...\n\n# Known to work with bash 3.* with programmable completion and extended\n# pattern matching enabled (use 'shopt -s extglob progcomp' to enable\n# these if they are not already enabled).\n\nshopt -s extglob\n\n# Tree helper functions which only use bash, to ease readability.\n\n# look for value associated to key from stdin in K/V hash file format\n# val=$(_svn_read_hashfile svn:realmstring < some/file)\nfunction _svn_read_hashfile()\n{\n  local tkey=$1 key= val=\n  while true; do\n    read tag len\n    [ $tag = 'END' ] && break\n    [ $tag != 'K' ] && {\n      #echo \"unexpected tag '$tag' instead of 'K'\" >&2\n      return\n    }\n    read -r -n $len key ; read\n    read tag len\n    [ $tag != 'V' ] && {\n      #echo \"unexpected tag '$tag' instead of 'V'\" >&2\n      return\n    }\n    read -r -n $len val ; read\n    if [[ $key = $tkey ]] ; then\n      echo \"$val\"\n      return\n    fi\n  done\n  #echo \"target key '$tkey' not found\" >&2\n}\n\n# _svn_grcut shell-regular-expression\n# extract filenames from 'svn status' output\nfunction _svn_grcut()\n{\n    local re=$1 line= old_IFS\n    # fix IFS, so that leading spaces are not ignored by next read.\n    # (there is a leading space in svn status output if only a prop is changed)\n    old_IFS=\"$IFS\"\n    IFS=$'\\n'\n    while read -r line ; do\n\t[[ ! $re || $line == $re ]] && echo \"${line/????????/}\"\n    done\n    IFS=\"$old_IFS\"\n}\n\n# extract stuff from svn info output\n# _svn_info (URL|Repository Root)\nfunction _svn_info()\n{\n  local what=$1 line=\n  LANG=C LC_MESSAGES=C svn info --non-interactive 2> /dev/null | \\\n  while read line ; do\n    [[ $line == *\"$what: \"* ]] && echo ${line#*: }\n  done\n}\n\n# broken since svn 1.7 | FIXME: change to svn status -v ?\n# _svn_lls (dir|file|all) files...\n# list svn-managed files from list\n# some 'svn status --all-files' would be welcome here?\nfunction _svn_lls()\n{\n    local opt=$1 f=\n    shift\n    for f in \"$@\" ; do\n\t# could try to check in .svn/entries? hmmm...\n\tif [[ $opt == @(dir|all) && -d \"$f\" ]] ; then\n\t    echo \"$f/\"\n\telif [[ $opt == @(file|all) ]] ; then\n\t    # split f in directory/file names\n\t    local dn= fn=\"$f\"\n\t    [[ \"$f\" == */* ]] && dn=${f%\\/*}/ fn=${f##*\\/}\n\t    # ??? this does not work for just added files, because they\n\t    # do not have a content reference yet...\n\t    [ -f \"${dn}.svn/text-base/${fn}.svn-base\" ] && echo \"$f\"\n\tfi\n    done\n}\n\n# try to complete TARGET\n# 1. [nothing]  lists available protocols\n# 2. svn+ssh:// lists servers from .ssh/known_hosts\n# 3. http[s]:// lists already used svn servers\n# 4. file://    lists files from dir\n# 5. ^/ or protocol except file:/ triggers svn ls\n# this code expects bash 4, $cur is split by : too\n#\n# $1            'all' | 'remote_only'\n# return        true if found something\nfunction _svn_complete_target() {\n\t# echo -e \"\\n_svn_complete_target: [$cur] 1:[${COMP_WORDS[COMP_CWORD]}] 2:[${COMP_WORDS[COMP_CWORD-1]}] 3:[${COMP_WORDS[COMP_CWORD-2]}] | [${COMP_WORDS[@]}] [$COMP_WORDBREAKS]\"\n\tlocal prefix=${COMP_WORDS[COMP_CWORD-2]}\n\tlocal colon=${COMP_WORDS[COMP_CWORD-1]}\n\t# see about COMP_WORDBREAKS workaround in prop completion\n\tif [[ $prefix == \"file\" && \"$colon\" == \":\" ]]\n\tthen\n\t\t# file completion for file:// urls\n\t\tCOMPREPLY=( $(compgen -d -S '/' -X '*/.*' -- $cur ) )\n\t\treturn\n\telif [[ ( $1 == \"all\" && $cur == ^/* ) || ( \"$colon\" == \":\" && $cur == //*/* ) ]]\n\tthen\t# we already have a protocol and host: autocomplete for svn ls ^/bla | svn ls remote_url | svn checkout remote_url\n\t\tlocal p\n\t\tif [ \"$colon\" == \":\" ] ; then\n\t\t\tp=\"$prefix$colon\"\n\t\tfi\n\t\tif [[ $cur =~ ((.*/)([^/]*)) ]] # url = everything up to the last /\n\t\tthen\n\t\t\tlocal url=\"${BASH_REMATCH[2]}\"\n\t\t\tlocal path=\"${BASH_REMATCH[3]}\"\n\t\t\tlocal remote_files=\"$(svn ls --non-interactive \"$p$url\" 2> /dev/null )\"\n\t\t\tCOMPREPLY=( $(compgen -P \"$url\" -W \"$remote_files\" -- \"$path\" ) )\n\t\t\tcompopt -o nospace\n\t\t\treturn 0\n\t\tfi\n\telif [[ \"$colon\" == \":\" ]]\n\tthen\n\t\t# get known servers\n\t\t# svn+ssh://\n\t\tif [[ $prefix == \"svn+ssh\" && $cur =~ (^//(.*)) ]] ; then\n\t\t\tlocal server_start=${BASH_REMATCH[2]}\n\t\t\t# debian & suse: /usr/share/bash-completion/bash_completion\n\t\t\tlocal suffix=/\n\t\t\t_known_hosts_real -p // \"$server_start\"\n\t\telse\n\t\t\tlocal urls= file=\n\t\t\tfor file in ~/.subversion/auth/svn.simple/* ; do\n\t\t\t\tif [ -r $file ] ; then\n\t\t\t\t\tlocal url=$(_svn_read_hashfile svn:realmstring < $file)\n\t\t\t\t\turl=${url/*</}\n\t\t\t\t\turl=${url/>*/}\n\t\t\t\t\turls=\"$urls $url\"\n\t\t\t\tfi\n\t\t\tdone\n\n\t\t\t# only suggest/show possible suffixes\n\t\t\tlocal suffix=$cur c= choices=\n\t\t\tfor c in $urls ; do\n\t\t\t\t[[ $c == $prefix:* ]] && choices=\"$choices ${c#*:}\"\n\t\t\tdone\n\n\t\t\tCOMPREPLY=( $(compgen -W \"$choices\" -- $suffix ) )\n\t\tfi\n\t\tcompopt -o nospace\n\t\treturn\n\telse\n\t\t# show schemas\n\t\tif [ $1 == 'all' ] ; then\n\t\t\tCOMPREPLY=( $(compgen -W \"^/ $urlSchemas\" -- $cur) )\n\t\telse\n\t\t\tCOMPREPLY=( $(compgen -W \"$urlSchemas\" -- $cur) )\n\t\tfi\n\t\tcompopt -o nospace\n\t\treturn\n\tfi\n\t#echo \"nothing found\"\n\treturn 1\n}\n\n# This completion guides the command/option order along the one suggested\n# by \"svn help\", although other syntaxes are allowed.\n#\n# - there is a \"real\" parser to check for what is available and deduce what\n#   can be suggested further.\n# - the syntax should be coherent with subversion/svn/{cl.h,main.c}\n# - although it is not a good practice, mixed options and arguments\n#   is supported by the completion as it is by the svn command.\n# - the completion works in the middle of a line,\n#   but not really in the middle of an argument or option.\n# - property names are completed: see comments about issues related to handling\n#   \":\" within property names although it is a word completion separator.\n# - unknown properties are assumed to be simple file properties.\n# - --revprop and --revision options are forced to revision properties\n#   as they are mandatory in this case.\n# - argument values are suggested to some other options, eg directory names\n#   for --config-dir.\n# - values for some options can be extended with environment variables:\n#   SVN_BASH_FILE_PROPS: other properties on files/directories\n#   SVN_BASH_REV_PROPS: other properties on revisions\n#   SVN_BASH_ENCODINGS: encodings to be suggested\n#   SVN_BASH_MIME_TYPE: mime types to be suggested\n#   SVN_BASH_KEYWORDS: \"svn:keywords\" substitutions to be suggested\n#   SVN_BASH_USERNAME: usernames suggested for --username\n#   SVN_BASH_COMPL_EXT: completion extensions for file arguments, based on the\n#      current subcommand, so that for instance only modified files are\n#      suggested for 'revert', only not svn-managed files for 'add', and so on.\n#      Possible values are:\n#      - username: guess usernames from ~/.subversion/auth/...\n#      - urls: guess urls from ~/.subversion/auth/... or others\n#      - svnstatus: use 'svn status' for completion\n#      - recurse: allow recursion (expensive)\n#      - externals: recurse into externals (very expensive)\n#     Former options are reasonable, but beware that both later options\n#     may be unadvisable if used on large working copies.\n#     None of these costly completions are activated by default.\n#     Argument completion outside a working copy results in an error message.\n#     Filenames with spaces are not completed properly.\n#\n# TODO\n# - other options?\n# - obsolete options could be removed from auto-comp? (e.g. -N)\n# - obsolete commands could be removed? (e.g. resolved)\n# - completion does not work properly when editing in the middle of the line\n#   status/previous are those at the end of the line, not at the entry position\n# - url completion should select more cases where it is relevant\n# - url completion of http:// schemas could suggest sub directories?\n# - add completion for experimental 'obliterate' feature?\n_svn()\n{\n\tlocal cur cmds cmdOpts pOpts mOpts rOpts qOpts nOpts optsParam opt\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\n\t# Possible expansions, without pure-prefix abbreviations such as \"up\".\n\tcmds='add auth blame annotate praise cat changelist cl checkout co cleanup'\n\tcmds=\"$cmds commit ci copy cp delete remove rm diff export help import\"\n\tcmds=\"$cmds info list ls lock log merge mergeinfo mkdir move mv rename\"\n\tcmds=\"$cmds patch propdel pdel propedit pedit propget pget proplist\"\n\tcmds=\"$cmds plist propset pset relocate resolve resolved revert status\"\n\tcmds=\"$cmds switch unlock update upgrade\"\n\tcmds=\"$cmds x-shelf-diff x-shelf-drop x-shelf-list x-shelf-list-by-paths\"\n\tcmds=\"$cmds x-shelf-log x-shelf-save x-shelve x-shelves x-unshelve\"\n\n\t# help options have a strange command status...\n\tlocal helpOpts='--help -h'\n\t# all special options that have a command status\n\tlocal specOpts=\"--version $helpOpts\"\n\n\t# options that require a parameter\n\t# note: continued lines must end '|' continuing lines must start '|'\n\toptsParam=\"-r|--revision|--username|--password|--targets\"\n\toptsParam=\"$optsParam|-x|--extensions|-m|--message|-F|--file\"\n\toptsParam=\"$optsParam|--encoding|--diff-cmd|--diff3-cmd|--editor-cmd\"\n\toptsParam=\"$optsParam|--old|--new|--config-dir|--config-option\"\n\toptsParam=\"$optsParam|--native-eol|-l|--limit|-c|--change\"\n\toptsParam=\"$optsParam|--depth|--set-depth|--with-revprop\"\n\toptsParam=\"$optsParam|--cl|--changelist|--accept|--show-revs\"\n\toptsParam=\"$optsParam|--show-item\"\n\n\t# svn:* and other (env SVN_BASH_*_PROPS) properties\n\tlocal svnProps revProps allProps psCmds propCmds\n\n\t# svn and user configured \"file\" (or directory) properties\n\t# the \"svn:mergeinfo\" prop is not included by default because it is\n\t# managed automatically, so there should be no need to edit it by hand.\n\tsvnProps=\"svn:keywords svn:executable svn:needs-lock svn:externals\n\t          svn:ignore svn:eol-style svn:mime-type $SVN_BASH_FILE_PROPS\"\n\n\t# svn and user configured revision properties\n\trevProps=\"svn:author svn:log svn:date $SVN_BASH_REV_PROPS\"\n\n\t# all properties as an array variable\n\tallProps=( $svnProps $revProps )\n\n\t# subcommands that expect property names\n\tpsCmds='propset|pset|ps'\n\tpropCmds=\"$psCmds|propget|pget|pg|propedit|pedit|pe|propdel|pdel|pd\"\n\n\t# possible URL schemas to access a subversion server\n\tlocal urlSchemas='file:/// http:// https:// svn:// svn+ssh://'\n\n\t# Parse arguments and set various variables about what was found.\n\t#\n\t# cmd: the current command if available\n\t#    isPropCmd: whether it expects a property name argument\n\t#    isPsCmd: whether it also expects a property value argument\n\t#    isHelpCmd: whether it is about help\n\t#    nExpectArgs: how many arguments are expected by the command\n\t# help: help requested about this command (if cmd=='help')\n\t# prop: property name (if appropriate)\n\t#    isRevProp: is it a special revision property\n\t# val: property value (if appropriate, under pset)\n\t# options: all options encountered\n\t#    hasRevPropOpt: is --revprop set\n\t#    hasRevisionOpt: is --revision set\n\t#    hasRelocateOpt: is --relocate set\n\t#    hasReintegrateOpt: is --reintegrate set\n\t#    acceptOpt: the value of --accept\n\t# nargs: how many arguments were found\n\t# stat: status of parsing at the 'current' word\n\t#\n\t# prev: previous command in the loop\n\t# last: status of last parameter analyzed\n\t# i: index\n\tlocal cmd= isPropCmd= isPsCmd= isHelpCmd= nExpectArgs= isCur= i=0\n\tlocal prev= help= prop= val= isRevProp= last='none' nargs=0 stat=\n\tlocal options= hasRevPropOpt= hasRevisionOpt= hasRelocateOpt=\n\tlocal acceptOpt= URL= hasReintegrateOpt=\n\n\tfor opt in \"${COMP_WORDS[@]}\"\n\tdo\n\t    # get status of current word (from previous iteration)\n\t    [[ $isCur ]] && stat=$last\n\n\t    # are we processing the current word\n\t    isCur=\n\t    [[ $i -eq $COMP_CWORD ]] && isCur=1\n\t    let i++\n\n\t    # FIRST must be the \"svn\" command\n\t    [ $last = 'none' ] && { last='first'; continue ; }\n\n\t    # SKIP option arguments\n\t    if [[ $prev == @($optsParam) ]] ; then\n\n\t\t# record accept value\n\t\t[[ $prev = '--accept' ]] && acceptOpt=$opt\n\n\t\tprev=''\n\t\tlast='skip'\n\t\tcontinue ;\n\t    fi\n\n\t    # Argh...  This looks like a bash bug...\n\t    # Redirections are passed to the completion function\n\t    # although it is managed by the shell directly...\n\t    # It matters because we want to tell the user when no more\n\t    # completion is available, so it does not necessary\n\t    # fallback to the default case.\n\t    if [[ $prev == @(<|>|>>|[12]>|[12]>>) ]] ; then\n\t\tprev=''\n\t\tlast='skip'\n\t\tcontinue ;\n\t    fi\n\t    prev=$opt\n\n\t    # get the subCoMmanD\n\t    if [[ ! $cmd && $opt \\\n               && ( $opt != -* || $opt == @(${specOpts// /|}) ) ]]\n            then\n\t\tcmd=$opt\n\t\t[[ $cmd == @($propCmds) ]] && isPropCmd=1\n\t\t[[ $cmd == @($psCmds) ]] && isPsCmd=1\n\t\t[[ $cmd == @(${helpOpts// /|}) ]] && cmd='help'\n\t\t[[ $cmd = 'help' ]] && isHelpCmd=1\n\t        # HELP about a command asked with an option\n\t\tif [[ $isHelpCmd && $cmd && $cmd != 'help' && ! $help ]]\n\t\tthen\n\t\t    help=$cmd\n\t\t    cmd='help'\n\t\tfi\n\t\tlast='cmd'\n\t\tcontinue\n\t    fi\n\n\t    # HELP about a command\n\t    if [[ $isHelpCmd && ! $help && $opt && $opt != -* ]]\n\t    then\n\t\thelp=$opt\n\t\tlast='help'\n\t\tcontinue\n\t    fi\n\n\t    # PROPerty name\n\t    if [[ $isPropCmd && ! $prop && $opt && $opt != -* ]]\n\t    then\n\t\tprop=$opt\n\t\t[[ $prop == @(${revProps// /|}) ]] && isRevProp=1\n\t\tlast='prop'\n\t\tcontinue\n\t    fi\n\n\t    # property VALue\n\t    if [[ $isPsCmd && $prop && ! $val && $opt != -* ]] ;\n\t    then\n\t\tval=$opt\n\t\tlast='val'\n\t\tcontinue\n\t    fi\n\n\t    if [[ $last != 'onlyarg' ]]\n\t    then\n\t      # more OPTions\n\t      case $opt in\n\t\t  -r|--revision|--revision=*)\n\t\t      hasRevisionOpt=1\n\t\t      ;;\n\t\t  --revprop)\n\t\t      hasRevPropOpt=1\n\t\t      # restrict to revision properties!\n\t\t      allProps=( $revProps )\n\t\t      # on revprops, only one URL is expected\n\t\t      nExpectArgs=1\n\t\t      ;;\n\t\t  -h|--help)\n\t\t      isHelpCmd=1\n\t\t      ;;\n\t\t  -F|--file)\n\t\t      val='-F'\n\t\t      ;;\n\t\t  --relocate)\n\t\t      hasRelocateOpt=1\n\t\t      ;;\n\t\t  --reintegrate)\n\t\t      hasReintegrateOpt=1\n\t\t      ;;\n\t      esac\n\n\t      # no more options, only arguments, whatever they look like.\n\t      if [[ $opt = '--' && ! $isCur ]] ; then\n\t\t  last='onlyarg'\n\t\t  continue\n\t      fi\n\n\t      # options are recorded...\n\t      if [[ $opt == -* ]] ; then\n\t\t  # but not the current one!\n\t\t  [[ ! $isCur ]] && options=\"$options $opt \"\n\t\t  last='opt'\n\t\t  continue\n\t      fi\n\t    else\n\t\t# onlyarg\n\t\tlet nargs++\n\t\tcontinue\n\t    fi\n\n\t    # then we have an argument\n\t    if [[ $cmd = 'merge' && ! $URL ]] ; then\n              # first argument is the source URL for the merge\n\t      URL=$opt\n\t    fi\n\n\t    last='arg'\n\t    let nargs++\n\tdone\n\t# end opt option processing...\n\t[[ $stat ]] || stat=$last\n\n\t# suggest all subcommands, including special help\n\tif [[ ! $cmd || $stat = 'cmd' ]]\n\tthen\n\t    COMPREPLY=( $( compgen -W \"$cmds $specOpts\" -- $cur ) )\n\t    return 0\n\tfi\n\n\t# suggest all subcommands\n\tif [[ $stat = 'help' || ( $isHelpCmd && ! $help ) ]]\n\tthen\n\t    COMPREPLY=( $( compgen -W \"$cmds\" -- $cur ) )\n\t    return 0\n\tfi\n\n\t# URL completion\n\tif [[ $cmd == @(co|checkout|ls|list) && $stat = 'arg' && \\\n\t\t\t$SVN_BASH_COMPL_EXT == *urls* ]]\n\tthen\n\t\tif [[ $cmd == @(ls|list) ]] ; then\n\t\t\t_svn_complete_target 'all' && return\n\t\telse\n\t\t\t_svn_complete_target 'remote_only' && return\n\t\tfi\n\tfi\n\n\tif [[ $cmd = 'merge' || $cmd = 'mergeinfo' ]]\n\tthen\n\t  local here=$(_svn_info URL)\n\t  # suggest a possible URL for merging\n\t  if [[ ! $URL && $stat = 'arg' ]] ; then\n\t    # we assume a 'standard' repos with branches and trunk\n\t    if [[ \"$here\" == */branches/* ]] ; then\n\t      # we guess that it is a merge from the trunk\n\t      COMPREPLY=( $(compgen -W ${here/\\/branches\\/*/\\/trunk} -- $cur ) )\n\t      return 0\n\t    elif [[ \"$here\" == */trunk* ]] ; then\n\t      # we guess that it is a merge from a branch\n\t      COMPREPLY=( $(compgen -W ${here/\\/trunk*/\\/branches\\/} -- $cur ) )\n\t      compopt -o nospace\n\t      return 0\n\t    else\n\t      # no se, let us suggest the repository root...\n\t      COMPREPLY=( $(compgen -W $(_svn_info Root)/ -- $cur ) )\n\t      compopt -o nospace\n\t      return 0\n\t    fi\n\t  # this part is broken with bash 4 URL contains https only\n\t  elif [[ $URL == */branches/* && $here == */trunk* && \\\n\t        ! $hasReintegrateOpt && $cur = '' && $stat = 'arg' ]] ; then\n\t    # force --reintegrate only if the current word is empty\n\t    COMPREPLY=( $(compgen -W '--reintegrate' -- $cur ) )\n\t    return 0\n\t  # autocomplete for svn merge ^/bla\n\t  else\n\t    _svn_complete_target 'all' && return\n\t  fi\n\tfi\n\n\t# help about option arguments\n\tif [[ $stat = 'skip' ]]\n\tthen\n\t    local previous=${COMP_WORDS[COMP_CWORD-1]}\n\t    local values= dirs= beep= exes=\n\n\t    [[ $previous = '--config-dir' ]] && dirs=1\n\n\t    # external editor, diff, diff3...\n\t    [[ $previous = --*-cmd ]] && exes=1\n\n\t    [[ $previous = '--native-eol' ]] && values='LF CR CRLF'\n\n\t    # just to suggest that a number is expected. hummm.\n\t    [[ $previous = '--limit' ]] && values='0 1 2 3 4 5 6 7 8 9'\n\n            # some special partial help about --revision option.\n\t    [[ $previous = '--revision' || $previous = '-r' ]] && \\\n\t\tvalues='HEAD BASE PREV COMMITTED 0 {'\n\n\t    [[ $previous = '--encoding' ]] && \\\n\t\tvalues=\"latin1 utf8 $SVN_BASH_ENCODINGS\"\n\n\t    [[ $previous = '--extensions' || $previous = '-x' ]] && \\\n\t\tvalues=\"--unified --ignore-space-change \\\n\t\t   --ignore-all-space --ignore-eol-style --show-c-functions\"\n\n\t    [[ $previous = '--depth' ]] && \\\n\t\tvalues='empty files immediates infinity'\n\n\t    [[ $previous = '--set-depth' ]] && \\\n\t\tvalues='empty exclude files immediates infinity'\n\n\t    [[ $previous = '--accept' ]] && \\\n\t    {\n\t        # the list is different for 'resolve'\n                if [[ $cmd = 'resolve' ]] ; then\n\t\t    # from svn help resolve\n\t\t    values='base working mine-full theirs-full'\n\t\telse # checkout merge switch update\n\t\t    values=\"postpone base mine-full theirs-full edit launch \\\n\t\t\tmine-conflict theirs-conflict\"\n\t\tfi\n\t    }\n\n\t    [[ $previous = '--show-revs' ]] && values='merged eligible'\n\n\t    [[ $previous = '--show-item' ]] && values=\"kind url relative-url \\\n\t      repos-root-url repos-uuid revision last-changed-revision \\\n\t      last-changed-date last-changed-author wc-root\"\n\n\t    if [[ $previous = '--username' ]] ; then\n\t      values=\"$SVN_BASH_USERNAME\"\n\t      if [[ $SVN_BASH_COMPL_EXT == *username* ]] ; then\n\t\tlocal file=\n\t\t# digest? others?\n\t\tfor file in ~/.subversion/auth/svn.simple/* ; do\n\t\t  if [ -r $file ] ; then\n\t\t    values=\"$values $(_svn_read_hashfile username < $file)\"\n\t\t  fi\n\t\tdone\n\t      fi\n\t      [[ ! \"$values\" ]] && beep=1\n\t    fi\n\n\t    # could look at ~/.subversion/ ?\n\t    # hmmm... this option should not exist\n\t    [[ $previous = '--password' ]] && beep=1\n\n\t    # TODO: provide help about other options such as:\n\t    # --old --new --with-revprop\n\n\t    # if the previous option required a parameter, do something\n\t    # or fallback on ordinary filename expansion\n\t    [[ $values ]] && COMPREPLY=( $( compgen -W \"$values\" -- $cur ) )\n\t    [[ $dirs ]] && COMPREPLY=( $( compgen -o dirnames -- $cur ) )\n\t    [[ $exes ]] && COMPREPLY=( $( compgen -c -- $cur ) )\n\t    [[ $beep ]] &&\n\t    {\n\t\t# 'no known completion'. hummm.\n\t\techo -en \"\\a\"\n\t\tCOMPREPLY=( '' )\n\t    }\n\t    return 0\n\tfi\n\n\t# provide allowed property names after property commands\n\tif [[ $isPropCmd && ( ! $prop || $stat = 'prop' ) && $cur != -* ]]\n\tthen\n\t    #\n\t    # Ok, this part is pretty ugly.\n\t    #\n\t    # The issue is that \":\" is a completion word separator,\n\t    # which is a good idea for file:// urls but not within\n\t    # property names...\n\t    #\n\t    # The first idea was to remove locally \":\" from COMP_WORDBREAKS\n\t    # and then put it back in all cases but in property name\n\t    # completion.  It does not always work.  There is a strange bug\n\t    # where one may get \"svn:svn:xxx\" in some unclear cases.\n\t    #\n\t    # Thus the handling is reprogrammed here...\n\t    # The code assumes that property names look like *:*,\n\t    # but it also works reasonably well with simple names.\n\t    #\n\t    # This hack is broken in bash4... not sure what to do about it,\n            # especially while keeping the bash3 compatibility:-(\n\t    local choices=\n\n\t    if [[ $cur == *:* ]]\n\t    then\n\t\t# only suggest/show possible suffixes\n\t\tlocal prefix=${cur%:*} suffix=${cur#*:} c=\n\t\tfor c in ${allProps[@]} ; do\n\t\t    [[ $c == $prefix:* ]] && choices=\"$choices ${c#*:}\"\n\t\tdone\n\t\t# everything will be appended to the prefix because ':' is\n\t\t# a separator, so cur is restricted to the suffix part.\n\t\tcur=$suffix\n\t    else\n\t\t# only one choice is fine\n\t\tCOMPREPLY=( $( compgen -W \"${allProps[*]}\" -- $cur ) )\n\t\t[ ${#COMPREPLY[@]} -eq 1 ] && return 0\n\n\t\t# no ':' so only suggest prefixes?\n\t\tlocal seen= n=0 last= c=\n\t\tfor c in ${allProps[@]%:*} ; do\n\t\t    # do not put the same prefix twice...\n\t\t    if [[ $c == $cur* && ( ! $seen || $c != @($seen) ) ]]\n\t\t    then\n\t\t\tlet n++\n\t\t\tlast=$c\n\t\t\tchoices=\"$choices $c:\"\n\t\t\tif [[ $seen ]]\n\t\t\tthen\n\t\t\t    seen=\"$seen|$c*\"\n\t\t\telse\n\t\t\t    seen=\"$c*\"\n\t\t\tfi\n\t\t    fi\n\t\tdone\n\n\t\t# supply two choices to force a partial completion and a beep\n\t\t[[ $n -eq 1 ]] && choices=\"$last:1 $last:2\"\n\t    fi\n\n\t    COMPREPLY=( $( compgen -W \"$choices\" -- $cur ) )\n\t    return 0\n\tfi\n\n\t# force mandatory --revprop option on revision properties\n\tif [[ $isRevProp && ! $hasRevPropOpt ]]\n\tthen\n\t    COMPREPLY=( $( compgen -W '--revprop' -- $cur ) )\n\t    return 0\n\tfi\n\n\t# force mandatory --revision option on revision properties\n\tif [[ $isRevProp && $hasRevPropOpt && ! $hasRevisionOpt ]]\n\tthen\n\t    COMPREPLY=( $( compgen -W '--revision' -- $cur ) )\n\t    return 0\n\tfi\n\n\t# possible completion when setting property values\n\tif [[ $isPsCmd && $prop && ( ! $val || $stat = 'val' ) ]]\n\tthen\n\t    # ' is a reminder for an arbitrary value\n\t    local values=\"\\' --file\"\n\t    case $prop in\n\t\tsvn:keywords)\n\t\t    # just a subset?\n\t\t    values=\"Id Rev URL Date Author Header \\' $SVN_BASH_KEYWORDS\"\n\t\t    ;;\n\t\tsvn:executable|svn:needs-lock)\n\t\t    # hmmm... canonical value * is special to the shell.\n\t\t    values='\\\\*'\n\t\t    ;;\n\t\tsvn:eol-style)\n\t\t    values='native LF CR CRLF'\n\t\t    ;;\n\t\tsvn:mime-type)\n\t\t    # could read /etc/mime.types if available. overkill.\n\t\t    values=\"text/ text/plain text/html text/xml text/rtf\n                       image/ image/png image/gif image/jpeg image/tiff\n                       audio/ audio/midi audio/mpeg\n                       video/ video/mpeg video/mp4\n                       application/ application/octet-stream\n                       $SVN_BASH_MIME_TYPE\"\n\t\t    ;;\n\t    esac\n\n\t    COMPREPLY=( $( compgen -W \"$values\" -- $cur ) )\n\t    # special case for --file... return even if within an option\n\t    [[ ${COMPREPLY} ]] && return 0\n\tfi\n\n\t# maximum number of additional arguments expected in various forms\n\tcase $cmd in\n\t    merge)\n\t\tnExpectArgs=3\n\t\t;;\n\t    mergeinfo)\n\t\tnExpectArgs=1\n\t\t;;\n\t    copy|cp|move|mv|rename|ren|export|import)\n\t\tnExpectArgs=2\n\t\t;;\n\t    switch|sw)\n\t\t[[ ! $hasRelocateOpt ]] && nExpectArgs=2\n\t\t;;\n\t    help|h)\n\t\tnExpectArgs=0\n\t\t;;\n\t    --version)\n\t\tnExpectArgs=0\n\t\t;;\n\tesac\n\n\t# the maximum number of arguments is reached for a command\n\tif [[ $nExpectArgs && $nargs -gt $nExpectArgs ]]\n\tthen\n\t    # some way to tell 'no completion at all'... is there a better one?\n\t    # Do not say 'file completion' here.\n\t    echo -en \"\\a\"\n\t    COMPREPLY=( '' )\n\t    return 0\n\tfi\n\n\t# if not typing an option,\n\t# then fallback on filename expansion...\n\tif [[ $cur != -* || $stat = 'onlyarg' ]]  ; then\n\n\t    # do we allow possible expensive completion here?\n\t    if [[ $SVN_BASH_COMPL_EXT == *svnstatus* ]] ; then\n\n\t\t# build status command and options\n\t\t# \"--quiet\" removes 'unknown' files\n\t\tlocal status='svn status --non-interactive'\n\n\t\t[[ $SVN_BASH_COMPL_EXT == *recurse* ]] || \\\n\t\t    status=\"$status --non-recursive\"\n\n\t\t# I'm not sure that it can work with externals in call cases\n\t\t# the output contains translatable sentences (even with quiet)\n\t\t[[ $SVN_BASH_COMPL_EXT == *externals* ]] || \\\n\t\t    status=\"$status --ignore-externals\"\n\n\t\tlocal cs= files=\n\t\t# subtlety: must not set $cur* if $cur is empty in some cases\n\t\t[[ $cur ]] && cs=$cur*\n\n\t\t# 'files' is set according to the current subcommand\n\t\tcase $cmd in\n\t\t    st*) # status completion must include all files\n\t\t\tfiles=$cur*\n\t\t\t;;\n\t\t    ci|commit|revert|di*) # anything edited\n\t\t\tfiles=$($status $cs| _svn_grcut '@([MADR!]*| M*|_M*)')\n\t\t\t;;\n\t\t    add) # unknown files\n\t\t\tfiles=$($status $cs| _svn_grcut '\\?*')\n\t\t\t;;\n\t\t    unlock) # unlock locked files\n\t\t\tfiles=$($status $cs| _svn_grcut '@(??L*|?????[KOTB]*)')\n\t\t\t;;\n\t\t    resolve*) # files in conflict\n\t\t\tfiles=$($status $cs| _svn_grcut '@(?C*|C*)')\n\t\t\t;;\n\t\t    praise|blame|ann*) # any svn file but added\n\t\t\tfiles=$( _svn_lls all $cur* )\n\t\t\t;;\n\t\t    p*) # prop commands\n\t\t\tif [[ $cmd == @($propCmds) && \\\n\t\t\t      $prop == @(svn:ignore|svn:externals) ]] ; then\n\t\t\t    # directory specific props\n\t\t\t    files=$( _svn_lls dir . $cur* )\n\t\t\telse\n\t\t\t    # ??? added directories appear twice: foo foo/\n\t\t\t    files=\"$( _svn_lls all $cur* )\n                                   $($status $cs | _svn_grcut 'A*' )\"\n\t\t\tfi\n\t\t\t;;\n\t\t    info) # information on any file\n\t\t\tfiles=\"$( _svn_lls all $cur* )\n                               $($status $cs | _svn_grcut 'A*' )\"\n\t\t\t;;\n\t\t    remove|rm|del*|move|mv|rename) # changing existing files\n\t\t\tfiles=$( _svn_lls all $cur* )\n\t\t\t;;\n\t\t    mkdir) # completion in mkdir can only be for subdirs?\n\t\t\tfiles=$( _svn_lls dir $cur* )\n\t\t\t;;\n\t\t    log|lock|up*|cl*|switch) # misc, all but added files\n\t\t\tfiles=$( _svn_lls all $cur* )\n\t\t\t;;\n\t\t    merge) # may do a better job? URL/WCPATH\n\t\t\tfiles=$( _svn_lls all $cur* )\n\t\t\t;;\n\t\t    ls|list) # better job? what about URLs?\n\t\t\tfiles=$( _svn_lls all $cur* )\n\t\t\t;;\n\t\t    *) # other commands: changelist export import cat mergeinfo\n\t\t\tlocal fallback=1\n\t\t\t;;\n\t\tesac\n\n\t\t# when not recursive, some relevant files may exist\n\t\t# within subdirectories, so they are added here.\n\t\t# should it be restricted to svn-managed subdirs? no??\n\t\tif [[ $SVN_BASH_COMPL_EXT != *recurse* ]] ; then\n\t\t    files=\"$files $( _svn_lls dir $cur* )\"\n\t\tfi\n\n\t\t# set completion depending on computed 'files'\n\t\tif [[ $files ]] ; then\n\t\t    COMPREPLY=( $( compgen -W \"$files\" -- $cur ) )\n\t\t    # if empty, set to nope?\n\t\t    [[ \"${COMPREPLY[*]}\" ]] || COMPREPLY=( '' )\n\t\telif [[ ! $fallback ]] ; then\n\t\t    # this suggests no completion...\n\t\t    echo -en \"\\a\"\n\t\t    COMPREPLY=( '' )\n\t\tfi\n\t    fi\n\t    # else fallback to ordinary filename completion...\n\t    return 0\n\tfi\n\n\t# otherwise build possible options for the command\n\tpOpts=\"--username --password --no-auth-cache --non-interactive \\\n\t       --password-from-stdin \\\n\t       --trust-server-cert-failures \\\n\t       --force-interactive\"\n\tmOpts=\"-m --message -F --file --encoding --force-log --with-revprop \\\n               --editor-cmd\"\n\trOpts=\"-r --revision\"\n\tqOpts=\"-q --quiet\"\n\tnOpts=\"-N --non-recursive --depth\"\n\tgOpts=\"-g --use-merge-history\"\n\tcOpts=\"--cl --changelist\"\n\n\tcmdOpts=\n\tcase $cmd in\n\t--version)\n\t\tcmdOpts=\"$qOpts\"\n\t\t;;\n\tadd)\n\t\tcmdOpts=\"--auto-props --no-auto-props --force --targets \\\n\t\t         --no-ignore --parents $nOpts $qOpts $pOpts\"\n\t\t;;\n\tauth)\n\t\tcmdOpts=\"--remove --show-passwords $pOpts\"\n\t\t;;\n\tblame|annotate|ann|praise)\n\t\tcmdOpts=\"$rOpts $pOpts -v --verbose --incremental --xml \\\n\t\t         -x --extensions --force $gOpts\"\n\t\t;;\n\tcat)\n\t\tcmdOpts=\"$rOpts $pOpts --ignore-keywords\"\n\t\t;;\n\tchangelist|cl)\n\t\tcmdOpts=\"--targets $pOpts $qOpts $cOpts \\\n                         -R --recursive --depth --remove\"\n\t\t;;\n\tcheckout|co)\n\t\tcmdOpts=\"$rOpts $qOpts $nOpts $pOpts --ignore-externals \\\n                         --force --store-pristine\"\n\t\t;;\n\tcleanup)\n\t\tcmdOpts=\"$pOpts --include-externals -q --quiet\\\n\t\t\t--remove-ignored --remove-unversioned --vacuum-pristines\"\n\t\t;;\n\tcommit|ci)\n\t\tcmdOpts=\"$mOpts $qOpts $nOpts --targets $pOpts \\\n\t\t         --no-unlock $cOpts --keep-changelists \\\n\t\t         --include-externals\"\n\t\t;;\n\tcopy|cp)\n\t\tcmdOpts=\"$mOpts $rOpts $qOpts $pOpts --parents \\\n\t\t         --ignore-externals --pin-externals\"\n\t\t;;\n\tdelete|del|remove|rm)\n\t\tcmdOpts=\"--force $mOpts $qOpts --targets $pOpts \\\n                         --keep-local\"\n\t\t;;\n\tdiff|di)\n\t\tcmdOpts=\"$rOpts -x --extensions --diff-cmd --no-diff-deleted \\\n\t\t         $nOpts $pOpts --force --old --new --notice-ancestry \\\n\t\t         -c --change --summarize $cOpts --xml --git \\\n\t\t         --internal-diff --show-copies-as-adds \\\n\t\t         --ignore-properties --properties-only --no-diff-added \\\n\t\t         --patch-compatible\"\n\t\t;;\n\texport)\n\t\tcmdOpts=\"$rOpts $qOpts $pOpts $nOpts --force --native-eol \\\n                         --ignore-externals --ignore-keywords\"\n\t\t;;\n\thelp|h|\\?)\n\t\tcmdOpts=\n\t\t;;\n\timport)\n\t\tcmdOpts=\"--auto-props --no-auto-props $mOpts $qOpts $nOpts \\\n\t\t         --no-ignore $pOpts --force\"\n\t\t;;\n\tinfo)\n\t\tcmdOpts=\"$pOpts $rOpts --targets -R --recursive --depth \\\n                         --include-externals --incremental --xml \\\n                         --show-item --no-newline $cOpts\"\n\t\t;;\n\tlist|ls)\n\t\tcmdOpts=\"$rOpts -v --verbose -R --recursive $pOpts \\\n\t\t         --incremental --search --xml --depth \\\n\t\t         --include-externals\"\n\t\t;;\n\tlock)\n\t\tcmdOpts=\"-m --message -F --file --encoding --force-log \\\n                         $qOpts --targets --force $pOpts\"\n\t\t;;\n\tlog)\n\t\tcmdOpts=\"$rOpts -v --verbose --targets $pOpts --stop-on-copy \\\n\t\t         --incremental --xml $qOpts -l --limit -c --change \\\n                         $gOpts --with-all-revprops --with-revprop --depth \\\n\t\t         --diff --diff-cmd -x --extensions --internal-diff \\\n\t\t         --with-no-revprops --search --search-and\"\n\t\t;;\n\tmerge)\n\t\tcmdOpts=\"$rOpts $nOpts $qOpts --force --dry-run --diff3-cmd \\\n\t\t         $pOpts --ignore-ancestry -c --change -x --extensions \\\n                         --record-only --accept \\\n\t\t         --allow-mixed-revisions -v --verbose\"\n\t\t;;\n\tmergeinfo)\n\t        cmdOpts=\"$rOpts $pOpts --depth --show-revs -R --recursive \\\n\t\t         $qOpts -v --verbose --incremental --log\"\n\t\t;;\n\tmkdir)\n\t\tcmdOpts=\"$mOpts $qOpts $pOpts --parents\"\n\t\t;;\n\tmove|mv|rename|ren)\n\t\tcmdOpts=\"$mOpts $qOpts --force $pOpts \\\n                         --parents --allow-mixed-revisions\"\n\t\t;;\n\tpatch)\n\t\tcmdOpts=\"$qOpts $pOpts --dry-run --ignore-whitespace \\\n\t\t\t--reverse-diff --strip\"\n\t\t;;\n\tpropdel|pdel|pd)\n\t\tcmdOpts=\"$qOpts -R --recursive $rOpts $pOpts $cOpts \\\n                         --depth\"\n\t\t[[ $isRevProp || ! $prop ]] && cmdOpts=\"$cmdOpts --revprop\"\n\t\t;;\n\tpropedit|pedit|pe)\n\t\tcmdOpts=\"$pOpts $mOpts --force\"\n\t\t[[ $isRevProp || ! $prop ]] && \\\n\t\t    cmdOpts=\"$cmdOpts --revprop $rOpts\"\n\t\t;;\n\tpropget|pget|pg)\n\t        cmdOpts=\"-v --verbose -R --recursive $rOpts --no-newline \\\n\t\t         $pOpts $cOpts --depth --xml --show-inherited-props\"\n\t\t[[ $isRevProp || ! $prop ]] && cmdOpts=\"$cmdOpts --revprop\"\n\t\t;;\n\tproplist|plist|pl)\n\t\tcmdOpts=\"-v --verbose -R --recursive $rOpts --revprop $qOpts \\\n\t\t         $pOpts $cOpts --depth --xml --show-inherited-props\"\n\t\t;;\n\tpropset|pset|ps)\n\t\tcmdOpts=\"$qOpts --targets -R --recursive \\\n\t\t         --encoding $pOpts --force $cOpts --depth\"\n\t\t[[ $isRevProp || ! $prop ]] && \\\n\t\t    cmdOpts=\"$cmdOpts --revprop $rOpts\"\n\t\t[[ $val ]] || cmdOpts=\"$cmdOpts -F --file\"\n\t\t;;\n        relocate)\n\t\tcmdOpts=\"--ignore-externals $pOpts\"\n\t\t;;\n        resolve)\n                cmdOpts=\"--targets -R --recursive $qOpts $pOpts --accept \\\n                         --depth\"\n                ;;\n\tresolved)\n\t\tcmdOpts=\"--targets -R --recursive $qOpts $pOpts --depth\"\n\t\t;;\n\trevert)\n\t\tcmdOpts=\"--targets -R --recursive $qOpts $cOpts \\\n                         --depth $pOpts\"\n\t\t;;\n\tstatus|stat|st)\n\t\tcmdOpts=\"-u --show-updates -v --verbose $nOpts $qOpts $pOpts \\\n\t\t         --no-ignore --ignore-externals --incremental --xml \\\n                         $rOpts $cOpts\"\n\t\t;;\n\tswitch|sw)\n\t\tcmdOpts=\"$rOpts $nOpts $qOpts $pOpts --diff3-cmd \\\n                         --force --accept --ignore-externals --set-depth \\\n\t\t         --ignore-ancestry\"\n\t\t;;\n\tunlock)\n\t\tcmdOpts=\"$qOpts --targets --force $pOpts\"\n\t\t;;\n\tupdate|up)\n\t\tcmdOpts=\"$rOpts $nOpts $qOpts $pOpts --diff3-cmd \\\n                         --ignore-externals --force --accept $cOpts \\\n                         --parents --editor-cmd --set-depth \\\n\t\t         --adds-as-modification\"\n\t\t;;\n\tupgrade)\n\t\tcmdOpts=\"$qOpts $pOpts\"\n\t\t;;\n\tx-shelf-list-by-paths)\n\t\tcmdOpts=\"$pOpts\"\n\t\t;;\n\tx-shelf-diff)\n\t\tcmdOpts=\"$pOpts --summarize\"\n\t\t;;\n\tx-shelf-drop)\n\t\tcmdOpts=\"$pOpts\"\n\t\t;;\n\tx-shelf-list|x-shelves)\n\t\tcmdOpts=\"$qOpts $pOpts\"\n\t\t;;\n\tx-shelf-log)\n\t\tcmdOpts=\"$qOpts $pOpts\"\n\t\t;;\n\tx-shelf-save)\n\t\tcmdOpts=\"--dry-run \\\n                         --depth --targets $cOpts \\\n                         $mOpts \\\n                         $qOpts $pOpts\"\n\t\t;;\n\tx-shelve)\n\t\tcmdOpts=\"--keep-local --dry-run \\\n                         --depth --targets $cOpts \\\n                         $mOpts \\\n                         $qOpts $pOpts\"\n\t\t;;\n\tx-unshelve)\n\t\tcmdOpts=\"--drop --dry-run \\\n                         $qOpts $pOpts\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\t# add options that are nearly always available\n\t[[ \"$cmd\" != \"--version\" ]] && cmdOpts=\"$cmdOpts $helpOpts\"\n\tcmdOpts=\"$cmdOpts --config-dir --config-option\"\n\n        # --accept (edit|launch) incompatible with --non-interactive\n\tif [[ $acceptOpt == @(edit|launch) ]] ;\n\tthen\n\t    cmdOpts=${cmdOpts/ --non-interactive / }\n\tfi\n\n\t# take out options already given\n\tfor opt in $options\n\tdo\n\t\tlocal optBase\n\n\t\t# remove leading dashes and arguments\n\t\tcase $opt in\n\t\t--*)    optBase=${opt/=*/} ;;\n\t\t-*)     optBase=${opt:0:2} ;;\n\t\tesac\n\n\t\tcmdOpts=\" $cmdOpts \"\n\t\tcmdOpts=${cmdOpts/ ${optBase} / }\n\n\t\t# take out alternatives and mutually exclusives\n\t\tcase $optBase in\n\t\t-v)              cmdOpts=${cmdOpts/ --verbose / } ;;\n\t\t--verbose)       cmdOpts=${cmdOpts/ -v / } ;;\n\t\t-N)              cmdOpts=${cmdOpts/ --non-recursive / } ;;\n\t\t--non-recursive) cmdOpts=${cmdOpts/ -N / } ;;\n\t\t-R)              cmdOpts=${cmdOpts/ --recursive / } ;;\n\t\t--recursive)     cmdOpts=${cmdOpts/ -R / } ;;\n\t\t-x)              cmdOpts=${cmdOpts/ --extensions / } ;;\n\t\t--extensions)    cmdOpts=${cmdOpts/ -x / } ;;\n\t\t-q)              cmdOpts=${cmdOpts/ --quiet / } ;;\n\t\t--quiet)         cmdOpts=${cmdOpts/ -q / } ;;\n\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\t-l)              cmdOpts=${cmdOpts/ --limit / } ;;\n\t\t--limit)         cmdOpts=${cmdOpts/ -l / } ;;\n\t\t-r)              cmdOpts=${cmdOpts/ --revision / } ;;\n\t\t--revision)      cmdOpts=${cmdOpts/ -r / } ;;\n\t\t-c)              cmdOpts=${cmdOpts/ --change / } ;;\n\t\t--change)        cmdOpts=${cmdOpts/ -c / } ;;\n\t\t--auto-props)    cmdOpts=${cmdOpts/ --no-auto-props / } ;;\n\t\t--no-auto-props) cmdOpts=${cmdOpts/ --auto-props / } ;;\n\t\t-g)              cmdOpts=${cmdOpts/ --use-merge-history / } ;;\n\t\t--use-merge-history)\n                                 cmdOpts=${cmdOpts/ -g / } ;;\n\t\t-m|--message|-F|--file)\n\t\t\tcmdOpts=${cmdOpts/ --message / }\n\t\t\tcmdOpts=${cmdOpts/ -m / }\n\t\t\tcmdOpts=${cmdOpts/ --file / }\n\t\t\tcmdOpts=${cmdOpts/ -F / }\n\t\t\t;;\n\t\tesac\n\n\t\t# remove help options within help subcommand\n\t\tif [ $isHelpCmd ] ; then\n\t\t    cmdOpts=${cmdOpts/ -h / }\n\t\t    cmdOpts=${cmdOpts/ --help / }\n\t\tfi\n\tdone\n\n\t# provide help about available options\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\treturn 0\n}\ncomplete -F _svn -o bashdefault -o default -X '@(*/.svn|*/.svn/|.svn|.svn/)' svn\n\n_svnadmin ()\n{\n\tlocal cur cmds cmdOpts optsParam opt helpCmds optBase i\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\n\t# Possible expansions, without pure-prefix abbreviations such as \"h\".\n\tcmds='build-repcache crashtest create delrevprop deltify dump dump-revprops freeze \\\n\t      help hotcopy info list-dblogs list-unused-dblogs \\\n\t      load load-revprops lock lslocks lstxns pack recover rev-size rmlocks \\\n\t      rmtxns setlog setrevprop setuuid unlock upgrade verify --version'\n\n\tif [[ $COMP_CWORD -eq 1 ]] ; then\n\t\tCOMPREPLY=( $( compgen -W \"$cmds\" -- $cur ) )\n\t\treturn 0\n\tfi\n\n\t# options that require a parameter\n\t# note: continued lines must end '|' continuing lines must start '|'\n\toptsParam=\"-r|--revision|--parent-dir|--fs-type|-M|--memory-cache-size\"\n\toptsParam=\"$optsParam|-F|--file|--exclude|--include\"\n\n\t# if not typing an option, or if the previous option required a\n\t# parameter, then fallback on ordinary filename expansion\n\thelpCmds='help|--help|h|\\?'\n\tif [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && \\\n\t   [[ \"$cur\" != -* ]] || \\\n\t   [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then\n\t\treturn 0\n\tfi\n\n\tcmdOpts=\n\tcase ${COMP_WORDS[1]} in\n\tbuild-repcache)\n\t\tcmdOpts=\"-r --revision -q --quiet -M --memory-cache-size\"\n\t\t;;\n\tcreate)\n\t\tcmdOpts=\"--bdb-txn-nosync --bdb-log-keep --config-dir \\\n\t\t         --fs-type --compatible-version\"\n\t\t;;\n\tdeltify)\n\t\tcmdOpts=\"-r --revision -q --quiet -M --memory-cache-size\"\n\t\t;;\n\tdump)\n\t\tcmdOpts=\"-r --revision --incremental -q --quiet --deltas \\\n\t\t         -M --memory-cache-size -F --file \\\n\t\t         --exclude --include --pattern\"\n\t\t;;\n        dump-revprops)\n\t\tcmdOpts=\"-r --revision -q --quiet -F --file\"\n\t\t;;\n\tfreeze)\n\t\tcmdOpts=\"-F --file\"\n\t\t;;\n\thelp|h|\\?)\n\t\tcmdOpts=\"$cmds\"\n\t\t;;\n\thotcopy)\n\t\tcmdOpts=\"--clean-logs --incremental -q --quiet\"\n\t\t;;\n\tload)\n\t\tcmdOpts=\"--ignore-uuid --force-uuid --parent-dir -q --quiet \\\n\t\t         --use-pre-commit-hook --use-post-commit-hook \\\n\t\t         --bypass-prop-validation -M --memory-cache-size \\\n\t\t         --no-flush-to-disk --normalize-props -F --file \\\n\t\t         --ignore-dates -r --revision\"\n\t\t;;\n        load-revprops)\n\t\tcmdOpts=\"-r --revision -q --quiet -F --file \\\n\t\t         --bypass-prop-validation --normalize-props \\\n\t\t         --force-uuid --no-flush-to-disk\"\n\t\t;;\n\tlstxns)\n        \tcmdOpts=\"-r --revision\"\n\t\t;;\n\tlock|unlock)\n\t\tcmdOpts=\"--bypass-hooks -q --quiet\"\n\t\t;;\n\tpack)\n\t\tcmdOpts=\"-M --memory-cache-size -q --quiet\"\n\t\t;;\n\trecover)\n\t\tcmdOpts=\"--wait\"\n\t\t;;\n\trev-size)\n\t\tcmdOpts=\"-r --revision -M --memory-cache-size -q --quiet\"\n\t\t;;\n\trmlocks)\n\t\tcmdOpts=\"-q --quiet\"\n\t\t;;\n\trmtxns)\n\t\tcmdOpts=\"-q --quiet\"\n\t\t;;\n\tsetlog)\n\t\tcmdOpts=\"-r --revision --bypass-hooks\"\n\t\t;;\n\tsetrevprop|delrevprop)\n\t\tcmdOpts=\"-r --revision -t --transaction \\\n\t\t         --use-pre-revprop-change-hook \\\n\t\t         --use-post-revprop-change-hook\"\n\t\t;;\n\tverify)\n\t\tcmdOpts=\"-r --revision -t --transaction -q --quiet \\\n\t\t         --check-normalization --keep-going \\\n\t\t         -M --memory-cache-size --metadata-only\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcmdOpts=\"$cmdOpts --help -h\"\n\n\t# take out options already given\n\tfor (( i=2; i<=$COMP_CWORD-1; ++i )) ; do\n\t\topt=${COMP_WORDS[$i]}\n\n\t\tcase $opt in\n\t\t--*)    optBase=${opt/=*/} ;;\n\t\t-*)     optBase=${opt:0:2} ;;\n\t\tesac\n\n\t\tcmdOpts=\" $cmdOpts \"\n\t\tcmdOpts=${cmdOpts/ ${optBase} / }\n\n\t\t# take out alternatives\n\t\tcase $optBase in\n\t\t-q)              cmdOpts=${cmdOpts/ --quiet / } ;;\n\t\t--quiet)         cmdOpts=${cmdOpts/ -q / } ;;\n\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\t-r)              cmdOpts=${cmdOpts/ --revision / } ;;\n\t\t--revision)      cmdOpts=${cmdOpts/ -r / } ;;\n\t\t-t)              cmdOpts=${cmdOpts/ --transaction / } ;;\n\t\t--transaction)   cmdOpts=${cmdOpts/ -t / } ;;\n\t\t-F)              cmdOpts=${cmdOpts/ --file / } ;;\n\t\t--file)          cmdOpts=${cmdOpts/ -F / } ;;\n\t\t-M)              cmdOpts=${cmdOpts/ --memory-cache-size / } ;;\n\t\t--memory-cache-size) cmdOpts=${cmdOpts/ --M / } ;;\n\t\tesac\n\n\t\t# skip next option if this one requires a parameter\n\t\tif [[ $opt == @($optsParam) ]] ; then\n\t\t\t((++i))\n\t\tfi\n\tdone\n\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\n\treturn 0\n}\ncomplete -F _svnadmin -o bashdefault -o default svnadmin\n\n_svndumpfilter ()\n{\n\tlocal cur cmds cmdOpts optsParam opt helpCmds optBase i\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\n\t# Possible expansions, without pure-prefix abbreviations such as \"h\".\n\tcmds='exclude help include --version'\n\n\tif [[ $COMP_CWORD -eq 1 ]] ; then\n\t\tCOMPREPLY=( $( compgen -W \"$cmds\" -- $cur ) )\n\t\treturn 0\n\tfi\n\n\t# options that require a parameter\n\t# note: continued lines must end '|' continuing lines must start '|'\n\toptsParam=\"--targets\"\n\n\t# if not typing an option, or if the previous option required a\n\t# parameter, then fallback on ordinary filename expansion\n\thelpCmds='help|--help|h|\\?'\n\tif [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && \\\n\t   [[ \"$cur\" != -* ]] || \\\n\t   [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then\n\t\treturn 0\n\tfi\n\n\tcmdOpts=\n\tcase ${COMP_WORDS[1]} in\n\texclude|include)\n\t\tcmdOpts=\"--drop-empty-revs --drop-all-empty-revs --renumber-revs\n\t\t         --skip-missing-merge-sources --targets\n\t\t         --preserve-revprops --quiet --pattern\"\n\t\t;;\n\thelp|h|\\?)\n\t\tcmdOpts=\"$cmds\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcmdOpts=\"$cmdOpts --help -h\"\n\n\t# take out options already given\n\tfor (( i=2; i<=$COMP_CWORD-1; ++i )) ; do\n\t\topt=${COMP_WORDS[$i]}\n\n\t\tcase $opt in\n\t\t--*)    optBase=${opt/=*/} ;;\n\t\t-*)     optBase=${opt:0:2} ;;\n\t\tesac\n\n\t\tcmdOpts=\" $cmdOpts \"\n\t\tcmdOpts=${cmdOpts/ ${optBase} / }\n\n\t\t# take out alternatives\n\t\tcase $optBase in\n\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\tesac\n\n\t\t# skip next option if this one requires a parameter\n\t\tif [[ $opt == @($optsParam) ]] ; then\n\t\t\t((++i))\n\t\tfi\n\tdone\n\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\n\treturn 0\n}\ncomplete -F _svndumpfilter -o bashdefault -o default svndumpfilter\n\n_svnlook ()\n{\n\tlocal cur cmds cmdOpts optsParam opt helpCmds optBase i\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\n\t# Possible expansions, without pure-prefix abbreviations such as \"h\".\n\tcmds='author cat changed date diff dirs-changed filesize help history \\\n\t      info lock log propget proplist tree uuid youngest --version'\n\n\tif [[ $COMP_CWORD -eq 1 ]] ; then\n\t\tCOMPREPLY=( $( compgen -W \"$cmds\" -- $cur ) )\n\t\treturn 0\n\tfi\n\n\t# options that require a parameter\n\t# note: continued lines must end '|' continuing lines must start '|'\n\toptsParam=\"-r|--revision|-t|--transaction|-l|--limit|-x|--extensions\"\n\n\t# if not typing an option, or if the previous option required a\n\t# parameter, then fallback on ordinary filename expansion\n\thelpCmds='help|--help|h|\\?'\n\tif [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && \\\n\t   [[ \"$cur\" != -* ]] || \\\n\t   [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then\n\t\treturn 0\n\tfi\n\n\tcmdOpts=\n\tcase ${COMP_WORDS[1]} in\n\tauthor)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tcat)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tchanged)\n\t\tcmdOpts=\"-r --revision -t --transaction --copy-info\"\n\t\t;;\n\tdate)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tdiff)\n\t\tcmdOpts=\"-r --revision -t --transaction --diff-copy-from \\\n\t\t         --no-diff-added --no-diff-deleted -x --extensions\"\n\t\t;;\n\tdirs-changed)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tfilesize)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\thelp|h|\\?)\n\t\tcmdOpts=\"$cmds\"\n\t\t;;\n\thistory)\n\t\tcmdOpts=\"-r --revision -l --limit --show-ids\"\n\t\t;;\n\tinfo)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tlock)\n\t\tcmdOpts=\n\t\t;;\n\tlog)\n\t\tcmdOpts=\"-r --revision -t --transaction\"\n\t\t;;\n\tpropget|pget|pg)\n\t\tcmdOpts=\"-r --revision -t --transaction --revprop\"\n\t\t;;\n\tproplist|plist|pl)\n\t\tcmdOpts=\"-r --revision -t --transaction --revprop -v --verbose --xml\"\n\t\t;;\n\ttree)\n\t\tcmdOpts=\"-r --revision -t --transaction --full-paths -N --non-recursive --show-ids\"\n\t\t;;\n\tuuid)\n\t\tcmdOpts=\n\t\t;;\n\tyoungest)\n\t\tcmdOpts=\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcmdOpts=\"$cmdOpts --help -h\"\n\n\t# take out options already given\n\tfor (( i=2; i<=$COMP_CWORD-1; ++i )) ; do\n\t\topt=${COMP_WORDS[$i]}\n\n\t\tcase $opt in\n\t\t--*)    optBase=${opt/=*/} ;;\n\t\t-*)     optBase=${opt:0:2} ;;\n\t\tesac\n\n\t\tcmdOpts=\" $cmdOpts \"\n\t\tcmdOpts=${cmdOpts/ ${optBase} / }\n\n\t\t# take out alternatives\n\t\tcase $optBase in\n\t\t-N)              cmdOpts=${cmdOpts/ --non-recursive / } ;;\n\t\t--non-recursive) cmdOpts=${cmdOpts/ -N / } ;;\n\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\t-l)              cmdOpts=${cmdOpts/ --limit / } ;;\n\t\t--limit)         cmdOpts=${cmdOpts/ -l / } ;;\n\t\t-r)              cmdOpts=${cmdOpts/ --revision / } ;;\n\t\t--revision)      cmdOpts=${cmdOpts/ -r / } ;;\n\t\t-t)              cmdOpts=${cmdOpts/ --transaction / } ;;\n\t\t--transaction)   cmdOpts=${cmdOpts/ -t / } ;;\n\t\t-v)              cmdOpts=${cmdOpts/ --verbose / } ;;\n\t\t--verbose)       cmdOpts=${cmdOpts/ -v / } ;;\n\t\t-x)              cmdOpts=${cmdOpts/ --extensions / } ;;\n\t\t--extensions)    cmdOpts=${cmdOpts/ -x / } ;;\n\t\tesac\n\n\t\t# skip next option if this one requires a parameter\n\t\tif [[ $opt == @($optsParam) ]] ; then\n\t\t\t((++i))\n\t\tfi\n\tdone\n\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\n\treturn 0\n}\ncomplete -F _svnlook -o bashdefault -o default svnlook\n\n_svnsync ()\n{\n\tlocal cur cmds cmdOpts optsParam opt helpCmds optBase i\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\n\t# Possible expansions, without pure-prefix abbreviations such as \"h\".\n\tcmds='copy-revprops help info initialize synchronize --version'\n\n\tif [[ $COMP_CWORD -eq 1 ]] ; then\n\t\tCOMPREPLY=( $( compgen -W \"$cmds\" -- $cur ) )\n\t\treturn 0\n\tfi\n\n\t# options that require a parameter\n\t# note: continued lines must end '|' continuing lines must start '|'\n\toptsParam=\"--config-dir|--config-option|--source-username|--source-password\"\n\toptsParam=\"$optsParam|--sync-username|--sync-password\"\n\n\t# if not typing an option, or if the previous option required a\n\t# parameter, then fallback on ordinary filename expansion\n\thelpCmds='help|--help|h|\\?'\n\tif [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && \\\n\t   [[ \"$cur\" != -* ]] || \\\n\t   [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then\n\t\treturn 0\n\tfi\n\n\tcmdOpts=\n\tcase ${COMP_WORDS[1]} in\n\tcopy-revprops|initialize|init|synchronize|sync)\n\t\tcmdOpts=\"--non-interactive --no-auth-cache --trust-server-cert \\\n\t\t         --source-username --source-password --sync-username \\\n\t\t         --sync-password --config-dir --config-option \\\n\t\t         -q --quiet -M --memory-cache-size\"\n\t\t;;\n\thelp|h|\\?)\n\t\tcmdOpts=\"$cmds\"\n\t\t;;\n\tinfo)\n\t\tcmdOpts=\"--non-interactive --no-auth-cache --trust-server-cert \\\n\t\t         --source-username --source-password --sync-username \\\n\t\t         --sync-password --config-dir --config-option\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcmdOpts=\"$cmdOpts --help -h\"\n\n\t# take out options already given\n\tfor (( i=2; i<=$COMP_CWORD-1; ++i )) ; do\n\t\topt=${COMP_WORDS[$i]}\n\n\t\tcase $opt in\n\t\t--*)    optBase=${opt/=*/} ;;\n\t\t-*)     optBase=${opt:0:2} ;;\n\t\tesac\n\n\t\tcmdOpts=\" $cmdOpts \"\n\t\tcmdOpts=${cmdOpts/ ${optBase} / }\n\n\t\t# take out alternatives\n\t\tcase $optBase in\n\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\t-q)              cmdOpts=${cmdOpts/ --quiet / } ;;\n\t\t--quiet)         cmdOpts=${cmdOpts/ -q / } ;;\n\t\tesac\n\n\t\t# skip next option if this one requires a parameter\n\t\tif [[ $opt == @($optsParam) ]] ; then\n\t\t\t((++i))\n\t\tfi\n\tdone\n\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\n\treturn 0\n}\ncomplete -F _svnsync -o bashdefault -o default svnsync\n\n# reasonable completion for 'svnversion'\n_svnversion ()\n{\n\tlocal cmdOpts=\" -n --no-newline -c --committed -h --help --version \"\n\tlocal cur=${COMP_WORDS[COMP_CWORD]}\n\n\tCOMPREPLY=()\n\n\t# parse current options\n\tlocal options= wcpath= trailurl= last='none' stat= opt= i=-1 isCur=\n\tfor opt in ${COMP_WORDS[@]}\n\tdo\n\t\t[[ $i -eq $COMP_CWORD ]] && stat=$last\n\t\tlet i++\n\n\t\t# are we processing the current word?\n\t\tisCur=\n\t\t[[ $i -eq $COMP_CWORD ]] && isCur=1\n\n\t\t# skip first command, should be 'svnversion'\n\t\tif [ $last = 'none' ] ; then\n\t\t\tlast='first'\n\t\t\tcontinue\n\t\tfi\n\n\t\t# get options\n\t\tif [[ $last != 'arg' && $opt == -* ]]\n\t\tthen\n\t\t\t# if '--' is at the current position, it means that we are looking\n\t\t\t# for '--*' options, and not the end of option processing.\n\t\t\tif [[ $opt = '--' && ! $isCur ]]\n\t\t\tthen\n\t\t\t\tlast='arg'\n\t\t\telse\n\t\t\t\toptions=\"$options $opt \"\n\t\t\t\tlast='opt'\n\t\t\tfi\n\t\t\tcontinue\n\t\tfi\n\t\t# get arguments\n\t\tif [[ $opt != -* ]]\n\t\tthen\n\t\t\tlast='arg'\n\t\t\tif [[ ! $wcpath ]]\n\t\t\tthen\n\t\t\t\twcpath=$opt\n\t\t\telif [[ ! $trailurl ]]\n\t\t\tthen\n\t\t\t\ttrailurl=$opt\n\t\t\tfi\n\t\tfi\n\tdone\n\t[[ $stat ]] || stat=$last\n\n\t# argument part\n\tif [[ $cur != -* || $stat = 'arg' ]]\n\tthen\n\t\t[[ $wcpath && $trailurl ]] && COMPREPLY=( '' )\n\t\treturn 0\n\tfi\n\n\t# suggest options, and  take out already given options\n\tfor opt in $options\n\tdo\n\t\t# take out options\n\t\tcmdOpts=${cmdOpts/ $opt / }\n\n\t\t# take out alternatives\n\t\tcase $opt in\n\t\t\t-n)              cmdOpts=${cmdOpts/ --no-newline / } ;;\n\t\t\t--no-newline)    cmdOpts=${cmdOpts/ -n / } ;;\n\t\t\t-h)              cmdOpts=${cmdOpts/ --help / } ;;\n\t\t\t--help)          cmdOpts=${cmdOpts/ -h / } ;;\n\t\t\t-c)              cmdOpts=${cmdOpts/ --committed / } ;;\n\t\t\t--committed)     cmdOpts=${cmdOpts/ -c / } ;;\n\t\tesac\n\tdone\n\n\tCOMPREPLY=( $( compgen -W \"$cmdOpts\" -- $cur ) )\n\n\treturn 0\n}\n# -X option does not seem to work?\ncomplete -F _svnversion -o dirnames -X '*.svn*' svnversion\n"
  },
  {
    "path": "completions/system.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# Loads the system's Bash completion modules.\n# If Homebrew is installed (OS X), its Bash completion modules are loaded.\n\nif [ -f /etc/bash_completion ]; then\n  . /etc/bash_completion\nfi\n\n# Some distribution makes use of a profile.d script to import completion.\nif [ -f /etc/profile.d/bash_completion.sh ]; then\n  . /etc/profile.d/bash_completion.sh\nfi\n\n\nif [ $(uname) = \"Darwin\" ] && _omb_util_command_exists brew; then\n  BREW_PREFIX=$(brew --prefix)\n\n  if [ -f \"$BREW_PREFIX\"/etc/bash_completion ]; then\n    . \"$BREW_PREFIX\"/etc/bash_completion\n  fi\n\n  # homebrew/versions/bash-completion2 (required for projects.completion.bash) is installed to this path\n  if [ -f \"$BREW_PREFIX\"/share/bash-completion/bash_completion ]; then\n    . \"$BREW_PREFIX\"/share/bash-completion/bash_completion\n  fi\nfi\n"
  },
  {
    "path": "completions/terraform.completion.sh",
    "content": "#! bash oh-my-bash.module\n# Bash Terraform completion\n\n_terraform()\n{\n   local cmds cur colonprefixes\n   cmds=\"apply destroy fmt get graph import init \\\n      output plan push refresh remote show taint \\\n      untaint validate version state\"\n\n   COMPREPLY=()\n   cur=${COMP_WORDS[COMP_CWORD]}\n   # Work-around bash_completion issue where bash interprets a colon\n   # as a separator.\n   # Work-around borrowed from the darcs work-around for the same\n   # issue.\n   colonprefixes=${cur%\"${cur##*:}\"}\n   COMPREPLY=( $(compgen -W '$cmds'  -- $cur))\n   local i=${#COMPREPLY[*]}\n   while [ $((--i)) -ge 0 ]; do\n      COMPREPLY[$i]=${COMPREPLY[$i]#\"$colonprefixes\"}\n   done\n\n        return 0\n} &&\ncomplete -F _terraform terraform\n"
  },
  {
    "path": "completions/test_kitchen.completion.sh",
    "content": "#! bash oh-my-bash.module\nfunction __kitchen_instance_list {\n  # cache to .kitchen.list.yml\n  if [[ .kitchen.yml -nt .kitchen.list.yml || .kitchen.local.yml -nt .kitchen.list.yml ]]; then\n    # update list if config has updated\n    kitchen list --bare > .kitchen.list.yml\n  fi\n  cat .kitchen.list.yml\n}\n\nfunction __kitchen_options {\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n  COMPREPLY=()\n\n  case $prev in\n    converge|create|destroy|diagnose|list|login|setup|test|verify)\n      COMPREPLY=( $(compgen -W \"$(__kitchen_instance_list)\" -- ${cur} ))\n      return 0\n      ;;\n    driver)\n      COMPREPLY=( $(compgen -W \"create discover help\"  -- ${cur} ))\n      return 0\n      ;;\n    *)\n      COMPREPLY=( $(compgen -W \"console converge create destroy driver help init list login setup test verify version\"  -- ${cur} ))\n      return 0\n      ;;\n  esac\n}\ncomplete -F __kitchen_options kitchen\n\n"
  },
  {
    "path": "completions/tkn.completion.sh",
    "content": "#! bash oh-my-bash.module\nif _omb_util_command_exists tkn; then\n  eval -- \"$(tkn completion bash)\"\nfi\n\nif _omb_util_command_exists tkn-pac; then\n  eval -- \"$(tkn-pac completion bash)\"\nfi\n"
  },
  {
    "path": "completions/tmux.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# tmux completion\n# See: http://www.debian-administration.org/articles/317 for how to write more.\n# Usage: Put \"source bash_completion_tmux.sh\" into your .bashrc\n# Based upon the example at http://paste-it.appspot.com/Pj4mLycDE\n\nfunction _tmux_expand {\n  [[ $cur != \"${cur%\\\\}\" ]] && cur=$cur'\\'\n  if [[ $cur == \\~*/* ]]; then\n    eval \"cur=$cur\"\n  elif [[ $cur == \\~* ]]; then\n    cur=${cur#\\~}\n    COMPREPLY=($(compgen -P '~' -u \"$cur\"))\n    ((${#COMPREPLY[@]} == 0))\n  fi\n}\n\nfunction _tmux_filedir {\n  local IFS=$'\\n'\n  _tmux_expand || return 0\n  if [[ $1 == -d ]]; then\n    COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -d -- \"$cur\"));\n    return 0;\n  fi;\n  COMPREPLY=(\"${COMPREPLY[@]}\" $(eval \"compgen -f -- \\\"$cur\\\"\"))\n}\n\nfunction _tmux_complete_client {\n  local IFS=$'\\n'\n  local cur=$1\n  COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -W \"$(tmux -q list-clients 2>/dev/null | cut -f 1 -d ':')\" -- \"${cur}\") )\n}\nfunction _tmux_complete_session {\n  local IFS=$'\\n'\n  local cur=$1\n  COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -W \"$(tmux -q list-sessions 2>/dev/null | cut -f 1 -d ':')\" -- \"${cur}\") )\n}\nfunction _tmux_complete_window {\n  local IFS=$'\\n'\n  local cur=$1\n  local session_name=$(<<< \"$cur\" sed 's/\\\\//g' | cut -d ':' -f 1)\n  local sessions\n\n  sessions=\"$(tmux -q list-sessions 2>/dev/null | sed -re 's/([^:]+:).*$/\\1/')\"\n  if [[ $session_name ]]; then\n    sessions=\"$sessions\n        $(tmux -q list-windows -t \"$session_name\" 2>/dev/null | sed -re 's/^([^:]+):.*$/'\"$session_name\"':\\1/')\"\n  fi\n  cur=$(<<< \"$cur\" sed -e 's/:/\\\\\\\\:/')\n  sessions=$(<<< \"$sessions\" sed -e 's/:/\\\\\\\\:/')\n  COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -W \"$sessions\" -- \"$cur\"))\n}\n\nfunction _tmux {\n  local cur prev\n  local i cmd cmd_index option option_index\n  local opts=\"\"\n  COMPREPLY=()\n  cur=${COMP_WORDS[COMP_CWORD]}\n  prev=${COMP_WORDS[COMP_CWORD-1]}\n\n  if [[ $prev == -f ]]; then\n    _tmux_filedir\n  else\n    # Search for the command\n    local skip_next=0\n    for ((i = 1; i <= COMP_CWORD; i++)); do\n      if ((skip_next == 1)); then\n        #_omb_util_print \"Skipping\"\n        skip_next=0;\n      elif [[ ${COMP_WORDS[i]} != -* ]]; then\n        cmd=${COMP_WORDS[i]}\n        cmd_index=$i\n        break\n      elif [[ ${COMP_WORDS[i]} == -f ]]; then\n        skip_next=1\n      fi\n    done\n\n    # Search for the last option command\n    skip_next=0\n    for ((i = 1; i <= COMP_CWORD; i++)); do\n      if ((skip_next == 1)); then\n        #_omb_util_print \"Skipping\"\n        skip_next=0\n      elif [[ ${COMP_WORDS[i]} == -* ]]; then\n        option=${COMP_WORDS[i]}\n        option_index=$i\n        if [[ ${COMP_WORDS[i]} == -- ]]; then\n          break\n        fi\n      elif [[ ${COMP_WORDS[i]} == -f ]]; then\n        skip_next=1\n      fi\n    done\n\n    if ((COMP_CWORD <= cmd_index)); then\n      # The user has not specified a command yet\n      COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -W \"$(tmux start-server \\; list-commands | cut -d' ' -f1)\" -- \"$cur\"))\n    else\n      case $cmd in\n      attach-session|attach)\n        case $prev in\n        -t) _tmux_complete_session \"$cur\" ;;\n        *) options=\"-t -d\" ;;\n        esac ;;\n      detach-client|detach)\n        case $prev in\n        -t) _tmux_complete_client \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      lock-client|lockc)\n        case $prev in\n        -t) _tmux_complete_client \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      lock-session|locks)\n        case $prev in\n        -t) _tmux_complete_session \"$cur\" ;;\n        *) options=\"-t -d\" ;;\n        esac ;;\n      new-session|new)\n        case $prev in\n        -t) _tmux_complete_session \"$cur\" ;;\n        -[n|d|s]) options=\"-d -n -s -t --\" ;;\n        *)\n          if [[ ${COMP_WORDS[option_index]} == -- ]]; then\n            _command_offset ${option_index}\n          else\n            options=\"-d -n -s -t --\"\n          fi\n          ;;\n        esac\n        ;;\n      refresh-client|refresh)\n        case $prev in\n        -t) _tmux_complete_client \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      rename-session|rename)\n        case $prev in\n        -t) _tmux_complete_session \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      source-file|source) _tmux_filedir ;;\n      has-session|has|kill-session)\n        case $prev in\n        -t) _tmux_complete_session \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      suspend-client|suspendc)\n        case $prev in\n        -t) _tmux_complete_client \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      switch-client|switchc)\n        case $prev in\n        -c) _tmux_complete_client \"$cur\" ;;\n        -t) _tmux_complete_session \"$cur\" ;;\n        *) options=\"-l -n -p -c -t\" ;;\n        esac ;;\n\n      send-keys|send)\n        case $option in\n        -t) _tmux_complete_window \"$cur\" ;;\n        *) options=\"-t\" ;;\n        esac ;;\n      esac # case $cmd\n    fi # command specified\n  fi # not -f\n\n  if [[ $options ]]; then\n    COMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -W \"$options\" -- \"$cur\"))\n  fi\n\n  return 0\n}\ncomplete -F _tmux tmux\n\n# END tmux completion\n"
  },
  {
    "path": "completions/todo.completion.sh",
    "content": "#! bash oh-my-bash.module\n# link: https://github.com/ginatrapani/todo.txt-cli/blob/master/todo_completion\n\n_todo()\n{\n    local cur prev opts\n    COMPREPLY=()\n    cur=\"${COMP_WORDS[COMP_CWORD]}\"\n    prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n\n    local -r OPTS=\"-@ -@@ -+ -++ -d -f -h -p -P -PP -a -n -t -v -vv -V -x\"\n    local -r COMMANDS=\"\\\n        add a addto addm append app archive command del  \\\n        rm depri dp do help list ls listaddons listall lsa listcon  \\\n        lsc listfile lf listpri lsp listproj lsprj move \\\n        mv prepend prep pri p replace report shorthelp\"\n    local -r MOVE_COMMAND_PATTERN='^(move|mv)$'\n\n    local _todo_sh=${_todo_sh:-todo.sh}\n    local completions\n    if [ $COMP_CWORD -eq 1 ]; then\n        completions=\"$COMMANDS $(eval TODOTXT_VERBOSE=0 $_todo_sh command listaddons) $OPTS\"\n    elif [[ $COMP_CWORD -gt 2 && ( \\\n        \"${COMP_WORDS[COMP_CWORD-2]}\" =~ $MOVE_COMMAND_PATTERN || \\\n        \"${COMP_WORDS[COMP_CWORD-3]}\" =~ $MOVE_COMMAND_PATTERN ) ]]; then\n        completions=$(eval TODOTXT_VERBOSE=0 $_todo_sh command listfile)\n    else\n        case \"$prev\" in\n            command)\n                completions=$COMMANDS;;\n            help)\n                completions=\"$COMMANDS $(eval TODOTXT_VERBOSE=0 $_todo_sh command listaddons)\";;\n            addto|listfile|lf)\n                completions=$(eval TODOTXT_VERBOSE=0 $_todo_sh command listfile);;\n            -*) completions=\"$COMMANDS $(eval TODOTXT_VERBOSE=0 $_todo_sh command listaddons) $OPTS\";;\n            *)  case \"$cur\" in\n                    +*) completions=$(eval TODOTXT_VERBOSE=0 $_todo_sh command listproj)\n                        COMPREPLY=( $( compgen -W \"$completions\" -- $cur ))\n                        [ ${#COMPREPLY[@]} -gt 0 ] && return 0\n                        completions=$(eval 'TODOTXT_VERBOSE=0 TODOTXT_SOURCEVAR=\\$DONE_FILE' $_todo_sh command listproj)\n                        ;;\n                    @*) completions=$(eval TODOTXT_VERBOSE=0 $_todo_sh command listcon)\n                        COMPREPLY=( $( compgen -W \"$completions\" -- $cur ))\n                        [ ${#COMPREPLY[@]} -gt 0 ] && return 0\n                        completions=$(eval 'TODOTXT_VERBOSE=0 TODOTXT_SOURCEVAR=\\$DONE_FILE' $_todo_sh command listcon)\n                        ;;\n                    *)  if [[ \"$cur\" =~ ^[0-9]+$ ]]; then\n                            local todo=$( \\\n                                eval TODOTXT_VERBOSE=0 $_todo_sh '-@ -+ -p -x command ls \"^ *${cur} \"' | \\\n                                sed -e 's/^ *[0-9]\\{1,\\} //' -e 's/^\\((.) \\)\\{0,1\\}[0-9]\\{2,4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} /\\1/' \\\n                                    -e 's/^\\([xX] \\)\\([0-9]\\{2,4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} \\)\\{1,2\\}/\\1/' \\\n                                    -e 's/[[:space:]]*$//' \\\n                                    -e '1q' \\\n                            )\n                            [ \"$todo\" ] && COMPREPLY[0]=\"$cur # $todo\"\n                            return 0\n                        else\n                            return 0\n                        fi\n                        ;;\n                esac\n                ;;\n        esac\n    fi\n\n    COMPREPLY=( $( compgen -W \"$completions\" -- $cur ))\n    return 0\n}\n\ncomplete -F _todo todo.sh\ncomplete -F _todo t\n"
  },
  {
    "path": "completions/uv.completion.sh",
    "content": "#! bash oh-my-bash.module\n\n# uv (Python package and project manager) completion\n# https://docs.astral.sh/uv/reference/cli/#uv-generate-shell-completion\n\nif _omb_util_command_exists uv; then\n  eval -- \"$(uv generate-shell-completion bash)\"\nfi\n"
  },
  {
    "path": "completions/vagrant.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/hashicorp/vagrant/blob/9df95a200280219ae5899db6eaa2e0eff4ad1a8e/contrib/bash/completion.sh\n#------------------------------------------------------------------------------\n# (The MIT License)\n#\n# Copyright (c) 2014 Kura\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the 'Software'), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n\nfunction __pwdln {\n  pwdmod=$PWD/\n  itr=0\n  until [[ ! $pwdmod ]]; do\n    ((itr++))\n    pwdmod=\"${pwdmod#*/}\"\n  done\n  _omb_util_put $((itr-1))\n}\n\nfunction __vagrantinvestigate {\n  if [[ -f $PWD/.vagrant || -d $PWD/.vagrant ]]; then\n    _omb_util_print \"$PWD/.vagrant\"\n    return 0\n  else\n    pwdmod2=$PWD\n    for ((i = 2; i <= $(__pwdln); i++)); do\n      pwdmod2=${pwdmod2%/*}\n      if [[ -f $pwdmod2/.vagrant || -d $pwdmod2/.vagrant ]]; then\n        _omb_util_print \"$pwdmod2/.vagrant\"\n        return 0\n      fi\n    done\n  fi\n  return 1\n}\n\nfunction _vagrant {\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local prev=${COMP_WORDS[COMP_CWORD-1]}\n  commands=\"box cloud connect destroy docker-exec docker-logs docker-run global-status halt help init list-commands login package plugin provision push rdp reload resume rsync rsync-auto share snapshot ssh ssh-config status suspend up version\"\n\n  if ((COMP_CWORD == 1)); then\n    COMPREPLY=($(compgen -W \"$commands\" -- \"$cur\"))\n    return 0\n  fi\n\n  if ((COMP_CWORD == 2)); then\n    case $prev in\n    \"init\")\n      local box_list=$(find \"${VAGRANT_HOME:-$HOME/.vagrant.d}/boxes\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sed -e 's/-VAGRANTSLASH-/\\//')\n      COMPREPLY=($(compgen -W \"$box_list\" -- \"$cur\"))\n      return 0\n      ;;\n    \"up\")\n      vagrant_state_file=$(__vagrantinvestigate) || return 1\n      if [[ -d $vagrant_state_file ]]; then\n        local vm_list=$(find \"$vagrant_state_file/machines\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\;)\n      fi\n      local up_commands=\"\\\n        --provision \\\n        --no-provision \\\n        --provision-with \\\n        --destroy-on-error \\\n        --no-destroy-on-error \\\n        --parallel \\\n        --no-parallel\n        --provider \\\n        --install-provider \\\n        --no-install-provider \\\n        -h \\\n        --help\"\n      COMPREPLY=($(compgen -W \"$up_commands $vm_list\" -- \"$cur\"))\n      return 0\n      ;;\n    \"destroy\"|\"ssh\"|\"provision\"|\"reload\"|\"halt\"|\"suspend\"|\"resume\"|\"ssh-config\")\n      vagrant_state_file=$(__vagrantinvestigate) || return 1\n      if [[ -f $vagrant_state_file ]]\n      then\n        running_vm_list=$(grep 'active' \"$vagrant_state_file\" | sed -e 's/\"active\"://' | tr ',' '\\n' | cut -d '\"' -f 2 | tr '\\n' ' ')\n      else\n        running_vm_list=$(find \"$vagrant_state_file/machines\" -type f -name \"id\" | awk -F\"/\" '{print $(NF-2)}')\n      fi\n      COMPREPLY=($(compgen -W \"$running_vm_list\" -- \"$cur\"))\n      return 0\n      ;;\n    \"box\")\n      box_commands=\"add help list outdated prune remove repackage update\"\n      COMPREPLY=($(compgen -W \"$box_commands\" -- \"$cur\"))\n      return 0\n      ;;\n    \"cloud\")\n      cloud_commands=\"auth box search provider publish version\"\n      COMPREPLY=($(compgen -W \"$cloud_commands\" -- \"$cur\"))\n      return 0\n      ;;\n    \"plugin\")\n      plugin_commands=\"install license list uninstall update\"\n      COMPREPLY=($(compgen -W \"$plugin_commands\" -- \"$cur\"))\n      return 0\n      ;;\n    \"help\")\n      COMPREPLY=($(compgen -W \"$commands\" -- \"$cur\"))\n      return 0\n      ;;\n    \"snapshot\")\n      snapshot_commands=\"delete list pop push restore save\"\n      COMPREPLY=($(compgen -W \"$snapshot_commands\" -- \"$cur\"))\n      return 0\n      ;;\n    *)\n      ;;\n    esac\n  fi\n\n  if ((COMP_CWORD == 3)); then\n    action=${COMP_WORDS[COMP_CWORD-2]}\n    case $action in\n    \"up\")\n      if [[ $prev == --no-provision ]]; then\n        if [[ -d $vagrant_state_file ]]; then\n          local vm_list=$(find \"$vagrant_state_file/machines\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\;)\n        fi\n        COMPREPLY=($(compgen -W \"$vm_list\" -- \"$cur\"))\n        return 0\n      fi\n      ;;\n    \"box\")\n      case $prev in\n      \"remove\"|\"repackage\")\n        local box_list=$(find \"${VAGRANT_HOME:-$HOME/.vagrant.d}/boxes\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sed -e 's/-VAGRANTSLASH-/\\//')\n        COMPREPLY=($(compgen -W \"$box_list\" -- \"$cur\"))\n        return 0\n        ;;\n      \"add\")\n        local add_commands=\"\\\n          --name \\\n          --checksum \\\n          --checksum-type \\\n          -c --clean \\\n          -f --force \\\n          \"\n        if [[ $cur == -* ]]; then\n          COMPREPLY=($(compgen -W \"$add_commands\" -- \"$cur\"))\n        else\n          COMPREPLY=($(compgen -o default -- \"$cur\"))\n        fi\n        return 0\n        ;;\n      *)\n        ;;\n      esac\n      ;;\n    \"snapshot\")\n      case $prev in\n      \"restore\"|\"delete\")\n        local snapshot_list=$(vagrant snapshot list)\n        COMPREPLY=($(compgen -W \"$snapshot_list\" -- \"$cur\"))\n        return 0\n        ;;\n      esac\n      ;;\n    *)\n      ;;\n    esac\n  fi\n}\ncomplete -F _vagrant vagrant\n"
  },
  {
    "path": "completions/vault.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Taken from https://github.com/iljaweis/vault-bash-completion\n#\n# * 2024-08-13 Confirmed that the current version is up-to-date with the\n#   archived version:\n#   https://github.com/iljaweis/vault-bash-completion/blob/c42047c5bd6aca9045b7945db1c41654080076e1/vault-bash-completion.sh\n#\n# ---------------------------------------------------------------------------\n# vault-bash-completion\n#\n# This adds bash completions for [HashiCorp Vault](https://www.vaultproject.io/)\n#\n# see https://github.com/iljaweis/vault-bash-completion\n# ---------------------------------------------------------------------------\n\nfunction _vault_mounts {\n  (\n    set -euo pipefail\n    if ! vault mounts 2> /dev/null | awk 'NR > 1 {print $1}'; then\n      _omb_util_print \"secret\"\n    fi\n  )\n}\n\nfunction _vault {\n  local VAULT_COMMANDS=$(vault 2>&1 | command grep -E '^ +' | awk '{print $1}')\n\n  local cur prev\n\n  if ((COMP_CWORD > 0)); then\n    cur=${COMP_WORDS[COMP_CWORD]}\n    prev=${COMP_WORDS[COMP_CWORD-1]}\n  fi\n\n  local line=${COMP_LINE}\n\n  if [[ $prev =~ ^(policies|policy-write|policy-delete) ]]; then\n    local policies=$(vault policies 2> /dev/null)\n    COMPREPLY=($(compgen -W \"$policies\" -- $cur))\n  elif (($(wc -w <<< \"$line\") <= 2)); then\n    if [[ $line =~ ^vault\\ (read|write|delete|list)\\ $ ]]; then\n      COMPREPLY=($(compgen -W \"$(_vault_mounts)\" -- ''))\n    else\n      COMPREPLY=($(compgen -W \"$VAULT_COMMANDS\" -- $cur))\n    fi\n  elif [[ $line =~ ^vault\\ (read|write|delete|list)\\ (.*)$ ]]; then\n    path=${BASH_REMATCH[2]}\n    if [[ $path =~ ^([^ ]+)/([^ /]*)$ ]]; then\n      list=$(vault list -format=yaml ${BASH_REMATCH[1]} 2> /dev/null | awk '{ print $2 }')\n      COMPREPLY=($(compgen -W \"$list\" -P \"${BASH_REMATCH[1]}/\" -- ${BASH_REMATCH[2]}))\n    else\n      COMPREPLY=($(compgen -W \"$(_vault_mounts)\" -- $path))\n    fi\n  fi\n}\n\ncomplete -o default -o nospace -F _vault vault\n"
  },
  {
    "path": "completions/virtualbox.completion.sh",
    "content": "#! bash oh-my-bash.module\n#\n# This completion setting seems to originate from the following repository:\n# https://github.com/tfmalt/bash-completion-virtualbox\n#\n# The license is unspecified.  The upstream is not active for nine years (as of\n# 2024-08), so we would adjust the codes by ourselves.\n#\n# Change history\n#\n# * 2017-10-10 This file was added to Oh My Bash. This is probably taken from\n#   the following version:\n#   https://github.com/tfmalt/bash-completion-virtualbox/blob/fb9739cfe9d2a6d0076c5423dc25393bcf6a77dd/vboxmanage_completion.bash\n# * 2024-08-13 The file cotnent is update to the latest upstream version based on:\n#   https://github.com/tfmalt/bash-completion-virtualbox/blob/02df30e0b8e399b8011d95aa917caf0aafe01d27/vboxmanage_completion.bash\n#\n#------------------------------------------------------------------------------\n#!/usr/bin/env bash\n#\n# Attempt at autocompletion script for vboxmanage. This scripts assumes an\n# alias between VBoxManage and vboxmanaage.\n#\n# Copyright (c) 2012  Thomas Malt <thomas@malt.no>\n#\n\n#alias vboxmanage=\"VBoxManage\"\n\ncomplete -F _vboxmanage vboxmanage\n\n# export VBOXMANAGE_NIC_TYPES\n\nfunction _vboxmanage {\n  local cur prev opts\n  COMPREPLY=()\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n\n  # _omb_util_print \"cur: |$cur|\"\n  # _omb_util_print \"prev: |$prev|\"\n\n  case $prev in\n  -v|--version)\n    return 0\n    ;;\n\n  -l|--long)\n    opts=$(__vboxmanage_list \"long\")\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  --nic[1-8])\n    # This is part of modifyvm subcommand\n    opts=$(__vboxmanage_nic_types)\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    ;;\n  startvm|list)\n    opts=$(__vboxmanage_$prev)\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  --type)\n    COMPREPLY=($(compgen -W \"gui headless\" -- ${cur}))\n    return 0\n    ;;\n  gui|headless)\n    # Done. no more completion possible\n    return 0\n    ;;\n  vboxmanage)\n    # In case current is complete command we return emmideatly.\n    case $cur in\n    startvm|list|controlvm|showvminfo|modifyvm)\n      COMPREPLY=($(compgen -W \"$cur \"))\n      return 0\n      ;;\n    esac\n\n    # _omb_util_print \"Got vboxmanage\"\n    opts=$(__vboxmanage_default)\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  -q|--nologo)\n    opts=$(__vboxmanage_default)\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  controlvm|showvminfo|modifyvm)\n    opts=$(__vboxmanage_list_vms)\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  vrde|setlinkstate*)\n    # vrde is a complete subcommand of controlvm\n    opts=\"on off\"\n    COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  esac\n\n  for VM in $(__vboxmanage_list_vms); do\n    if [ \"$VM\" == \"$prev\" ]; then\n      pprev=${COMP_WORDS[COMP_CWORD-2]}\n      # _omb_util_print \"previous: $pprev\"\n      case $pprev in\n      startvm)\n        opts=\"--type\"\n        COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n        return 0\n        ;;\n      controlvm)\n        opts=$(__vboxmanage_controlvm $VM)\n        COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n        return 0;\n        ;;\n      showvminfo)\n        opts=\"--details --machinereadable --log\"\n        COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n        return 0;\n        ;;\n      modifyvm)\n        opts=$(__vboxmanage_modifyvm)\n        COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n        return 0\n        ;;\n      esac\n    fi\n  done\n\n  # _omb_util_print \"Got to end withoug completion\"\n}\n\nfunction _vboxmanage_realopts {\n  _omb_util_print $(vboxmanage | grep -Eo \"^\\s{2}[a-z]+\")\n  _omb_util_print \" \"\n}\n\nfunction __vboxmanage_nic_types {\n  _omb_util_print $(vboxmanage |\n           grep ' nic<' |\n           sed 's/.*nic<1-N> \\([a-z\\|]*\\).*/\\1/' | tr '|' ' ')\n}\n\nfunction __vboxmanage_startvm {\n  RUNNING=$(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '\"')\n  TOTAL=$(vboxmanage list vms | cut -d' ' -f1 | tr -d '\"')\n\n  AVAILABLE=\"\"\n  for VM in $TOTAL; do\n    MATCH=0;\n    for RUN in $RUNNING \"x\"; do\n      if [ \"$VM\" == \"$RUN\" ]; then\n        MATCH=1\n      fi\n    done\n    (( $MATCH == 0 )) && AVAILABLE=\"$AVAILABLE $VM \"\n  done\n  _omb_util_print $AVAILABLE\n}\n\nfunction __vboxmanage_list {\n  INPUT=$(vboxmanage list | tr -s '[\\[\\]\\|\\n]' ' ' | cut -d' ' -f4-)\n\n  PRUNED=\"\"\n  if [ \"$1\" == \"long\" ]; then\n    for WORD in $INPUT; do\n      [ \"$WORD\" == \"-l\" ] && continue;\n      [ \"$WORD\" == \"--long\" ] && continue;\n\n      PRUNED=\"$PRUNED $WORD\"\n    done\n  else\n    PRUNED=$INPUT\n  fi\n\n  _omb_util_print $PRUNED\n}\n\n\nfunction __vboxmanage_list_vms {\n  VMS=\"\"\n  if [ \"x$1\" == \"x\" ]; then\n    SEPARATOR=\" \"\n  else\n    SEPARATOR=$1\n  fi\n\n  for VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '\"'); do\n    [ \"$VMS\" != \"\" ] && VMS=\"${VMS}${SEPARATOR}\"\n    VMS=\"${VMS}${VM}\"\n  done\n\n  _omb_util_print $VMS\n}\n\nfunction __vboxmanage_list_runningvms {\n  VMS=\"\"\n  if [ \"$1\" == \"\" ]; then\n    SEPARATOR=\" \"\n  else\n    SEPARATOR=$1\n  fi\n\n  for VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '\"'); do\n    [ \"$VMS\" != \"\" ] && VMS=\"${VMS}${SEPARATOR}\"\n    VMS=\"${VMS}${VM}\"\n  done\n\n  _omb_util_print $VMS\n}\n\nfunction __vboxmanage_controlvm {\n  _omb_util_print \"pause resume reset poweroff savestate acpipowerbutton\"\n  _omb_util_print \"acpisleepbutton keyboardputscancode guestmemoryballoon\"\n  _omb_util_print \"gueststatisticsinterval usbattach usbdetach vrde vrdeport\"\n  _omb_util_print \"vrdeproperty vrdevideochannelquality setvideomodehint\"\n  _omb_util_print \"screenshotpng setcredentials teleport plugcpu unplugcpu\"\n  _omb_util_print \"cpuexecutioncap\"\n\n  # setlinkstate<1-N>\n  activenics=$(__vboxmanage_showvminfo_active_nics $1)\n  for nic in $(_omb_util_print \"${activenics}\" | tr -d 'nic'); do\n    _omb_util_print \"setlinkstate${nic}\"\n  done\n\n# nic<1-N> null|nat|bridged|intnet|hostonly|generic\n#                                      [<devicename>] |\n                          # nictrace<1-N> on|off\n                          #   nictracefile<1-N> <filename>\n                          #   nicproperty<1-N> name=[value]\n                          #   natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n                          #                 <hostport>,[<guestip>],<guestport>\n                          #   natpf<1-N> delete <rulename>\n}\n\nfunction __vboxmanage_modifyvm {\n  options=$(vboxmanage modifyvm | grep '\\[--' | grep -v '\\[--nic<' |\n              sed 's/ *\\[--\\([a-z]*\\).*/--\\1/')\n  # Exceptions\n  for i in {1..8}; do\n    options=\"$options --nic${i}\"\n  done\n  _omb_util_print $options\n}\n\nfunction __vboxmanage_showvminfo_active_nics {\n  nics=$(vboxmanage showvminfo $1 --machinereadable |\n           awk '/^nic/ && ! /none/' |\n           awk '{ split($1, names, \"=\"); print names[1] }')\n  _omb_util_print $nics\n}\n\nfunction __vboxmanage_default {\n  realopts=$(_vboxmanage_realopts)\n  opts=$realopts$(vboxmanage | grep -i vboxmanage | cut -d' ' -f2 | grep -v '\\[' | sort | uniq)\n  pruned=\"\"\n\n  # _omb_util_print \"\"\n  # _omb_util_print \"DEBUG: cur: $cur, prev: $prev\"\n  # _omb_util_print \"DEBUG: default: |$p1|$p2|$p3|$p4|\"\n  case ${cur} in\n  -*)\n    _omb_util_print $opts\n    # COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n    return 0\n    ;;\n  esac;\n\n  for WORD in $opts; do\n    MATCH=0\n    for OPT in ${COMP_WORDS[@]}; do\n      # opts=$(_omb_util_print ${opts} | grep -v $OPT);\n      if [ \"$OPT\" == \"$WORD\" ]; then\n        MATCH=1\n        break;\n      fi\n      if [ \"$OPT\" == \"-v\" ] && [ \"$WORD\" == \"--version\" ]; then\n        MATCH=1\n        break;\n      fi\n      if [ \"$OPT\" == \"--version\" ] && [ \"$WORD\" == \"-v\" ]; then\n        MATCH=1\n        break;\n      fi\n      if [ \"$OPT\" == \"-q\" ] && [ \"$WORD\" == \"--nologo\" ]; then\n        MATCH=1\n        break;\n      fi\n      if [ \"$OPT\" == \"--nologo\" ] && [ \"$WORD\" == \"-q\" ]; then\n        MATCH=1\n        break;\n      fi\n    done\n    (( $MATCH == 1 )) && continue;\n    pruned=\"$pruned $WORD\"\n\n  done\n\n  # COMPREPLY=($(compgen -W \"${pruned}\" -- ${cur}))\n  _omb_util_print $pruned\n  return 0\n}\n"
  },
  {
    "path": "lib/base.sh",
    "content": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copyright (2022-08-23): The contents of this file seems to have been\n# originally introduced in a blog post [1].  The author also put it on Gist\n# [2]. The blog post says \"feel free to take whatever\", but the license is not\n# explicitly specified.  Aliases are moved to general.aliases.sh.\n#\n# [1] Nathaniel Landau, \"My Mac OSX Bash Profile\",\n#     https://natelandau.com/my-mac-osx-bash_profile/, 2013-07-02.\n# [2] https://gist.github.com/natelandau/10654137\n#\n#------------------------------------------------------------------------------\n#\n#  Description:  This file holds all base BASH functions\n#\n#  Sections:\n#  1.   Make Terminal Better (remapping defaults and adding functionality)\n#  2.   File and Folder Management\n#  3.   Searching\n#  4.   Process Management\n#  5.   Networking\n#  6.   System Operations & Information\n#  7.   Date & Time Management\n#  8.   Web Development\n#  9.   <your_section>\n#\n#  X.   Reminders & Notes\n#\n#------------------------------------------------------------------------------\n\n#   -----------------------------\n#   1.  MAKE TERMINAL BETTER\n#   -----------------------------\n\n#   mcd:   Makes new Dir and jumps inside\n#   --------------------------------------------------------------------\nfunction mcd { mkdir -p -- \"$*\" ; cd -- \"$*\" || exit ; }\n\n#   mans:   Search manpage given in agument '1' for term given in argument '2' (case insensitive)\n#           displays paginated result with colored search terms and two lines surrounding each hit.\n#           Example: mans mplayer codec\n#   --------------------------------------------------------------------\nfunction mans { man \"$1\" | grep -iC2 --color=always \"$2\" | less ; }\n\n#   showa: to remind yourself of an alias (given some part of it)\n#   ------------------------------------------------------------\nfunction showa { /usr/bin/grep --color=always -i -a1 \"$@\" ~/Library/init/bash/aliases.bash | grep -v '^\\s*$' | less -FSRXc ; }\n\n#   quiet: mute output of a command\n#   ------------------------------------------------------------\nfunction quiet {\n  \"$@\" &> /dev/null &\n}\n\n#   lsgrep: search through directory contents with grep\n#   ------------------------------------------------------------\n# shellcheck disable=SC2010\nfunction lsgrep { ls | grep \"$*\" ; }\n\n#   banish-cookies: redirect .adobe and .macromedia files to /dev/null\n#   ------------------------------------------------------------\nfunction banish-cookies {\n  rm -r ~/.macromedia ~/.adobe\n  ln -s /dev/null ~/.adobe\n  ln -s /dev/null ~/.macromedia\n}\n\n#   show the n most used commands. defaults to 10\n#   ------------------------------------------------------------\nfunction hstats {\n  if [[ $# -lt 1 ]]; then\n    NUM=10\n  else\n    NUM=${1}\n  fi\n  history | awk '{print $2}' | sort | uniq -c | sort -rn | head -\"$NUM\"\n}\n\n\n#   -------------------------------\n#   2.  FILE AND FOLDER MANAGEMENT\n#   -------------------------------\n\nfunction zipf { zip -r \"$1\".zip \"$1\" ; }           # zipf:         To create a ZIP archive of a folder\n\n#   extract:  Extract most know archives with one command\n#   ---------------------------------------------------------\nfunction extract {\n  if [ -f \"$1\" ] ; then\n    case \"$1\" in\n    *.tar.bz2)   tar xjf \"$1\"     ;;\n    *.tar.gz)    tar xzf \"$1\"     ;;\n    *.bz2)       bunzip2 \"$1\"     ;;\n    *.rar)       unrar e \"$1\"     ;;\n    *.gz)        gunzip \"$1\"      ;;\n    *.tar)       tar xf \"$1\"      ;;\n    *.tbz2)      tar xjf \"$1\"     ;;\n    *.tgz)       tar xzf \"$1\"     ;;\n    *.zip)       unzip \"$1\"       ;;\n    *.Z)         uncompress \"$1\"  ;;\n    *.7z)        7z x \"$1\"        ;;\n    *)     _omb_util_print \"'$1' cannot be extracted via extract()\" ;;\n    esac\n  else\n    _omb_util_print \"'$1' is not a valid file\"\n  fi\n}\n\n#   buf:  back up file with timestamp\n#   ---------------------------------------------------------\nfunction buf {\n  local filename filetime\n  filename=$1\n  filetime=$(date +%Y%m%d_%H%M%S)\n  cp -a \"${filename}\" \"${filename}_${filetime}\"\n}\n\n#   del:  move files to hidden folder in tmp, that gets cleared on each reboot\n#   ---------------------------------------------------------\nfunction del {\n  mkdir -p /tmp/.trash && mv \"$@\" /tmp/.trash;\n}\n\n#   mkiso:  creates iso from current dir in the parent dir (unless defined)\n#   ---------------------------------------------------------\nfunction mkiso {\n  if _omb_util_command_exists mkisofs; then\n    if [ -z ${1+x} ]; then\n      local isoname=${PWD##*/}\n    else\n      local isoname=$1\n    fi\n\n    if [ -z ${2+x} ]; then\n      local destpath=../\n    else\n      local destpath=$2\n    fi\n\n    if [ -z ${3+x} ]; then\n      local srcpath=${PWD}\n    else\n      local srcpath=$3\n    fi\n\n    if [ ! -f \"${destpath}${isoname}.iso\" ]; then\n      _omb_util_print \"writing ${isoname}.iso to ${destpath} from ${srcpath}\"\n      mkisofs -V \"${isoname}\" -iso-level 3 -r -o \"${destpath}${isoname}.iso\" \"${srcpath}\"\n    else\n      _omb_util_print \"${destpath}${isoname}.iso already exists\"\n    fi\n  else\n    _omb_util_print \"mkisofs cmd does not exist, please install cdrtools\"\n  fi\n}\n\n\n#   ---------------------------\n#   3.  SEARCHING\n#   ---------------------------\n\nfunction ff { /usr/bin/find . -name \"$@\" ; }      # ff:       Find file under the current directory\n# shellcheck disable=SC2145\nfunction ffs { /usr/bin/find . -name \"$@\"'*' ; }  # ffs:      Find file whose name starts with a given string\n# shellcheck disable=SC2145\nfunction ffe { /usr/bin/find . -name '*'\"$@\" ; }  # ffe:      Find file whose name ends with a given string\nfunction bigfind {\n  if [[ $# -lt 1 ]]; then\n    echo_warn \"Usage: bigfind DIRECTORY\"\n    return\n  fi\n  du -a \"$1\" | sort -n -r | head -n 10\n}\n\n\n#   ---------------------------\n#   4.  PROCESS MANAGEMENT\n#   ---------------------------\n\n#   findPid: find out the pid of a specified process\n#   -----------------------------------------------------\n#       Note that the command name can be specified via a regex\n#       E.g. findPid '/d$/' finds pids of all processes with names ending in 'd'\n#       Without the 'sudo' it will only find processes of the current user\n#   -----------------------------------------------------\nfunction findPid { lsof -t -c \"$@\" ; }\n\n#   my_ps: List processes owned by my user:\n#   ------------------------------------------------------------\nfunction my_ps { ps \"$@\" -u \"$USER\" -o pid,%cpu,%mem,start,time,bsdtime,command ; }\n\n\n#   ---------------------------\n#   5.  NETWORKING\n#   ---------------------------\n\n#   ips:  display all ip addresses for this host\n#   -------------------------------------------------------------------\nfunction ips {\n  if _omb_util_command_exists ifconfig\n  then\n    ifconfig | awk '/inet /{ print $2 }'\n  elif _omb_util_command_exists ip\n  then\n    ip addr | grep -oP 'inet \\K[\\d.]+'\n  else\n    _omb_util_print \"You don't have ifconfig or ip command installed!\"\n  fi\n}\n\n#   down4me:  checks whether a website is down for you, or everybody\n#   -------------------------------------------------------------------\nfunction down4me {\n  curl -s \"http://www.downforeveryoneorjustme.com/$1\" | sed '/just you/!d;s/<[^>]*>//g'\n}\n\n#   myip:  displays your ip address, as seen by the Internet\n#   -------------------------------------------------------------------\nfunction myip {\n  res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\\.]+')\n  _omb_util_print \"Your public IP is: ${_omb_term_bold_green} $res ${_omb_term_normal}\"\n}\n\n#   ii:  display useful host related informaton\n#   -------------------------------------------------------------------\nfunction ii {\n  _omb_util_print $'\\n'\"You are logged on ${_omb_term_brown}$HOST\"\n  _omb_util_print $'\\n'\"Additionnal information:$NC \"; uname -a\n  _omb_util_print $'\\n'\"${_omb_term_brown}Users logged on:$NC \"; w -h\n  _omb_util_print $'\\n'\"${_omb_term_brown}Current date :$NC \"; date\n  _omb_util_print $'\\n'\"${_omb_term_brown}Machine stats :$NC \"; uptime\n  [[ \"$OSTYPE\" == darwin* ]] && _omb_util_print $'\\n'\"${_omb_term_brown}Current network location :$NC \" ; scselect\n  _omb_util_print $'\\n'\"${_omb_term_brown}Public facing IP Address :$NC \" ;myip\n  [[ \"$OSTYPE\" == darwin* ]] && _omb_util_print $'\\n'\"${_omb_term_brown}DNS Configuration:$NC \" ; scutil --dns\n  _omb_util_print\n}\n\n#   ---------------------------------------\n#   6.  SYSTEMS OPERATIONS & INFORMATION\n#   ---------------------------------------\n\n#   batch_chmod: Batch chmod for all files & sub-directories in the current one\n#   -------------------------------------------------------------------\nfunction batch_chmod {\n  _omb_util_put \"${_omb_term_bold_navy}Applying 0755 permission for all directories...\"\n  (find . -type d -print0 | xargs -0 chmod 0755) &\n  spinner\n  _omb_util_put \"${_omb_term_normal}\"\n\n  _omb_util_put \"${_omb_term_bold_navy}Applying 0644 permission for all files...\"\n  (find . -type f -print0 | xargs -0 chmod 0644) &\n  spinner\n  _omb_util_put \"${_omb_term_normal}\"\n}\n\n#   usage: disk usage per directory, in Mac OS X and Linux\n#   -------------------------------------------------------------------\nfunction usage {\n  if [ \"$(uname)\" = \"Darwin\" ]; then\n    if [ -n \"$1\" ]; then\n      du -hd 1 \"$1\"\n    else\n      du -hd 1\n    fi\n  elif [ \"$(uname)\" = \"Linux\" ]; then\n    if [ -n \"$1\" ]; then\n      du -h --max-depth=1 \"$1\"\n    else\n      du -h --max-depth=1\n    fi\n  fi\n}\n\n#   pickfrom: picks random line from file\n#   -------------------------------------------------------------------\nfunction pickfrom {\n  local file=$1\n  [ -z \"$file\" ] && reference \"$FUNCNAME\" && return\n  length=$(wc -l < \"$file\")\n  n=$( ($RANDOM \\* \"$length\" / 32768 + 1))\n  head -n \"$n\" \"$file\" | tail -1\n}\n\n#   passgen: generates random password from dictionary words\n#       Note default length of generated password is 4, you can pass it to the command\n#       E.g. passgen 15\n#   -------------------------------------------------------------------\n# shellcheck disable=SC2046\n# shellcheck disable=SC2005\n# shellcheck disable=SC2034\n# shellcheck disable=SC2086\nfunction passgen {\n  local i pass length=${1:-4}\n  pass=$(_omb_util_print $(for ((i=1;i<=length;i++)); do pickfrom /usr/share/dict/words; done))\n  _omb_util_print \"With spaces (easier to memorize): $pass\"\n  _omb_util_print \"Without (use this as the password): $(tr -d ' ' <<< \"$pass\")\"\n}\n\n\n#   ---------------------------------------\n#   7.  DATE & TIME MANAGEMENT\n#   ---------------------------------------\n\n\n#   ---------------------------------------\n#   8.  WEB DEVELOPMENT\n#   ---------------------------------------\n\nfunction httpHeaders { /usr/bin/curl -I -L \"$@\" ; }             # httpHeaders:      Grabs headers from web page\n\n#   httpDebug:  Download a web page and show info on what took time\n#   -------------------------------------------------------------------\nfunction httpDebug { /usr/bin/curl \"$@\" -o /dev/null -w \"dns: %{time_namelookup} connect: %{time_connect} pretransfer: %{time_pretransfer} starttransfer: %{time_starttransfer} total: %{time_total}\\\\n\" ; }\n\n\n\n\n#   ---------------------------------------\n#   X.  REMINDERS & NOTES\n#   ---------------------------------------\n\n#   remove_disk: spin down unneeded disk\n#   ---------------------------------------\n#   diskutil eject /dev/disk1s3\n\n#   to change the password on an encrypted disk image:\n#   ---------------------------------------\n#   hdiutil chpass /path/to/the/diskimage\n\n#   to mount a read-only disk image as read-write:\n#   ---------------------------------------\n#   hdiutil attach example.dmg -shadow /tmp/example.shadow -noverify\n\n#   mounting a removable drive (of type msdos or hfs)\n#   ---------------------------------------\n#   mkdir /Volumes/Foo\n#   ls /dev/disk*   to find out the device to use in the mount command)\n#   mount -t msdos /dev/disk1s1 /Volumes/Foo\n#   mount -t hfs /dev/disk1s1 /Volumes/Foo\n\n#   to create a file of a given size: /usr/sbin/mkfile or /usr/bin/hdiutil\n#   ---------------------------------------\n#   e.g.: mkfile 10m 10MB.dat\n#   e.g.: hdiutil create -size 10m 10MB.dmg\n#   the above create files that are almost all zeros - if random bytes are desired\n#   then use: ~/Dev/Perl/randBytes 1048576 > 10MB.dat\n"
  },
  {
    "path": "lib/bourne-shell.sh",
    "content": "#! bash oh-my-bash.module\n# ~/.bashrc: executed by bash(1) for non-login shells.\n# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)\n\n# make less more friendly for non-text input files, see lesspipe(1)\nif [[ ! $LESSOPEN ]];then\n  if [[ -f /etc/gentoo-release ]]; then\n    export LESSOPEN=\"|lesspipe %s\"\n  else\n    if [[ -x /usr/bin/lesspipe ]]; then\n      eval \"$(SHELL=/bin/sh /usr/bin/lesspipe)\"\n    elif [[ -x /usr/bin/lesspipe.sh ]]; then\n      eval \"$(SHELL=/bin/sh /usr/bin/lesspipe.sh)\"\n    fi\n  fi\nfi\n\n# set variable identifying the chroot you work in (used in the prompt below)\nif [[ ! ${debian_chroot:-} && -r /etc/debian_chroot ]]; then\n  debian_chroot=$(< /etc/debian_chroot)\nfi\n\n# set a fancy prompt (non-color, unless we know we \"want\" color)\ncase $TERM in\nxterm-color|*-256color) color_prompt=yes;;\nesac\n\n# uncomment for a colored prompt, if the terminal has the capability; turned\n# off by default to not distract the user: the focus in a terminal window\n# should be on the output of commands, not on the prompt\n#force_color_prompt=yes\n\nif [[ $force_color_prompt ]]; then\n  if [[ -x /usr/bin/tput ]] && tput setaf 1 &>/dev/null; then\n    # We have color support; assume it's compliant with Ecma-48\n    # (ISO/IEC-6429). (Lack of such support is extremely rare, and such\n    # a case would tend to support setf rather than setaf.)\n    color_prompt=yes\n  else\n    color_prompt=\n  fi\nfi\n\nif [[ $color_prompt == yes ]]; then\n  PS1='${debian_chroot:+($debian_chroot)}\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\]\\$ '\nelse\n  PS1='${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ '\nfi\nunset -v color_prompt force_color_prompt\n\n# If this is an xterm set the title to user@host:dir\ncase $TERM in\nxterm*|rxvt*)\n  PS1=\"\\[\\e]0;${debian_chroot:+($debian_chroot)}\\u@\\h: \\w\\a\\]$PS1\"\n  ;;\n*)\n  ;;\nesac\n\n# enable color support of ls and also add handy aliases\nif [[ -x /usr/bin/dircolors ]]; then\n  if [[ -r ~/.dircolors ]]; then\n    eval \"$(dircolors -b ~/.dircolors)\"\n  else\n    eval \"$(dircolors -b)\"\n  fi\n  #_omb_util_alias ls='dir --color=auto'\n  #_omb_util_alias vdir='vdir --color=auto'\n\n  # Note: aliases \"grep\", \"fgrep\", and \"egrep\" are merged in lib/grep.sh\nfi\n\nfunction _omb_util_alias_select_ls {\n  if command ls --color=auto ~ &>/dev/null; then\n    _omb_command='ls --color=auto'\n  elif command ls -G ~ &>/dev/null; then\n    _omb_command='ls -G'\n  fi\n}\n_omb_util_alias_delayed ls\n\n# colored GCC warnings and errors\n#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'\n\n# ls aliases are moved to \"lib/directories.sh\"\n\n# Add an \"alert\" alias for long running commands.  Use like so:\n#   sleep 10; alert\nif _omb_util_binary_exists notify-send; then\n  function _omb_alias_alert {\n    local status=$? type command\n    if ((status == 0)); then\n      type=terminal\n    else\n      type=error\n    fi\n\n    # get the command\n    command=$(history | command tail -n 1 | command sed -e 's/^[[:space:]]*[0-9]\\{1,\\}[[:space:]]*//;s/[;&|][[:space:]]*alert$//')\n\n    notify-send --urgency=low -i \"$type\" \"$command\"\n\n    return \"$status\"\n  }\n  _omb_util_alias alert='_omb_alias_alert \"$@\"'\nfi\n\n# Alias definitions.\n# You may want to put all your additions into a separate file like\n# ~/.bash_aliases, instead of adding them here directly.\n# See /usr/share/doc/bash-doc/examples in the bash-doc package.\n\nif [[ -f ~/.bash_aliases ]]; then\n  . ~/.bash_aliases\nfi\n\nif [[ -f ~/.bashrc.local ]]; then\n  . ~/.bashrc.local\nfi\n\n# enable programmable completion features (you don't need to enable\n# this, if it's already enabled in /etc/bash.bashrc and /etc/profile\n# sources /etc/bash.bashrc).\nif ! shopt -oq posix; then\n  if [[ -f /usr/share/bash-completion/bash_completion ]]; then\n    . /usr/share/bash-completion/bash_completion\n  elif [[ -f /etc/bash_completion ]]; then\n    . /etc/bash_completion\n  fi\nfi\n"
  },
  {
    "path": "lib/cli.bash",
    "content": "#!/usr/bin/env bash\n\n_omb_module_require lib:utils\n\nfunction _omb_cmd_help {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_changelog {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_plugin {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_pull {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_reload {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_theme {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_update {\n  echo 'Not yet implemented'\n}\nfunction _omb_cmd_version {\n  echo 'Not yet implemented'\n}\n\nfunction omb {\n  if (($# == 0)); then\n    _omb_cmd_help\n    return 2\n  fi\n\n  # Subcommand functions start with _ so that they don't\n  # appear as completion entries when looking for `omb`\n  if ! _omb_util_function_exists \"_omb_cmd_$1\"; then\n    _omb_cmd_help\n    return 2\n  fi\n\n  _omb_cmd_\"$@\"\n}\n\n\n_omb_module_require lib:utils\n\n_omb_lib_cli__init_shopt=\n_omb_util_get_shopt -v _omb_lib_cli__init_shopt extglob\nshopt -s extglob\n\nfunction _comp_cmd_omb__describe {\n  eval \"set -- $1 \\\"\\${$2[@]}\\\"\"\n  local type=$1; shift\n  local word desc words iword=0\n  for word; do\n    desc=\"($type) ${word#*:}\" # unused\n    word=${word%%:*}\n    words[iword++]=$word\n  done\n\n  local -a filtered\n  _omb_util_split_lines filtered \"$(compgen -W '\"${words[@]}\"' -- \"${COMP_WORDS[COMP_CWORD]}\")\"\n  COMPREPLY+=(\"${filtered[@]}\")\n}\n\nfunction _comp_cmd_omb__get_available_plugins {\n  available_plugins=()\n\n  local -a plugin_files\n  _omb_util_glob_expand plugin_files '{\"$OSH\",\"$OSH_CUSTOM\"}/plugins/*/{_*,*.plugin.{bash,sh}}'\n\n  local plugin\n  for plugin in \"${plugin_files[@]##*/}\"; do\n    case $plugin in\n    *.plugin.bash) plugin=${plugin%.plugin.bash} ;;\n    *.plugin.sh) plugin=${plugin%.plugin.sh} ;;\n    *) plugin=${plugin#_} ;;\n    esac\n\n    _omb_util_array_contains available_plugins \"$plugin\" ||\n      available_plugins+=(\"$plugin\")\n  done\n}\n\nfunction _comp_cmd_omb__get_available_themes {\n  available_themes=()\n\n  local -a theme_files\n  _omb_util_glob_expand theme_files '{\"$OSH\",\"$OSH_CUSTOM\"}/themes/*/{_*,*.theme.{bash,sh}}'\n\n  local theme\n  for theme in \"${theme_files[@]##*/}\"; do\n    case $theme in\n    *.theme.bash) theme=${theme%.theme.bash} ;;\n    *.theme.sh) theme=${theme%.theme.sh} ;;\n    *) theme=${theme#_} ;;\n    esac\n\n    _omb_util_array_contains available_themes \"$theme\" ||\n      available_themes+=(\"$theme\")\n  done\n}\n\n## @fn _comp_cmd_omb__get_valid_plugins type\nfunction _comp_cmd_omb__get_valid_plugins {\n  if [[ $1 == disable ]]; then\n    # if command is \"disable\", only offer already enabled plugins\n    valid_plugins=(\"${plugins[@]}\")\n  else\n    local -a available_plugins\n    _comp_cmd_omb__get_available_plugins\n    valid_plugins=(\"${available_plugins[@]}\")\n\n    # if command is \"enable\", remove already enabled plugins\n    if [[ ${COMP_WORDS[2]} == enable ]]; then\n      _omb_util_array_remove valid_plugins \"${plugins[@]}\"\n    fi\n  fi\n}\n\nfunction _comp_cmd_omb {\n  local shopt\n  _omb_util_get_shopt extglob\n  shopt -s extglob\n\n  if ((COMP_CWORD == 1)); then\n    local -a cmds=(\n      'changelog:Print the changelog'\n      'help:Usage information'\n      'plugin:Manage plugins'\n      'pr:Manage Oh My Bash Pull Requests'\n      'reload:Reload the current bash session'\n      'theme:Manage themes'\n      'update:Update Oh My Bash'\n      'version:Show the version'\n    )\n    _comp_cmd_omb__describe 'command' cmds\n  elif ((COMP_CWORD ==2)); then\n    case \"${COMP_WORDS[1]}\" in\n    changelog)\n      local -a refs\n      _omb_util_split_lines refs \"$(command git -C \"$OSH\" for-each-ref --format=\"%(refname:short):%(subject)\" refs/heads refs/tags)\"\n      _comp_cmd_omb__describe 'command' refs ;;\n    plugin)\n      local -a subcmds=(\n        'disable:Disable plugin(s)'\n        'enable:Enable plugin(s)'\n        'info:Get plugin information'\n        'list:List plugins'\n        'load:Load plugin(s)'\n      )\n      _comp_cmd_omb__describe 'command' subcmds ;;\n    pr)\n      local -a subcmds=(\n        'clean:Delete all Pull Request branches'\n        'test:Test a Pull Request'\n      )\n      _comp_cmd_omb__describe 'command' subcmds ;;\n    theme)\n      local -a subcmds=(\n        'list:List themes'\n        'set:Set a theme in your .zshrc file'\n        'use:Load a theme'\n      )\n      _comp_cmd_omb__describe 'command' subcmds ;;\n    esac\n  elif ((COMP_CWORD == 3)); then\n    case \"${COMP_WORDS[1]}::${COMP_WORDS[2]}\" in\n    plugin::@(disable|enable|load))\n      local -a valid_plugins\n      _comp_cmd_omb__get_valid_plugins \"${COMP_WORDS[2]}\"\n      _comp_cmd_omb__describe 'plugin' valid_plugins ;;\n    plugin::info)\n      local -a available_plugins\n      _comp_cmd_omb__get_available_plugins\n      _comp_cmd_omb__describe 'plugin' available_plugins ;;\n    theme::@(set|use))\n      local -a available_themes\n      _comp_cmd_omb__get_available_themes\n      _comp_cmd_omb__describe 'theme' available_themes ;;\n    esac\n  elif ((COMP_CWORD > 3)); then\n    case \"${COMP_WORDS[1]}::${COMP_WORDS[2]}\" in\n    plugin::@(enable|disable|load))\n      local -a valid_plugins\n      _comp_cmd_omb__get_valid_plugins \"${COMP_WORDS[2]}\"\n\n      # Remove plugins already passed as arguments\n      # NOTE: $((COMP_CWORD - 1)) is the last plugin argument completely passed, i.e. that which\n      # has a space after them. This is to avoid removing plugins partially passed, which makes\n      # the completion not add a space after the completed plugin.\n      _omb_util_array_remove valid_plugins \"${COMP_WORDS[@]:3:COMP_CWORD-3}\"\n\n      _comp_cmd_omb__describe 'plugin' valid_plugins ;;\n    esac\n  fi\n\n  [[ :$shopt: == *:extglob:* ]] || shopt -u extglob\n  return 0\n}\n\ncomplete -F _comp_cmd_omb omb\n\n[[ :$_omb_lib_cli__init_shopt: == *:extglob:* ]] || shopt -u extglob\nunset -v _omb_lib_cli__init_shopt\n"
  },
  {
    "path": "lib/directories.sh",
    "content": "#! bash oh-my-bash.module\n# Common directories functions\n\nOMB_DIRECTORIES_CD_USE_PUSHD=false\n\n_omb_cd_dirstack=(\"$PWD\")\n\n# A clone of the Zsh `cd' builtin command.  This supports the numbered option\n# `-1', `-2', etc.\nfunction _omb_directories_cd {\n  local -i index\n  if [[ $# -eq 1 && $1 =~ ^-[1-9]+$ ]]; then\n    index=${1#-}\n    if ((index >= ${#_omb_cd_dirstack[@]})); then\n      builtin echo \"cd: no such entry in dir stack\" >&2\n      return 1\n    fi\n    set -- \"${_omb_cd_dirstack[index]}\"\n  fi\n  if [[ ${OMB_DIRECTORIES_CD_USE_PUSHD-} == true ]]; then\n    local oldpwd=$OLDPWD\n    builtin pushd . >/dev/null &&\n      OLDPWD=$oldpwd builtin cd \"$@\" &&\n      oldpwd=$OLDPWD &&\n      builtin pushd . >/dev/null &&\n      for ((index = ${#DIRSTACK[@]} - 1; index >= 1; index--)); do\n        if [[ ${DIRSTACK[0]/#~/$HOME} == \"${DIRSTACK[index]}\" ]]; then\n          builtin popd \"+$index\" >/dev/null || return 1\n        fi\n      done\n    local status=$?\n    _omb_cd_dirstack=(\"${DIRSTACK[@]/#~/$HOME}\")\n    OLDPWD=$oldpwd\n  else\n    [[ ${_omb_cd_dirstack[0]} == \"$PWD\" ]] ||\n      _omb_cd_dirstack=(\"$PWD\" \"${_omb_cd_dirstack[@]}\")\n    builtin cd \"$@\" &&\n      _omb_cd_dirstack=(\"$PWD\" \"${_omb_cd_dirstack[@]}\")\n    local status=$?\n\n    for ((index = ${#_omb_cd_dirstack[@]} - 1; index >= 1; index--)); do\n      if [[ ${_omb_cd_dirstack[0]} == \"${_omb_cd_dirstack[index]}\" ]]; then\n        unset -v '_omb_cd_dirstack[index]'\n      fi\n    done\n    _omb_cd_dirstack=(\"${_omb_cd_dirstack[@]}\")\n  fi\n  return \"$status\"\n}\n_omb_util_alias cd='_omb_directories_cd'\n\n_omb_util_alias cd..='cd ../'                         # Go back 1 directory level (for fast typers)\n_omb_util_alias ..='cd ../'                           # Go back 1 directory level\n_omb_util_alias ...='cd ../../'                       # Go back 2 directory levels\n_omb_util_alias .3='cd ../../../'                     # Go back 3 directory levels\n_omb_util_alias .4='cd ../../../../'                  # Go back 4 directory levels\n_omb_util_alias .5='cd ../../../../../'               # Go back 5 directory levels\n_omb_util_alias .6='cd ../../../../../../'            # Go back 6 directory levels\n\n_omb_util_alias -='cd -'\n_omb_util_alias 1='cd -'\n_omb_util_alias 2='cd -2'\n_omb_util_alias 3='cd -3'\n_omb_util_alias 4='cd -4'\n_omb_util_alias 5='cd -5'\n_omb_util_alias 6='cd -6'\n_omb_util_alias 7='cd -7'\n_omb_util_alias 8='cd -8'\n_omb_util_alias 9='cd -9'\n\n_omb_util_alias md='mkdir -p'\n_omb_util_alias rd='rmdir'\n_omb_util_alias d='dirs -v | head -10'\n_omb_util_alias po='popd'\n\n# List directory contents\n_omb_util_alias lsa='ls -lha'\n_omb_util_alias l='ls -lha'\n_omb_util_alias ll='ls -lh'\n_omb_util_alias la='ls -lhA'\n\n# From bourne-shell.sh (unused)\n#_omb_util_alias l='ls -CF'\n#_omb_util_alias ll='ls -laF'\n#_omb_util_alias la='ls -A'\n"
  },
  {
    "path": "lib/functions.sh",
    "content": "#! bash oh-my-bash.module\nfunction bash_stats() {\n  fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] \" \" CMD[a]/count*100 \"% \" a;}' | grep -v \"./\" | column -c3 -s \" \" -t | sort -nr | nl |  head -n20\n}\n\nfunction uninstall_oh_my_bash() {\n  source \"$OSH\"/tools/uninstall.sh\n}\n\nfunction upgrade_oh_my_bash() {\n  source \"$OSH\"/tools/upgrade.sh\n}\n\nfunction take() {\n  mkdir -p \"$1\"\n  cd \"$1\" || exit\n}\n\nfunction open_command() {\n  local open_cmd\n\n  # define the open command\n  case \"$OSTYPE\" in\n    darwin*)  open_cmd='open' ;;\n    cygwin*)  open_cmd='cygstart' ;;\n    linux*)   open_cmd='xdg-open' ;;\n    msys*)    open_cmd='start \"\"' ;;\n    *)        _omb_util_print \"Platform $OSTYPE not supported\"\n              return 1\n              ;;\n  esac\n\n  # don't use nohup on OSX\n  if [[ \"$OSTYPE\" == darwin* ]]; then\n    $open_cmd \"$@\" &>/dev/null\n  else\n    nohup $open_cmd \"$@\" &>/dev/null\n  fi\n}\n\n#\n# Get the value of an alias.\n#\n# Arguments:\n#    1. alias - The alias to get its value from\n# STDOUT:\n#    The value of alias $1 (if it has one).\n# Return value:\n#    0 if the alias was found,\n#    1 if it does not exist\n#\nif ((_omb_bash_version >= 40000)); then\n  function alias_value() {\n    [[ ${BASH_ALIASES[$1]+set} ]] && _omb_util_print \"${BASH_ALIASES[$1]}\"\n  }\nelse\n  function alias_value() {\n    local value=\n    value=$(alias \"$1\" 2>/dev/null) && eval \"value=${value#*=}\" && _omb_util_print \"$value\"\n  }\nfi\n\n#\n# Try to get the value of an alias,\n# otherwise return the input.\n#\n# Arguments:\n#    1. alias - The alias to get its value from\n# STDOUT:\n#    The value of alias $1, or $1 if there is no alias $1.\n# Return value:\n#    Always 0\n#\nfunction try_alias_value() {\n    alias_value \"$1\" || _omb_util_print \"$1\"\n}\n\n#\n# Set variable \"$1\" to default value \"$2\" if \"$1\" is not yet defined.\n#\n# Arguments:\n#    1. name - The variable to set\n#    2. val  - The default value\n# Return value:\n#    0 if the variable exists, 3 if it was set\n#\nfunction default() {\n    typeset -p \"$1\" &>/dev/null && return 0\n    typeset -g \"$1\"=\"$2\"   && return 3\n}\n\n#\n# Set enviroment variable \"$1\" to default value \"$2\" if \"$1\" is not yet defined.\n#\n# Arguments:\n#    1. name - The env variable to set\n#    2. val  - The default value\n# Return value:\n#    0 if the env variable exists, 3 if it was set\n#\nfunction env_default() {\n    env | grep -q \"^$1=\" && return 0\n    export \"$1=$2\"       && return 3\n}\n"
  },
  {
    "path": "lib/git.sh",
    "content": "#! bash oh-my-bash.module\n# Outputs current branch info in prompt format\n\n_omb_module_require lib:omb-prompt-colors\n_omb_module_require lib:omb-prompt-base\n_omb_module_require lib:omb-deprecate\n\n: \"${_omb_git_post_1_7_2:=${POST_1_7_2_GIT:-}}\"\n_omb_deprecate_declare 20000 POST_1_7_2_GIT _omb_git_post_1_7_2 sync\n\n# # Note: The same name of a functionis defined in omb-prompt-base.  We comment\n# # out this function for now.\n# function git_prompt_info {\n#   local ref\n#   if [[ $(_omb_prompt_git config --get oh-my-bash.hide-status 2>/dev/null) != 1 ]]; then\n#     ref=$(_omb_prompt_git symbolic-ref HEAD 2> /dev/null) || \\\n#     ref=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) || return 0\n#     _omb_util_print \"$OSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$OSH_THEME_GIT_PROMPT_SUFFIX\"\n#   fi\n# }\n\n# Checks if working tree is dirty\nfunction parse_git_dirty {\n  local STATUS=\n  local -a FLAGS=('--porcelain')\n  if [[ $(_omb_prompt_git config --get oh-my-bash.hide-dirty) != 1 ]]; then\n    if ((${_omb_git_post_1_7_2:=$(git_compare_version \"1.7.2\")} > 0)); then\n      FLAGS+=('--ignore-submodules=dirty')\n    fi\n    if [[ $DISABLE_UNTRACKED_FILES_DIRTY == \"true\" ]]; then\n      FLAGS+=('--untracked-files=no')\n    fi\n    STATUS=$(_omb_prompt_git status \"${FLAGS[@]}\" 2> /dev/null | tail -n1)\n  fi\n  if [[ $STATUS ]]; then\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_DIRTY\"\n  else\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_CLEAN\"\n  fi\n}\n\n# Gets the difference between the local and remote branches\nfunction git_remote_status {\n  local git_remote_origin=$(_omb_prompt_git rev-parse --verify ${hook_com[branch]}@{upstream} --symbolic-full-name 2>/dev/null)\n  local remote=${git_remote_origin/refs\\/remotes\\//}\n  if [[ $remote ]]; then\n    local ahead=$(_omb_prompt_git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)\n    local behind=$(_omb_prompt_git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)\n\n    local git_remote_status git_remote_status_detailed\n    if ((ahead == 0 && behind == 0)); then\n      git_remote_status=$OSH_THEME_GIT_PROMPT_EQUAL_REMOTE\n    elif ((ahead > 0 && behind == 0)); then\n      git_remote_status=$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE\n      git_remote_status_detailed=$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))$_omb_prompt_reset_color\n    elif ((behind > 0 && ahead == 0)); then\n      git_remote_status=$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE\n      git_remote_status_detailed=$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))$_omb_prompt_reset_color\n    elif ((ahead > 0 && behind > 0)); then\n      git_remote_status=$OSH_THEME_GIT_PROMPT_DIVERGED_REMOTE\n      git_remote_status_detailed=$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))$_omb_prompt_reset_color$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$OSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))$_omb_prompt_reset_color\n    fi\n\n    if [[ $OSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]]; then\n      git_remote_status=$OSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$OSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX\n    fi\n\n    _omb_util_print \"$git_remote_status\"\n  fi\n}\n\n# Outputs the name of the current branch\n# Usage example: git pull origin $(git_current_branch)\n# Using '--quiet' with 'symbolic-ref' will not cause a fatal error (128) if\n# it's not a symbolic ref, but in a Git repo.\nfunction git_current_branch {\n  local ref\n  ref=$(_omb_prompt_git symbolic-ref --quiet HEAD 2> /dev/null)\n  local ret=$?\n  if [[ $ret != 0 ]]; then\n    [[ $ret == 128 ]] && return  # no git repo.\n    ref=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) || return\n  fi\n  _omb_util_print ${ref#refs/heads/}\n}\n\n\n# Gets the number of commits ahead from remote\nfunction git_commits_ahead {\n  if _omb_prompt_git rev-parse --git-dir &>/dev/null; then\n    local commits=$(_omb_prompt_git rev-list --count @{upstream}..HEAD)\n    if ((commits != 0)); then\n      _omb_util_print \"$OSH_THEME_GIT_COMMITS_AHEAD_PREFIX$commits$OSH_THEME_GIT_COMMITS_AHEAD_SUFFIX\"\n    fi\n  fi\n}\n\n# Gets the number of commits behind remote\nfunction git_commits_behind {\n  if _omb_prompt_git rev-parse --git-dir &>/dev/null; then\n    local commits=$(_omb_prompt_git rev-list --count HEAD..@{upstream})\n    if ((commits != 0)); then\n      _omb_util_print \"$OSH_THEME_GIT_COMMITS_BEHIND_PREFIX$commits$OSH_THEME_GIT_COMMITS_BEHIND_SUFFIX\"\n    fi\n  fi\n}\n\n# Outputs if current branch is ahead of remote\nfunction git_prompt_ahead {\n  if [[ $(_omb_prompt_git rev-list origin/$(git_current_branch)..HEAD 2> /dev/null) ]]; then\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_AHEAD\"\n  fi\n}\n\n# Outputs if current branch is behind remote\nfunction git_prompt_behind {\n  if [[ $(_omb_prompt_git rev-list HEAD..origin/$(git_current_branch) 2> /dev/null) ]]; then\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_BEHIND\"\n  fi\n}\n\n# Outputs if current branch exists on remote or not\nfunction git_prompt_remote {\n  if [[ $(_omb_prompt_git show-ref origin/$(git_current_branch) 2> /dev/null) ]]; then\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_REMOTE_EXISTS\"\n  else\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_REMOTE_MISSING\"\n  fi\n}\n\n# Formats prompt string for current git commit short SHA\nfunction git_prompt_short_sha {\n  local SHA\n  SHA=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) &&\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER\"\n}\n\n# Formats prompt string for current git commit long SHA\nfunction git_prompt_long_sha {\n  local SHA\n  SHA=$(_omb_prompt_git rev-parse HEAD 2> /dev/null) &&\n    _omb_util_print \"$OSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$OSH_THEME_GIT_PROMPT_SHA_AFTER\"\n}\n\n# Get the status of the working tree\nfunction git_prompt_status {\n  local INDEX=$(_omb_prompt_git status --porcelain -b 2> /dev/null)\n  local STATUS=\n  if command grep -qE '^\\?\\? ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_UNTRACKED$STATUS\n  fi\n  if command grep -q '^[AM]  ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_ADDED$STATUS\n  fi\n  if command grep -qE '^[ A]M |^ T ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_MODIFIED$STATUS\n  fi\n  if command grep -q '^R  ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_RENAMED$STATUS\n  fi\n  if command grep -qE '^[ A]D |D  ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_DELETED$STATUS\n  fi\n  if _omb_prompt_git rev-parse --verify refs/stash &> /dev/null; then\n    STATUS=$OSH_THEME_GIT_PROMPT_STASHED$STATUS\n  fi\n  if command grep -q '^UU ' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_UNMERGED$STATUS\n  fi\n  if command grep -q '^## [^ ]\\+ .*ahead' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_AHEAD$STATUS\n  fi\n  if command grep -q '^## [^ ]\\+ .*behind' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_BEHIND$STATUS\n  fi\n  if command grep -q '^## [^ ]\\+ .*diverged' <<< \"$INDEX\"; then\n    STATUS=$OSH_THEME_GIT_PROMPT_DIVERGED$STATUS\n  fi\n  _omb_util_print \"$STATUS\"\n}\n\n# Compares the provided version of git to the version installed and on path\n# Outputs -1, 0, or 1 if the installed version is less than, equal to, or\n# greater than the input version, respectively.\nfunction git_compare_version {\n  local INPUT_GIT_VERSION INSTALLED_GIT_VERSION\n  _omb_util_split INPUT_GIT_VERSION \"$1\" '.'\n  _omb_util_split INSTALLED_GIT_VERSION \"$(_omb_prompt_git --version 2>/dev/null)\"\n  _omb_util_split INSTALLED_GIT_VERSION \"${INSTALLED_GIT_VERSION[2]}\" '.'\n\n  local i\n  for i in {0..2}; do\n    if ((INSTALLED_GIT_VERSION[i] > INPUT_GIT_VERSION[i])); then\n      _omb_util_print 1\n      return 0\n    fi\n    if ((INSTALLED_GIT_VERSION[i] < INPUT_GIT_VERSION[i])); then\n      _omb_util_print -1\n      return 0\n    fi\n  done\n  _omb_util_print 0\n}\n\n# Outputs the name of the current user\n# Usage example: $(git_current_user_name)\nfunction git_current_user_name {\n  _omb_prompt_git config user.name 2>/dev/null\n}\n\n# Outputs the email of the current user\n# Usage example: $(git_current_user_email)\nfunction git_current_user_email {\n  _omb_prompt_git config user.email 2>/dev/null\n}\n"
  },
  {
    "path": "lib/grep.sh",
    "content": "#! bash oh-my-bash.module\n\n# is x grep argument available?\nfunction _omb_grep_flag_available {\n  echo | grep \"$1\" \"\" >/dev/null 2>&1\n}\n\n_omb_grep_options=()\n\n# color grep results\nif _omb_grep_flag_available --color=auto; then\n  _omb_grep_options+=( \"--color=auto\" )\nfi\n\n# ignore VCS folders (if the necessary grep flags are available)\n_omb_grep_vcs_folders=\"{.bzr,CVS,.git,.hg,.svn}\"\n\nif _omb_grep_flag_available --exclude-dir=.cvs; then\n  _omb_grep_options+=( \"--exclude-dir=$_omb_grep_vcs_folders\" )\nelif _omb_grep_flag_available --exclude=.cvs; then\n  _omb_grep_options+=( \"--exclude=$_omb_grep_vcs_folders\" )\nfi\n\n# export grep settings\nif ((${#_omb_grep_options[@]} > 0)); then\n  _omb_util_alias grep=\"grep ${_omb_grep_options[*]}\"\n  _omb_util_alias fgrep=\"grep -F ${_omb_grep_options[*]}\"\n  _omb_util_alias egrep=\"grep -E ${_omb_grep_options[*]}\"\nelse\n  _omb_util_alias fgrep='grep -F'\n  _omb_util_alias egrep='grep -E'\nfi\n\n# clean up\nunset -v _omb_grep_options\nunset -v _omb_grep_vcs_folders\nunset -f _omb_grep_flag_available\n"
  },
  {
    "path": "lib/history.sh",
    "content": "#! bash oh-my-bash.module\n\n# A part of this file came from bash-sensible [1].  The current version is\n# based on commit eb82f9e8.\n#\n# [1] https://github.com/mrzool/bash-sensible\n#     Copyright (c) 2015 Mattia Tezzele, provided under the MIT license.\n\n## Command history configuration\nif [ -z \"$HISTFILE\" ]; then\n  HISTFILE=$HOME/.bash_history\nfi\n\n\n# some moderate history controls taken from sensible.bash\n## SANE HISTORY DEFAULTS ##\n\n# Append to the history file, don't overwrite it\nshopt -s histappend\n\n# Save multi-line commands as one command\nshopt -s cmdhist\n\n# Re-edit the command line for failing history expansions\nshopt -s histreedit\n\n# Re-edit the result of history expansions\nshopt -s histverify\n\n# save history with newlines instead of ; where possible\nshopt -s lithist\n\n# Record each line as it gets issued\n_omb_util_add_prompt_command 'history -a'\n\n# Unlimited history size. Doesn't appear to slow things down, so why not?\n# Export these variables to apply them also to the child shell sessions.\n#\n# Note: There are multiple ways to realize the unlimited history size.\n#\n# 1) A documented way is HISTSIZE=-1.  However, this is only supported in bash\n#   >= 4.3 and it causes clearing the user's history in bash < 4.3.  Even if\n#   we use HISTSIZE=-1 only when the current Bash version is 4.3 or above, it\n#   clears the user's history file when a lower version of Bash is in the\n#   system and it is started without setting HISTSIZE (e.g. when the Bash is\n#   started with --norc or the specified init file is broken).  One could\n#   consider giving up making HISTSIZE and HISTFILESIZE environment variables,\n#   but then it truncates the user's history file when a new Bash is started\n#   without setting HISTSIZE.\n#\n# 2) Another well known trick is to set HISTSIZE and HISTFILESIZE to an empty\n#   string.  This works as unlimited history in all the Bash versions.\n#   However, an empty HISTSIZE environment variable causes a startup error in\n#   Mksh.  One could consider giving up making HISTSIZE environment variable,\n#   but again, this will truncate the user's history file with Bash without\n#   configuration.  One might consider defining a shell function or an alias to\n#   start mksh without the HISTSIZE environment variable, but the users\n#   wouldn't like it.  In addition, the truncated history problem persists with\n#   the child Bash started within persists.\n#\n# 3) We instead consider explicitly specifying to HISTSIZE a large number that\n#   is unlikely to be reached.  A typical value might be 10000 or 100000, but\n#   that can still be reached by heavy users.  We instead specify a number as\n#   large as possible.  The number shall not exceed INT_MAX, or otherwise\n#   HISTSIZE becomes negative and clears the user's history.  In case there is\n#   a system where `int' is a 16-bit signed integer, we choose 0x7FFF7FFF so\n#   that the lower word is 0x7FFF.  This still does not ensure that the 16-bit\n#   integer becomes 0x7FFF after overflow (since the overflow of the signed\n#   integer causes the undefined behavior in the C standard), but it is safer\n#   in typical implementations.\n#\n# See discussion on https://github.com/ohmybash/oh-my-bash/issues/586.\nexport HISTSIZE=$((0x7FFF7FFF))\nexport HISTFILESIZE=$((0x7FFF7FFF))\n\n# Avoid duplicate entries\nHISTCONTROL=\"erasedups:ignoreboth\"\n\n# Don't record some commands\nHISTIGNORE=\"exit:ls:bg:fg:history:clear\"\n\n# Enable incremental history search with up/down arrows (also Readline goodness)\n# Learn more about this here: https://codeinthehole.com/tips/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/\n# bash4 specific ??\nbind '\"\\e[A\": history-search-backward'\nbind '\"\\e[B\": history-search-forward'\nbind '\"\\e[C\": forward-char'\nbind '\"\\e[D\": backward-char'\n\n# Use standard ISO 8601 timestamp\n# %F equivalent to %Y-%m-%d\n# %T equivalent to %H:%M:%S (24-hours format)\n\n# Show history\ncase $HIST_STAMPS in\n  \"[mm/dd/yyyy]\") HISTTIMEFORMAT=$'\\033[31m[%m/%d/%Y] \\033[36m[%T]\\033[0m ' ;;\n  \"[dd.mm.yyyy]\") HISTTIMEFORMAT=$'\\033[31m[%d.%m.%Y] \\033[36m[%T]\\033[0m ' ;;\n  \"[yyyy-mm-dd]\") HISTTIMEFORMAT=$'\\033[31m[%F] \\033[36m[%T]\\033[0m ' ;;\n  \"mm/dd/yyyy\") HISTTIMEFORMAT='%m/%d/%Y %T ' ;;\n  \"dd.mm.yyyy\") HISTTIMEFORMAT='%d.%m.%Y %T ' ;;\n  \"yyyy-mm-dd\"|*) HISTTIMEFORMAT='%F %T ' ;;\nesac\n"
  },
  {
    "path": "lib/misc.sh",
    "content": "#! bash oh-my-bash.module\n## jobs\n#setopt long_list_jobs\n\n## pager\nenv_default PAGER 'less'\nenv_default LESS '-R'\n\n## super user alias\n_omb_util_alias _='sudo'\n_omb_util_alias please='sudo'\n\n## more intelligent acking for ubuntu users\nif _omb_util_binary_exists ack-grep; then\n  _omb_util_alias afind='ack-grep -il'\nelse\n  _omb_util_alias afind='ack -il'\nfi\n\n# only define LC_CTYPE if undefined\nif [[ -z \"$LC_CTYPE\" && -z \"$LC_ALL\" ]]; then\n  export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG\nfi\n\n# recognize comments\nshopt -s interactive_comments\n"
  },
  {
    "path": "lib/mo.sh",
    "content": "#! bash oh-my-bash.module\n#\n#/ Mo is a mustache template rendering software written in bash.  It inserts\n#/ environment variables into templates.\n#/\n#/ Simply put, mo will change {{VARIABLE}} into the value of that\n#/ environment variable.  You can use {{#VARIABLE}}content{{/VARIABLE}} to\n#/ conditionally display content or iterate over the values of an array.\n#/\n#/ Learn more about mustache templates at https://mustache.github.io/\n#/\n#/ Simple usage:\n#/\n#/    mo [--false] [--help] [--source=FILE] filenames...\n#/\n#/ --false       - Treat the string \"false\" as empty for conditionals.\n#/ --help        - This message.\n#/ --source=FILE - Load FILE into the environment before processing templates.\n#\n# Mo is under a MIT style licence with an additional non-advertising clause.\n# See LICENSE.md for the full text.\n#\n# This is open source!  Please feel free to contribute.\n#\n# https://github.com/tests-always-included/mo\n\n\n# Public: Template parser function.  Writes templates to stdout.\n#\n# $0            - Name of the mo file, used for getting the help message.\n# --false       - Treat \"false\" as an empty value.  You may set the\n#                 MO_FALSE_IS_EMPTY environment variable instead to a non-empty\n#                 value to enable this behavior.\n# --help        - Display a help message.\n# --source=FILE - Source a file into the environment before processint\n#                 template files.\n# --            - Used to indicate the end of options.  You may optionally\n#                 use this when filenames may start with two hyphens.\n# $@            - Filenames to parse.\n#\n# Mo uses the following environment variables:\n#\n# MO_FALSE_IS_EMPTY   - When set to a non-empty value, the string \"false\"\n#                       will be treated as an empty value for the purposes\n#                       of conditionals.\n# MO_ORIGINAL_COMMAND - Used to find the `mo` program in order to generate\n#                       a help message.\n#\n# Returns nothing.\nfunction mo {\n    # This function executes in a subshell so IFS is reset.\n    # Namespace this variable so we don't conflict with desired values.\n    local moContent f2source files doubleHyphens\n\n    IFS=$' \\n\\t'\n    files=()\n    doubleHyphens=false\n\n    if [[ $# -gt 0 ]]; then\n        for arg in \"$@\"; do\n            if $doubleHyphens; then\n                # After we encounter two hyphens together, all the rest\n                # of the arguments are files.\n                files=(\"${files[@]}\" \"$arg\")\n            else\n                case \"$arg\" in\n                    -h|--h|--he|--hel|--help|-\\?)\n                        _moUsage \"$0\"\n                        exit 0\n                        ;;\n\n                    --false)\n                        # shellcheck disable=SC2030\n                        MO_FALSE_IS_EMPTY=true\n                        ;;\n\n                    --source=*)\n                        f2source=\"${arg#--source=}\"\n\n                        if [[ -f \"$f2source\" ]]; then\n                            # shellcheck disable=SC1090\n                            . \"$f2source\"\n                        else\n                            echo \"No such file: $f2source\" >&2\n                            exit 1\n                        fi\n                        ;;\n\n                    --)\n                        # Set a flag indicating we've encountered double hyphens\n                        doubleHyphens=true\n                        ;;\n\n                    *)\n                        # Every arg that is not a flag or a option should be a file\n                        files=(\"${files[@]}\" \"$arg\")\n                        ;;\n                esac\n            fi\n        done\n    fi\n\n    _moGetContent moContent \"${files[@]}\"\n    _moParse \"$moContent\" \"\" true\n}\n\n\n# Internal: Scan content until the right end tag is found.  Creates an array\n# with the following members:\n#\n#   [0] = Content before end tag\n#   [1] = End tag (complete tag)\n#   [2] = Content after end tag\n#\n# Everything using this function uses the \"standalone tags\" logic.\n#\n# $1 - Name of variable for the array\n# $2 - Content\n# $3 - Name of end tag\n# $4 - If -z, do standalone tag processing before finishing\n#\n# Returns nothing.\nfunction _moFindEndTag {\n    local content remaining scanned standaloneBytes tag\n\n    #: Find open tags\n    scanned=\"\"\n    _moSplit content \"$2\" '{{' '}}'\n\n    while [[ \"${#content[@]}\" -gt 1 ]]; do\n        _moTrimWhitespace tag \"${content[1]}\"\n\n        #: Restore content[1] before we start using it\n        content[1]='{{'\"${content[1]}\"'}}'\n\n        case $tag in\n            '#'* | '^'*)\n                #: Start another block\n                scanned=\"${scanned}${content[0]}${content[1]}\"\n                _moTrimWhitespace tag \"${tag:1}\"\n                _moFindEndTag content \"${content[2]}\" \"$tag\" \"loop\"\n                scanned=\"${scanned}${content[0]}${content[1]}\"\n                remaining=${content[2]}\n                ;;\n\n            '/'*)\n                #: End a block - could be ours\n                _moTrimWhitespace tag \"${tag:1}\"\n                scanned=\"$scanned${content[0]}\"\n\n                if [[ \"$tag\" == \"$3\" ]]; then\n                    #: Found our end tag\n                    if [[ -z \"${4-}\" ]] && _moIsStandalone standaloneBytes \"$scanned\" \"${content[2]}\" true; then\n                        #: This is also a standalone tag - clean up whitespace\n                        #: and move those whitespace bytes to the \"tag\" element\n                        standaloneBytes=( $standaloneBytes )\n                        content[1]=\"${scanned:${standaloneBytes[0]}}${content[1]}${content[2]:0:${standaloneBytes[1]}}\"\n                        scanned=\"${scanned:0:${standaloneBytes[0]}}\"\n                        content[2]=\"${content[2]:${standaloneBytes[1]}}\"\n                    fi\n\n                    local \"$1\" && _moIndirectArray \"$1\" \"$scanned\" \"${content[1]}\" \"${content[2]}\"\n                    return 0\n                fi\n\n                scanned=\"$scanned${content[1]}\"\n                remaining=${content[2]}\n                ;;\n\n            *)\n                #: Ignore all other tags\n                scanned=\"${scanned}${content[0]}${content[1]}\"\n                remaining=${content[2]}\n                ;;\n        esac\n\n        _moSplit content \"$remaining\" '{{' '}}'\n    done\n\n    #: Did not find our closing tag\n    scanned=\"$scanned${content[0]}\"\n    local \"$1\" && _moIndirectArray \"$1\" \"${scanned}\" \"\" \"\"\n}\n\n\n# Internal: Find the first index of a substring.  If not found, sets the\n# index to -1.\n#\n# $1 - Destination variable for the index\n# $2 - Haystack\n# $3 - Needle\n#\n# Returns nothing.\nfunction _moFindString {\n    local pos string\n\n    string=${2%%$3*}\n    [[ \"$string\" == \"$2\" ]] && pos=-1 || pos=${#string}\n    local \"$1\" && _moIndirect \"$1\" \"$pos\"\n}\n\n\n# Internal: Generate a dotted name based on current context and target name.\n#\n# $1 - Target variable to store results\n# $2 - Context name\n# $3 - Desired variable name\n#\n# Returns nothing.\nfunction _moFullTagName {\n    if [[ -z \"${2-}\" ]] || [[ \"$2\" == *.* ]]; then\n        local \"$1\" && _moIndirect \"$1\" \"$3\"\n    else\n        local \"$1\" && _moIndirect \"$1\" \"${2}.${3}\"\n    fi\n}\n\n\n# Internal: Fetches the content to parse into a variable.  Can be a list of\n# partials for files or the content from stdin.\n#\n# $1   - Variable name to assign this content back as\n# $2-@ - File names (optional)\n#\n# Returns nothing.\nfunction _moGetContent {\n    local content filename target\n\n    target=$1\n    shift\n    if [[ \"${#@}\" -gt 0 ]]; then\n        content=\"\"\n\n        for filename in \"$@\"; do\n            #: This is so relative paths work from inside template files\n            content=\"$content\"'{{>'\"$filename\"'}}'\n        done\n    else\n        _moLoadFile content /dev/stdin\n    fi\n\n    local \"$target\" && _moIndirect \"$target\" \"$content\"\n}\n\n\n# Internal: Indent a string, placing the indent at the beginning of every\n# line that has any content.\n#\n# $1 - Name of destination variable to get an array of lines\n# $2 - The indent string\n# $3 - The string to reindent\n#\n# Returns nothing.\nfunction _moIndentLines {\n    local content fragment len posN posR result trimmed\n\n    result=\"\"\n    len=$((${#3} - 1))\n\n    #: This removes newline and dot from the workaround in _moPartial\n    content=\"${3:0:$len}\"\n\n    if [[ -z \"${2-}\" ]]; then\n        local \"$1\" && _moIndirect \"$1\" \"$content\"\n\n        return 0\n    fi\n\n    _moFindString posN \"$content\" $'\\n'\n    _moFindString posR \"$content\" $'\\r'\n\n    while [[ \"$posN\" -gt -1 ]] || [[ \"$posR\" -gt -1 ]]; do\n        if [[ \"$posN\" -gt -1 ]]; then\n            fragment=\"${content:0:$posN + 1}\"\n            content=${content:$posN + 1}\n        else\n            fragment=\"${content:0:$posR + 1}\"\n            content=${content:$posR + 1}\n        fi\n\n        _moTrimChars trimmed \"$fragment\" false true \" \" $'\\t' $'\\n' $'\\r'\n\n        if [[ -n \"$trimmed\" ]]; then\n            fragment=\"$2$fragment\"\n        fi\n\n        result=\"$result$fragment\"\n        _moFindString posN \"$content\" $'\\n'\n        _moFindString posR \"$content\" $'\\r'\n    done\n\n    _moTrimChars trimmed \"$content\" false true \" \" $'\\t'\n\n    if [[ -n \"$trimmed\" ]]; then\n        content=\"$2$content\"\n    fi\n\n    result=\"$result$content\"\n\n    local \"$1\" && _moIndirect \"$1\" \"$result\"\n}\n\n\n# Internal: Send a variable up to the parent of the caller of this function.\n#\n# $1 - Variable name\n# $2 - Value\n#\n# Examples\n#\n#   callFunc () {\n#       local \"$1\" && _moIndirect \"$1\" \"the value\"\n#   }\n#   callFunc dest\n#   echo \"$dest\"  # writes \"the value\"\n#\n# Returns nothing.\nfunction _moIndirect {\n    unset -v \"$1\"\n    printf -v \"$1\" '%s' \"$2\"\n}\n\n\n# Internal: Send an array as a variable up to caller of a function\n#\n# $1   - Variable name\n# $2-@ - Array elements\n#\n# Examples\n#\n#   callFunc () {\n#       local myArray=(one two three)\n#       local \"$1\" && _moIndirectArray \"$1\" \"${myArray[@]}\"\n#   }\n#   callFunc dest\n#   echo \"${dest[@]}\" # writes \"one two three\"\n#\n# Returns nothing.\nfunction _moIndirectArray {\n    unset -v \"$1\"\n\n    # IFS must be set to a string containing space or unset in order for\n    # the array slicing to work regardless of the current IFS setting on\n    # bash 3.  This is detailed further at\n    # https://github.com/fidian/gg-core/pull/7\n    eval \"$(printf \"IFS= %s=(\\\"\\${@:2}\\\") IFS=%q\" \"$1\" \"$IFS\")\"\n}\n\n\n# Internal: Determine if a given environment variable exists and if it is\n# an array.\n#\n# $1 - Name of environment variable\n#\n# Be extremely careful.  Even if strict mode is enabled, it is not honored\n# in newer versions of Bash.  Any errors that crop up here will not be\n# caught automatically.\n#\n# Examples\n#\n#   var=(abc)\n#   if _moIsArray var; then\n#      echo \"This is an array\"\n#      echo \"Make sure you don't accidentally use \\$var\"\n#   fi\n#\n# Returns 0 if the name is not empty, 1 otherwise.\nfunction _moIsArray {\n    # Namespace this variable so we don't conflict with what we're testing.\n    local moTestResult\n\n    moTestResult=$(declare -p \"$1\" 2>/dev/null) || return 1\n    [[ \"${moTestResult:0:10}\" == \"declare -a\" ]] && return 0\n    [[ \"${moTestResult:0:10}\" == \"declare -A\" ]] && return 0\n\n    return 1\n}\n\n\n# Internal: Determine if the given name is a defined function.\n#\n# $1 - Function name to check\n#\n# Be extremely careful.  Even if strict mode is enabled, it is not honored\n# in newer versions of Bash.  Any errors that crop up here will not be\n# caught automatically.\n#\n# Examples\n#\n#   moo () {\n#       echo \"This is a function\"\n#   }\n#   if _moIsFunction moo; then\n#       echo \"moo is a defined function\"\n#   fi\n#\n# Returns 0 if the name is a function, 1 otherwise.\nfunction _moIsFunction {\n    local functionList functionName\n\n    functionList=$(declare -F)\n    functionList=( ${functionList//declare -f /} )\n\n    for functionName in \"${functionList[@]}\"; do\n        if [[ \"$functionName\" == \"$1\" ]]; then\n            return 0\n        fi\n    done\n\n    return 1\n}\n\n\n# Internal: Determine if the tag is a standalone tag based on whitespace\n# before and after the tag.\n#\n# Passes back a string containing two numbers in the format \"BEFORE AFTER\"\n# like \"27 10\".  It indicates the number of bytes remaining in the \"before\"\n# string (27) and the number of bytes to trim in the \"after\" string (10).\n# Useful for string manipulation:\n#\n# $1 - Variable to set for passing data back\n# $2 - Content before the tag\n# $3 - Content after the tag\n# $4 - true/false: is this the beginning of the content?\n#\n# Examples\n#\n#   _moIsStandalone RESULT \"$before\" \"$after\" false || return 0\n#   RESULT_ARRAY=( $RESULT )\n#   echo \"${before:0:${RESULT_ARRAY[0]}}...${after:${RESULT_ARRAY[1]}}\"\n#\n# Returns nothing.\nfunction _moIsStandalone {\n    local afterTrimmed beforeTrimmed char\n\n    _moTrimChars beforeTrimmed \"$2\" false true \" \" $'\\t'\n    _moTrimChars afterTrimmed \"$3\" true false \" \" $'\\t'\n    char=$((${#beforeTrimmed} - 1))\n    char=${beforeTrimmed:$char}\n\n    if [[ \"$char\" != $'\\n' ]] && [[ \"$char\" != $'\\r' ]]; then\n        if [[ -n \"$char\" ]] || ! $4; then\n            return 1\n        fi\n    fi\n\n    char=${afterTrimmed:0:1}\n\n    if [[ \"$char\" != $'\\n' ]] && [[ \"$char\" != $'\\r' ]] && [[ -n \"$char\" ]]; then\n        return 2\n    fi\n\n    if [[ \"$char\" == $'\\r' ]] && [[ \"${afterTrimmed:1:1}\" == $'\\n' ]]; then\n        char=\"$char\"$'\\n'\n    fi\n\n    local \"$1\" && _moIndirect \"$1\" \"$((${#beforeTrimmed})) $((${#3} + ${#char} - ${#afterTrimmed}))\"\n}\n\n\n# Internal: Join / implode an array\n#\n# $1    - Variable name to receive the joined content\n# $2    - Joiner\n# $3-$* - Elements to join\n#\n# Returns nothing.\nfunction _moJoin {\n    local joiner part result target\n\n    target=$1\n    joiner=$2\n    result=$3\n    shift 3\n\n    for part in \"$@\"; do\n        result=\"$result$joiner$part\"\n    done\n\n    local \"$target\" && _moIndirect \"$target\" \"$result\"\n}\n\n\n# Internal: Read a file into a variable.\n#\n# $1 - Variable name to receive the file's content\n# $2 - Filename to load\n#\n# Returns nothing.\nfunction _moLoadFile {\n    local content len\n\n    # The subshell removes any trailing newlines.  We forcibly add\n    # a dot to the content to preserve all newlines.\n    # TODO: remove cat and replace with read loop?\n\n    content=$(cat -- \"$2\"; echo '.')\n    len=$((${#content} - 1))\n    content=${content:0:$len}  # Remove last dot\n\n    local \"$1\" && _moIndirect \"$1\" \"$content\"\n}\n\n\n# Internal: Process a chunk of content some number of times.  Writes output\n# to stdout.\n#\n# $1   - Content to parse repeatedly\n# $2   - Tag prefix (context name)\n# $3-@ - Names to insert into the parsed content\n#\n# Returns nothing.\nfunction _moLoop {\n    local content context contextBase\n\n    content=$1\n    contextBase=$2\n    shift 2\n\n    while [[ \"${#@}\" -gt 0 ]]; do\n        _moFullTagName context \"$contextBase\" \"$1\"\n        _moParse \"$content\" \"$context\" false\n        shift\n    done\n}\n\n\n# Internal: Parse a block of text, writing the result to stdout.\n#\n# $1 - Block of text to change\n# $2 - Current name (the variable NAME for what {{.}} means)\n# $3 - true when no content before this, false otherwise\n#\n# Returns nothing.\nfunction _moParse {\n    # Keep naming variables mo* here to not overwrite needed variables\n    # used in the string replacements\n    local moBlock moContent moCurrent moIsBeginning moTag\n\n    moCurrent=$2\n    moIsBeginning=$3\n\n    # Find open tags\n    _moSplit moContent \"$1\" '{{' '}}'\n\n    while [[ \"${#moContent[@]}\" -gt 1 ]]; do\n        _moTrimWhitespace moTag \"${moContent[1]}\"\n\n        case $moTag in\n            '#'*)\n                # Loop, if/then, or pass content through function\n                # Sets context\n                _moStandaloneAllowed moContent \"${moContent[@]}\" \"$moIsBeginning\"\n                _moTrimWhitespace moTag \"${moTag:1}\"\n                _moFindEndTag moBlock \"$moContent\" \"$moTag\"\n                _moFullTagName moTag \"$moCurrent\" \"$moTag\"\n\n                if _moTest \"$moTag\"; then\n                    # Show / loop / pass through function\n                    if _moIsFunction \"$moTag\"; then\n                        #: TODO: Consider piping the output to _moGetContent\n                        #: so the lambda does not execute in a subshell?\n                        moContent=$($moTag \"${moBlock[0]}\")\n                        _moParse \"$moContent\" \"$moCurrent\" false\n                        moContent=\"${moBlock[2]}\"\n                    elif _moIsArray \"$moTag\"; then\n                        eval \"_moLoop \\\"\\${moBlock[0]}\\\" \\\"$moTag\\\" \\\"\\${!${moTag}[@]}\\\"\"\n                    else\n                        _moParse \"${moBlock[0]}\" \"$moCurrent\" false\n                    fi\n                fi\n\n                moContent=\"${moBlock[2]}\"\n                ;;\n\n            '>'*)\n                # Load partial - get name of file relative to cwd\n                _moPartial moContent \"${moContent[@]}\" \"$moIsBeginning\" \"$moCurrent\"\n                ;;\n\n            '/'*)\n                # Closing tag - If hit in this loop, we simply ignore\n                # Matching tags are found in _moFindEndTag\n                _moStandaloneAllowed moContent \"${moContent[@]}\" \"$moIsBeginning\"\n                ;;\n\n            '^'*)\n                # Display section if named thing does not exist\n                _moStandaloneAllowed moContent \"${moContent[@]}\" \"$moIsBeginning\"\n                _moTrimWhitespace moTag \"${moTag:1}\"\n                _moFindEndTag moBlock \"$moContent\" \"$moTag\"\n                _moFullTagName moTag \"$moCurrent\" \"$moTag\"\n\n                if ! _moTest \"$moTag\"; then\n                    _moParse \"${moBlock[0]}\" \"$moCurrent\" false \"$moCurrent\"\n                fi\n\n                moContent=\"${moBlock[2]}\"\n                ;;\n\n            '!'*)\n                # Comment - ignore the tag content entirely\n                # Trim spaces/tabs before the comment\n                _moStandaloneAllowed moContent \"${moContent[@]}\" \"$moIsBeginning\"\n                ;;\n\n            .)\n                # Current content (environment variable or function)\n                _moStandaloneDenied moContent \"${moContent[@]}\"\n                _moShow \"$moCurrent\" \"$moCurrent\"\n                ;;\n\n            '=')\n                # Change delimiters\n                # Any two non-whitespace sequences separated by whitespace.\n                # TODO\n                _moStandaloneAllowed moContent \"${moContent[@]}\" \"$moIsBeginning\"\n                ;;\n\n            '{'*)\n                # Unescaped - split on }}} not }}\n                _moStandaloneDenied moContent \"${moContent[@]}\"\n                moContent=\"${moTag:1}\"'}}'\"$moContent\"\n                _moSplit moContent \"$moContent\" '}}}'\n                _moTrimWhitespace moTag \"${moContent[0]}\"\n                _moFullTagName moTag \"$moCurrent\" \"$moTag\"\n                moContent=${moContent[1]}\n\n                # Now show the value\n                _moShow \"$moTag\" \"$moCurrent\"\n                ;;\n\n            '&'*)\n                # Unescaped\n                _moStandaloneDenied moContent \"${moContent[@]}\"\n                _moTrimWhitespace moTag \"${moTag:1}\"\n                _moFullTagName moTag \"$moCurrent\" \"$moTag\"\n                _moShow \"$moTag\" \"$moCurrent\"\n                ;;\n\n            *)\n                # Normal environment variable or function call\n                _moStandaloneDenied moContent \"${moContent[@]}\"\n                _moFullTagName moTag \"$moCurrent\" \"$moTag\"\n                _moShow \"$moTag\" \"$moCurrent\"\n                ;;\n        esac\n\n        moIsBeginning=false\n        _moSplit moContent \"$moContent\" '{{' '}}'\n    done\n\n    echo -n \"${moContent[0]}\"\n}\n\n\n# Internal: Process a partial.\n#\n# Indentation should be applied to the entire partial\n#\n# Prefix all variables.\n#\n# $1 - Name of destination \"content\" variable.\n# $2 - Content before the tag that was not yet written\n# $3 - Tag content\n# $4 - Content after the tag\n# $5 - true/false: is this the beginning of the content?\n# $6 - Current context name\n#\n# Returns nothing.\nfunction _moPartial {\n    # Namespace variables here to prevent conflicts.\n    local moContent moFilename moIndent moPartial moStandalone\n\n    if _moIsStandalone moStandalone \"$2\" \"$4\" \"$5\"; then\n        moStandalone=( $moStandalone )\n        echo -n \"${2:0:${moStandalone[0]}}\"\n        moIndent=${2:${moStandalone[0]}}\n        moContent=${4:${moStandalone[1]}}\n    else\n        moIndent=\"\"\n        echo -n \"$2\"\n        moContent=$4\n    fi\n\n    _moTrimWhitespace moFilename \"${3:1}\"\n\n    # Execute in subshell to preserve current cwd and environment\n    (\n        # TODO:  Remove dirname and use a function instead\n        cd \"$(dirname -- \"$moFilename\")\" || exit 1\n        _moIndentLines moPartial \"$moIndent\" \"$(\n            _moLoadFile moPartial \"${moFilename##*/}\"\n\n            # Fix bash handling of subshells\n            # The extra dot is removed in _moIndentLines\n            echo -n \"${moPartial}.\"\n        )\"\n        _moParse \"$moPartial\" \"$6\" true\n    )\n\n    local \"$1\" && _moIndirect \"$1\" \"$moContent\"\n}\n\n\n# Internal: Show an environment variable or the output of a function to\n# stdout.\n#\n# Limit/prefix any variables used.\n#\n# $1 - Name of environment variable or function\n# $2 - Current context\n#\n# Returns nothing.\nfunction _moShow {\n    # Namespace these variables\n    local moJoined moNameParts\n\n    if _moIsFunction \"$1\"; then\n        CONTENT=$($1 \"\")\n        _moParse \"$CONTENT\" \"$2\" false\n        return 0\n    fi\n\n    _moSplit moNameParts \"$1\" \".\"\n\n    if [[ -z \"${moNameParts[1]}\" ]]; then\n        if _moIsArray \"$1\"; then\n            eval _moJoin moJoined \",\" \"\\${$1[@]}\"\n            echo -n \"$moJoined\"\n        else\n            echo -n \"${!1}\"\n        fi\n    else\n        # Further subindexes are disallowed\n        eval \"echo -n \\\"\\${${moNameParts[0]}[${moNameParts[1]%%.*}]}\\\"\"\n    fi\n}\n\n\n# Internal: Split a larger string into an array.\n#\n# $1 - Destination variable\n# $2 - String to split\n# $3 - Starting delimiter\n# $4 - Ending delimiter (optional)\n#\n# Returns nothing.\nfunction _moSplit {\n    local pos result\n\n    result=( \"$2\" )\n    _moFindString pos \"${result[0]}\" \"$3\"\n\n    if [[ \"$pos\" -ne -1 ]]; then\n        # The first delimiter was found\n        result[1]=${result[0]:$pos + ${#3}}\n        result[0]=${result[0]:0:$pos}\n\n        if [[ -n \"${4-}\" ]]; then\n            _moFindString pos \"${result[1]}\" \"$4\"\n\n            if [[ \"$pos\" -ne -1 ]]; then\n                # The second delimiter was found\n                result[2]=\"${result[1]:$pos + ${#4}}\"\n                result[1]=\"${result[1]:0:$pos}\"\n            fi\n        fi\n    fi\n\n    local \"$1\" && _moIndirectArray \"$1\" \"${result[@]}\"\n}\n\n\n# Internal: Handle the content for a standalone tag.  This means removing\n# whitespace (not newlines) before a tag and whitespace and a newline after\n# a tag.  That is, assuming, that the line is otherwise empty.\n#\n# $1 - Name of destination \"content\" variable.\n# $2 - Content before the tag that was not yet written\n# $3 - Tag content (not used)\n# $4 - Content after the tag\n# $5 - true/false: is this the beginning of the content?\n#\n# Returns nothing.\nfunction _moStandaloneAllowed {\n    local bytes\n\n    if _moIsStandalone bytes \"$2\" \"$4\" \"$5\"; then\n        bytes=( $bytes )\n        echo -n \"${2:0:${bytes[0]}}\"\n        local \"$1\" && _moIndirect \"$1\" \"${4:${bytes[1]}}\"\n    else\n        echo -n \"$2\"\n        local \"$1\" && _moIndirect \"$1\" \"$4\"\n    fi\n}\n\n\n# Internal: Handle the content for a tag that is never \"standalone\".  No\n# adjustments are made for newlines and whitespace.\n#\n# $1 - Name of destination \"content\" variable.\n# $2 - Content before the tag that was not yet written\n# $3 - Tag content (not used)\n# $4 - Content after the tag\n#\n# Returns nothing.\nfunction _moStandaloneDenied {\n    echo -n \"$2\"\n    local \"$1\" && _moIndirect \"$1\" \"$4\"\n}\n\n\n# Internal: Determines if the named thing is a function or if it is a\n# non-empty environment variable.  When MO_FALSE_IS_EMPTY is set to a\n# non-empty value, then \"false\" is also treated is an empty value.\n#\n# Do not use variables without prefixes here if possible as this needs to\n# check if any name exists in the environment\n#\n# $1                - Name of environment variable or function\n# $2                - Current value (our context)\n# MO_FALSE_IS_EMPTY - When set to a non-empty value, this will say the\n#                     string value \"false\" is empty.\n#\n# Returns 0 if the name is not empty, 1 otherwise.  When MO_FALSE_IS_EMPTY\n# is set, this returns 1 if the name is \"false\".\nfunction _moTest {\n    # Test for functions\n    _moIsFunction \"$1\" && return 0\n\n    if _moIsArray \"$1\"; then\n        # Arrays must have at least 1 element\n        eval \"[[ \\\"\\${#${1}[@]}\\\" -gt 0 ]]\" && return 0\n    else\n        # If MO_FALSE_IS_EMPTY is set, then return 1 if the value of\n        # the variable is \"false\".\n        # shellcheck disable=SC2031\n        [[ -n \"${MO_FALSE_IS_EMPTY-}\" ]] && [[ \"${!1-}\" == \"false\" ]] && return 1\n\n        # Environment variables must not be empty\n        [[ -n \"${!1}\" ]] && return 0\n    fi\n\n    return 1\n}\n\n\n# Internal: Trim the leading whitespace only.\n#\n# $1   - Name of destination variable\n# $2   - The string\n# $3   - true/false - trim front?\n# $4   - true/false - trim end?\n# $5-@ - Characters to trim\n#\n# Returns nothing.\nfunction _moTrimChars {\n    local back current front last target varName\n\n    target=$1\n    current=$2\n    front=$3\n    back=$4\n    last=\"\"\n    shift 4 # Remove target, string, trim front flag, trim end flag\n\n    while [[ \"$current\" != \"$last\" ]]; do\n        last=$current\n\n        for varName in \"$@\"; do\n            $front && current=\"${current/#$varName}\"\n            $back && current=\"${current/%$varName}\"\n        done\n    done\n\n    local \"$target\" && _moIndirect \"$target\" \"$current\"\n}\n\n\n# Internal: Trim leading and trailing whitespace from a string.\n#\n# $1 - Name of variable to store trimmed string\n# $2 - The string\n#\n# Returns nothing.\nfunction _moTrimWhitespace {\n    local result\n\n    _moTrimChars result \"$2\" true true $'\\r' $'\\n' $'\\t' \" \"\n    local \"$1\" && _moIndirect \"$1\" \"$result\"\n}\n\n\n# Internal: Displays the usage for mo.  Pulls this from the file that\n# contained the `mo` function.  Can only work when the right filename\n# comes is the one argument, and that only happens when `mo` is called\n# with `$0` set to this file.\n#\n# $1 - Filename that has the help message\n#\n# Returns nothing.\nfunction _moUsage {\n    grep '^#/' \"${MO_ORIGINAL_COMMAND}\" | cut -c 4-\n}\n\n\n# Save the original command's path for usage later\nMO_ORIGINAL_COMMAND=\"$(cd \"${BASH_SOURCE[0]%/*}\" || exit 1; pwd)/${BASH_SOURCE[0]##*/}\"\n\n# If sourced, load all functions.\n# If executed, perform the actions as expected.\nif [[ \"$0\" == \"${BASH_SOURCE[0]}\" ]] || [[ -z \"${BASH_SOURCE[0]}\" ]]; then\n    mo \"$@\"\nfi\n"
  },
  {
    "path": "lib/nvm.sh",
    "content": "#! bash oh-my-bash.module\n# get the node.js version\nfunction nvm_prompt_info() {\n  [[ -f \"$NVM_DIR/nvm.sh\" ]] || return\n  local nvm_prompt\n  nvm_prompt=$(node -v 2>/dev/null)\n  [[ \"${nvm_prompt}x\" == \"x\" ]] && return\n  nvm_prompt=${nvm_prompt:1}\n  _omb_util_print \"${OSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${OSH_THEME_NVM_PROMPT_SUFFIX}\"\n}\n"
  },
  {
    "path": "lib/omb-completion.sh",
    "content": "#! bash oh-my-bash.module\n# Copyright 2023 Koichi Murase.\n#\n# Helper functions for completions\n#\n\n## @fn _omb_completion_reassemble_breaks exclude\n##   @param[in] $1 exclude Characters to exclude from COMP_WORDSBREAKS\n##   @var[out] cur[0] Current word after reassembly\n##   @var[out] cur[1] Part of ${cur[0]} that was originally in previous words\n##     in COMP_WORDS.\n##   @arr[out] COMPREPLY This functions empties the array COMPREPLY.\nfunction _omb_completion_reassemble_breaks {\n  local exclude=$1\n  local line=$COMP_LINE point=$COMP_POINT\n  local breaks=${COMP_WORDBREAKS//[\\\"\\'$exclude]}\n\n  COMPREPLY=()\n  cur=(\"${COMP_WORDS[COMP_CWORD]}\" '')\n\n  local word rprefix= rword=\n  for word in \"${COMP_WORDS[@]::COMP_CWORD+1}\"; do\n    local space=${line%%\"$word\"*}\n    if [[ $space == \"$line\" ]]; then\n      # error: COMP_LINE does not contain enough words\n      return 1\n    fi\n\n    word=${word::point - ${#space}}\n    if [[ $space || $rword == *[\"$breaks\"] || $word == [\"$breaks\"]* ]]; then\n      rprefix=\n      rword=$word\n    else\n      rprefix=$rword\n      rword+=$word\n    fi\n\n    line=${line:${#space}+${#word}}\n    ((point -= ${#space} + ${#word}))\n    ((point >= 0)) || break\n  done\n\n  cur=(\"$rword\" \"$rprefix\")\n}\n\n## @fn _omb_completion_resolve_breaks\n##   Adjust completions generated for the reassembled word\n##   @var[out] cur[1] Prefix to remove set by _omb_completion_reassemble_breaks\n##   @arr[out] COMPREPLY This functions empties the array COMPREPLY.\nfunction _omb_completion_resolve_breaks {\n  if [[ ${cur[1]} ]]; then\n    local i\n    for i in \"${!COMPREPLY[@]}\"; do\n      if [[ ${COMPREPLY[i]} == \"$cur_prefix\"* ]]; then\n        COMPREPLY[i]=${COMPREPLY[i]#\"$cur_prefix\"}\n      else\n        unset -v 'COMPREPLY[i]'\n      fi\n    done\n    COMPREPLY=(\"${COMPREPLY[@]}\")\n  fi\n}\n"
  },
  {
    "path": "lib/omb-deprecate.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_deprecate_warning {\n  local level=$1 msg=$2\n  local sep=$_omb_term_teal:\n  local src=$_omb_term_purple${BASH_SOURCE[level+1]}\n  local line=$_omb_term_green${BASH_LINENO[level]}\n  local func=${FUNCNAME[level+1]}\n  if [[ $func && $func != source ]]; then\n    func=\" $_omb_term_teal($_omb_term_navy$func$_omb_term_teal)\"\n  else\n    func=\n  fi\n  _omb_util_print \"$src$sep$line$func$sep$_omb_term_reset $msg\"\n}\n\nfunction _omb_deprecate_function__notify {\n  local old=$1 new=$2\n  local v=__omb_deprecate_Function_$old; v=${v//[!a-zA-Z0-9_]/'_'}\n  [[ ${!v+set} ]] && return 0\n  local esc_old=$_omb_term_bold_brown$old$_omb_term_reset\n  local esc_new=$_omb_term_bold_navy$new$_omb_term_reset\n  _omb_deprecate_warning 2 \"The function '$esc_old' is deprecated. Please use '$esc_new'.\" >&2\n  printf -v \"$v\" notified\n}\n\nfunction _omb_deprecate_function {\n  local version=$1 old=$2 new=$3\n  local warning=\n  ((_omb_version >= version)) &&\n    warning=\"_omb_deprecate_function__notify '$old' '$new'; \"\n  builtin eval -- \"function $old { $warning$new \\\"\\$@\\\"; }\"\n}\n\nfunction _omb_deprecate_defun_print {\n  local version=$1 old=$2 new=$3 var=${4:-REPLY}\n  local warning=\n  ((_omb_version >= version)) &&\n    warning=\"_omb_deprecate_function__notify '$old' '$new'; \"\n  builtin eval -- \"function $old { ${warning}local $var; $new \\\"\\$@\\\"; _omb_util_print \\\"\\$$var\\\"; }\"\n}\n\nfunction _omb_deprecate_defun_put {\n  local version=$1 old=$2 new=$3 var=${4:-REPLY}\n  local warning=\n  ((_omb_version >= version)) &&\n    warning=\"_omb_deprecate_function__notify '$old' '$new'; \"\n  builtin eval -- \"function $old { ${warning}local $var; $new \\\"\\$@\\\"; _omb_util_put \\\"\\$$var\\\"; }\"\n}\n\n## @fn _omb_deprecate_declare version old_name new_name opts arg\n##   @param[in] version\n##     The OMB version starting warning messages.\n##\n##   @param[in] old_name new_name\n##     old and new variable names.  The empty value of new_name indicates that\n##     the old_name is just deprecated, or there is no unique corresponding new\n##     variable.\n##\n##   @param[in] opts\n##     a colon-separated list of the following fields:\n##\n##     sync\n##       detect changes in either of old variable and new variable, and apply\n##       the change to the other.\n##     track\n##       copy from the new variable to the old variable when the value is\n##       changed.\n##\n##   @param[in] arg\n##     When new_name is not specified, arg contains an error message that will\n##     be shown when the old_name is accessed.\n##\n\n## @fn _omb_deprecate_declare__init\n##   @var[in] __ver __old __new __opts __msg\nfunction _omb_deprecate_declare__init {\n  if [[ ${!__old+set} ]]; then\n    __opts=$__opts:notified\n    if ((_omb_version >= __ver)); then\n      if [[ $__new ]]; then\n        _omb_util_print \"oh-my-bash: The variable '$__old' is set but has been renamed to '$__new'.  Please use '$__new'.\"\n      else\n        _omb_util_print \"oh-my-bash: The variable '$__old' is set but has been deprecated.${__msg+ $__msg}\"\n      fi >/dev/tty\n    fi\n    if [[ $__new && ! ${!__new+set} ]]; then\n      printf -v \"$__new\" '%s' \"${!__old}\"\n    fi\n  fi\n}\nif ((_omb_bash_version >= 40300)); then\n  _omb_deprecate_declare=()\n  declare -gA _omb_deprecate_declare_counter=()\n  function _omb_deprecate_declare {\n    local __ver=$1 __old=$2 __new=$3 __opts=$4 __msg=$5\n    _omb_deprecate_declare__init\n\n    unset -n \"$__old\"\n    unset -v \"$__old\"\n    if ((_omb_version >= __ver)); then\n      local __index=${#_omb_deprecate_declare[@]}\n      _omb_deprecate_declare[__index]=$__old:$__new:$__msg\n      eval \"declare -gn $__old='$__new[_omb_deprecate_declare_counter[$__index,\\$BASH_SOURCE,\\$LINENO]+=\\$(_omb_deprecate_declare__notify $__index),0]'\"\n    else\n      eval \"declare -gn $__old='$__new'\"\n    fi\n  }\n  function _omb_deprecate_declare__notify {\n    local __index=$1 data=${_omb_deprecate_declare[__index]}\n    local __old=${data%%:*}; data=${data#*:}\n    local __new=${data%%:*}; data=${data#*:}\n    local __msg=$data\n    local count=${_omb_deprecate_declare_counter[$__index,${BASH_SOURCE[1]},${BASH_LINENO[0]}]:-0}\n    if ((count == 0)); then\n      local esc_old=$_omb_term_bold_brown$__old$_omb_term_reset\n      local esc_new=$_omb_term_bold_navy$__new$_omb_term_reset\n      if [[ $__new ]]; then\n        _omb_deprecate_warning 1 \"The variable '$esc_old' has been renamed to '$esc_new'. Please use '$esc_new'.\"\n      else\n        _omb_deprecate_warning 1 \"The variable '$esc_old' has been deprecated.${__msg+ $__msg}\"\n      fi >/dev/tty\n    fi\n    _omb_util_print 1\n  }\nelse\n  _omb_deprecate_declare=()\n  _omb_deprecate_declare_notify=()\n  _omb_deprecate_declare_value=()\n  function _omb_deprecate_declare {\n    local __ver=$1 __old=$2 __new=$3 __opts=$4 __msg=$5\n    _omb_deprecate_declare__init\n\n    if [[ ! $__new ]]; then\n      # (show warning when used) nothing can be done for bash <= 4.2\n      return 0\n    fi\n\n    local __notify=\n    if ((_omb_version >= __ver)) && [[ :$__opts: != *:notified:* ]]; then\n      __notify=1\n    fi\n\n    printf -v \"$__old\" %s \"${!__new-}\"\n    if [[ :$__opts: == *:track:* ]]; then\n      local __index=${#_omb_deprecate_declare[@]}\n      _omb_deprecate_declare[__index]=track:$__old:$__new:$__msg\n      _omb_deprecate_declare_notify[__index]=$__notify\n    elif [[ :$__opts: == *:sync:* ]]; then\n      local __index=${#_omb_deprecate_declare[@]}\n      _omb_deprecate_declare[__index]=sync:$__old:$__new:$__msg\n      _omb_deprecate_declare_notify[__index]=$__notify\n      _omb_deprecate_declare_value[__index]=${__new}\n    fi\n  }\n  function _omb_deprecate_declare__sync {\n    local __index __pair __type __old __new __msg\n    for __index in \"${!_omb_util_deprecate[@]}\"; do\n      __pair=${_omb_util_deprecate[__index]}\n      __type=${__pair%%:*} __pair=${__pair#*:}\n      __old=${__pair%%:*} __pair=${__pair#*:}\n      __new=${_pair%%:*} __msg=${__pair#*:}\n\n      [[ ${!__new} != \"$__value\" || ${!__old} != \"$__value\" ]] || continue\n\n      # Notify deprecation when the variable 'old_name' has been first changed.\n      if [[ ${!__old+set} && ${!__old} != \"$__value\" && ${_omb_deprecate_declare_notify[__index]} ]]; then\n        _omb_deprecate_declare_notify[__index]=\n        local esc_old=$_omb_term_bold_brown$__old$_omb_term_reset\n        local esc_new=$_omb_term_bold_navy$__new$_omb_term_reset\n        if [[ $__new ]]; then\n          _omb_util_print \"oh-my-bash: The variable '$esc_old' is changed but has been renamed to '$esc_new'.  Please use '$esc_new'.\"\n        else\n          _omb_util_print \"oh-my-bash: The variable '$esc_old' is changed but has been deprecated.${__msg+ $__msg}\"\n        fi >/dev/tty\n      fi\n\n      case $__type in\n      (sync)\n        local __value=${_omb_util_deprecate_value[__index]} __event=\n        if [[ ! ${!__new+set} || ! ${!__old+set} ]]; then\n          __value=${!__new-${!__old-}} __event=change\n        elif [[ ${!__new} != \"$__value\" ]]; then\n          __value=${!__new} __event=change\n        elif [[ ${!__old} != \"$__value\" ]]; then\n          __value=${!__old} __event=change\n        fi\n\n        if [[ $__event ]]; then\n          _omb_util_deprecate_value[__index]=$__value\n          printf -v \"$__new\" %s \"$__value\"\n          printf -v \"$__old\" %s \"$__value\"\n        fi ;;\n      (track)\n        printf -v \"$__old\" %s \"${!__new-}\" ;;\n      esac\n    done\n  }\n  _omb_util_add_prompt_command _omb_deprecate_declare__sync\nfi\n\nif ((_omb_bash_version >= 40300)); then\n  _omb_deprecate_const=()\n  _omb_deprecate_const_value=()\n  declare -gA _omb_deprecate_const_counter=()\n  function _omb_deprecate_const {\n    local __ver=$1 __old=$2 __value=$3 __msg=$4\n    if [[ ${!__old+set} ]]; then\n      return 0\n    fi\n\n    if ((_omb_version >= __ver)); then\n      local __index=${#_omb_deprecate_const[@]}\n      _omb_deprecate_const[__index]=$__old:$__msg\n      _omb_deprecate_const_value[__index]=$__value\n      printf -v \"_omb_deprecate_Const_$__old\" %s \"$__value\"\n      eval \"declare -gn $__old='_omb_deprecate_Const_$__old[_omb_deprecate_const_counter[$__index,\\$BASH_SOURCE,\\$LINENO]+=\\$(_omb_deprecate_const__notify $__index),0]'\"\n    else\n      printf -v \"$__old\" %s \"$__value\"\n    fi\n  }\n  function _omb_deprecate_const__notify {\n    local __index=$1\n    local __old=${_omb_deprecate_const[__index]%%:*}\n    local __msg=${_omb_deprecate_const[__index]#*:}\n    local __value=${_omb_deprecate_const_value[__index]}\n    local __ref=_omb_deprecate_Const_$__old\n    if [[ ${!__ref-} == \"$__value\" ]]; then\n      local count=${_omb_deprecate_const_counter[$__index,${BASH_SOURCE[1]},${BASH_LINENO[0]}]:-0}\n      if ((count == 0)); then\n        local esc_old=$_omb_term_bold_brown$__old$_omb_term_reset\n        _omb_deprecate_warning 1 \"The variable '$esc_old' has been deprecated.${__msg+ $__msg}\" >&2\n      fi\n    fi\n    _omb_util_print 1\n  }\n  function _omb_deprecate_const__sync {\n    local __index __old __curval __compaction=\n    for __index in \"${!_omb_deprecate_const[@]}\"; do\n      __old=${_omb_deprecate_const[__index]%%:*}\n      [[ $__old ]] || continue\n\n      __ref=_omb_deprecate_Const_$__old\n      __curval=${!__ref-}\n      if [[ $__curval != \"${_omb_deprecate_const_value[__index]}\" ]]; then\n        _omb_deprecate_const[__index]=\n        _omb_deprecate_const_value[__index]=\n        unset -n \"$__old\"\n        printf -v \"$__old\" %s \"$__curval\"\n      fi\n    done\n  }\n  _omb_util_add_prompt_command _omb_deprecate_const__sync\nelse\n  function _omb_deprecate_const {\n    local __ver=$1 __old=$2 __value=$3 __msg=$4\n    if [[ ${!__old+set} ]]; then\n      return 0\n    fi\n    printf -v \"$__old\" %s \"$__value\"\n  }\nfi\n\n_omb_deprecate_msg_please_use=\"Please use '$_omb_term_bold_navy%s$_omb_term_reset'.\"\n\n#------------------------------------------------------------------------------\n# deprecate functions and variables\n\n# oh-my-bash.sh -- These functions were originally used to find\n# \"fpath\" directories, which are not supported by Bash.\n\nfunction is_plugin {\n  local base_dir=$1 name=$2\n  [[ -f $base_dir/plugins/$name/$name.plugin.sh || -f $base_dir/plugins/$name/_$name ]]\n}\n\nfunction is_completion {\n  local base_dir=$1 name=$2\n  [[ -f $base_dir/completions/$name/$name.completion.sh ]]\n}\n\nfunction is_alias {\n  local base_dir=$1 name=$2\n  [[ -f $base_dir/aliases/$name/$name.aliases.sh ]]\n}\n\n# lib/utils.sh -- Logging functions\n_omb_deprecate_function 20000 type_exists _omb_util_binary_exists\n\n_omb_deprecate_const 20000 ncolors   \"$_omb_term_colors\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_colors}\"\n_omb_deprecate_const 20000 bold      \"$_omb_term_bold\"      \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold}\"\n_omb_deprecate_const 20000 underline \"$_omb_term_underline\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline}\"\n_omb_deprecate_const 20000 reset     \"$_omb_term_reset\"     \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_reset}\"\n_omb_deprecate_const 20000 tan       \"$_omb_term_olive\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_olive}\"\n\n_omb_deprecate_red=${_omb_term_brown:+$'\\1'$_omb_term_brown$'\\2'}\n_omb_deprecate_green=${_omb_term_green:+$'\\1'$_omb_term_green$'\\2'}\n_omb_deprecate_yellow=${_omb_term_olive:+$'\\1'$_omb_term_olive$'\\2'}\n_omb_deprecate_blue=${_omb_term_navy:+$'\\1'$_omb_term_navy$'\\2'}\n_omb_deprecate_magenta=${_omb_term_purple:+$'\\1'$_omb_term_purple$'\\2'}\n_omb_deprecate_const 20000 red       \"$_omb_deprecate_red\"     \"Please use '${_omb_term_bold_navy}_omb_term_brown$_omb_term_reset' or '${_omb_term_bold_navy}_omb_prompt_brown$_omb_term_reset'.\"\n_omb_deprecate_const 20000 green     \"$_omb_deprecate_green\"   \"Please use '${_omb_term_bold_navy}_omb_term_green$_omb_term_reset' or '${_omb_term_bold_navy}_omb_prompt_green$_omb_term_reset'.\"\n_omb_deprecate_const 20000 yellow    \"$_omb_deprecate_yellow\"  \"Please use '${_omb_term_bold_navy}_omb_term_olive$_omb_term_reset' or '${_omb_term_bold_navy}_omb_prompt_olive$_omb_term_reset'.\"\n_omb_deprecate_const 20000 blue      \"$_omb_deprecate_blue\"    \"Please use '${_omb_term_bold_navy}_omb_term_navy$_omb_term_reset' or '${_omb_term_bold_navy}_omb_prompt_navy$_omb_term_reset'.\"\n_omb_deprecate_const 20000 purple    \"$_omb_deprecate_magenta\" \"Please use '${_omb_term_bold_navy}_omb_term_purple$_omb_term_reset' or '${_omb_term_bold_navy}_omb_prompt_purple$_omb_term_reset'.\"\n\n_omb_deprecate_function 20000 e_header    _omb_log_header\n_omb_deprecate_function 20000 e_arrow     _omb_log_arrow\n_omb_deprecate_function 20000 e_success   _omb_log_success\n_omb_deprecate_function 20000 e_error     _omb_log_error\n_omb_deprecate_function 20000 e_warning   _omb_log_warning\n_omb_deprecate_function 20000 e_underline _omb_log_underline\n_omb_deprecate_function 20000 e_bold      _omb_log_bold\n_omb_deprecate_function 20000 e_note      _omb_log_note\n\n# plugins/bashmarks/bashmarks.plugin.sh [ This anyway conflicts with\n#   variables defined by themes (axin, mairan, sexy, etc.) so do not\n#   define fallbacks and warnings. ]\n#_omb_deprecate_const RED   \"0;31m\" \"${_omb_deprecate_msg_please_use/'%s'/\\${_omb_term_brown:2}}\"\n#_omb_deprecate_const GREEN \"0;33m\" \"${_omb_deprecate_msg_please_use/'%s'/\\${_omb_term_green:2}}\"\n\n# themes/*\n_omb_deprecate_function 20000 prompt_command  _omb_theme_PROMPT_COMMAND\n_omb_deprecate_function 20000 prompt          _omb_theme_PROMPT_COMMAND\n_omb_deprecate_function 20000 prompt_setter   _omb_theme_PROMPT_COMMAND\n_omb_deprecate_function 20000 pure_setter     _omb_theme_PROMPT_COMMAND # pure, gallifrey\n_omb_deprecate_function 20000 dulcie_setter   _omb_theme_PROMPT_COMMAND # dulcie\n_omb_deprecate_function 20000 _brainy_setter  _omb_theme_PROMPT_COMMAND # brainy\n_omb_deprecate_function 20000 set_bash_prompt _omb_theme_PROMPT_COMMAND # agnoster\n"
  },
  {
    "path": "lib/omb-prompt-base.sh",
    "content": "#! bash oh-my-bash.module\n\n_omb_module_require lib:omb-util\n_omb_module_require lib:omb-deprecate\n_omb_module_require lib:omb-prompt-colors\n\nCLOCK_CHAR_THEME_PROMPT_PREFIX=''\nCLOCK_CHAR_THEME_PROMPT_SUFFIX=''\nCLOCK_THEME_PROMPT_PREFIX=''\nCLOCK_THEME_PROMPT_SUFFIX=''\n\nTHEME_PROMPT_HOST='\\H'\n\nSCM_CHECK=${SCM_CHECK:=true}\n\nSCM_THEME_PROMPT_DIRTY=' ✗'\nSCM_THEME_PROMPT_CLEAN=' ✓'\nSCM_THEME_PROMPT_PREFIX=' |'\nSCM_THEME_PROMPT_SUFFIX='|'\nSCM_THEME_BRANCH_PREFIX=''\nSCM_THEME_TAG_PREFIX='tag:'\nSCM_THEME_DETACHED_PREFIX='detached:'\nSCM_THEME_BRANCH_TRACK_PREFIX=' → '\nSCM_THEME_BRANCH_GONE_PREFIX=' ⇢ '\nSCM_THEME_CURRENT_USER_PREFFIX=' ☺︎ '\nSCM_THEME_CURRENT_USER_SUFFIX=''\nSCM_THEME_CHAR_PREFIX=''\nSCM_THEME_CHAR_SUFFIX=''\n\nTHEME_BATTERY_PERCENTAGE_CHECK=${THEME_BATTERY_PERCENTAGE_CHECK:=true}\n\nSCM_GIT_SHOW_DETAILS=${SCM_GIT_SHOW_DETAILS:=true}\nSCM_GIT_SHOW_REMOTE_INFO=${SCM_GIT_SHOW_REMOTE_INFO:=auto}\nSCM_GIT_DISABLE_UNTRACKED_DIRTY=${SCM_GIT_DISABLE_UNTRACKED_DIRTY:=false}\nSCM_GIT_IGNORE_UNTRACKED=${SCM_GIT_IGNORE_UNTRACKED:=false}\nSCM_GIT_SHOW_CURRENT_USER=${SCM_GIT_SHOW_CURRENT_USER:=false}\nSCM_GIT_SHOW_MINIMAL_INFO=${SCM_GIT_SHOW_MINIMAL_INFO:=false}\n\nSCM_GIT='git'\nSCM_GIT_CHAR='±'\nSCM_GIT_DETACHED_CHAR='⌿'\nSCM_GIT_AHEAD_CHAR=\"↑\"\nSCM_GIT_BEHIND_CHAR=\"↓\"\nSCM_GIT_UNTRACKED_CHAR=\"?:\"\nSCM_GIT_UNSTAGED_CHAR=\"U:\"\nSCM_GIT_STAGED_CHAR=\"S:\"\n\nSCM_HG='hg'\nSCM_HG_CHAR='☿'\n\nSCM_SVN='svn'\nSCM_SVN_CHAR='⑆'\n\nSCM_NONE='NONE'\nSCM_NONE_CHAR='○'\n\nTHEME_SHOW_USER_HOST=${THEME_SHOW_USER_HOST:=false}\nUSER_HOST_THEME_PROMPT_PREFIX=''\nUSER_HOST_THEME_PROMPT_SUFFIX=''\n\n# #new\n# OMB_PROMPT_RBFU_FORMAT=' |%s|'\n# OMB_PROMPT_RBENV_FORMAT=' |%s|'\n# OMB_PROMPT_RVM_FORMAT=' |%s|'\n# OMB_PROMPT_CHRUBY_FORMAT=' |%s|'\n\n# deprecate\nRBFU_THEME_PROMPT_PREFIX=' |'\nRBFU_THEME_PROMPT_SUFFIX='|'\nRBENV_THEME_PROMPT_PREFIX=' |'\nRBENV_THEME_PROMPT_SUFFIX='|'\nRVM_THEME_PROMPT_PREFIX=' |'\nRVM_THEME_PROMPT_SUFFIX='|'\nCHRUBY_THEME_PROMPT_PREFIX=' |'\nCHRUBY_THEME_PROMPT_SUFFIX='|'\n\n# # new\n# OMB_PROMPT_VIRTUALENV_FORMAT=' |%s|'\n# OMB_PROMPT_CONDAENV_FORMAT=' |%s|'\n# OMB_PROMPT_CONDAENV_USE_BASENAME=true\n# OMB_PROMPT_PYTHON_VERSION_FORMAT=' |%s|'\n# OMB_PROMPT_SHOW_PYTHON_VENV=true\nOMB_PROMPT_SPACK_ENV_FORMAT='[%s] '\n\n# deprecate\nVIRTUALENV_THEME_PROMPT_PREFIX=' |'\nVIRTUALENV_THEME_PROMPT_SUFFIX='|'\nCONDAENV_THEME_PROMPT_PREFIX=' |'\nCONDAENV_THEME_PROMPT_SUFFIX='|'\nPYTHON_THEME_PROMPT_PREFIX=' |'\nPYTHON_THEME_PROMPT_SUFFIX='|'\n\n## @fn _omb_prompt_format var value fmt_prefix[:deprecated]\n##   @param[in] var\n##   @param[in] value\n##   @param[in] fmt_prefix\n##   @param[in,opt] deprecated\n##   @var[out] $var\nfunction _omb_prompt_format {\n  local __format=${3%%:*}_FORMAT; __format=${!__format-}\n  if [[ ! $__format ]]; then\n    local __prefix=${3#*:}_PREFIX; __prefix=${!__prefix-} # deprecate name\n    local __suffix=${3#*:}_SUFFIX; __suffix=${!__suffix-} # deprecate name\n    __format=${__prefix//'%'/'%%'}%s${__suffix//'%'/'%%'}\n  fi\n  local REPLY\n  _omb_string_escape_prompt \"$2\"\n  printf -v \"$1\" \"$__format\" \"$REPLY\"\n}\n\nfunction _omb_prompt_git {\n  command git \"$@\"\n}\n\nfunction _omb_prompt_git_status_enabled {\n  [[ $(_omb_prompt_git config --get-regexp '^(oh-my-zsh|bash-it|oh-my-bash)\\.hide-status$' |\n    awk '$2== \"1\" {hide_status = 1;} END { print hide_status; }') != \"1\" ]]\n}\n\nfunction scm {\n  if [[ \"$SCM_CHECK\" = false ]]; then SCM=$SCM_NONE\n  elif [[ -f .git/HEAD ]]; then SCM=$SCM_GIT\n  elif _omb_util_binary_exists git && [[ -n \"$(_omb_prompt_git rev-parse --is-inside-work-tree 2> /dev/null)\" ]]; then SCM=$SCM_GIT\n  elif [[ -d .hg ]]; then SCM=$SCM_HG\n  elif _omb_util_binary_exists hg && [[ -n \"$(command hg root 2> /dev/null)\" ]]; then SCM=$SCM_HG\n  elif [[ -d .svn ]]; then SCM=$SCM_SVN\n  else SCM=$SCM_NONE\n  fi\n}\n\nfunction scm_prompt_char {\n  if [[ -z $SCM ]]; then scm; fi\n  if [[ $SCM == $SCM_GIT ]]; then SCM_CHAR=$SCM_GIT_CHAR\n  elif [[ $SCM == $SCM_HG ]]; then SCM_CHAR=$SCM_HG_CHAR\n  elif [[ $SCM == $SCM_SVN ]]; then SCM_CHAR=$SCM_SVN_CHAR\n  else SCM_CHAR=$SCM_NONE_CHAR\n  fi\n}\n\nfunction scm_prompt_vars {\n  scm\n  scm_prompt_char\n  SCM_DIRTY=0\n  SCM_STATE=''\n  [[ $SCM == $SCM_GIT ]] && git_prompt_vars && return\n  [[ $SCM == $SCM_HG ]] && hg_prompt_vars && return\n  [[ $SCM == $SCM_SVN ]] && svn_prompt_vars && return\n}\n\nfunction scm_prompt_info {\n  scm\n  scm_prompt_char\n  scm_prompt_info_common\n}\n\nfunction scm_prompt_char_info {\n  scm_prompt_char\n  echo -ne \"${SCM_THEME_CHAR_PREFIX}${SCM_CHAR}${SCM_THEME_CHAR_SUFFIX}\"\n  scm_prompt_info_common\n}\n\nfunction scm_prompt_info_common {\n  SCM_DIRTY=0\n  SCM_STATE=''\n\n  if [[ ${SCM} == ${SCM_GIT} ]]; then\n    if [[ ${SCM_GIT_SHOW_MINIMAL_INFO} == true ]]; then\n      # user requests minimal git status information\n      git_prompt_minimal_info\n    else\n      # more detailed git status\n      git_prompt_info\n    fi\n    return\n  fi\n\n  # TODO: consider adding minimal status information for hg and svn\n  [[ ${SCM} == ${SCM_HG} ]] && hg_prompt_info && return\n  [[ ${SCM} == ${SCM_SVN} ]] && svn_prompt_info && return\n}\n\n# This is added to address bash shell interpolation vulnerability described\n# here: https://github.com/njhartwell/pw3nage\nfunction git_clean_branch {\n  local unsafe_ref=$(_omb_prompt_git symbolic-ref -q HEAD 2> /dev/null)\n  local stripped_ref=${unsafe_ref##refs/heads/}\n  local clean_ref=${stripped_ref//[\\$\\`\\\\]/-}\n  clean_ref=${clean_ref//[^[:print:]]/-} # strip escape sequences, etc.\n  _omb_util_print $clean_ref\n}\n\nfunction git_prompt_minimal_info {\n  local ref status\n  local git_status_flags=('--porcelain')\n  local clean_symbol=\"${SCM_THEME_PROMPT_CLEAN:-✔}\"\n  local dirty_symbol=\"${SCM_THEME_PROMPT_DIRTY:-✘}\"\n  SCM_STATE=${clean_symbol}\n\n  if _omb_prompt_git_status_enabled; then\n    # Get the branch reference\n    ref=$(git_clean_branch) ||\n      ref=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) || return 0\n    SCM_BRANCH=${SCM_THEME_BRANCH_PREFIX}${ref}\n\n    # Get the status\n    [[ \"${SCM_GIT_IGNORE_UNTRACKED}\" = \"true\" ]] && git_status_flags+=('--untracked-files=no')\n    status=$(_omb_prompt_git status \"${git_status_flags[@]}\" 2> /dev/null | tail -n1)\n\n    if [[ -n ${status} ]]; then\n      SCM_DIRTY=1\n      SCM_STATE=${dirty_symbol}\n    fi\n\n    # Output the git prompt\n    SCM_PREFIX=${SCM_THEME_PROMPT_PREFIX}\n    SCM_SUFFIX=${SCM_THEME_PROMPT_SUFFIX}\n    echo -e \"${SCM_PREFIX}${SCM_BRANCH}${SCM_STATE}${SCM_SUFFIX}\"\n  fi\n}\n\nfunction git_status_summary {\n  awk '\n  BEGIN {\n    untracked=0;\n    unstaged=0;\n    staged=0;\n  }\n  {\n    if (!after_first && $0 ~ /^##.+/) {\n      print $0\n      seen_header = 1\n    } else if ($0 ~ /^\\?\\? .+/) {\n      untracked += 1\n    } else {\n      if ($0 ~ /^.[^ ] .+/) {\n        unstaged += 1\n      }\n      if ($0 ~ /^[^ ]. .+/) {\n        staged += 1\n      }\n    }\n    after_first = 1\n  }\n  END {\n    if (!seen_header) {\n      print\n    }\n    print untracked \"\\t\" unstaged \"\\t\" staged\n  }'\n}\n\nfunction git_prompt_vars {\n  local details=''\n  local git_status_flags=''\n  [[ \"$(_omb_prompt_git rev-parse --is-inside-work-tree 2> /dev/null)\" == \"true\" ]] || return 1\n  SCM_STATE=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n  if _omb_prompt_git_status_enabled; then\n    [[ \"${SCM_GIT_IGNORE_UNTRACKED}\" = \"true\" ]] && git_status_flags='-uno'\n    local status_lines=$((_omb_prompt_git status --porcelain ${git_status_flags} -b 2> /dev/null ||\n                          _omb_prompt_git status --porcelain ${git_status_flags}    2> /dev/null) | git_status_summary)\n    local status=$(awk 'NR==1' <<< \"$status_lines\")\n    local counts=$(awk 'NR==2' <<< \"$status_lines\")\n    IFS=$'\\t' read -r untracked_count unstaged_count staged_count <<< \"$counts\"\n    if [[ \"${untracked_count}\" -gt 0 || \"${unstaged_count}\" -gt 0 || \"${staged_count}\" -gt 0 ]]; then\n      if [[ \"${SCM_GIT_SHOW_DETAILS}\" = \"true\" ]]; then\n        [[ \"${staged_count}\" -gt 0 ]] && details+=\" ${SCM_GIT_STAGED_CHAR}${staged_count}\" && SCM_DIRTY=3\n        [[ \"${unstaged_count}\" -gt 0 ]] && details+=\" ${SCM_GIT_UNSTAGED_CHAR}${unstaged_count}\" && SCM_DIRTY=2\n        [[ \"${untracked_count}\" -gt 0 ]] && details+=\" ${SCM_GIT_UNTRACKED_CHAR}${untracked_count}\" &&\n          [[ \"$SCM_GIT_DISABLE_UNTRACKED_DIRTY\" != \"true\" ]] && SCM_DIRTY=1\n      fi\n      [[ \"$SCM_GIT_DISABLE_UNTRACKED_DIRTY\" != \"true\" || \"${unstaged_count}\" -gt 0 || \"${staged_count}\" -gt 0 ]] &&\n        SCM_STATE=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n    fi\n  fi\n\n  [[ \"${SCM_GIT_SHOW_CURRENT_USER}\" == \"true\" ]] && details+=\"$(git_user_info)\"\n\n  SCM_CHANGE=$(_omb_prompt_git rev-parse --short HEAD 2>/dev/null)\n\n  local ref=$(git_clean_branch)\n\n  if [[ -n \"$ref\" ]]; then\n    SCM_BRANCH=\"${SCM_THEME_BRANCH_PREFIX}${ref}\"\n    local tracking_info=\"$(grep -- \"${SCM_BRANCH}\\.\\.\\.\" <<< \"${status}\")\"\n    if [[ -n \"${tracking_info}\" ]]; then\n      [[ \"${tracking_info}\" =~ .+\\[gone\\]$ ]] && local branch_gone=\"true\"\n      tracking_info=${tracking_info#\\#\\# ${SCM_BRANCH}...}\n      tracking_info=${tracking_info% [*}\n      local remote_name=${tracking_info%%/*}\n      local remote_branch=${tracking_info#${remote_name}/}\n      local remote_info=\"\"\n      local num_remotes=$(_omb_prompt_git remote | wc -l 2> /dev/null)\n      [[ \"${SCM_BRANCH}\" = \"${remote_branch}\" ]] && local same_branch_name=true\n      if ([[ \"${SCM_GIT_SHOW_REMOTE_INFO}\" = \"auto\" ]] && [[ \"${num_remotes}\" -ge 2 ]]) ||\n          [[ \"${SCM_GIT_SHOW_REMOTE_INFO}\" = \"true\" ]]; then\n        remote_info=\"${remote_name}\"\n        [[ \"${same_branch_name}\" != \"true\" ]] && remote_info+=\"/${remote_branch}\"\n      elif [[ ${same_branch_name} != \"true\" ]]; then\n        remote_info=\"${remote_branch}\"\n      fi\n      if [[ -n \"${remote_info}\" ]];then\n        if [[ \"${branch_gone}\" = \"true\" ]]; then\n          SCM_BRANCH+=\"${SCM_THEME_BRANCH_GONE_PREFIX}${remote_info}\"\n        else\n          SCM_BRANCH+=\"${SCM_THEME_BRANCH_TRACK_PREFIX}${remote_info}\"\n        fi\n      fi\n    fi\n    SCM_GIT_DETACHED=\"false\"\n  else\n    local detached_prefix=\"\"\n    ref=$(_omb_prompt_git describe --tags --exact-match 2> /dev/null)\n    if [[ -n \"$ref\" ]]; then\n      detached_prefix=${SCM_THEME_TAG_PREFIX}\n    else\n      ref=$(_omb_prompt_git describe --contains --all HEAD 2> /dev/null)\n      ref=${ref#remotes/}\n      [[ -z \"$ref\" ]] && ref=${SCM_CHANGE}\n      detached_prefix=${SCM_THEME_DETACHED_PREFIX}\n    fi\n    SCM_BRANCH=${detached_prefix}${ref}\n    SCM_GIT_DETACHED=\"true\"\n  fi\n\n  local ahead_re='.+ahead ([0-9]+).+'\n  local behind_re='.+behind ([0-9]+).+'\n  [[ \"${status}\" =~ ${ahead_re} ]] && SCM_BRANCH+=\" ${SCM_GIT_AHEAD_CHAR}${BASH_REMATCH[1]}\"\n  [[ \"${status}\" =~ ${behind_re} ]] && SCM_BRANCH+=\" ${SCM_GIT_BEHIND_CHAR}${BASH_REMATCH[1]}\"\n\n  local stash_count=\"$(_omb_prompt_git stash list 2> /dev/null | wc -l | tr -d ' ')\"\n  [[ \"${stash_count}\" -gt 0 ]] && SCM_BRANCH+=\" {${stash_count}}\"\n\n  SCM_BRANCH+=${details}\n\n  SCM_PREFIX=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n  SCM_SUFFIX=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n}\n\nfunction svn_prompt_vars {\n  if [[ -n $(command svn status 2> /dev/null) ]]; then\n    SCM_DIRTY=1\n    SCM_STATE=${SVN_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n  else\n    SCM_DIRTY=0\n    SCM_STATE=${SVN_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n  fi\n  SCM_PREFIX=${SVN_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n  SCM_SUFFIX=${SVN_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n  SCM_BRANCH=$(command svn info 2> /dev/null | awk -F/ '/^URL:/ { for (i=0; i<=NF; i++) { if ($i == \"branches\" || $i == \"tags\" ) { print $(i+1); break }; if ($i == \"trunk\") { print $i; break } } }') || return\n  SCM_CHANGE=$(command svn info 2> /dev/null | sed -ne 's#^Revision: ##p' )\n}\n\n# this functions returns absolute location of .hg directory if one exists\n# It starts in the current directory and moves its way up until it hits /.\n# If we get to / then no Mercurial repository was found.\n# Example:\n# - lets say we cd into ~/Projects/Foo/Bar\n# - .hg is located in ~/Projects/Foo/.hg\n# - get_hg_root starts at ~/Projects/Foo/Bar and sees that there is no .hg directory, so then it goes into ~/Projects/Foo\nfunction get_hg_root {\n  local CURRENT_DIR=$PWD\n\n  while [ \"$CURRENT_DIR\" != \"/\" ]; do\n    if [ -d \"$CURRENT_DIR/.hg\" ]; then\n      _omb_util_print \"$CURRENT_DIR/.hg\"\n      return\n    fi\n\n    CURRENT_DIR=$(dirname \"$CURRENT_DIR\")\n  done\n}\n\nfunction hg_prompt_vars {\n  if [[ -n $(command hg status 2> /dev/null) ]]; then\n    SCM_DIRTY=1\n    SCM_STATE=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n  else\n    SCM_DIRTY=0\n    SCM_STATE=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n  fi\n  SCM_PREFIX=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n  SCM_SUFFIX=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n\n  HG_ROOT=$(get_hg_root)\n\n  if [ -f \"$HG_ROOT/branch\" ]; then\n    # Mercurial holds it's current branch in .hg/branch file\n    SCM_BRANCH=$(cat \"$HG_ROOT/branch\")\n  else\n    SCM_BRANCH=$(command hg summary 2> /dev/null | grep branch: | awk '{print $2}')\n  fi\n\n  if [ -f \"$HG_ROOT/dirstate\" ]; then\n    # Mercurial holds various information about the working directory in .hg/dirstate file. More on http://mercurial.selenic.com/wiki/DirState\n    SCM_CHANGE=$(hexdump -n 10 -e '1/1 \"%02x\"' \"$HG_ROOT/dirstate\" | cut -c-12)\n  else\n    SCM_CHANGE=$(command hg summary 2> /dev/null | grep parent: | awk '{print $2}')\n  fi\n}\n\n## @fn _omb_prompt_get_rbfu\n##   @var[out] rbfu\n##   @exit\nfunction _omb_prompt_get_rbfu {\n  rbfu=$RBFU_RUBY_VERSION\n  [[ $rbfu ]] || return 1\n  _omb_prompt_format rbfu \"$rbfu\" OMB_PROMPT_RBFU:RBFU_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_rbenv\n##   @var[out] rbenv\n##   @exit\nfunction _omb_prompt_get_rbenv {\n  rbenv=\n  _omb_util_command_exists rbenv || return 1\n\n  rbenv=$(rbenv version-name)\n  rbenv commands | command grep -q gemset &&\n    gemset=$(rbenv gemset active 2> /dev/null) &&\n    rbenv=\"$rbenv@${gemset%% *}\"\n\n  [[ $rbenv != system ]] || return 1\n  _omb_prompt_format rbenv \"$rbenv\" OMB_PROMPT_RBENV:RBENV_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_rvm\n##   @var[out] rvm\n##   @exit\nfunction _omb_prompt_get_rvm {\n  rvm=\n  if _omb_util_command_exists rvm-prompt; then\n    rvm=$(rvm-prompt)\n  elif _omb_util_command_exists rvm; then\n    local rvm_current=$(rvm tools identifier)\n    local rvm_default=$(rvm strings default)\n    [[ $rvm_current && $rvm_default && $rvm_current != \"$rvm_default\" ]] || return 1\n    rvm=$rvm_current\n  fi\n\n  [[ $rvm ]] || return 1\n  _omb_prompt_format rvm \"$rvm\" OMB_PROMPT_RVM:RVM_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_chruby\n##   @var[out] chruby\n##   @exit\nfunction _omb_prompt_get_chruby {\n  chruby=\n  _omb_util_function_exists chruby || return 1\n\n  _omb_util_function_exists chruby_auto && chruby=$(chruby_auto)\n\n  local ruby_version\n  ruby_version=$(ruby --version | command awk '{print $1, $2;}') || return\n  chruby | command grep -q '\\*' || ruby_version=\"${ruby_version} (system)\"\n  _omb_prompt_format ruby_version \"$ruby_version\" OMB_PROMPT_CHRUBY:CHRUBY_THEME_PROMPT\n\n  chruby+=$ruby_version\n}\n\n## @fn _omb_prompt_get_ruby_env\n##   @var[out] ruby_env\n##   @exit\nfunction _omb_prompt_get_ruby_env {\n  local rbfu rbenv rvm chruby\n  _omb_prompt_get_rbfu\n  _omb_prompt_get_rbenv\n  _omb_prompt_get_rvm\n  _omb_prompt_get_chruby\n  ruby_env=$rbfu$rbenv$rvm$chruby\n  [[ $ruby_env ]]\n}\n\n_omb_util_defun_print _omb_prompt_{print,get}_rbfu rbfu\n_omb_util_defun_print _omb_prompt_{print,get}_rbenv rbenv\n_omb_util_defun_print _omb_prompt_{print,get}_rvm rvm\n_omb_util_defun_print _omb_prompt_{print,get}_chruby chruby\n_omb_util_defun_print _omb_prompt_{print,get}_ruby_env ruby_env\n\n_omb_deprecate_function 20000 rbfu_version_prompt   _omb_prompt_print_rbfu\n_omb_deprecate_function 20000 rbenv_version_prompt  _omb_prompt_print_rbenv\n_omb_deprecate_function 20000 rvm_version_prompt    _omb_prompt_print_rvm\n_omb_deprecate_function 20000 chruby_version_prompt _omb_prompt_print_chruby\n_omb_deprecate_function 20000 ruby_version_prompt   _omb_prompt_print_ruby_env\n\n## @fn _omb_prompt_get_virtualenv\n##   @var[out] virtualenv\n##   @exit\nfunction _omb_prompt_get_virtualenv {\n  virtualenv=\n  [[ ${VIRTUAL_ENV-} ]] || return 1\n  virtualenv=${VIRTUAL_ENV_PROMPT:-$(basename \"$VIRTUAL_ENV\")}\n  _omb_prompt_format virtualenv \"$virtualenv\" OMB_PROMPT_VIRTUALENV:VIRTUALENV_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_condaenv\n##   @var[out] condaenv\n##   @exit\nfunction _omb_prompt_get_condaenv {\n  condaenv=\n  [[ ${CONDA_DEFAULT_ENV-} && ${CONDA_SHLVL-} != 0 ]] || return 1\n\n  condaenv=$CONDA_DEFAULT_ENV\n  if [[ ${OMB_PROMPT_CONDAENV_USE_BASENAME-} == true ]]; then\n    condaenv=$(basename \"$condaenv\")\n  fi\n  _omb_prompt_format condaenv \"$condaenv\" OMB_PROMPT_CONDAENV:CONDAENV_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_python_version\n##   @var[out] python_version\n##   @exit\nfunction _omb_prompt_get_python_version {\n  python_version=$(python --version 2>&1 | command awk '{print \"py-\"$2;}')\n  [[ $python_version ]] || return 1\n  _omb_prompt_format python_version \"$python_version\" OMB_PROMPT_PYTHON_VERSION:PYTHON_THEME_PROMPT\n}\n\n## @fn _omb_prompt_get_python_venv\n##   @var[out] python_venv\n##   @exit\nfunction _omb_prompt_get_python_venv {\n  python_venv=\n  [[ ${OMB_PROMPT_SHOW_PYTHON_VENV-} == true ]] || return 1\n  local virtualenv condaenv\n  _omb_prompt_get_virtualenv\n  _omb_prompt_get_condaenv\n  python_venv=$virtualenv$condaenv\n  [[ $python_venv ]]\n}\n\n## @fn _omb_prompt_get_python_env\n##   @var[out] python_env\n##   @exit\nfunction _omb_prompt_get_python_env {\n  local virtualenv condaenv python_version\n  _omb_prompt_get_virtualenv\n  _omb_prompt_get_condaenv\n  _omb_prompt_get_python_version\n  python_env=$virtualenv$condaenv$python_version\n  [[ $python_env ]]\n}\n\n## @fn _omb_prompt_get_spack_env\n##   @var[out] spack_env\n##   @exit\nfunction _omb_prompt_get_spack_env {\n  spack_env=\n  [[ ${OMB_PROMPT_SHOW_SPACK_ENV-} == true ]] || return 1\n  [[ ${SPACK_ENV-} ]] || return 1\n  _omb_prompt_format spack_env \"$(basename \"$SPACK_ENV\")\" OMB_PROMPT_SPACK_ENV\n}\n\n_omb_util_defun_print _omb_prompt_{print,get}_virtualenv virtualenv\n_omb_util_defun_print _omb_prompt_{print,get}_condaenv condaenv\n_omb_util_defun_print _omb_prompt_{print,get}_python_version python_version\n_omb_util_defun_print _omb_prompt_{print,get}_python_venv python_venv\n_omb_util_defun_print _omb_prompt_{print,get}_python_env python_env\n\n_omb_deprecate_function 20000 virtualenv_prompt     _omb_prompt_print_virtualenv\n_omb_deprecate_function 20000 condaenv_prompt       _omb_prompt_print_condaenv\n_omb_deprecate_function 20000 py_interp_prompt      _omb_prompt_print_python_version\n_omb_deprecate_function 20000 python_version_prompt _omb_prompt_print_python_env\n\nfunction git_user_info {\n  # support two or more initials, set by 'git pair' plugin\n  SCM_CURRENT_USER=$(_omb_prompt_git config user.initials | sed 's% %+%')\n  # if `user.initials` weren't set, attempt to extract initials from `user.name`\n  [[ -z \"${SCM_CURRENT_USER}\" ]] && SCM_CURRENT_USER=$(printf \"%s\" $(for word in $(_omb_prompt_git config user.name | tr 'A-Z' 'a-z'); do printf \"%1.1s\" $word; done))\n  [[ -n \"${SCM_CURRENT_USER}\" ]] && printf \"%s\" \"$SCM_THEME_CURRENT_USER_PREFFIX$SCM_CURRENT_USER$SCM_THEME_CURRENT_USER_SUFFIX\"\n}\n\nfunction clock_char {\n  CLOCK_CHAR=${THEME_CLOCK_CHAR:-\"⌚\"}\n  CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-\"$_omb_prompt_normal\"}\n  SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-\"true\"}\n\n  if [[ \"${SHOW_CLOCK_CHAR}\" = \"true\" ]]; then\n    echo -e \"${CLOCK_CHAR_COLOR}${CLOCK_CHAR_THEME_PROMPT_PREFIX}${CLOCK_CHAR}${CLOCK_CHAR_THEME_PROMPT_SUFFIX}\"\n  fi\n}\n\nfunction clock_prompt {\n  CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_normal\"}\n  CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H:%M:%S\"}\n  [ -z $THEME_SHOW_CLOCK ] && THEME_SHOW_CLOCK=${THEME_CLOCK_CHECK:-\"true\"}\n  SHOW_CLOCK=$THEME_SHOW_CLOCK\n\n  if [[ \"${SHOW_CLOCK}\" = \"true\" ]]; then\n    CLOCK_STRING=$(date +\"${CLOCK_FORMAT}\")\n    echo -e \"${CLOCK_COLOR}${CLOCK_THEME_PROMPT_PREFIX}${CLOCK_STRING}${CLOCK_THEME_PROMPT_SUFFIX}\"\n  fi\n}\n\nfunction user_host_prompt {\n  if [[ \"${THEME_SHOW_USER_HOST}\" = \"true\" ]]; then\n      echo -e \"${USER_HOST_THEME_PROMPT_PREFIX}\\u@\\h${USER_HOST_THEME_PROMPT_SUFFIX}\"\n  fi\n}\n\n# backwards-compatibility\nfunction git_prompt_info {\n  git_prompt_vars\n  echo -e \"${SCM_PREFIX}${SCM_BRANCH}${SCM_STATE}${SCM_SUFFIX}\"\n}\n\nfunction svn_prompt_info {\n  svn_prompt_vars\n  echo -e \"${SCM_PREFIX}${SCM_BRANCH}${SCM_STATE}${SCM_SUFFIX}\"\n}\n\nfunction hg_prompt_info() {\n  hg_prompt_vars\n  echo -e \"${SCM_PREFIX}${SCM_BRANCH}:${SCM_CHANGE#*:}${SCM_STATE}${SCM_SUFFIX}\"\n}\n\nfunction scm_char {\n  scm_prompt_char\n  echo -e \"${SCM_THEME_CHAR_PREFIX}${SCM_CHAR}${SCM_THEME_CHAR_SUFFIX}\"\n}\n\nfunction prompt_char {\n  scm_char\n}\n\nfunction battery_char {\n  if [[ \"${THEME_BATTERY_PERCENTAGE_CHECK}\" = true ]]; then\n    echo -e \"${_omb_prompt_bold_brown}$(battery_percentage)%\"\n  fi\n}\n\nif ! _omb_util_command_exists 'battery_charge' ; then\n  # if user has installed battery plugin, skip this...\n  function battery_charge (){\n    # no op\n    _omb_util_put\n  }\nfi\n\n# The battery_char function depends on the presence of the battery_percentage function.\n# If battery_percentage is not defined, then define battery_char as a no-op.\nif ! _omb_util_command_exists 'battery_percentage' ; then\n  function battery_char (){\n    # no op\n    _omb_util_put\n  }\nfi\n\nfunction aws_profile {\n  if [[ $AWS_DEFAULT_PROFILE ]]; then\n    _omb_util_print \"$AWS_DEFAULT_PROFILE\"\n  else\n    _omb_util_print \"default\"\n  fi\n}\n\n\n# Returns true if $1 is a shell function.\n_omb_deprecate_function 20000 fn_exists _omb_util_function_exists\n_omb_deprecate_function 20000 safe_append_prompt_command _omb_util_add_prompt_command\n"
  },
  {
    "path": "lib/omb-prompt-colors.sh",
    "content": "#! bash oh-my-bash.module\n#\n# 2022-01-20 Koichi Murase: renamed from \"themes/colours.theme.sh\" to \"lib/omb-prompt-colors.sh\"\n\n_omb_module_require lib:omb-deprecate\n\nfunction _omb_theme__construct_sgr {\n  out=\n  local reset=\n  while (($#)); do\n    local next=$1; shift\n    case $next in\n    reset)     reset=0 ;;\n    bold)      out=${out:+$out;}1 ;;\n    faint)     out=${out:+$out;}2 ;;\n    italic)    out=${out:+$out;}3 ;;\n    underline) out=${out:+$out;}4 ;;\n    negative)  out=${out:+$out;}7 ;;\n    crossed)   out=${out:+$out;}8 ;;\n    color)\n      local color=$1; shift\n\n      local side=fg mode=normal\n      case $1 in\n      fg | bg) side=$1; shift ;;\n      esac\n      case $1 in\n      normal | bright) mode=$1; shift ;;\n      esac\n\n      local prefix=3\n      case $side:$mode in\n      fg:normal) prefix=3  ;;\n      bg:normal) prefix=4  ;;\n      fg:bright) prefix=9  ;;\n      bg:bright) prefix=10 ;;\n      esac\n\n      case $color in\n      black)   color=0 ;;\n      red)     color=1 ;;\n      green)   color=2 ;;\n      yellow)  color=3 ;;\n      blue)    color=4 ;;\n      magenta) color=5 ;;\n      cyan)    color=6 ;;\n      white)   color=7 ;;\n      rgb)\n        local r=$1 g=$2 b=$3; shift 3\n        if ((r == g && g == b)); then\n          # gray range above 232\n          color=$((232 + r / 11))\n        else\n          color=\"8;5;$(((r * 36  + b * 6 + g) / 51 + 16))\"\n        fi ;;\n      *) _omb_util_print \"_omb_theme_color: unknown color '$color'\" >&2\n         continue ;;\n      esac\n      out=${out:+$out;}$prefix$color ;;\n    '')\n      out=\"${out:+$out;}$*\" ;;\n    *)\n      _omb_util_print \"_omb_theme_color: unknown token '$next'\" >&2 ;;\n    esac\n  done\n\n  if [[ $reset ]]; then\n    out=$reset${out:+;$out}\n  fi\n}\n\nfunction _omb_theme_color_prompt {\n  local out\n  _omb_theme__construct_sgr \"$@\"\n  _omb_util_print \"\\[\\e[${out}m\\]\"\n}\n\nfunction _omb_theme_color_echo {\n  local out\n  _omb_theme__construct_sgr \"$@\"\n  _omb_util_print \"\\033[${out}m\"\n}\n\nfunction _omb_prompt_color_initialize {\n  _omb_prompt_normal='\\[\\e[0m\\]'\n  _omb_prompt_reset_color='\\[\\e[39m\\]'\n\n  # used by themes/gallifrey\n  _omb_prompt_bold='\\[\\e[1m\\]'\n\n  local -a normal_colors=(black brown green olive navy purple teal silver)\n  local -a bright_colors=(gray red lime yellow blue magenta cyan white)\n\n  local bright_fg_prefix=9 bright_bg_prefix=10\n  ((_omb_term_colors >= 16)) || bright_fg_prefix=3 bright_bg_prefix=4\n\n  local index\n  for ((index = 0; index < 8; index++)); do\n    printf -v \"_omb_prompt_${normal_colors[index]}\" %s '\\[\\e[0;3'\"$index\"'m\\]'\n    printf -v \"_omb_prompt_bold_${normal_colors[index]}\" %s '\\[\\e[3'\"$index\"';1m\\]'\n    printf -v \"_omb_prompt_underline_${normal_colors[index]}\" %s '\\[\\e[3'\"$index\"';4m\\]'\n    printf -v \"_omb_prompt_background_${normal_colors[index]}\" %s '\\[\\e[4'\"$index\"'m\\]'\n    printf -v \"_omb_prompt_${bright_colors[index]}\" %s '\\[\\e[0;'\"$bright_fg_prefix$index\"'m\\]'\n    printf -v \"_omb_prompt_bold_${bright_colors[index]}\" %s '\\[\\e['\"$bright_fg_prefix$index\"';1m\\]'\n    printf -v \"_omb_prompt_underline_${bright_colors[index]}\" %s '\\[\\e['\"$bright_fg_prefix$index\"';4m\\]'\n    printf -v \"_omb_prompt_background_${bright_colors[index]}\" %s '\\[\\e['\"$bright_bg_prefix$index\"'m\\]'\n  done\n}\n_omb_prompt_color_initialize\n\n\n_omb_deprecate_function 20000 color      _omb_theme_color_prompt\n_omb_deprecate_function 20000 echo_color _omb_theme_color_echo\n\n_omb_deprecate_const 20000 black             \"$_omb_prompt_black\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_black}\"\n_omb_deprecate_const 20000 cyan              \"$_omb_prompt_teal\"              \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_teal}\"\n_omb_deprecate_const 20000 white             \"$_omb_prompt_white\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_white}\"\n_omb_deprecate_const 20000 orange            \"$_omb_prompt_red\"               \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_red}\"\n\n_omb_deprecate_const 20000 bold_black        \"$_omb_prompt_bold_black\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_black}\"\n_omb_deprecate_const 20000 bold_red          \"$_omb_prompt_bold_brown\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_brown}\"\n_omb_deprecate_const 20000 bold_green        \"$_omb_prompt_bold_green\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_green}\"\n_omb_deprecate_const 20000 bold_yellow       \"$_omb_prompt_bold_olive\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_olive}\"\n_omb_deprecate_const 20000 bold_blue         \"$_omb_prompt_bold_navy\"         \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_navy}\"\n_omb_deprecate_const 20000 bold_purple       \"$_omb_prompt_bold_purple\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_purple}\"\n_omb_deprecate_const 20000 bold_cyan         \"$_omb_prompt_bold_teal\"         \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_teal}\"\n_omb_deprecate_const 20000 bold_white        \"$_omb_prompt_bold_white\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_white}\"\n_omb_deprecate_const 20000 bold_orange       \"$_omb_prompt_bold_red\"          \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_red}\"\n\n_omb_deprecate_const 20000 underline_black   \"$_omb_prompt_underline_black\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_black}\"\n_omb_deprecate_const 20000 underline_red     \"$_omb_prompt_underline_brown\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_brown}\"\n_omb_deprecate_const 20000 underline_green   \"$_omb_prompt_underline_green\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_green}\"\n_omb_deprecate_const 20000 underline_yellow  \"$_omb_prompt_underline_olive\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_olive}\"\n_omb_deprecate_const 20000 underline_blue    \"$_omb_prompt_underline_navy\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_navy}\"\n_omb_deprecate_const 20000 underline_purple  \"$_omb_prompt_underline_purple\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_purple}\"\n_omb_deprecate_const 20000 underline_cyan    \"$_omb_prompt_underline_teal\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_teal}\"\n_omb_deprecate_const 20000 underline_white   \"$_omb_prompt_underline_white\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_white}\"\n_omb_deprecate_const 20000 underline_orange  \"$_omb_prompt_underline_red\"     \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_underline_red}\"\n\n_omb_deprecate_const 20000 background_black  \"$_omb_prompt_background_black\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_black}\"\n_omb_deprecate_const 20000 background_red    \"$_omb_prompt_background_brown\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_brown}\"\n_omb_deprecate_const 20000 background_green  \"$_omb_prompt_background_green\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_green}\"\n_omb_deprecate_const 20000 background_yellow \"$_omb_prompt_background_olive\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_olive}\"\n_omb_deprecate_const 20000 background_blue   \"$_omb_prompt_background_navy\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_navy}\"\n_omb_deprecate_const 20000 background_purple \"$_omb_prompt_background_purple\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_purple}\"\n_omb_deprecate_const 20000 background_cyan   \"$_omb_prompt_background_teal\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_teal}\"\n_omb_deprecate_const 20000 background_white  \"$_omb_prompt_background_white\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_white}\"\n_omb_deprecate_const 20000 background_orange \"$_omb_prompt_background_red\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_background_red}\"\n\n_omb_deprecate_const 20000 normal            \"$_omb_prompt_normal\"            \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_normal}\"\n_omb_deprecate_const 20000 reset_color       \"$_omb_prompt_reset_color\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_reset_color}\"\n\n_omb_deprecate_const 20000 echo_black             \"$_omb_term_black\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_black}\"\n_omb_deprecate_const 20000 echo_red               \"$_omb_term_brown\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_brown}\"\n_omb_deprecate_const 20000 echo_green             \"$_omb_term_green\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_green}\"\n_omb_deprecate_const 20000 echo_yellow            \"$_omb_term_olive\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_olive}\"\n_omb_deprecate_const 20000 echo_blue              \"$_omb_term_navy\"              \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_navy}\"\n_omb_deprecate_const 20000 echo_purple            \"$_omb_term_purple\"            \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_purple}\"\n_omb_deprecate_const 20000 echo_cyan              \"$_omb_term_teal\"              \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_teal}\"\n_omb_deprecate_const 20000 echo_white             \"$_omb_term_white\"             \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_white}\"\n_omb_deprecate_const 20000 echo_orange            \"$_omb_term_red\"               \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_red}\"\n\n_omb_deprecate_const 20000 echo_bold_black        \"$_omb_term_bold_black\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_black}\"\n_omb_deprecate_const 20000 echo_bold_red          \"$_omb_term_bold_brown\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_brown}\"\n_omb_deprecate_const 20000 echo_bold_green        \"$_omb_term_bold_green\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_green}\"\n_omb_deprecate_const 20000 echo_bold_yellow       \"$_omb_term_bold_olive\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_olive}\"\n_omb_deprecate_const 20000 echo_bold_blue         \"$_omb_term_bold_navy\"         \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_navy}\"\n_omb_deprecate_const 20000 echo_bold_purple       \"$_omb_term_bold_purple\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_purple}\"\n_omb_deprecate_const 20000 echo_bold_cyan         \"$_omb_term_bold_teal\"         \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_teal}\"\n_omb_deprecate_const 20000 echo_bold_white        \"$_omb_term_bold_white\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_white}\"\n_omb_deprecate_const 20000 echo_bold_orange       \"$_omb_term_bold_red\"          \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_bold_red}\"\n\n_omb_deprecate_const 20000 echo_underline_black   \"$_omb_term_underline_black\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_black}\"\n_omb_deprecate_const 20000 echo_underline_red     \"$_omb_term_underline_brown\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_brown}\"\n_omb_deprecate_const 20000 echo_underline_green   \"$_omb_term_underline_green\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_green}\"\n_omb_deprecate_const 20000 echo_underline_yellow  \"$_omb_term_underline_olive\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_olive}\"\n_omb_deprecate_const 20000 echo_underline_blue    \"$_omb_term_underline_navy\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_navy}\"\n_omb_deprecate_const 20000 echo_underline_purple  \"$_omb_term_underline_purple\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_purple}\"\n_omb_deprecate_const 20000 echo_underline_cyan    \"$_omb_term_underline_teal\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_teal}\"\n_omb_deprecate_const 20000 echo_underline_white   \"$_omb_term_underline_white\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_white}\"\n_omb_deprecate_const 20000 echo_underline_orange  \"$_omb_term_underline_red\"     \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_underline_red}\"\n\n_omb_deprecate_const 20000 echo_background_black  \"$_omb_term_background_black\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_black}\"\n_omb_deprecate_const 20000 echo_background_red    \"$_omb_term_background_brown\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_brown}\"\n_omb_deprecate_const 20000 echo_background_green  \"$_omb_term_background_green\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_green}\"\n_omb_deprecate_const 20000 echo_background_yellow \"$_omb_term_background_olive\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_olive}\"\n_omb_deprecate_const 20000 echo_background_blue   \"$_omb_term_background_navy\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_navy}\"\n_omb_deprecate_const 20000 echo_background_purple \"$_omb_term_background_purple\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_purple}\"\n_omb_deprecate_const 20000 echo_background_cyan   \"$_omb_term_background_teal\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_teal}\"\n_omb_deprecate_const 20000 echo_background_white  \"$_omb_term_background_white\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_white}\"\n_omb_deprecate_const 20000 echo_background_orange \"$_omb_term_background_red\"    \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_background_red}\"\n\n_omb_deprecate_const 20000 echo_normal            \"$_omb_term_normal\"            \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_normal}\"\n_omb_deprecate_const 20000 echo_reset_color       \"$_omb_term_reset_color\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_reset_color}\"\n"
  },
  {
    "path": "lib/omb-util.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_util_put {\n  printf '%s' \"$@\"\n}\n\nfunction _omb_util_print {\n  local IFS=$' \\t\\n'\n  printf '%s\\n' \"$*\"\n}\n\nfunction _omb_util_print_lines {\n  if (($#)); then\n    printf '%s\\n' \"$@\"\n  fi\n}\n\nfunction _omb_string_escape_prompt {\n  REPLY=$1\n  local specialchars='\\`$'\n  if [[ $REPLY == [\"$specialchars\"] ]]; then\n    local i n=${#specialchars} a b\n    for ((i=0;i<n;i++)); do\n      a=${specialchars:i:1}\n      b='\\'$a\n      REPLY=${REPLY//\"$a\"/\"$b\"}\n    done\n  fi\n}\n"
  },
  {
    "path": "lib/readlink.sh",
    "content": "#! bash oh-my-bash.module\n\n## This module provides the following function which can be used as \"readlink\n## -f\" that can be used in any systems.  The implementation is taken from\n## \"ble/util/readlink\" from ble.sh <https://github.com/akinomyoga/ble.sh>.\n##\n## @fn _omb_util_readlink filename\n##   print the real path of the filename which is possibly a symbolic link.\n##\n\n# use _omb_util_print\n_omb_module_require lib:omb-util\n# use _omb_util_function_exists, _omb_util_binary_exists\n_omb_module_require lib:utils\n\nif ((_omb_bash_version >= 40000)); then\n  _omb_util_readlink_visited_init='local -A visited=()'\n  function _omb_util_readlink__visited {\n    [[ ${visited[$1]+set} ]] && return 0\n    visited[$1]=1\n    return 1\n  }\nelse\n  _omb_util_readlink_visited_init=\"local -a visited=()\"\n  function _omb_util_readlink__visited {\n    local key\n    for key in \"${visited[@]}\"; do\n      [[ $1 == \"$key\" ]] && return 0\n    done\n    visited=(\"$1\" \"${visited[@]}\")\n    return 1\n  }\nfi\n\n## @fn _omb_util_readlink__readlink path\n##   @var[out] link\nfunction _omb_util_readlink__readlink {\n  local path=$1\n  if _omb_util_function_exists readlink; then\n    link=$(readlink -- \"$path\")\n    [[ $link ]]\n  elif _omb_util_binary_exists ls; then\n    link=$(ls -ld -- \"$path\") &&\n      [[ $link == *\" $path -> \"?* ]] &&\n      link=${link#*\" $path -> \"}\n  else\n    false\n  fi\n} 2>/dev/null\n\n## @fn  _omb_util_readlink__resolve_physical_directory\n##   @var[in,out] path\nfunction _omb_util_readlink__resolve_physical_directory {\n  [[ $path == */?* ]] || return 0\n  local PWD=$PWD OLDPWD=$OLDPWD CDPATH=\n  builtin cd -L . &&\n    local pwd=$PWD &&\n    builtin cd -P \"${path%/*}/\" &&\n    path=${PWD%/}/${path##*/}\n  builtin cd -L \"$pwd\"\n  return 0\n}\n\nfunction _omb_util_readlink__resolve_loop {\n  local path=$1\n  builtin eval -- \"$_omb_util_readlink_visited_init\"\n  while [[ -h $path ]]; do\n    local link\n    _omb_util_readlink__visited \"$path\" && break\n    _omb_util_readlink__readlink \"$path\" || break\n    if [[ $link == /* || $path != */* ]]; then\n      path=$link\n    else\n      _omb_util_readlink__resolve_physical_directory\n      path=${path%/}/$link\n    fi\n    while [[ $path == ?*/ ]]; do path=${path%/}; done\n  done\n  _omb_util_print \"$path\"\n}\n\nfunction _omb_util_readlink__resolve {\n  # Select implementation on the first call\n  _omb_util_readlink_type=\n\n  case $OSTYPE in\n  (cygwin | msys | linux-gnu)\n    # These systems provide \"readlink -f\".\n    local readlink\n    readlink=$(type -P readlink)\n    case $readlink in\n    (/bin/readlink | /usr/bin/readlink)\n      # shellcheck disable=SC2100\n      _omb_util_readlink_type=readlink-f\n      function _omb_util_readlink__resolve { readlink -f -- \"$1\"; } ;;\n    esac ;;\n  esac\n\n  if [[ ! $_omb_util_readlink_type ]]; then\n    _omb_util_readlink_type=loop\n    function _omb_util_readlink__resolve { _omb_util_readlink__resolve_loop \"$1\"; }\n  fi\n\n  _omb_util_readlink__resolve \"$1\"\n}\n\nfunction _omb_util_readlink {\n  if [[ -h $1 ]]; then\n    _omb_util_readlink__resolve \"$1\"\n  else\n    _omb_util_print \"$1\"\n  fi\n}\n"
  },
  {
    "path": "lib/shopt.sh",
    "content": "#! bash oh-my-bash.module\n\n# This file originally came from bash-sensible [1].  Some of the settings\n# related to history is separated into \"lib/history.sh\".  The current version\n# is based on commit eb82f9e8.\n#\n# [1] https://github.com/mrzool/bash-sensible\n#     Copyright (c) 2015 Mattia Tezzele, provided under the MIT license.\n\n# Various shell options collected in single file\n# taken from bash-sensible and other sources\n## GENERAL OPTIONS ##\n\n# Prevent file overwrite on stdout redirection\n# Use `>|` to force redirection to an existing file\nset -o noclobber\n\n# Update window size after every command\nshopt -s checkwinsize\n\n# Automatically trim long paths in the prompt (requires Bash 4.x)\nPROMPT_DIRTRIM=${PROMPT_DIRTRIM:-2}\n\n# Enable history expansion with space\n# E.g. typing !!<space> will replace the !! with your last command\nbind Space:magic-space\n\n# Turn on extended glob patterns such as @(...), *(...), ?(...), and +(...)\nshopt -s extglob\n\n# Turn on recursive globbing (enables ** to recurse all directories)\nshopt -s globstar 2> /dev/null\n\n# Case-sensitive globbing (used in pathname expansion)\n#\n# Note: We do not turn \"nocaseglob\" on by default.  We have been turning on the\n# nocaseglob option for a long time, but this conflicts with users'\n# expectations that the pathname expansions are case-sensitive.  This might\n# cause an unexpected destructive result e.g. with \"rm <glob-pattern>\".  Also,\n# the option OMB_CASE_SENSITIVE is originally for the case-(in)sensitive\n# completion and should not be mixed with the option for the pathname\n# expansion.  See a discussion in Ref. [2].  A consistent change was also\n# applied to the upstream bash-sensible [3].\n#\n# [2] https://github.com/ohmybash/oh-my-bash/issues/623\n# [3] https://github.com/mrzool/bash-sensible/commit/eb82f9e87728ea10423a2a2b039a4b491d10c733\n#\n#shopt -s nocaseglob\n\n## SMARTER TAB-COMPLETION (Readline bindings) ##\n\n# Conditionally perform file completion in a case insensitive fashion.\n# Setting OMB_CASE_SENSITIVE to 'true' will switch from the default,\n# case insensitive, matching to the case-sensitive one\n#\n# Note: CASE_SENSITIVE is the compatibility name\nif [[ ${OMB_CASE_SENSITIVE:-${CASE_SENSITIVE:-}} == true ]]; then\n\tbind \"set completion-ignore-case off\"\nelse\n\t# By default, case sensitivity is disabled.\n\tbind \"set completion-ignore-case on\"\n\n\t# Treat hyphens and underscores as equivalent\n\t# CASE_SENSITIVE must be off\n\tif [[ ! ${OMB_HYPHEN_SENSITIVE-} && ${HYPHEN_INSENSITIVE} ]]; then\n\t\tcase $HYPHEN_INSENSITIVE in\n\t\t(true)  OMB_HYPHEN_SENSITIVE=true ;;\n\t\t(false) OMB_HYPHEN_SENSITIVE=false ;;\n\t\tesac\n\tfi\n\tif [[ ${OMB_HYPHEN_SENSITIVE-} == false ]]; then\n\t\tbind \"set completion-map-case on\"\n\tfi\nfi\n\n# Display matches for ambiguous patterns at first tab press\nbind \"set show-all-if-ambiguous on\"\n\n# Immediately add a trailing slash when autocompleting symlinks to directories\nbind \"set mark-symlinked-directories on\"\n\n## BETTER DIRECTORY NAVIGATION ##\n\n# Prepend cd to directory names automatically\nshopt -s autocd 2> /dev/null\n# Correct spelling errors during tab-completion\nshopt -s dirspell 2> /dev/null\n# Correct spelling errors in arguments supplied to cd\nshopt -s cdspell 2> /dev/null\n\n# This defines where cd looks for targets\n# Add the directories you want to have fast access to, separated by colon\n# Ex: CDPATH=\".:~:~/projects\" will look for targets in the current working directory, in home and in the ~/projec\nCDPATH=\".\"\n\n# This allows you to bookmark your favorite places across the file system\n# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in\nshopt -s cdable_vars\n"
  },
  {
    "path": "lib/spectrum.sh",
    "content": "#! bash oh-my-bash.module\n# A script to make using 256 colors in bash less painful.\n# P.C. Shyamshankar <sykora@lucentbeing.com>\n# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/\n\n_omb_module_require lib:omb-deprecate\n_omb_module_require lib:omb-prompt-colors\n\n# typeset in bash does not have associative arrays, declare does in bash 4.0+\n# https://stackoverflow.com/a/6047948\n\n# This library only works for BASH 4.x to keep the minimum compatibility for macOS.\n# shellcheck disable=SC2034\nif\n  # shellcheck disable=SC2168\n  if ((_omb_bash_version >= 40200)); then\n    declare -gA _omb_spectrum_fx=()\n    declare -gA _omb_spectrum_fg=()\n    declare -gA _omb_spectrum_bg=()\n    declare -gA FX FG BG\n  elif ((_omb_bash_version >= 40000)) && ! local _omb_local_test 2>/dev/null; then\n    declare -A _omb_spectrum_fx=()\n    declare -A _omb_spectrum_fg=()\n    declare -A _omb_spectrum_bg=()\n    declare -A FX FG BG\n  else\n    false\n  fi\nthen\n  function _omb_spectrum__initialize() {\n    _omb_spectrum_fx=(\n      [reset]=$'\\e[00m'\n      [bold]=$'\\e[01m'       [no-bold]=$'\\e[22m'\n      [italic]=$'\\e[03m'     [no-italic]=$'\\e[23m'\n      [underline]=$'\\e[04m'  [no-underline]=$'\\e[24m'\n      [blink]=$'\\e[05m'      [no-blink]=$'\\e[25m'\n      [reverse]=$'\\e[07m'    [no-reverse]=$'\\e[27m'\n    )\n    local color\n    for color in {000..255}; do\n      _omb_spectrum_fg[$color]=$'\\e[38;5;'${color}'m'\n      _omb_spectrum_bg[$color]=$'\\e[48;5;'${color}'m'\n    done\n  }\n  _omb_spectrum__initialize\n\n  _omb_deprecate_const 20000 _RED \"$_omb_term_brown\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_brown}\"\n  _omb_deprecate_const 20000 _NC  \"$_omb_term_reset\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_term_reset}\"\n  function _omb_spectrum__deprecate() {\n    local key\n    for key in \"${!_omb_spectrum_fx[@]}\"; do FX[$key]=${_omb_spectrum_fx[$key]}; done\n    for key in \"${!_omb_spectrum_fg[@]}\"; do FG[$key]=${_omb_spectrum_fg[$key]}; done\n    for key in \"${!_omb_spectrum_bg[@]}\"; do BG[$key]=${_omb_spectrum_bg[$key]}; done\n  }\n  _omb_spectrum__deprecate\nfi\n\nOSH_SPECTRUM_TEXT=${OSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris}\n\n# Show all 256 colors with color number\nfunction spectrum_ls() {\n  local code\n  for code in {000..255}; do\n    printf '%s: \\e[38;5;%sm%s%s\\n' \"$code\" \"$code\" \"$OSH_SPECTRUM_TEXT\" \"$_omb_term_reset\"\n  done\n}\n\n# Show all 256 colors where the background is set to specific color\nfunction spectrum_bls() {\n  local code\n  for code in {000..255}; do\n    printf '%s: \\e[48;5;%sm%s%s\\n' \"$code\" \"$code\" \"$OSH_SPECTRUM_TEXT\" \"$_omb_term_reset\"\n  done\n}\n"
  },
  {
    "path": "lib/spinner.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Move a process to background and track its progress in a smoothier way.\n# Could be use if $TERM not set.\n#\n# Examples\n#\n# echo -ne \"${_omb_term_brown}I am running...\"\n# ( my_long_task_running ) &\n# spinner\n# echo -ne \"...${_omb_term_reset} ${_omb_term_green}DONE${_omb_term_reset}\"\n#\n\n# This spinner is used when there is a terminal.\nfunction term_spinner {\n  local pid=$!\n  local delay=0.1\n  local spinstr='|/-\\'\n  while [ \"$(ps a | awk '{print $1}' | grep $pid)\" ]; do\n    local temp=${spinstr#?}\n    printf \" [%c]  \" \"$spinstr\"\n    local spinstr=$temp${spinstr%\"$temp\"}\n    sleep $delay\n    printf \"\\b\\b\\b\\b\\b\\b\"\n  done\n  printf \"    \\b\\b\\b\\b\"\n}\n\nfunction no_term_spinner {\n  local pid=$!\n  local delay=0.1\n  local spinstr='|/-\\'\n  while [ \"$(ps a | awk '{print $1}' | grep $pid)\" ]; do\n    printf \".\"\n    sleep 2\n  done\n  echo \" ✓ \"\n}\n\nfunction spinner {\n  if [[ -z \"$TERM\" ]]; then\n    no_term_spinner\n  else\n    term_spinner\n  fi\n}\n"
  },
  {
    "path": "lib/theme-and-appearance.sh",
    "content": "#! bash oh-my-bash.module\n\n# colored ls\nexport LSCOLORS='Gxfxcxdxdxegedabagacad'\n"
  },
  {
    "path": "lib/utils.sh",
    "content": "#! bash oh-my-bash.module\n############################---Description---###################################\n#                                                                              #\n# Summary       : A collection of handy utilities and functions for bash       #\n# Support       : destro.nnt@gmail.com                                         #\n# Created date  : Mar 18,2017                                                  #\n# Latest Modified date : Mar 18,2017                                           #\n#                                                                              #\n################################################################################\n\n############################---Usage---#########################################\n\n# source ~/path/to/directory/utils.sh\n\n########################## Styled text output ##################################\n\n# e_header \"I am a sample script\"\n# e_success \"I am a success message\"\n# e_error \"I am an error message\"\n# e_warning \"I am a warning message\"\n# e_underline \"I am underlined text\"\n# e_bold \"I am bold text\"\n# e_note \"I am a note\"\n\n################# Performing simple Yes/No confirmations #######################\n\n# seek_confirmation \"Do you want to print a success message?\"\n# if is_confirmed; then\n#   e_success \"Here is a success message\"\n# else\n#   e_error \"You did not ask for a success message\"\n# fi\n\n############ Testing if packages, apps, gems, etc. are installed ###############\n\n# if _omb_util_command_exists 'git'; then\n#   e_success \"Git good to go\"\n# else\n#   e_error \"Git should be installed. It isn't. Aborting.\"\n#   exit 1\n# fi\n\n# if is_os \"darwin\"; then\n#   e_success \"You are on a mac\"\n# else\n#   e_error \"You are not on a mac\"\n#   exit 1\n# fi\n\n##################### Sending notifications to Pushover ########################\n\n# pushover \"We just finished performing a lengthy task.\"\n\n############################### Comparing A List ###############################\n\n# recipes=(\n#   A-random-package\n#   bash\n#   Another-random-package\n#   git\n# )\n# list=\"$(to_install \"${recipes[*]}\" \"$(brew list)\")\"\n# if [[ \"$list\" ]]; then\n# for item in ${list[@]}\n#   do\n#     echo \"$item is not on the list\"\n#   done\n# else\n# e_arrow \"Nothing to install.  You've already got them all.\"\n# fi\n\n\n################################################################################\n\nfunction _omb_util_setexit {\n  return \"$1\"\n}\n\nfunction _omb_util_defun_print {\n  builtin eval -- \"function $1 { local $3; $2 \\\"\\$@\\\" && _omb_util_print \\\"\\${$3}\\\"; }\"\n}\n\n#\n# Test whether a command---either an alias, a keyword, a function, a builtin,\n# or a file---is defined.\n#\n# $1 = cmd to test\n#\n# Usage:\n#\n#   if _omb_util_command_exists 'git'; then\n#     some action\n#   else\n#     some other action\n#   fi\n#\n\nif ((_omb_bash_version >= 40000)); then\n  function _omb_util_command_exists {\n    type -t -- \"$@\" &>/dev/null # bash-4.0\n  }\n  function _omb_util_binary_exists {\n    type -P -- \"$@\" &>/dev/null # bash-4.0\n  }\nelse\n  function _omb_util_command_exists {\n    while (($#)); do\n      type -t -- \"$1\" &>/dev/null || return 1\n      shift\n    done\n  }\n  function _omb_util_binary_exists {\n    while (($#)); do\n      type -P -- \"$1\" &>/dev/null || return 1\n      shift\n    done\n  }\nfi\nfunction _omb_util_function_exists {\n  declare -F \"$@\" &>/dev/null # bash-3.2\n}\n\n#\n# Set Colors\n#\n# Use colors, but only if connected to a terminal, and that terminal\n# supports them.  These colors are intended to be used with `echo`\n#\nfunction _omb_term_color_initialize {\n  local name\n  local -a normal_colors=(black brown green olive navy purple teal silver)\n  local -a bright_colors=(gray red lime yellow blue magenta cyan white)\n\n  if [[ ! -t 1 ]]; then\n    _omb_term_colors=\n    _omb_term_bold=\n    _omb_term_underline=\n    _omb_term_reset=\n    _omb_term_normal=\n    _omb_term_reset_color=\n    for name in \"${normal_colors[@]}\" \"${bright_colors[@]}\" violet; do\n      printf -v \"_omb_term_$name\" ''\n      printf -v \"_omb_term_background_$name\" ''\n      printf -v \"_omb_term_bold_$name\" ''\n      printf -v \"_omb_term_underline_$name\" ''\n    done\n    return 0\n  fi\n\n  if [[ ${BLE_VERSION-} ]]; then\n    # Import terminfo cache of ble.sh (https://github.com/akinomyoga/ble.sh)\n    _omb_term_colors=$_ble_term_colors\n    _omb_term_bold=$_ble_term_bold\n    _omb_term_underline=$_ble_term_smul\n    _omb_term_reset=$_ble_term_sgr0\n    _omb_term_normal=$_ble_term_sgr0\n    _omb_term_reset_color=$'\\e[39m'\n\n    local index\n    for ((index = 0; index < 8; index++)); do\n      printf -v \"_omb_term_${normal_colors[index]}\" %s \"${_ble_term_setaf[index]}\"\n      printf -v \"_omb_term_background_${normal_colors[index]}\" %s \"${_ble_term_setab[index]}\"\n      printf -v \"_omb_term_${bright_colors[index]}\" %s \"${_ble_term_setaf[index+8]}\"\n      printf -v \"_omb_term_background_${bright_colors[index]}\" %s \"${_ble_term_setab[index+8]}\"\n    done\n\n  else\n    if [[ ${OMB_TERM_USE_TPUT-} != no ]] && _omb_util_binary_exists tput; then\n      _omb_term_colors=$(tput colors 2>/dev/null || tput Co 2>/dev/null)\n      _omb_term_bold=$(tput bold 2>/dev/null || tput md 2>/dev/null)\n      _omb_term_underline=$(tput smul 2>/dev/null || tput ul 2>/dev/null)\n      _omb_term_reset=$(tput sgr0 2>/dev/null || tput me 2>/dev/null)\n    else\n      _omb_term_colors=\n      _omb_term_bold=$'\\e[1m'\n      _omb_term_underline=$'\\e[4m'\n      _omb_term_reset=$'\\e[0m'\n    fi\n    _omb_term_normal=$'\\e[0m'\n    _omb_term_reset_color=$'\\e[39m'\n\n    # normal colors\n    if ((_omb_term_colors >= 8)); then\n      local index\n      for ((index = 0; index < 8; index++)); do\n        local fg=$(tput setaf \"$index\" 2>/dev/null || tput AF \"$index\" 2>/dev/null)\n        [[ $fg ]] || fg=$'\\e[3'$index'm'\n        printf -v \"_omb_term_${normal_colors[index]}\" %s \"$fg\"\n        printf -v \"_omb_term_background_${normal_colors[index]}\" '\\e[4%sm' \"$index\"\n      done\n    else\n      local index\n      for ((index = 0; index < 8; index++)); do\n        printf -v \"_omb_term_${normal_colors[index]}\" '\\e[3%sm' \"$index\"\n        printf -v \"_omb_term_background_${normal_colors[index]}\" '\\e[4%sm' \"$index\"\n      done\n    fi\n\n    # bright colors\n    if ((_omb_term_colors >= 16)); then\n      local index\n      for ((index = 0; index < 8; index++)); do\n        local fg=$(tput setaf $((index+8)) 2>/dev/null || tput AF $((index+8)) 2>/dev/null)\n        [[ $fg ]] || fg=$'\\e[9'$index'm'\n        local refbg=_omb_term_background_${normal_colors[index]}\n        local bg=${!refbg}$'\\e[10'$index'm'\n        printf -v \"_omb_term_${bright_colors[index]}\" %s \"$fg\"\n        printf -v \"_omb_term_background_${bright_colors[index]}\" %s \"$bg\"\n      done\n    else\n      # copy normal colors to bright colors (with bold)\n      local index\n      for ((index = 0; index < 8; index++)); do\n        local reffg=_omb_term_${normal_colors[index]}\n        local refbg=_omb_term_background_${normal_colors[index]}\n        printf -v \"_omb_term_${bright_colors[index]}\" %s \"$_omb_term_bold${!reffg}\"\n        printf -v \"_omb_term_background_${bright_colors[index]}\" %s \"$_omb_term_bold${!refbg}\"\n      done\n    fi\n  fi\n\n  # index colors\n  if ((_omb_term_colors == 256)); then\n    _omb_term_violet=$'\\e[38;5;171m'\n    _omb_term_background_violet=$'\\e[48;5;171m'\n  else\n    _omb_term_violet=$_omb_term_purple\n    _omb_term_background_violet=$_omb_term_background_purple\n  fi\n\n  # bold / underline versions\n  for name in \"${normal_colors[@]}\" \"${bright_colors[@]}\" violet; do\n    local ref=_omb_term_$name\n    printf -v \"_omb_term_bold_$name\" %s \"$_omb_term_bold${!ref}\"\n    printf -v \"_omb_term_underline_$name\" %s \"$_omb_term_underline${!ref}\"\n  done\n}\n_omb_term_color_initialize\n\n#\n# Headers and Logging\n#\nfunction _omb_log_header    { printf \"\\n${_omb_term_bold}${_omb_term_violet}==========  %s  ==========${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_arrow     { printf \"➜ %s\\n\" \"$@\"; }\nfunction _omb_log_success   { printf \"${_omb_term_green}✔ %s${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_error     { printf \"${_omb_term_brown}✖ %s${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_warning   { printf \"${_omb_term_olive}➜ %s${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_underline { printf \"${_omb_term_underline}${_omb_term_bold}%s${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_bold      { printf \"${_omb_term_bold}%s${_omb_term_reset}\\n\" \"$@\"; }\nfunction _omb_log_note      { printf \"${_omb_term_underline}${_omb_term_bold}${_omb_term_navy}Note:${_omb_term_reset}  ${_omb_term_olive}%s${_omb_term_reset}\\n\" \"$@\"; }\n\n#\n# USAGE FOR SEEKING CONFIRMATION\n# seek_confirmation \"Ask a question\"\n# Credit: https://github.com/kevva/dotfiles\n#\n# if is_confirmed; then\n#   some action\n# else\n#   some other action\n# fi\n#\nfunction seek_confirmation {\n  printf \"\\\\n${_omb_term_bold}%s${_omb_term_reset}\" \"$@\"\n  read -rp \" (y/n) \" -n 1\n  printf \"\\\\n\"\n}\n\n# Test whether the result of an 'ask' is a confirmation\nfunction is_confirmed {\n  [[ $REPLY =~ ^[Yy]$ ]]\n}\n\n#\n# Test which OS the user runs\n# $1 = OS to test\n# Usage: if is_os 'darwin'; then\n#\nfunction is_os {\n  [[ $OSTYPE == $1* ]]\n}\n\n#\n# Pushover Notifications\n# Usage: pushover \"Title Goes Here\" \"Message Goes Here\"\n# Credit: http://ryonsherman.blogspot.com/2012/10/shell-script-to-send-pushover.html\n#\nfunction pushover {\n  PUSHOVERURL=\"https://api.pushover.net/1/messages.json\"\n  API_KEY=$PUSHOVER_API_KEY\n  USER_KEY=$PUSHOVER_USER_KEY\n  DEVICE=$PUSHOVER_DEVICE\n\n  TITLE=\"${1}\"\n  MESSAGE=\"${2}\"\n\n  curl \\\n  -F \"token=${API_KEY}\" \\\n  -F \"user=${USER_KEY}\" \\\n  -F \"device=${DEVICE}\" \\\n  -F \"title=${TITLE}\" \\\n  -F \"message=${MESSAGE}\" \\\n  \"${PUSHOVERURL}\" > /dev/null 2>&1\n}\n\n## @fn _omb_util_get_shopt optnames...\n##   @var[out] __shopt\nif ((_omb_bash_version >= 40100)); then\n  function _omb_util_get_shopt() {\n    if [[ $1 == -v ]]; then\n      [[ $2 == __shopt ]] || local __shopt\n      _omb_util_get_shopt \"${@:3}\"\n      [[ $2 == __shopt ]] || printf -v \"$2\" '%s' \"$__shopt\"\n    else\n      __shopt=$BASHOPTS\n    fi\n  }\nelse\n  function _omb_util_get_shopt {\n    if [[ $1 == -v ]]; then\n      [[ $2 == __shopt ]] || local __shopt\n      _omb_util_get_shopt \"${@:3}\"\n      [[ $2 == __shopt ]] || printf -v \"$2\" '%s' \"$__shopt\"\n    else\n      __shopt=\n      local opt\n      for opt; do\n        if shopt -q \"$opt\" &>/dev/null; then\n          __shopt=${__shopt:+$__shopt:}$opt\n        fi\n      done\n    fi\n  }\nfi\n\n_omb_util_unload_hook=()\nfunction _omb_util_unload {\n  local hook\n  for hook in \"${_omb_util_unload_hook[@]}\"; do\n    eval -- \"$hook\"\n  done\n}\n\n_omb_util_original_PS1=$PS1\n# shellcheck disable=SC2016\n_omb_util_unload_hook+=('PS1=$_omb_util_original_PS1')\n\n_omb_util_prompt_command=()\nfunction _omb_util_prompt_command_hook {\n  local status=$? lastarg=$_ hook\n  for hook in \"${_omb_util_prompt_command[@]}\"; do\n    _omb_util_setexit \"$status\" \"$lastarg\"\n    eval -- \"$hook\"\n  done\n  _omb_util_setexit \"$status\"\n}\n\n_omb_util_unload_hook+=('_omb_util_prompt_command=()')\n\n: \"${_omb_util_prompt_command_setup=}\"\nfunction _omb_util_add_prompt_command {\n  local other\n  for other in \"${_omb_util_prompt_command[@]}\"; do\n    [[ $1 == \"$other\" ]] && return 0\n  done\n  _omb_util_prompt_command+=(\"$1\")\n\n  if [[ ! $_omb_util_prompt_command_setup ]]; then\n    _omb_util_prompt_command_setup=1\n    local hook=_omb_util_prompt_command_hook\n\n    # See if we need to use the overriden version\n    if _omb_util_function_exists append_prompt_command_override; then\n      append_prompt_command_override \"$hook\"\n      return\n    fi\n\n    # Set OS dependent exact match regular expression\n    local prompt_re\n    if [[ $OSTYPE == darwin* ]]; then\n      # macOS\n      prompt_re='[[:<:]]'$hook'[[:>:]]'\n    else\n      # Linux, FreeBSD, etc.\n      prompt_re='\\<'$hook'\\>'\n    fi\n    [[ $PROMPT_COMMAND =~ $prompt_re ]] && return 0\n\n    if ((_omb_bash_version >= 50100)); then\n      local other\n      for other in \"${PROMPT_COMMAND[@]}\"; do\n        [[ $hook == \"$other\" ]] && return 0\n      done\n      PROMPT_COMMAND+=(\"$hook\")\n    else\n      PROMPT_COMMAND=\"$hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}\"\n    fi\n  fi\n}\n\n## @fn _omb_util_split array str [sep]\n##   Split STR with SEP in a safe way and store the result in ARRAY.\n##   @param[out] array\n##     The name of an array variable to which the split result is stored.\n##   @param[in] str\n##     The string to split\n##   @param[in,opt]\n##     The set of separator characters.  The default is ' <tab><newline>'.\nfunction _omb_util_split {\n  local __set=$- IFS=${3:-$' \\t\\n'}\n  set -f\n  eval -- \"$1=(\\$2)\"\n  [[ $__set == *f* ]] || set +f\n  return 0\n}\n\n## @fn _omb_util_glob_expand array glob\n##   Perform the pathname expansion of a glob pattern GLOB in a safe way and\n##   store the filenames in ARRAY.\n##   @param[out] array\n##     The name of an array variable to which the filenames are stored.\n##   @param[in] glob\n##     The glob pattern that is attempted to match filenames\nfunction _omb_util_glob_expand {\n  local __set=$- __shopt __gignore=$GLOBIGNORE\n  _omb_util_get_shopt failglob nullglob extglob\n\n  shopt -u failglob\n  shopt -s nullglob\n  shopt -s extglob\n  set +f\n  GLOBIGNORE=\n\n  eval -- \"$1=($2)\"\n\n  GLOBIGNORE=$__gignore\n  # Note: dotglob is changed by GLOBIGNORE\n  if [[ :$__shopt: == *:dotglob:* ]]; then\n    shopt -s dotglob\n  else\n    shopt -u dotglob\n  fi\n  [[ $__set == *f* ]] && set -f\n  [[ :$__shopt: != *:extglob:* ]] && shopt -u extglob\n  [[ :$__shopt: != *:nullglob:* ]] && shopt -u nullglob\n  [[ :$__shopt: == *:failglob:* ]] && shopt -s failglob\n  return 0\n}\n\n## @fn _omb_util_split_lines array_name string\nfunction _omb_util_split_lines {\n  local __set=$- IFS=$'\\n'\n  set -f\n  eval \"$1=(\\$2)\"\n  [[ $__set == *f* ]] || set +f\n  return 0\n}\n\n## @fn _omb_util_array_contains array_name value\nfunction _omb_util_array_contains {\n  # When the array does not have any elements, we always fail.\n  eval \"((\\${#$1[@]}))\" || return 1\n\n  [[ $1 == ret ]] ||\n    eval \"local -a ret=(\\\"\\${$1[@]}\\\")\"\n  local value\n  for value in \"${ret[@]}\"; do\n    if [[ $value == \"$2\" ]]; then\n      return 0\n    fi\n  done\n  return 1\n}\n\n## @fn _omb_util_array_remove array_name values...\nfunction _omb_util_array_remove {\n  local __script='\n    local iA yA\n    for iA in ${!A[@]}; do\n      for yA in \"${@:2}\"; do\n        if [[ ${A[iA]} == \"$yA\" ]]; then\n          unset -v '\\''A[iA]'\\''\n          continue 2\n        fi\n      done\n    done\n    A=(\"${A[@]}\") # compaction\n  '; eval -- \"${__script//A/$1}\"\n}\n\nfunction _omb_util_alias {\n  case ${OMB_DEFAULT_ALIASES:-enable} in\n  (disable) return 0 ;;\n  (check) alias -- \"${1%%=*}\" &>/dev/null && return 0 ;;\n  (enable) ;;\n  (*)\n    _omb_log_error \"invalid value: OMB_DEFAULT_ALIASES='${OMB_DEFAULT_ALIASES-}' (expect: enable|disable|check)\" >&2\n    return 2\n  esac\n  alias -- \"$1\"\n}\n\nfunction _omb_util_alias_delayed__init {\n  local _omb_name=$1 _omb_init=${FUNCNAME[1]}\n  local _omb_command=$_omb_name\n  \"_omb_util_alias_select_$_omb_name\"\n\n  if [[ ! $_omb_command || $_omb_command == \"$_omb_name\" ]]; then\n    unalias \"$_omb_name\"\n  else\n    alias \"$_omb_name=$_omb_command\"\n  fi || return 1\n\n  eval -- \"function $_omb_init { command ${_omb_command:-$_omb_name} \\\"\\$@\\\"; }\" && \"$_omb_init\" \"${@:2}\"\n}\nfunction _omb_util_alias_delayed {\n  local name=$1 opts=${2-}\n  local func=_omb_util_alias_init_$name\n  eval -- \"function $func { _omb_util_alias_delayed__init $name \\\"\\$@\\\"; }\"\n  if [[ :$opts: == *:force:* ]]; then\n    alias \"$name=$func\"\n  else\n    _omb_util_alias \"$name=$func\"\n  fi\n}\n\nfunction _omb_util_mktemp {\n  local template=tmp.oh-my-bash.XXXXXXXXXX\n  if _omb_util_command_exists mktemp; then\n    mktemp -t \"$template\"\n  else\n    m4 -D template=\"${TMPDIR:-/tmp}/$template\" <<< 'mkstemp(template)'\n  fi\n}\n"
  },
  {
    "path": "log/.gitkeep",
    "content": ""
  },
  {
    "path": "oh-my-bash.sh",
    "content": "#!/usr/bin/env bash\n\n# Bail out early if non-interactive\n#\n# Note: We cannot produce any error messages here because, in some systems,\n# /etc/gdm3/Xsession sources ~/.profile and checks stderr.  If there is any\n# stderr ourputs, it refuses to start the session.\ncase $- in\n  *i*) ;;\n    *) return;;\nesac\n\nif [ -z \"${BASH_VERSION-}\" ]; then\n  printf '%s\\n' 'oh-my-bash: This is not a Bash. Use OMB with Bash 3.2 or higher.' >&2\n  return 1\nfi\n_omb_bash_version=$((BASH_VERSINFO[0] * 10000 + BASH_VERSINFO[1] * 100 + BASH_VERSINFO[2]))\nif ((_omb_bash_version < 30200)); then\n  printf '%s\\n' \"oh-my-bash: OMB does not support this version of Bash ($BASH_VERSION)\" >&2\n  printf '%s\\n' \"oh-my-bash: Use OMB with Bash 3.2 or higher\" >&2\n  return 1\nfi\n\nOMB_VERSINFO=(1 0 0 0 master noarch)\nOMB_VERSION=\"${OMB_VERSINFO[0]}.${OMB_VERSINFO[1]}.${OMB_VERSINFO[2]}(${OMB_VERSINFO[3]})-${OMB_VERSINFO[4]} (${OMB_VERSINFO[5]})\"\n_omb_version=$((OMB_VERSINFO[0] * 10000 + OMB_VERSINFO[1] * 100 + OMB_VERSINFO[2]))\n\n# Check for updates on initial load...\nif [[ $DISABLE_AUTO_UPDATE != true ]]; then\n  source \"$OSH\"/tools/check_for_upgrade.sh\nfi\n\n# Initializes Oh My Bash\n\n# Set OSH_CUSTOM to the path where your custom config files\n# and plugins exist, or else we will use the default custom/\nif [[ ! ${OSH_CUSTOM-} ]]; then\n  OSH_CUSTOM=$OSH/custom\n  [[ -d $OSH_CUSTOM && -O $OSH_CUSTOM ]] ||\n    OSH_CUSTOM=${XDG_DATA_HOME:-$HOME/.local/share}/oh-my-bash/custom\nfi\n\n# Set OSH_CACHE_DIR to the path where cache files should be created\n# or else we will use the default cache/\nif [[ ! ${OSH_CACHE_DIR-} ]]; then\n  OSH_CACHE_DIR=$OSH/cache\n  [[ -d $OSH_CACHE_DIR && -O $OSH_CACHE_DIR ]] ||\n    OSH_CACHE_DIR=${XDG_STATE_HOME:-$HOME/.local/state}/oh-my-bash/cache\nfi\n\n_omb_module_loaded=\nfunction _omb_module_require {\n  local status=0\n  local -a files=() modules=()\n  while (($#)); do\n    local type=lib name=$1; shift\n    [[ $name == *:* ]] && type=${name%%:*} name=${name#*:}\n    name=${name%.bash}\n    name=${name%.sh}\n\n    local module=$type:$name\n    [[ ' '$_omb_module_loaded' ' == *\" $module \"* ]] && continue\n\n    local -a locations=()\n    case $type in\n    lib)        locations=({\"$OSH_CUSTOM\",\"$OSH\"}/lib/\"$name\".{bash,sh}) ;;\n    plugin)     locations=({\"$OSH_CUSTOM\",\"$OSH\"}/plugins/\"$name\"/\"$name\".plugin.{bash,sh}) ;;\n    alias)      locations=({\"$OSH_CUSTOM\",\"$OSH\"}/aliases/\"$name\".aliases.{bash,sh}) ;;\n    completion) locations=({\"$OSH_CUSTOM\",\"$OSH\"}/completions/\"$name\".completion.{bash,sh}) ;;\n    theme)      locations=({\"$OSH_CUSTOM\"{,/themes},\"$OSH\"/themes}/\"$name\"/\"$name\".theme.{bash,sh}) ;;\n    *)\n      printf '%s\\n' \"oh-my-bash (module_require): unknown module type '$type'.\" >&2\n      status=2\n      continue ;;\n    esac\n\n    local path\n    for path in \"${locations[@]}\"; do\n      if [[ -f $path ]]; then\n        files+=(\"$path\")\n        modules+=(\"$module\")\n        continue 2\n      fi\n    done\n\n    printf '%s\\n' \"oh-my-bash (module_require): module '$type:$name' not found.\" >&2\n    status=127\n  done\n\n  if ((status == 0)); then\n    local i\n    for i in \"${!files[@]}\"; do\n      local path=${files[i]} module=${modules[i]}\n      if [[ $module != theme:* ]]; then\n        [[ ' '$_omb_module_loaded' ' == *\" $module \"* ]] && continue\n        _omb_module_loaded=\"$_omb_module_loaded $module\"\n      fi\n      source \"$path\" || status=$?\n    done\n  fi\n\n  return \"$status\"\n}\n\nfunction _omb_module_require_lib        { _omb_module_require \"${@/#/lib:}\"; }\nfunction _omb_module_require_plugin     { _omb_module_require \"${@/#/plugin:}\"; }\nfunction _omb_module_require_alias      { _omb_module_require \"${@/#/alias:}\"; }\nfunction _omb_module_require_completion { _omb_module_require \"${@/#/completion:}\"; }\nfunction _omb_module_require_theme      { _omb_module_require \"${@/#/theme:}\"; }\n\n# Load all of the config files in ~/.oh-my-bash/lib that end in .sh\n# TIP: Add files you don't want in git to .gitignore\n_omb_module_require_lib omb-util\n_omb_module_require_lib utils\n_omb_util_glob_expand _omb_init_files '{\"$OSH\",\"$OSH_CUSTOM\"}/lib/*.{bash,sh}'\n_omb_init_files=(\"${_omb_init_files[@]##*/}\")\n_omb_init_files=(\"${_omb_init_files[@]%.bash}\")\n_omb_init_files=(\"${_omb_init_files[@]%.sh}\")\n_omb_module_require_lib \"${_omb_init_files[@]}\"\nunset -v _omb_init_files\n\n# Figure out the SHORT hostname\nif [[ $OSTYPE = darwin* ]]; then\n  # macOS's $HOST changes with dhcp, etc. Use ComputerName if possible.\n  SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*}\nelse\n  SHORT_HOST=${HOST/.*}\nfi\n\n# Load all of the plugins that were defined in ~/.bashrc\n_omb_module_require_plugin \"${plugins[@]}\"\n\n# Load all of the aliases that were defined in ~/.bashrc\n_omb_module_require_alias \"${aliases[@]}\"\n\n# Load all of the completions that were defined in ~/.bashrc\n_omb_module_require_completion \"${completions[@]}\"\n\n# Load all of your custom configurations from custom/\n_omb_util_glob_expand _omb_init_files '\"$OSH_CUSTOM\"/*.{sh,bash}'\nfor _omb_init_file in \"${_omb_init_files[@]}\"; do\n  [[ -f $_omb_init_file ]] &&\n    source \"$_omb_init_file\"\ndone\nunset -v _omb_init_files _omb_init_file\n\n# Load the theme\nif [[ $OSH_THEME ]]; then\n  _omb_module_require_theme \"$OSH_THEME\"\nfi\n\nif [[ $PROMPT ]]; then\n  export PS1='\\['$PROMPT'\\]'\nfi\n\nif ! _omb_util_command_exists '__git_ps1'; then\n  source \"$OSH/tools/git-prompt.sh\"\nfi\n\n# Adding Support for other OSes\nif [[ -s /usr/bin/gloobus-preview ]]; then\n  PREVIEW=\"gloobus-preview\"\nelif [[ -s /Applications/Preview.app ]]; then\n  PREVIEW=\"/Applications/Preview.app\"\nelse\n  PREVIEW=\"less\"\nfi\n"
  },
  {
    "path": "plugins/README.md",
    "content": "# Oh-My-Bash Plugins: Enhancing Your Development Experience\n\n\"Oh My Bash won't make you a tenfold developer... but it might make you feel like one.\"\n\n_Embracing a suite of plugins can significantly boost your coding efficiency by automating repetitive tasks, thereby making them less monotonous and easier to execute._\n\n**What is a Plugin?**\nA plugin is a type of software that augments the functionality of an existing program or system. These additions can range from simple to complex features and are intended to extend or customize the core functionality without modifying the codebase.\n\n**Plugin Enablement:**\nOnce you identify the plugins you wish to utilize with Oh My Bash, you'll need to enable them in the `.bashrc` file located in your `$HOME` directory. Open this file with your preferred text editor and specify the plugins you want to load. For instance:\n\n```bash\nplugins=(git bundler osx rake ruby)\n```\n\n**Conditional Enablement:**\nYou may wish to control when or how plugins are activated. For instance, to ensure the `tmux-autoattach` plugin runs only in SSH sessions, you can employ a conditional statement checking for the `$SSH_TTY` variable. Make sure to remove the plugin from the main plugin list and use a conditional like this:\n\n```bash\n[[ $SSH_TTY ]] && plugins+=(tmux-autoattach)\n```\n\nBy leveraging these plugins, you can streamline your workflow and tackle coding challenges with greater efficiency.\n\n| Plugin            | Description                                                                                                                 |\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| ansible           | Configuration management tool used to automate the provisioning, configuration, and management of computer systems.         |\n| [asdf](asdf)      | [asdf](https://asdf-vm.com) is a tool version manager to allow installing different versions of Node.js, Ruby, Golang, etc. |\n| aws               | Tools for interacting with Amazon Web Services (AWS)                                                                        |\n| bash-preexec      | Tool allowing execution of commands before they are executed in Bash.                                                       |\n| bashmarks         | Utility facilitating directory navigation via bookmarks in Bash.                                                            |\n| battery           | Plugin related to monitoring and managing battery on computer systems.                                                      |\n| brew              | Package manager for macOS and Linux facilitating software installation and management.                                      |\n| bu                | Insufficient information provided to give a precise description.                                                            |\n| cargo             | Plugin to initialize CARGO_HOME and PATH for cargo                                                                          |\n| colored-man-pages | Adds a few colors to `man` pages.                                                                                           |\n| chezmoi           | Dotfile management tool enabling management of user environment configuration.                                              |\n| dotnet            | This plugin provides completion and useful aliases for .NET Core CLI.                                                       |\n| fasd              | Utility easing filesystem navigation through shortcuts and abbreviated commands.                                            |\n| fzf               | A command-line fuzzy finder.                                                                                                |\n| gcloud            | Command-line tools for interacting with Google Cloud Platform (GCP).                                                        |\n| git               | Distributed version control system for managing the history of changes in software projects.                                |\n| goenv             | Tool for managing Go versions within a development environment.                                                             |\n| golang            | The Go programming language, along with its tools and standard libraries.                                                   |\n| jump              | Jump helps you navigate faster by learning your habits.                                                                     |\n| kubectl           | Command-line tool for interacting with Kubernetes clusters.                                                                 |\n| npm               | Package manager for Node.js facilitating installation and management of project dependencies.                               |\n| nvm               | Node.js version manager allowing easy switching between different Node.js versions.                                         |\n| progress          | Insufficient information provided to give a precise description.                                                            |\n| pyenv             | Tool for managing multiple Python versions within a system.                                                                 |\n| rbenv             | Tool for managing your app's Ruby environment.                                                                              |\n| sdkman            | Version and package manager for development tools such as Java, Kotlin, and Gradle.                                         |\n| sudo              | Utility for executing commands with superuser privileges on Unix and Unix-like systems.                                     |\n| tmux              | Aliases for tmux, the terminal multiplexer.                                                                                 |\n| tmux-autoattach   | Plugin related to session management in the tmux terminal multiplexer.                                                      |\n| vagrant           | Tool for creating and managing virtual development environments.                                                            |\n| virtualenvwrapper | A set of extensions to the virtualenv tool.                                                                                 |\n| xterm             | Terminal emulator for X Window systems providing a graphical user interface for accessing the command line.                 |\n| zellij-autoattach | Plugin related to session management in the zellij terminal multiplexer.                                                      |\n| zoxide            | Utility for quickly navigating the filesystem based on visited directory history.                                           |\n"
  },
  {
    "path": "plugins/ansible/README.md",
    "content": "# ansible plugin\n\n## Introduction\n\nThe `ansible plugin` adds several aliases for useful [ansible](https://docs.ansible.com/ansible/latest/index.html) commands and [aliases](#aliases).\n\nTo use it, add `ansible` to the plugins array of your bashrc file:\n\n```\nplugins=(... ansible)\n```\n\n## Aliases\n\n| Command                                    | Description                                                         |\n|:-------------------------------------------|:--------------------------------------------------------------------|\n| `ansible-version` / `aver`                 | Show the version on ansible installed in this host                  |\n| `ansible-role-init <role name>` / `arinit` | Creates the Ansible Role as per Ansible Galaxy standard             |\n| `a`                                        | command `ansible`                                                   |\n| `aconf`                                    | command `ansible-config`                                            |\n| `acon`                                     | command `ansible-console`                                           |\n| `ainv`                                     | command `ansible-inventory`                                         |\n| `aplaybook`                                | command `ansible-playbook`                                          |\n| `adoc`                                     | command `ansible-doc`                                               |\n| `agal`                                     | command `ansible-galaxy`                                            |\n| `apull`                                    | command `ansible-pull`                                              |\n| `aval`                                     | command `ansible-vault`                                             |\n"
  },
  {
    "path": "plugins/ansible/ansible.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# Functions\nfunction ansible-version(){\n  ansible --version\n}\n\nfunction ansible-role-init(){\n  if ! [ -z $1] ; then\n    _omb_util_print \"Ansible Role : $1 Creating....\"\n    ansible-galaxy init $1\n    tree $1\n  else\n    _omb_util_print \"Usage : ansible-role-init <role name>\"\n    _omb_util_print \"Example : ansible-role-init role1\"\n  fi\n}\n\n# Aliases\nalias a='ansible '\nalias aconf='ansible-config '\nalias acon='ansible-console '\nalias aver='ansible-version'\nalias arinit='ansible-role-init'\nalias aplaybook='ansible-playbook '\nalias ainv='ansible-inventory '\nalias adoc='ansible-doc '\nalias agal='ansible-galaxy '\nalias apull='ansible-pull '\nalias aval='ansible-vault'\n"
  },
  {
    "path": "plugins/asdf/README.md",
    "content": "# asdf plugin\n\nAdd [oh-my-bash](https://ohmybash.github.io) integration with [asdf](https://github.com/asdf-vm/asdf), the extendable version manager, with support for Ruby, Node.js, Elixir, Erlang and more.\n\n## Installation\n\n1. [Install asdf](https://github.com/asdf-vm/asdf#setup) by running the following:\n    ``` bash\n    git clone https://github.com/asdf-vm/asdf.git ~/.asdf\n    ```\n\n2. Enable the plugin by adding it to your oh-my-bash `plugins` definition in `~/.bashrc`.\n    ``` sh\n    plugins=(asdf)\n    ```\n\n2. Enable the completions by adding it to your oh-my-bash `completions` definition in `~/.bashrc`.\n    ``` sh\n    completions=(asdf)\n    ```\n\n## Usage\n\nSee the [asdf usage documentation](https://github.com/asdf-vm/asdf#usage) for information on how to use asdf:\n\n``` bash\nasdf plugin add nodejs\nasdf install nodejs latest\n```\n"
  },
  {
    "path": "plugins/asdf/asdf.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# asdf.plugin.sh: asdf plugin for oh-my-bash.\n# Author: @RobLoach (https://github.com/robloach)\n# Author: @prodrigues1912 (https://github.com/prodrigues1912)\n# Originally suggested in https://github.com/ohmybash/oh-my-bash/pull/310\n# Fork of the oh-my-zsh asdf plugin\n\n# Custom ASDF_DIR location\nif [[ ${ASDF_DIR+set} ]]; then\n  . \"$ASDF_DIR/asdf.sh\"\n\n# Home\nelif [[ -f \"$HOME/.asdf/asdf.sh\" ]]; then\n  ASDF_DIR=\"$HOME/.asdf\"\n  . \"${ASDF_DIR}/asdf.sh\"\n\n# Config\nelif [[ -f \"${XDG_CONFIG_HOME:-$HOME/.config}/asdf/asdf.sh\" ]]; then\n  ASDF_DIR=\"${XDG_CONFIG_HOME:-$HOME/.config}/asdf\"\n  . \"${ASDF_DIR}/asdf.sh\"\n\n# Arch Linux / AUR Package\nelif [[ -f \"/opt/asdf-vm/asdf.sh\" ]]; then\n  ASDF_DIR=\"/opt/asdf-vm\"\n  . /opt/asdf-vm/asdf.sh\n\n# Homebrew\nelif _omb_util_command_exists brew; then\n  _omb_plugin_asdf__prefix=\"$(brew --prefix asdf)\"\n  if [[ -f \"$_omb_plugin_asdf__prefix/libexec/asdf.sh\" ]]; then\n    ASDF_DIR=\"$_omb_plugin_asdf__prefix/libexec\"\n    . \"$ASDF_DIR/asdf.sh\"\n  fi\n  unset -v _omb_plugin_asdf__prefix\nfi\n"
  },
  {
    "path": "plugins/aws/aws.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# aws.plugin.sh\n# Author: Michael Anckaert <michael.anckaert@sinax.be>\n# Based on oh-my-zsh AWS plugin\n#\n# command 'agp' returns the selected AWS profile (aws get profile)\n# command 'asp' sets the AWS profile to use (aws set profile)\n#\n\nexport AWS_HOME=~/.aws\n\nfunction agp {\n  _omb_util_print $AWS_DEFAULT_PROFILE\n}\n\nfunction asp {\n  local rprompt=${RPROMPT/<aws:$(agp)>/}\n\n  export AWS_DEFAULT_PROFILE=$1\n  export AWS_PROFILE=$1\n}\n"
  },
  {
    "path": "plugins/bash-preexec/README.md",
    "content": "# bash preexec\n\nThis plugin loads `bash-preexec.sh` bundled with OMB if necessary.\n"
  },
  {
    "path": "plugins/bash-preexec/bash-preexec.plugin.sh",
    "content": "#! bash oh-my-bash.module\nif [[ ! ${bash_preexec_imported:-${__bp_imported:-}} ]]; then\n  source \"$OSH/tools/bash-preexec.sh\"\nfi\n"
  },
  {
    "path": "plugins/bashmarks/README.md",
    "content": "# Bashmarks plugin\n\nThe Bashmarks plugin allows you to create and use bookmarks for directories on\nyour filesystems.  This plugin is derived from the project\nhttps://github.com/huyng/bashmarks but contains improvements.  This plugin is\nlicensed under the 3-Clause BSD license.\n\n## Quickstart\n\nCreate a new bookmark using the *bm -a* command:\n\n```bash\n$ bm -a mydir\n```\n\nThe command above creates a bookmark for the current directory with the name\n*mydir*.\n\nYou can navigate to the location of a bookmark using the *bm -g* command:\n\n```bash\n$ bm -g mydir\n```\n\nYou can also supply just any bookmark name and the *-g* option will be assumed:\n\n```bash\n$ bm mydir\n```\n\nTab completion is available when you need to enter a bookmark name in a\ncommand, such as when using *bm -g*\n\nEasily list all bookmarks you have set up using the *bm -l* command:\n\n```bash\n$ bm -l\n```\n\n## Configuration\n\n- **`BASHMARKS_SDIR`**: This variable contains the path to the file that stores\n  the information of bookmarks of directory names. The default path is\n  `~/.sdirs`.  The old interface `SDIRS` is now deprecated.\n\n## Commands\n\n- **`bm -h`**: Print short help text\n- **`bm -a bookmarkname`**: Save the current directory as bookmarkname\n- **`bm [-g] bookmarkname`**: Go to the specified bookmark\n- **`bm -p bookmarkname`**: Print the bookmark\n- **`bm -d bookmarkname`**: Delete a bookmark\n- **`bm -l`**: List all bookmarks\n\n## Valid bookmark names\n\nA bookmark name can contain lower and upper case characters (A-Z), numbers and\nunderscore characters. No periods, semicolons, spaces or other characters are\nallowed in a bookmark name.\n"
  },
  {
    "path": "plugins/bashmarks/bashmarks.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# Copyright (c) 2010, Huy Nguyen, https://everyhue.me\n# Copyright (c) 2015, Toan Nguyen, https://nntoan.github.io\n# All rights reserved.\n#\n# This plugin is derived from the project https://github.com/huing/bashmarks.\n# This version is based on the following commit in the upstream project:\n#\n#   https://github.com/huyng/bashmarks/commit/264952f2225691b5f99a498e4834e2c69bf4f5f5\n#\n# This plugin is licensed under the BSD-3 License.\n#------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n#     * Redistributions of source code must retain the above copyright notice,\n#       this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of Huy Nguyen nor the names of contributors may be\n#       used to endorse or promote products derived from this software without\n#       specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#------------------------------------------------------------------------------\n\n# USAGE:\n# bm -a bookmarkname - saves the curr dir as bookmarkname\n# bm -g bookmarkname - jumps to the that bookmark\n# bm -g b[TAB] - tab completion is available\n# bm -p bookmarkname - prints the bookmark\n# bm -p b[TAB] - tab completion is available\n# bm -d bookmarkname - deletes the bookmark\n# bm -d [TAB] - tab completion is available\n# bm -l - list all bookmarks\n\n# Default configurations\nif [[ ! ${BASHMARKS_SDIRS-} ]]; then\n  BASHMARKS_SDIRS=${SDIRS:-$HOME/.sdirs}\nfi\n\n# Deprecated interfaces (2023-10-12)\n_omb_deprecate_declare  20000 SDIRS                 BASHMARKS_SDIRS sync\n_omb_deprecate_function 20000 _echo_usage           _bashmarks_usage\n_omb_deprecate_function 20000 _save_bookmark        _bashmarks_save\n_omb_deprecate_function 20000 _delete_bookmark      _bashmarks_delete\n_omb_deprecate_function 20000 _goto_bookmark        _bashmarks_goto\n_omb_deprecate_function 20000 _list_bookmark        _bashmarks_list\n_omb_deprecate_function 20000 _print_bookmark       _bashmarks_print\n_omb_deprecate_function 20000 _l                    _bashmarks_list_names\n_omb_deprecate_function 20000 _bookmark_name_valid  _bashmarks_is_valid_bookmark_name\n_omb_deprecate_function 20000 _comp                 _bashmarks_comp_cmd_bm\n_omb_deprecate_function 20000 _compzsh              _bashmarks_compzsh_cmd_bm\n_omb_deprecate_function 20000 _purge_line           _bashmarks_purge_line\n\n# setup file to store bookmarks\nif [[ ! -e $BASHMARKS_SDIRS ]]; then\n  touch \"$BASHMARKS_SDIRS\"\nfi\n\n# main function\nfunction bm {\n  local option=$1\n  case $option in\n    # save current directory to bookmarks [ bm -a BOOKMARK_NAME ]\n    -a)\n      _bashmarks_save \"$2\"\n    ;;\n    # delete bookmark [ bm -d BOOKMARK_NAME ]\n    -d)\n      _bashmarks_delete \"$2\"\n    ;;\n    # jump to bookmark [ bm -g BOOKMARK_NAME ]\n    -g)\n      _bashmarks_goto \"$2\"\n    ;;\n    # print bookmark [ bm -p BOOKMARK_NAME ]\n    -p)\n      _bashmarks_print \"$2\"\n    ;;\n    # show bookmark list [ bm -l ]\n    -l)\n      _bashmarks_list\n    ;;\n    # help [ bm -h ]\n    -h)\n      _bashmarks_usage\n    ;;\n    *)\n      if [[ $1 == -* ]]; then\n        # unrecognized option. echo error message and usage [ bm -X ]\n        _omb_util_print \"Unknown option '$1'\"\n        _bashmarks_usage\n        kill -SIGINT $$\n        exit 1\n      elif [[ $1 == \"\" ]]; then\n        # no args supplied - echo usage [ bm ]\n        _bashmarks_usage\n      else\n        # non-option supplied as first arg.  assume goto [ bm BOOKMARK_NAME ]\n        _bashmarks_goto \"$1\"\n      fi\n    ;;\n  esac\n}\n\n# print usage information\nfunction _bashmarks_usage {\n  _omb_util_print 'USAGE:'\n  _omb_util_print \"bm -h                   - Prints this usage info\"\n  _omb_util_print 'bm -a <bookmark_name>   - Saves the current directory as \"bookmark_name\"'\n  _omb_util_print 'bm [-g] <bookmark_name> - Goes (cd) to the directory associated with \"bookmark_name\"'\n  _omb_util_print 'bm -p <bookmark_name>   - Prints the directory associated with \"bookmark_name\"'\n  _omb_util_print 'bm -d <bookmark_name>   - Deletes the bookmark'\n  _omb_util_print 'bm -l                   - Lists all available bookmarks'\n}\n\n# save current directory to bookmarks\nfunction _bashmarks_save {\n  if _bashmarks_is_valid_bookmark_name \"$@\"; then\n    _bashmarks_purge_line \"$BASHMARKS_SDIRS\" \"export DIR_$1=\"\n    CURDIR=$(sed \"s#^$HOME#\\$HOME#g\" <<< \"$PWD\")\n    _omb_util_print \"export DIR_$1=\\\"$CURDIR\\\"\" >> \"$BASHMARKS_SDIRS\"\n  fi\n}\n\n# delete bookmark\nfunction _bashmarks_delete {\n  if _bashmarks_is_valid_bookmark_name \"$@\"; then\n    _bashmarks_purge_line \"$BASHMARKS_SDIRS\" \"export DIR_$1=\"\n    unset \"DIR_$1\"\n  fi\n}\n\n# jump to bookmark\nfunction _bashmarks_goto {\n  source \"$BASHMARKS_SDIRS\"\n  local target_varname=DIR_$1\n  local target=${!target_varname-}\n  if [[ -d $target ]]; then\n    cd \"$target\"\n  elif [[ ! $target ]]; then\n    _omb_util_print \"${_omb_term_brown}WARNING: '${1}' bashmark does not exist${_omb_term_reset}\"\n  else\n    _omb_util_print \"${_omb_term_brown}WARNING: '${target}' does not exist${_omb_term_reset}\"\n  fi\n}\n\n# list bookmarks with dirname\nfunction _bashmarks_list {\n  source \"$BASHMARKS_SDIRS\"\n  # if color output is not working for you, comment out the line below '\\033[1;32m' == \"red\"\n  env | sort | awk '/^DIR_.+/{split(substr($0,5),parts,\"=\"); printf(\"\\033[0;33m%-20s\\033[0m %s\\n\", parts[1], parts[2]);}'\n  # uncomment this line if color output is not working with the line above\n  # env | grep \"^DIR_\" | cut -c5- | sort |grep \"^.*=\"\n}\n\n# print bookmark\nfunction _bashmarks_print {\n  source \"$BASHMARKS_SDIRS\"\n  local var=DIR_$1\n  _omb_util_print \"${!var}\"\n}\n\n# list bookmarks without dirname\nfunction _bashmarks_list_names {\n  source \"$BASHMARKS_SDIRS\"\n  env | grep \"^DIR_\" | cut -c5- | sort | grep \"^.*=\" | cut -f1 -d \"=\"\n}\n\n# validate bookmark name\n# @var[out] exit_message\nfunction _bashmarks_is_valid_bookmark_name {\n  local exit_message=\"\"\n  if [[ ! $1 ]]; then\n    exit_message=\"bookmark name required\"\n    _omb_util_print \"$exit_message\" >&2\n    return 1\n  elif [[ $1 == *[!A-Za-z0-9_]* ]]; then\n    exit_message=\"bookmark name is not valid\"\n    _omb_util_print \"$exit_message\" >&2\n    return 1\n  fi\n}\n\n# completion command\nfunction _bashmarks_comp_cmd_bm {\n  COMPREPLY=()\n\n  # bm, g, p, d, bm -[gpd]\n  if ((COMP_CWORD == 1)) || { ((COMP_CWORD >= 2)) && [[ ${COMP_WORDS[1]} == -[gpd] ]]; }; then\n    local cur=${COMP_WORDS[COMP_CWORD]}\n    COMPREPLY=($(compgen -W '$(_bashmarks_list_names)' -- \"$cur\"))\n  fi\n\n  return 0\n}\n\n# ZSH completion command\nfunction _bashmarks_compzsh_cmd_bm {\n  reply=($(_bashmarks_list_names))\n}\n\n# safe delete line from sdirs\nfunction _bashmarks_purge_line {\n  if [[ -s $1 ]]; then\n    # safely create a temp file.  To atomically rewrite the target file with\n    # \"mv\", we create the temporary file in the same directory as the target of\n    # the symbolic link.\n    local dest tmpdir t\n    dest=$(_omb_util_readlink \"$1\" 2>/dev/null)\n    tmpdir=$(dirname -- \"$dest\")\n    t=$(mktemp \"${tmpdir%/}/bashmarks.XXXXXX\") || exit 1\n    trap \"/bin/rm -f -- '$t'\" EXIT\n\n    # purge line\n    sed \"/$2/d\" \"$1\" >| \"$t\" &&\n      /bin/mv -f -- \"$t\" \"$dest\"\n\n    # cleanup temp file\n    /bin/rm -f -- \"$t\"\n    trap - EXIT\n  fi\n}\n\n# bind completion command for g,p,d to _bashmarks_comp_cmd_bm\nif [[ ${ZSH_VERSION-} ]]; then\n  compctl -K _bashmarks_compzsh_cmd_bm bm -g\n  compctl -K _bashmarks_compzsh_cmd_bm bm -p\n  compctl -K _bashmarks_compzsh_cmd_bm bm -d\n  compctl -K _bashmarks_compzsh_cmd_bm g\n  compctl -K _bashmarks_compzsh_cmd_bm p\n  compctl -K _bashmarks_compzsh_cmd_bm d\nelse\n  shopt -s progcomp\n  complete -F _bashmarks_comp_cmd_bm bm\n  complete -F _bashmarks_comp_cmd_bm g\n  complete -F _bashmarks_comp_cmd_bm p\n  complete -F _bashmarks_comp_cmd_bm d\nfi\n\nalias s='bm -a'       # Save a bookmark [bookmark_name]\nalias g='bm -g'       # Go to bookmark [bookmark_name]\nalias p='bm -p'       # Print bookmark of a path [path]\nalias d='bm -d'       # Delete a bookmark [bookmark_name]\n"
  },
  {
    "path": "plugins/battery/README.md",
    "content": "# Battery Plugin for Oh My Bash\n\n## Overview\n\nThis custom plugin for Oh My Bash enhances your terminal experience by providing functions to monitor and display battery status and information.\n\n## Functions\n\n### 1. `ac_adapter_connected`\n\n- **Description:** Checks if the AC adapter is currently connected.\n- **Returns:**\n  - `0` if the adapter is connected.\n  - Non-zero exit status otherwise.\n\n### 2. `ac_adapter_disconnected`\n\n- **Description:** Checks if the AC adapter is currently disconnected.\n- **Returns:**\n  - `0` if the adapter is disconnected.\n  - Non-zero exit status otherwise.\n\n### 3. `battery_percentage`\n\n- **Description:** Retrieves and displays the current battery charge as a percentage of full (100%).\n- **Standard Output:**\n  - Battery percentage as an integer.\n\n### 4. `battery_charge`\n\n- **Description:** Presents a graphical representation of the battery charge using ASCII characters.\n- **Stanard Output:**\n  - Graphical representation of the battery charge.\n\n## Usage\n\nAdd the plugin name `battery` in the `plugins` array in `~/.bashrc`.\n\n```shell\n# bashrc\n\nplugins=(... battery)\n```\n\nYou can use the functions from the interactive settings with Oh My Bash.\n\n_⚠️ if you want to add only the plugin and not Oh My Bash, you can copy the file\n`battery.plugin.sh` and `lib/utils.sh` to a place you like and source them in\n`~/.basrhc` (for interactive uses) or in a shell script (for a standalone shell\nprogram).  You may instead copy and paste the functions directly into a script\nfile, in which case the plugin will not receive updates and possible errors\nwill have to be solved by you_\n\n## Dependencies\n\nThis plugin relies on several utilities for retrieving battery information:\n\n- `upower`: Primary tool for battery information retrieval.\n- `acpi`, `pmset`, `ioreg`, `WMIC`: Fallback options for battery information retrieval.\n- `/sys/class/power_supply/`: Fallback option for battery information retrieval.\n\nThis plugin file also depends on the following module in Oh My Bash:\n\n- `lib/utils.sh`\n"
  },
  {
    "path": "plugins/battery/battery.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_plugin_battery__upower_print_info {\n  upower -i \"$(upower -e | sed -n '/BAT/{p;q;}')\"\n}\n\n## @fn ac_adapter_connected\n##   @exit 0 if the adapter is disconnected, or non-zero exit status\n##     otherwise.\nfunction ac_adapter_connected {\n  if _omb_util_command_exists upower; then\n    _omb_plugin_battery__upower_print_info | grep -qE 'state[:[:blank:]]*(charging|fully-charged)'\n  elif _omb_util_command_exists acpi; then\n    acpi -a | grep -q \"on-line\"\n  elif _omb_util_command_exists pmset; then\n    pmset -g batt | grep -q 'AC Power'\n  elif _omb_util_command_exists ioreg; then\n    ioreg -n AppleSmartBattery -r | grep -q '\"ExternalConnected\" = Yes'\n  elif _omb_util_command_exists WMIC; then\n    WMIC Path Win32_Battery Get BatteryStatus /Format:List | grep -q 'BatteryStatus=2'\n  elif [[ -r /sys/class/power_supply/ADP0/online ]]; then\n    [[ $(< /sys/class/power_supply/ADP0/online) == 1 ]]\n  fi\n}\n\n## @fn ac_adapter_disconnected\n##   @exit 0 if the adapter is disconnected, or non-zero exit status\n##     otherwise.\nfunction ac_adapter_disconnected {\n  if _omb_util_command_exists upower; then\n    _omb_plugin_battery__upower_print_info | grep -qE 'state[:[:blank:]]*discharging'\n  elif _omb_util_command_exists acpi; then\n    acpi -a | grep -q \"off-line\"\n  elif _omb_util_command_exists pmset; then\n    pmset -g batt | grep -q 'Battery Power'\n  elif _omb_util_command_exists ioreg; then\n    ioreg -n AppleSmartBattery -r | grep -q '\"ExternalConnected\" = No'\n  elif _omb_util_command_exists WMIC; then\n    WMIC Path Win32_Battery Get BatteryStatus /Format:List | grep -q 'BatteryStatus=1'\n  elif [[ -r /sys/class/power_supply/ADP0/online ]]; then\n    [[ $(< /sys/class/power_supply/ADP0/online) == 0 ]]\n  fi\n}\n\n## @fn battery_percentage\n##   @about 'displays battery charge as a percentage of full (100%)'\n##   @group 'battery'\nfunction battery_percentage {\n  if _omb_util_command_exists upower; then\n    local UPOWER_OUTPUT=$(_omb_plugin_battery__upower_print_info | sed -n 's/.*percentage[:[:blank:]]*\\([0-9%]\\{1,\\}\\)$/\\1/p')\n    [[ $UPOWER_OUTPUT ]] &&\n      _omb_util_print \"${UPOWER_OUTPUT::-1}\"\n  elif _omb_util_command_exists acpi; then\n    local ACPI_OUTPUT=$(acpi -b)\n    case $ACPI_OUTPUT in\n      *\" Unknown\"*)\n        local PERC_OUTPUT=$(head -c 22 <<< \"$ACPI_OUTPUT\" | tail -c 2)\n        case $PERC_OUTPUT in\n          *%)\n            head -c 2 <<< \"0${PERC_OUTPUT}\"\n          ;;\n          *)\n            _omb_util_print ${PERC_OUTPUT}\n          ;;\n        esac\n      ;;\n\n      *\" Charging\"* | *\" Discharging\"*)\n        local PERC_OUTPUT=$(awk -F, '/,/{gsub(/ /, \"\", $0); gsub(/%/,\"\", $0); print $2}' <<< \"$ACPI_OUTPUT\")\n        _omb_util_print ${PERC_OUTPUT}\n      ;;\n      *\" Full\"*)\n        _omb_util_print '100'\n      ;;\n      *)\n        _omb_util_print '-1'\n      ;;\n    esac\n  elif _omb_util_command_exists pmset; then\n    local PMSET_OUTPUT=$(pmset -g ps | sed -n 's/.*[[:blank:]]+*\\(.*%\\).*/\\1/p')\n    case $PMSET_OUTPUT in\n      100*)\n        _omb_util_print '100'\n      ;;\n      *)\n        head -c 2 <<< \"$PMSET_OUTPUT\"\n      ;;\n    esac\n  elif _omb_util_command_exists ioreg; then\n    local IOREG_OUTPUT=$(ioreg -n AppleSmartBattery -r | awk '$1~/Capacity/{c[$1]=$3} END{OFMT=\"%05.2f%%\"; max=c[\"\\\"MaxCapacity\\\"\"]; print (max>0? 100*c[\"\\\"CurrentCapacity\\\"\"]/max: \"?\")}')\n    case $IOREG_OUTPUT in\n      100*)\n        _omb_util_print '100'\n      ;;\n      *)\n        head -c 2 <<< \"$IOREG_OUTPUT\"\n      ;;\n    esac\n  elif _omb_util_command_exists WMIC; then\n    local WINPC=$(grep -o '[0-9]*' <<< \"porcent=$(WMIC PATH Win32_Battery Get EstimatedChargeRemaining /Format:List)\")\n    case $WINPC in\n      100*)\n        _omb_util_print '100'\n      ;;\n      *)\n        _omb_util_print $WINPC\n      ;;\n    esac\n  elif [[ -r /sys/class/power_supply/BAT0/capacity ]]; then\n    _omb_util_print \"$(< /sys/class/power_supply/BAT0/capacity)\"\n  fi\n}\n\n## @fn battery_charge\n##   @about 'graphical display of your battery charge'\n##   @group 'battery'\nfunction battery_charge {\n  # Full char\n  local F_C='▸'\n  # Depleted char\n  local D_C='▹'\n  local DEPLETED_COLOR=\"${_omb_prompt_normal}\"\n  local FULL_COLOR=\"${_omb_prompt_green}\"\n  local HALF_COLOR=\"${_omb_prompt_olive}\"\n  local DANGER_COLOR=\"${_omb_prompt_brown}\"\n  local BATTERY_OUTPUT=\"${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${D_C}\"\n  local BATTERY_PERC=$(battery_percentage)\n\n  case $BATTERY_PERC in\n    no)\n      _omb_util_print \"\"\n    ;;\n    9*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${F_C}${_omb_prompt_normal}\"\n    ;;\n    8*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${_omb_prompt_normal}\"\n    ;;\n    7*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${_omb_prompt_normal}\"\n    ;;\n    6*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${_omb_prompt_normal}\"\n    ;;\n    5*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    4*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    3*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    2*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    1*)\n      _omb_util_print \"${FULL_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    05)\n      _omb_util_print \"${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    04)\n      _omb_util_print \"${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    03)\n      _omb_util_print \"${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    02)\n      _omb_util_print \"${DANGER_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    0*)\n      _omb_util_print \"${HALF_COLOR}${F_C}${DEPLETED_COLOR}${D_C}${D_C}${D_C}${D_C}${_omb_prompt_normal}\"\n    ;;\n    *)\n      _omb_util_print \"${DANGER_COLOR}UNPLG${_omb_prompt_normal}\"\n    ;;\n  esac\n}\n"
  },
  {
    "path": "plugins/brew/README.md",
    "content": "# brew plugin\n\nThe plugin adds several aliases for common [brew](https://brew.sh) commands.\n\nTo use it, add `brew` to the plugins array of your bashrc file:\n\n```bash\nplugins=(... brew)\n```\n\n## Aliases\n\n| Alias  | Command              | Description   |\n|--------|----------------------|---------------|\n| brewp  | `brew pin`           | Pin a specified formulae, preventing them from being upgraded when issuing the brew upgrade <formulae> command. |\n| brews  | `brew list -1`       | List installed formulae, one entry per line, or the installed files for a given formulae. |\n| brewsp | `brew list --pinned` | Show the versions of pinned formulae, or only the specified (pinned) formulae if formulae are given. |\n| bubo   | `brew update && brew outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated formulae. |\n| bubc   | `brew upgrade && brew cleanup` | Upgrade outdated, unpinned brews (with existing install options), then removes stale lock files and outdated downloads for formulae and casks, and removes old versions of installed formulae. |\n| bubu   | `bubo && bubc`       | Updates Homebrew, lists outdated formulae, upgrades oudated and unpinned formulae, and removes stale and outdated downloads and versions. |\n| bcubo  | `brew update && brew cask outdated` | Fetch the newest version of Homebrew and all formulae, then list outdated casks. |\n| bcubc  | `brew cask reinstall $(brew cask outdated) && brew cleanup` | Updates outdated casks, then runs cleanup. |\n"
  },
  {
    "path": "plugins/brew/brew.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nalias brewp='brew pin'\nalias brews='brew list -1'\nalias brewsp='brew list --pinned'\nalias bubo='brew update && brew outdated'\nalias bubc='brew upgrade && brew cleanup'\nalias bubu='bubo && bubc'\nalias bcubo='brew update && brew cask outdated'\nalias bcubc='brew cask reinstall $(brew cask outdated) && brew cleanup'\n"
  },
  {
    "path": "plugins/bu/bu.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# bu.plugin.sh\n# Author: Taleeb Midi <taleebmidi@gmail.com>\n# Based on oh-my-zsh AWS plugin\n#\n# command 'bu [N]' Change directory up N times\n#\n\nfunction _omb_plugin_bu_usage {\n  cat <<EOF\nUsage: bu [N]\n        N        N is the number of level to move back up to, this argument must be a positive integer.\n        h help   displays this basic help menu.\nEOF\n}\n\n# Faster Change Directory up\n# shellcheck disable=SC2034\nfunction bu {\n  # reset variables\n  local STRARGMNT=\"\"\n  local FUNCTIONARG=$1\n  # Make sure the provided argument is a positive integer:\n  if [[ $FUNCTIONARG && $FUNCTIONARG != *[!0-9]* ]]; then\n    local i\n    for ((i = 1; i <= FUNCTIONARG; i++)); do\n      STRARGMNT+=../\n    done\n    cd \"$STRARGMNT\"\n  else\n    _omb_plugin_bu_usage\n  fi\n}\n"
  },
  {
    "path": "plugins/cargo/README.md",
    "content": "# cargo plugin\n\nThis plugin configures cargo paths.\n"
  },
  {
    "path": "plugins/cargo/cargo.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# @sjplanet 2025\n\n# Set CARGO_HOME to default if not already set\n: \"${CARGO_HOME:=$HOME/.cargo}\"\n\n# Check if the directory exists\nif [[ -d $CARGO_HOME ]]; then\n  if [[ -f $CARGO_HOME/env && -r $CARGO_HOME/env ]]; then\n    # Note: Rustup sets PATH in $CARGO/env\n    source \"$CARGO_HOME/env\"\n  else\n    # Add $CARGO_HOME/bin to PATH if it's not already included\n    case :$PATH: in\n    *\":$CARGO_HOME/bin:\"*) ;;  # already in PATH, do nothing\n    *) export PATH=$CARGO_HOME/bin${PATH:+:$PATH} ;;\n    esac\n  fi\nfi\n"
  },
  {
    "path": "plugins/chezmoi/README.md",
    "content": "# Chezmoi plugin\n\nThe chezmoi plugin defines a number of useful aliases for you. [Consult the complete list](./chezmoi.plugin.sh)\n\n## List of aliases\n\n| Alias | Command                | Description                                                                                                                                         |\n|-------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|\n| cz    | 'chezmoi'              | Manage your dotfiles across multiple diverse machines, securely                                                                                     |\n| cza   | 'chezmoi add'          | Add targets to the source state.                                                                                                                    |\n| czcd  | 'chezmoi cd'           | cd's into the chezmoi source directory                                                                                                              |\n| cze   | 'chezmoi edit'         | Edit the source state of targets, which must be files or symlinks. If no targets are given then the working tree of the source directory is opened. |\n| czea  | 'chezmoi edit --apply' | Apply target immediately after editing. Ignored if there are no targets.                                                                            |\n| czra  | 'chezmoi re-add'       | Re-add modified files in the target state, preserving any encrypted\\_ attributes.                                                                   |\n"
  },
  {
    "path": "plugins/chezmoi/chezmoi.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nalias cz='chezmoi'\nalias cza='chezmoi add'\nalias czcd='chezmoi cd'\nalias cze='chezmoi edit'\nalias czea='chezmoi edit --apply'\nalias czra='chezmoi re-add'\n"
  },
  {
    "path": "plugins/colored-man-pages/README.md",
    "content": "# Colored Man Pages Plugin\n\nAdds colors to [`man`](https://man7.org/linux/man-pages/man1/man.1.html) pages.\n\nTo use it, add `colored-man-pages` to the plugins array in your .bashrc file.\n\n```bash\nplugins=(... colored-man-pages)\n```\n\nIt will also automatically colorize man pages displayed by `dman` or `debman`,\nfrom [`debian-goodies`](https://packages.debian.org/stable/debian-goodies).\n\nYou can also try to color other pages by prefixing the respective command with `colored`:\n\n```bash\ncolored git help clone\n```\n"
  },
  {
    "path": "plugins/colored-man-pages/colored-man-pages.plugin.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Colored Man Pages Plugin\n#\n# This plugin is based on the following Oh-My-Zsh plugin:\n# https://github.com/ohmyzsh/ohmyzsh/blob/6bc4c80c7db072a0d2d265eb3589bbe52e0d2737/plugins/colored-man-pages/colored-man-pages.plugin.zsh\n\n# Adds the LESS_TERMCAP_* variables to color the man pages.\nfunction colored {\n  local -x LESS_TERMCAP_mb=$_omb_term_red\n  local -x LESS_TERMCAP_md=$_omb_term_bold_red\n  local -x LESS_TERMCAP_me=$_omb_term_reset\n  local -x LESS_TERMCAP_so=$_omb_term_bold_yellow\n  local -x LESS_TERMCAP_se=$_omb_term_reset\n  local -x LESS_TERMCAP_us=$_omb_term_green\n  local -x LESS_TERMCAP_ue=$_omb_term_reset\n\n  # Prefer `less` whenever available, since we specifically configured\n  # environment for it.\n  local -x PAGER=$(type -P less || _omb_util_print \"$PAGER\")\n  local -x GROFF_NO_SGR=1\n\n  command \"$@\"\n}\n\n# Wrapper for man to colorize the output.\n_omb_util_binary_exists man &&\n  function man {\n    colored \"$FUNCNAME\" \"$@\"\n  }\n\n# Wrapper for dman to colorize the output.\n_omb_util_binary_exists dman &&\n  function dman {\n    colored \"$FUNCNAME\" \"$@\"\n  }\n\n# Wrapper for debman to colorize the output.\n_omb_util_binary_exists debman &&\n  function debman {\n    colored \"$FUNCNAME\" \"$@\"\n  }\n"
  },
  {
    "path": "plugins/dotnet/README.md",
    "content": "# .NET Core CLI plugin\n\nThis plugin provides completion and useful aliases for [.NET Core CLI](https://dotnet.microsoft.com/).\n\nTo use it, add `dotnet` to the plugins array in your .bashrc file.\n\n```\nplugins=(... dotnet)\n```\n\n## Aliases\n\n| Alias | Command           | Description                                                       |\n| ----- | ----------------- | ----------------------------------------------------------------- |\n| dn    | dotnet new        | Create a new .NET project or file.                                |\n| dr    | dotnet run        | Build and run a .NET project output.                              |\n| dt    | dotnet test       | Run unit tests using the test runner specified in a .NET project. |\n| dw    | dotnet watch      | Watch for source file changes and restart the dotnet command.     |\n| dwr   | dotnet watch run  | Watch for source file changes and restart the `run` command.      |\n| dwt   | dotnet watch test | Watch for source file changes and restart the `test` command.     |\n| ds    | dotnet sln        | Modify Visual Studio solution files.                              |\n| da    | dotnet add        | Add a package or reference to a .NET project.                     |\n| dp    | dotnet pack       | Create a NuGet package.                                           |\n| dng   | dotnet nuget      | Provides additional NuGet commands.                               |\n| db    | dotnet build      | Build a .NET project                                              |\n"
  },
  {
    "path": "plugins/dotnet/dotnet.plugin.sh",
    "content": "#! bash oh-my-bash.module\n#\n# This plugin is based on the following version of the Oh-My-Zsh plugin:\n# https://github.com/ohmyzsh/ohmyzsh/blame/c68ff8aeedc2b779ae42d745457ecd443e22e212/plugins/dotnet/dotnet.plugin.zsh\n\n# bash parameter completion for the dotnet CLI was taken from the following\n# source under the MIT license:\n# source: https://github.com/dotnet/sdk/blob/f271b05d65e8218d3c276f417d66021692108118/scripts/register-completions.bash\n# Copyright (c) .NET Foundation and Contributors\n_dotnet_bash_complete()\n{\n  local word=${COMP_WORDS[COMP_CWORD]}\n\n  local completions\n  completions=\"$(dotnet complete --position \"${COMP_POINT}\" \"${COMP_LINE}\" 2>/dev/null)\"\n  if [ $? -ne 0 ]; then\n    completions=\"\"\n  fi\n\n  COMPREPLY=( $(compgen -W \"$completions\" -- \"$word\") )\n}\ncomplete -f -F _dotnet_bash_complete dotnet\n\n\n# Aliases bellow are here for backwards compatibility\n# added by Shaun Tabone (https://github.com/xontab)\n\n#Create a new .NET project or file.\nalias dn='dotnet new'\n#Build and run a .NET project output.\nalias dr='dotnet run'\n#Run unit tests using the test runner specified in a .NET project.\nalias dt='dotnet test'\n#Watch for source file changes and restart the dotnet command.\nalias dw='dotnet watch'\n#Watch for source file changes and restart the `run` command.\nalias dwr='dotnet watch run'\n#Watch for source file changes and restart the `test` command.\nalias dwt='dotnet watch test'\n#Modify Visual Studio solution files.\nalias ds='dotnet sln'\n#Add a package or reference to a .NET project.\nalias da='dotnet add'\n#Create a NuGet package.\nalias dp='dotnet pack'\n#Provides additional NuGet commands.\nalias dng='dotnet nuget'\n#Build a .NET project\nalias db='dotnet build'\n\n# Aliases added by Chris Lebron (https://github.com/clebron949)\n#List dotnet sdk versions installed\nalias dls='dotnet --list-sdks'\n#List dotnet runtimes installed\nalias dlr='dotnet --list-runtimes'\n"
  },
  {
    "path": "plugins/fasd/fasd.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Initialize fasd, without setting up the prompt hook, which\n# we want to be handled by oh-my-bash.\n\nfunction _omb_plugin_fasd_prompt_func {\n  local sink=${OMB_PLUGIN_FASD_SINK:-/dev/null}\n  [[ $sink == /dev/null ]] && return 0\n  fasd --proc \"$(fasd --sanitize \"$(history 1 | command sed 's/^[ ]*[0-9]*[ ]*//')\")\" >> \"$sink\" 2>&1\n}\n\nfunction _omb_plugin_fasd_initialize {\n  if _omb_util_command_exists fasd; then\n    eval -- \"$(fasd --init posix-alias bash-ccomp bash-ccomp-install)\"\n    _omb_util_add_prompt_command _omb_plugin_fasd_prompt_func\n  else\n    _omb_util_print 'fasd not found, plugin not activated.' >&2\n  fi\n}\n\n_omb_plugin_fasd_initialize\n"
  },
  {
    "path": "plugins/fzf/README.md",
    "content": "# fzf plugin\n\nThe fzf plugin enables fzf keybindings and completions on bash.\n\nTo use it, install\n[fzf](https://github.com/junegunn/fzf?tab=readme-ov-file#installation) and add fzf\nto the plugins array of your bashrc file:\n\n```bash\nplugins=(... fzf)\n```\n"
  },
  {
    "path": "plugins/fzf/fzf.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Check if fzf is installed\nif _omb_util_command_exists fzf; then\n  # Set up fzf key bindings and fuzzy completion\n  eval -- \"$(fzf --bash)\"\nelse\n  _omb_util_print '[oh-my-bash] fzf not found, please install it from https://github.com/junegunn/fzf' >&2\nfi\n"
  },
  {
    "path": "plugins/gcloud/README.md",
    "content": "# gcloud\n\nThis plugin provides completion support for the\n[Google Cloud SDK CLI](https://cloud.google.com/sdk/gcloud/).\nBased on [gcloud plugin for oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gcloud).\n\nTo use it, add `gcloud` to the plugins array in your bashrc file.\n\n```bash\nplugins=(... gcloud)\n```\n\nIt relies on you having installed the SDK using one of the supported options\nlisted [here](https://cloud.google.com/sdk/install).\n\n## Plugin Options\n\n* Set `OMB_PLUGIN_GCLOUD_HOME` in your `bashrc` file before you load oh-my-bash if you have\nyour GCloud SDK installed in a non-standard location. The plugin will use this\nas the base for your SDK if it finds it set already.\n\n* If you do not have a `python2` in your `PATH` you'll also need to set the\n`CLOUDSDK_PYTHON` environment variable at the end of your `.bashrc`. This is\nused by the SDK to call a compatible interpreter when you run one of the\nSDK commands.\n"
  },
  {
    "path": "plugins/gcloud/gcloud.plugin.sh",
    "content": "#!/bin/bash oh-my-bash.module\n# gcloud.plugin.sh\n# Author: Ian Chesal (github.com/ianchesal) -- ohmyzsh/gloud.plugin.zsh\n# Author: Antonino Cangialosi (github.com/ninoCan)\n# Fork of oh-my-zsh gcloud plugin\n\nfunction _omb_plugin_gcloud_set_home_var() {\n  if [[ ! ${OMB_PLUGIN_GCLOUD_HOME-} ]]; then\n    local -a search_locations=(\n      \"$HOME/google-cloud-sdk\"\n      \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk\"\n      \"/opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk\"\n      \"/usr/share/google-cloud-sdk\"\n      \"/snap/google-cloud-sdk/current\"\n      \"/usr/lib/google-cloud-sdk\"\n      \"/usr/lib64/google-cloud-sdk\"\n      \"/opt/google-cloud-sdk\"\n      \"/opt/local/libexec/google-cloud-sdk\"\n    )\n\n    local gcloud_sdk_location\n    for gcloud_sdk_location in \"${search_locations[@]}\"; do\n      if [[ -d $gcloud_sdk_location ]]; then\n        OMB_PLUGIN_GCLOUD_HOME=$gcloud_sdk_location\n        break\n      fi\n    done\n  fi\n}\n\nfunction _omb_plugin_gcloud_set_completions() {\n  if [[ ${OMB_PLUGIN_GCLOUD_HOME-} ]]; then\n    # Only source this if gcloud isn't already on the path\n    if _omb_util_binary_exists gcloud; then\n      if [[ -f $OMB_PLUGIN_GCLOUD_HOME/path.bash.inc ]]; then\n        source \"$OMB_PLUGIN_GCLOUD_HOME/path.bash.inc\"\n      fi\n\n      # Look for completion file in different paths\n      local -a completion_filepath_candidates=(\n        \"${OMB_PLUGIN_GCLOUD_HOME}/completion.bash.inc\"    # default location\n        \"/usr/share/google-cloud-sdk/completion.bash.inc\"  # apt-based location\n      )\n      local comp_file\n      for comp_file in \"${completion_filepath_candidates[@]}\"; do\n        if [[ -f $comp_file ]]; then\n          source \"$comp_file\"\n          break\n        fi\n      done\n    fi\n  fi\n}\n\n_omb_plugin_gcloud_set_home_var\n_omb_plugin_gcloud_set_completions\n"
  },
  {
    "path": "plugins/git/README.md",
    "content": "# Git Plugin\n\nThe git plugin defines a number of useful aliases for you. [Consult the complete list](git.plugin.sh#L34)\n\n\n# How to Use Aliases and Shell Functions for Git with Oh My Bash\n\nThis README provides instructions on how to use the provided aliases and shell functions for Git with Oh My Bash. These aliases and functions can significantly improve your Git workflow by simplifying common Git commands and providing useful shortcuts.\n\n## Aliases\n\n### General Git Commands\n\n- `g`: Shortcut for `git`.\n- `ga`: Shortcut for `git add`. Adds specified files to the staging area.\n- `gaa`: Shortcut for `git add --all`. Adds all changes, including untracked files, to the staging area.\n- `gc`: Shortcut for `git commit`. Commits changes to the repository.\n- `gca`: Shortcut for `git commit --all`. Commits all changes to the repository.\n- `gcmsg`: Shortcut for `git commit --message`. Commits changes with a specified message.\n- `gd`: Shortcut for `git diff`. Shows changes between commits, commit and working tree, etc.\n- `gdca`: Shortcut for `git diff --cached`. Shows changes between staged and last commit.\n- `gf`: Shortcut for `git fetch`. Downloads objects and refs from another repository.\n- `gg`: Shortcut for `git gui citool`. Launches Git GUI.\n- `gl`: Shortcut for `git pull`. Fetches from and integrates with another repository or a local branch.\n- `gpr`: Shortcut for `git pull --rebase`. Fetches and rebases changes from another repository.\n- `gp`: Shortcut for `git push`. Pushes changes to a remote repository.\n- `gs`: Shortcut for `git status`. Shows the working tree status.\n\n### Branching and Merging\n\n- `gcb`: Shortcut for `git checkout -b`. Creates a new branch and switches to it.\n- `gco`: Shortcut for `git checkout`. Switches branches or restores working tree files.\n- `gm`: Shortcut for `git merge`. Joins two or more development histories together.\n- `grb`: Shortcut for `git rebase`. Reapplies commits on top of another base tip.\n- `grbi`: Shortcut for `git rebase --interactive`. Reapplies commits interactively.\n- `grbd`: Shortcut for `git rebase develop`. Reapplies commits onto the develop branch.\n- `gsw`: Shortcut for `git switch`. Switches branches.\n\n### Tagging\n\n- `gta`: Shortcut for `git tag --annotate`. Creates an annotated tag.\n- `gts`: Shortcut for `git tag --sign`. Creates a signed tag.\n- `gtv`: Shortcut for `git tag`. Lists tags.\n\n### Miscellaneous\n\n- `gclean`: Shortcut for `git clean`. Removes untracked files from the working tree.\n- `gunwip`: Undo last commit if marked as work in progress.\n- `gignore`: Ignores changes to tracked files.\n- `gunignore`: Stops ignoring changes to tracked files.\n- `gcount`: Shows commit count by author.\n- `gk`: Opens Git GUI.\n- `gke`: Opens extended Git GUI.\n\n## Shell Functions\n\n- `current_branch`: Get the name of the current branch.\n- `current_repository`: Get the list of remotes for the current repository.\n- `work_in_progress`: Warn if the current branch is a work in progress.\n- `git_develop_branch`: Check for develop and similarly named branches.\n- `git_main_branch`: Check if main exists and use instead of master.\n\n## Usage Example\n\nTo add all changes and commit with a message, you can use:\n\n```bash\ngaa && gcmsg \"Your commit message\"\n```\n"
  },
  {
    "path": "plugins/git/git.plugin.sh",
    "content": "#! bash oh-my-bash.module\n_omb_module_require completion:git\n\n#\n# Functions\n#\n\n# The name of the current branch\n# Back-compatibility wrapper for when this function was defined here in\n# the plugin, before being pulled in to core lib/git.zsh as git_current_branch()\n# to fix the core -> git plugin dependency.\nfunction current_branch() {\n  git_current_branch\n}\n# The list of remotes\nfunction current_repository() {\n  if ! $_omb_git_git_cmd rev-parse --is-inside-work-tree &> /dev/null; then\n    return\n  fi\n  _omb_util_print $($_omb_git_git_cmd remote -v | cut -d':' -f 2)\n}\n# Warn if the current branch is a WIP\nfunction work_in_progress() {\n  if $(git log -n 1 2>/dev/null | grep -q -c \"\\-\\-wip\\-\\-\"); then\n    _omb_util_print \"WIP!!\"\n  fi\n}\n\n# Check for develop and similarly named branches\nfunction git_develop_branch() {\n  command git rev-parse --git-dir &>/dev/null || return\n  local branch\n  for branch in dev devel development; do\n    if command git show-ref -q --verify refs/heads/\"$branch\"; then\n      _omb_util_print \"$branch\"\n      return\n    fi\n  done\n  _omb_util_print develop\n}\n\n# Check if main exists and use instead of master\nfunction git_main_branch() {\n  command git rev-parse --git-dir &>/dev/null || return\n  local ref\n  for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk,mainline,default}; do\n    if command git show-ref -q --verify \"$ref\"; then\n      _omb_util_print \"${ref##*/}\"\n      return\n    fi\n  done\n  _omb_util_print master\n}\n\n#\n# Aliases\n#\n# From Oh-My-Zsh:\n# https://github.com/ohmyzsh/ohmyzsh/blob/f36c6db0eac17b022eee87411e6996a5f5fc8457/plugins/git/git.plugin.zsh\n#\n\nalias g='command git'\n__git_complete g _git\n\nalias ga='command git add'\n__git_complete ga _git_add\nalias gaa='command git add --all'\n__git_complete gaa _git_add\nalias gapa='command git add --patch'\n__git_complete gapa _git_add\nalias gau='command git add --update'\n__git_complete gau _git_add\nalias gav='command git add --verbose'\n__git_complete gav _git_add\nalias gwip='command git add -A; command git rm $(git ls-files --deleted) 2> /dev/null; command git commit --no-verify --no-gpg-sign --message \"--wip-- [skip ci]\"'\n\nalias gam='command git am'\n__git_complete gam _git_am\nalias gama='command git am --abort'\n__git_complete gama _git_am\nalias gamc='command git am --continue'\n__git_complete gamc _git_am\nalias gamscp='command git am --show-current-patch'\n__git_complete gamscp _git_am\nalias gams='command git am --skip'\n__git_complete gams _git_am\n\nalias gap='command git apply'\n__git_complete gap _git_apply\nalias gapt='command git apply --3way'\n__git_complete gapt _git_apply\n\nalias gbl='command git blame -b -w'\n\nalias gb='command git branch'\n__git_complete gb _git_branch\nalias gbD='command git branch --delete --force'\n__git_complete gbD _git_branch\nalias gba='command git branch -a'\n__git_complete gba _git_branch\nalias gbd='command git branch -d'\n__git_complete gbd _git_branch\nalias gbda='command git branch --no-color --merged | command grep -vE \"^([+*]|\\s*($(git_main_branch)|$(git_develop_branch))\\s*$)\" | command xargs git branch --delete 2>/dev/null'\nalias gbg='LANG=C command git branch -vv | grep \": gone\\]\"'\nalias gbgD='LANG=C command git branch --no-color -vv | grep \": gone\\]\" | awk '\"'\"'{print $1}'\"'\"' | command xargs git branch -D'\nalias gbgd='LANG=C command git branch --no-color -vv | grep \": gone\\]\" | awk '\"'\"'{print $1}'\"'\"' | command xargs git branch -d'\nalias gbm='command git branch --move'\n__git_complete gbm _git_branch\nalias gbnm='command git branch --no-merged'\n__git_complete gbnm _git_branch\nalias gbr='command git branch --remote'\n__git_complete gbr _git_branch\nalias gbsc='command git branch --show-current'\n__git_complete gbsc _git_branch\nalias ggsup='command git branch --set-upstream-to=\"origin/$(git_current_branch)\"'\n__git_complete ggsup _git_branch\n\nalias gbs='command git bisect'\n__git_complete gbs _git_bisect\nalias gbsb='command git bisect bad'\n__git_complete gbsb _git_bisect\nalias gbsg='command git bisect good'\n__git_complete gbsg _git_bisect\nalias gbsn='command git bisect new'\n__git_complete gbsn _git_bisect\nalias gbso='command git bisect old'\n__git_complete gbso _git_bisect\nalias gbsr='command git bisect reset'\n__git_complete gbsr _git_bisect\nalias gbss='command git bisect start'\n__git_complete gbss _git_bisect\n\nalias gcb='command git checkout -b'\n__git_complete gcb _git_checkout\nalias gcd='command git checkout \"$(git_develop_branch)\"'\n__git_complete gcd _git_checkout\nalias gcm='command git checkout \"$(git_main_branch)\"'\n__git_complete gcm _git_checkout\nalias gco='command git checkout'\n__git_complete gco _git_checkout\nalias gcor='command git checkout --recurse-submodules'\n__git_complete gcor _git_checkout\n\nalias gcp='command git cherry-pick'\n__git_complete gcp _git_cherry_pick\nalias gcpa='command git cherry-pick --abort'\n__git_complete gcpa _git_cherry_pick\nalias gcpc='command git cherry-pick --continue'\n__git_complete gcpc _git_cherry_pick\nalias gcps='command git cherry-pick -s'\n__git_complete gcps _git_cherry_pick\n\nalias gcl='command git clone --recursive'\n__git_complete gcl _git_clone\nfunction gccd() {\n  command git clone --recurse-submodules \"$@\"\n  local lastarg=$_\n  [[ -d $lastarg ]] && cd \"$lastarg\" && return\n  lastarg=${lastarg##*/}\n  cd \"${lastarg%.git}\"\n}\n#compdef _git gccd=git-clone\n__git_complete gccd _git_clone\n\nalias gclean='command git clean -fd'\n__git_complete gclean _git_clean\n\nalias gc!='command git commit --verbose --amend'\n__git_complete gc! _git_commit\nalias gc='command git commit --verbose'\n__git_complete gc _git_commit\nalias gca!='command git commit --verbose --all --amend'\n__git_complete gca! _git_commit\nalias gca='command git commit --verbose --all'\n__git_complete gca _git_commit\nalias gcam='command git commit --all --message'\n__git_complete gcam _git_commit\nalias gcan!='command git commit --verbose --all --no-edit --amend'\n__git_complete gcan! _git_commit\nalias gcans!='command git commit --verbose --all --signoff --no-edit --amend'\n__git_complete gcans! _git_commit\nalias gcas='command git commit --all --signoff'\n__git_complete gcas _git_commit\nalias gcasm='command git commit --all --signoff --message'\n__git_complete gcasm _git_commit\nalias gcmsg='command git commit --message'\n__git_complete gcmsg _git_commit\nalias gcn!='command git commit --verbose --no-edit --amend'\n__git_complete gcn! _git_commit\nalias gcs='command git commit --gpg-sign'\n__git_complete gcs _git_commit\nalias gcsm='command git commit --signoff --message'\n__git_complete gcsm _git_commit\nalias gcss='command git commit --gpg-sign --signoff'\n__git_complete gcss _git_commit\nalias gcssm='command git commit --gpg-sign --signoff --message'\n__git_complete gcssm _git_commit\n\nalias gcf='command git config --list'\n__git_complete gcf _git_config\n\nalias gdct='command git describe --tags `git rev-list --tags --max-count=1`'\n\nalias gd='command git diff'\n__git_complete gd _git_diff\nalias gdca='command git diff --cached'\n__git_complete gdca _git_diff\nalias gdcw='command git diff --cached --word-diff'\n__git_complete gdcw _git_diff\nalias gds='command git diff --staged'\n__git_complete gds _git_diff\nalias gdw='command git diff --word-diff'\n__git_complete gdw _git_diff\nalias gdup='command git diff @{upstream}'\n__git_complete gdup _git_diff\nfunction gdnolock() {\n  command git diff \"$@\" \":(exclude)package-lock.json\" \":(exclude)*.lock\"\n}\n#compdef _git gdnolock=git-diff\n__git_complete gdnolock _git_diff\nfunction gdv {\n  command git diff -w \"$@\" | view -\n}\n#compdef _git gdv=git-diff\n__git_complete gdv _git_diff\n\nalias gdt='command git diff-tree --no-commit-id --name-only -r'\n__git_complete gdt _git_diff\n\nalias gdtool='command git difftool -d'\n__git_complete gdtool _git_difftool\n\nalias gf='command git fetch'\n__git_complete gf _git_fetch\nalias gfa='command git fetch --all --prune'\n__git_complete gfa _git_fetch\nalias gfo='command git fetch origin'\n# jobs=<n> was added in git 2.8\n# alias gfa='git fetch --all --prune --jobs=10' \\\n__git_complete gfo _git_fetch\n\nalias gg='command git gui citool'\nalias gga='command git gui citool --amend'\n\nalias ghh='command git help'\n__git_complete ghh _git_help\n\nalias glg='command git log --stat'\n__git_complete glg _git_log\nalias glgg='command git log --graph'\n__git_complete glgg _git_log\nalias glgga='command git log --graph --decorate --all'\n__git_complete glgga _git_log\nalias glgm='command git log --graph --max-count=10'\n__git_complete glgm _git_log\nalias glgp='command git log --stat -p'\n__git_complete glgp _git_log\nalias glo='command git log --oneline --decorate'\n__git_complete glo _git_log\nalias glod='command git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset\"'\n__git_complete glod _git_log\nalias glods='command git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset\" --date=short'\n__git_complete glods _git_log\nalias glog='command git log --oneline --decorate --graph'\n__git_complete glog _git_log\nalias gloga='command git log --oneline --decorate --graph --all'\n__git_complete gloga _git_log\nalias glol='command git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset\"'\n__git_complete glol _git_log\nalias glola='command git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset\" --all'\n__git_complete glola _git_log\nalias glols='command git log --graph --pretty=\"%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset\" --stat'\n__git_complete glols _git_log\n# Pretty log messages\nfunction _git_log_prettily(){\n  if [[ $1 ]]; then\n    command git log --pretty=\"$1\"\n  fi\n}\nalias glp='_git_log_prettily'\n#compdef _git glp=git-log\n__git_complete glp _git_log\n\nalias gignored='command git ls-files -v | grep \"^[[:lower:]]\"'\nalias gfg='command git ls-files | grep'\n\nalias gm='command git merge'\n__git_complete gm _git_merge\nalias gma='command git merge --abort'\n__git_complete gma _git_merge\nalias gmom='command git merge \"origin/$(git_main_branch)\"'\n__git_complete gmom _git_merge\nalias gms='command git merge --squash'\n__git_complete gms _git_merge\nalias gmum='command git merge \"upstream/$(git_main_branch)\"'\n__git_complete gmum _git_merge\n\nalias gmt='command git mergetool --no-prompt' # deprecate?\n__git_complete gmt _git_mergetool\nalias gmtvim='command git mergetool --no-prompt --tool=vimdiff' # deprecate?\n__git_complete gmtvim _git_mergetool\nalias gmtl='command git mergetool --no-prompt'\n__git_complete gmtl _git_mergetool\nalias gmtlvim='command git mergetool --no-prompt --tool=vimdiff'\n__git_complete gmtlvim _git_mergetool\n\nalias ggpull='command git pull origin \"$(git_current_branch)\"'\n__git_complete ggpull _git_pull\nalias ggpur='ggu'\nalias gl='command git pull'\n__git_complete gl _git_pull\nalias gluc='command git pull upstream \"$(git_current_branch)\"'\n__git_complete gluc _git_pull\nalias glum='command git pull upstream \"$(git_main_branch)\"'\n__git_complete glum _git_pull\nalias gpr='command git pull --rebase'\n__git_complete gpr _git_pull\nalias gup='command git pull --rebase'\n__git_complete gup _git_pull\nalias gupa='command git pull --rebase --autostash'\n__git_complete gupa _git_pull\nalias gupav='command git pull --rebase --autostash --verbose'\n__git_complete gupav _git_pull\nalias gupom='command git pull --rebase origin \"$(git_main_branch)\"'\n__git_complete gupom _git_pull\nalias gupomi='command git pull --rebase=interactive origin \"$(git_main_branch)\"'\n__git_complete gupomi _git_pull\nalias gupv='command git pull --rebase --verbose'\n__git_complete gupv _git_pull\nfunction ggl {\n  if (($# != 0 && $# != 1)); then\n    command git pull origin \"$*\"\n  else\n    local b=\n    (($# == 0)) && b=$(git_current_branch)\n    command git pull origin \"${b:-$1}\"\n  fi\n}\n__git_complete ggl _git_pull\nfunction ggu {\n  local b=\n  (($# != 1)) && b=$(git_current_branch)\n  command git pull --rebase origin \"${b:-$1}\"\n}\n#compdef _git ggl=git-checkout\n#compdef _git ggpull=git-checkout\n#compdef _git ggpur=git-checkout\n#compdef _git ggu=git-checkout\n__git_complete ggu _git_pull\n\nalias ggpush='command git push origin \"$(git_current_branch)\"'\n__git_complete ggpush _git_push\nalias gp='command git push'\n__git_complete gp _git_push\nalias gpd='command git push --dry-run'\n__git_complete gpd _git_push\nalias gpf!='command git push --force'\n__git_complete gpf! _git_push\nalias gpf='command git push --force-with-lease'\n__git_complete gpf _git_push\nalias gpoat='command git push origin --all && command git push origin --tags'\n__git_complete gpoat _git_push\nalias gpod='command git push origin --delete'\n__git_complete gpod _git_push\nalias gpsup='command git push --set-upstream origin \"$(git_current_branch)\"'\n__git_complete gpsup _git_push\nalias gpsupf='command git push --set-upstream origin \"$(git_current_branch)\" --force-with-lease'\n__git_complete gpsupf _git_push\nalias gpu='command git push upstream'\n__git_complete gpu _git_push\nalias gpv='command git push --verbose'\n__git_complete gpv _git_push\n#is-at-least 2.30 \"$git_version\" && alias gpf='git push --force-with-lease --force-if-includes'\n#is-at-least 2.30 \"$git_version\" && alias gpsupf='git push --set-upstream origin \"$(git_current_branch)\" --force-with-lease --force-if-includes'\nfunction ggf {\n  (($# != 1)) && local b=$(git_current_branch)\n  command git push --force origin \"${b:=$1}\"\n}\n__git_complete ggf _git_push\nfunction ggfl {\n  (($# != 1)) && local b=$(git_current_branch)\n  command git push --force-with-lease origin \"${b:=$1}\"\n}\n__git_complete ggfl _git_push\nfunction ggp {\n  if (($# != 0 && $# != 1)); then\n    command git push origin \"$*\"\n  else\n    (($# == 0)) && local b=$(git_current_branch)\n    command git push origin \"${b:=$1}\"\n  fi\n}\n__git_complete ggp _git_push\nfunction ggpnp {\n  if (($# == 0)); then\n    ggl && ggp\n  else\n    ggl \"$*\" && ggp \"$*\"\n  fi\n}\n__git_complete ggpnp _git_push\n#compdef _git ggf=git-checkout\n#compdef _git ggfl=git-checkout\n#compdef _git ggp=git-checkout\n#compdef _git ggpnp=git-checkout\n#compdef _git ggpush=git-checkout\n#compdef _git gpoat=git-push\n\nalias grb='command git rebase'\n__git_complete grb _git_rebase\nalias grba='command git rebase --abort'\n__git_complete grba _git_rebase\nalias grbc='command git rebase --continue'\n__git_complete grbc _git_rebase\nalias grbi='command git rebase --interactive'\n__git_complete grbi _git_rebase\nalias grbo='command git rebase --onto'\n__git_complete grbo _git_rebase\nalias grbs='command git rebase --skip'\n__git_complete grbs _git_rebase\nalias grbd='command git rebase \"$(git_develop_branch)\"'\n__git_complete grbd _git_rebase\nalias grbm='command git rebase \"$(git_main_branch)\"'\n__git_complete grbm _git_rebase\nalias grbom='command git rebase \"origin/$(git_main_branch)\"'\n__git_complete grbom _git_rebase\n\nalias gr='command git remote'\n__git_complete gr _git_remote\nalias gra='command git remote add'\n__git_complete gra _git_remote\nalias grmv='command git remote rename'\n__git_complete grmv _git_remote\nalias grrm='command git remote remove'\n__git_complete grrm _git_remote\nalias grset='command git remote set-url'\n__git_complete grset _git_remote\nalias grup='command git remote update'\n__git_complete grup _git_remote\nalias grv='command git remote --verbose'\n__git_complete grv _git_remote\n\nalias gpristine='command git reset --hard && command git clean --force -dfx'\nalias grh='command git reset'\n__git_complete grh _git_reset\nalias grhh='command git reset --hard'\n__git_complete grhh _git_reset\nalias grhk='command git reset --keep'\n__git_complete grhk _git_reset\nalias grhs='command git reset --soft'\n__git_complete grhs _git_reset\nalias groh='command git reset \"origin/$(git_current_branch)\" --hard'\n__git_complete groh _git_reset\nalias grt='cd $(command git rev-parse --show-toplevel || _omb_util_print \".\")'\nalias gru='command git reset --'\n__git_complete gru _git_reset\n\nalias grs='command git restore'\n__git_complete grs _git_restore\nalias grss='command git restore --source'\n__git_complete grss _git_restore\nalias grst='command git restore --staged'\n__git_complete grst _git_restore\n\nalias gunwip='command git rev-list --max-count=1 --format=\"%s\" HEAD | grep -q \"\\--wip--\" && command git reset HEAD~1'\nalias grev='command git revert'\n__git_complete grev _git_revert\n\nalias grm='command git rm'\n__git_complete grm _git_rm\nalias grmc='command git rm --cached'\n__git_complete grmc _git_rm\n\nalias gcount='command git shortlog --summary --numbered'\n__git_complete gcount _git_shortlog\n#compdef _git gcount complete -F _git gcount\n\nalias gsh='command git show'\n__git_complete gsh _git_show\nalias gsps='command git show --pretty=short --show-signature'\n__git_complete gsps _git_show\n\nalias gsta='command git stash save'\n__git_complete gsta _git_stash\nalias gstaa='command git stash apply'\n__git_complete gstaa _git_stash\nalias gstall='command git stash --all'\n__git_complete gstall _git_stash\nalias gstc='command git stash clear'\n__git_complete gstc _git_stash\nalias gstd='command git stash drop'\n__git_complete gstd _git_stash\nalias gstl='command git stash list'\n__git_complete gstl _git_stash\nalias gstp='command git stash pop'\n__git_complete gstp _git_stash\nalias gsts='command git stash show'\n__git_complete gsts _git_stash\nalias gstu='gsta --include-untracked'\n__git_complete gstu _git_stash\n#is-at-least 2.13 \"$git_version\" && alias gsta='command git stash push'\n\nalias gsb='command git status --short --branch'\n__git_complete gsb _git_status\nalias gss='command git status --short'\n__git_complete gss _git_status\nalias gst='command git status'\n__git_complete gst _git_status\n\nalias gsi='command git submodule init'\n__git_complete gsi _git_submodule\nalias gsu='command git submodule update'\n__git_complete gsu _git_submodule\n\nalias git-svn-dcommit-push='command git svn dcommit && command git push github \"$(git_main_branch):svntrunk\"'\nalias gsd='command git svn dcommit'\n__git_complete gsd _git_svn\nalias gsr='command git svn rebase'\n__git_complete gsr _git_svn\n#compdef _git git-svn-dcommit-push=git\n\nalias gsw='command git switch'\n__git_complete gsw _git_switch\nalias gswc='command git switch --create'\n__git_complete gswc _git_switch\nalias gswd='command git switch \"$(git_develop_branch)\"'\n__git_complete gswd _git_switch\nalias gswm='command git switch \"$(git_main_branch)\"'\n__git_complete gswm _git_switch\n\nalias gta='command git tag --annotate'\n__git_complete gta _git_tag\nalias gts='command git tag --sign'\n__git_complete gts _git_tag\nalias gtv='command git tag | sort -V'\n__git_complete gtv _git_tag\nfunction gtl {\n  command git tag --sort=-v:refname -n --list \"$1*\"\n}\n__git_complete gtl _git_tag\n#compdef _git gtl=git-tag\n\nalias gignore='command git update-index --assume-unchanged'\nalias gunignore='command git update-index --no-assume-unchanged'\n\nalias gwch='command git whatchanged -p --abbrev-commit --pretty=medium'\n__git_complete gwch _git_whatchanged\n\nalias gwt='command git worktree'\n__git_complete gwt _git_worktree\nalias gwta='command git worktree add'\n__git_complete gwta _git_worktree\nalias gwtls='command git worktree list'\n__git_complete gwtls _git_worktree\nalias gwtmv='command git worktree move'\n__git_complete gwtmv _git_worktree\nalias gwtrm='command git worktree remove'\n__git_complete gwtrm _git_worktree\n\nalias gk='\\gitk --all --branches'\nalias gke='\\gitk --all $(git log --walk-reflogs --pretty=%h)'\n# alias gk='\\gitk --all --branches &!'\n# alias gke='\\gitk --all $(git log --walk-reflogs --pretty=%h) &!'\n#compdef _git gk='command gitk'\n#compdef _git gke='command gitk'\n"
  },
  {
    "path": "plugins/goenv/README.md",
    "content": "# goenv plugin\n\nThe goenv plugin will configure goenv paths and configure goenv to manage GOROOT and GOHOME.\n"
  },
  {
    "path": "plugins/goenv/goenv.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# @chopnico 2021\n\nif [[ -d ~/.goenv ]]; then\n  # goenv exported variables\n  export GOENV_ROOT=~/.goenv\n  export PATH=$GOENV_ROOT/bin${PATH:+:$PATH}\n\n  # Enables goenv shims\n  eval -- \"$(goenv init -)\"\n\n  # Allows goenv to manage GOPATH and GOROOT\n  export PATH=$GOROOT/bin:$PATH\n  export PATH=$PATH:$GOPATH/bin\nfi\n"
  },
  {
    "path": "plugins/golang/README.md",
    "content": "# Golang plugin\n\nThe `golang plugin` plugin adds some aliases for common [Golang](https://golang.org/) commands.\n\nTo use it, add `golang` to the plugins array of your bashrc file:\n\n```\nplugins=(... golang)\n```\n\n## Aliases\n\n| Alias   | Command                 | Description                                                   |\n| ------- | ----------------------- | ------------------------------------------------------------- |\n| gob     | `go build`              | Build your code                                               |\n| goc     | `go clean`              | Removes object files from package source directories          |\n| god     | `go doc`                | Prints documentation comments                                 |\n| gof     | `go fmt`                | Gofmt formats (aligns and indents) Go programs.               |\n| gofa    | `go fmt ./...`          | Run go fmt for all packages in current directory, recursively |\n| gog     | `go get`                | Downloads packages and then installs them to $GOPATH          |\n| goi     | `go install`            | Compiles and installs packages to $GOPATH                     |\n| gol     | `go list`               | Lists Go packages                                             |\n| gom     | `go mod`                | Access to operations on modules                               |\n| gop     | `cd $GOPATH`            | Takes you to $GOPATH                                          |\n| gopb    | `cd $GOPATH/bin`        | Takes you to $GOPATH/bin                                      |\n| gops    | `cd $GOPATH/src`        | Takes you to $GOPATH/src                                      |\n| gor     | `go run`                | Compiles and runs your code                                   |\n| got     | `go test`               | Runs tests                                                    |\n| gov     | `go vet`                | Vet examines Go source code and reports suspicious constructs |\n"
  },
  {
    "path": "plugins/golang/golang.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nalias gob='go build'\nalias goc='go clean'\nalias god='go doc'\nalias gof='go fmt'\nalias gofa='go fmt ./...'\nalias gog='go get'\nalias goi='go install'\nalias gol='go list'\nalias gom='go mod'\nalias gop='cd $GOPATH'\nalias gopb='cd $GOPATH/bin'\nalias gops='cd $GOPATH/src'\nalias gor='go run'\nalias got='go test'\nalias gov='go vet'\n"
  },
  {
    "path": "plugins/jump/README.md",
    "content": "# jump plugin\n\nThe jump plugin enables jump on bash.\n\nJump integrates with your shell and learns about your navigational habits by keeping track of the directories you visit. It gives you the most visited directory for the shortest search term you type.\n\n## Installation\n\n1. [Install jump](https://github.com/gsamokovarov/jump?tab=readme-ov-file#installation)\n\n2. Enable the plugin by adding it to the plugins array of your bashrc file:\n\n    ```bash\n    plugins=(... jump)\n    ```\n\n3. (Optional) Enable the completions by adding it to the completions array of bashrc file:\n\n    ```bash\n    completions=(... jump)\n    ```\n\n## Usage\n\nSee the [jump usage documentation](https://github.com/gsamokovarov/jump?tab=readme-ov-file#usage)\nfor information on how to use jump.\n"
  },
  {
    "path": "plugins/jump/jump.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Check if jump is installed\nif _omb_util_command_exists jump; then\n  eval -- \"$(jump shell bash)\"\nelse\n  _omb_util_print '[oh-my-bash] jump not found, please install it from https://github.com/gsamokovarov/jump' >&2\nfi\n"
  },
  {
    "path": "plugins/kubectl/README.md",
    "content": "# Kubectl plugin\n\nThis plugin adds completion for the [Kubernetes cluster manager](https://kubernetes.io/docs/reference/kubectl/kubectl/),\nas well as some aliases for common kubectl commands.\n\nTo use it, add `kubectl` to the plugins array in your bashrc file:\n\n```bash\nplugins=(... kubectl)\n```\n\n## Aliases\n\n| Alias   | Command                             | Description                                                                                      |\n|:--------|:------------------------------------|:-------------------------------------------------------------------------------------------------|\n| k       | `kubectl`                           | The kubectl command                                                                              |\n| kca     | `kubectl --all-namespaces`          | The kubectl command targeting all namespaces                                                     |\n| kaf     | `kubectl apply -f`                  | Apply a YML file                                                                                 |\n| keti    | `kubectl exec -ti`                  | Drop into an interactive terminal on a container                                                 |\n|         |                                     | **Manage configuration quickly to switch contexts between local, dev and staging**               |\n| kcuc    | `kubectl config use-context`        | Set the current-context in a kubeconfig file                                                     |\n| kcsc    | `kubectl config set-context`        | Set a context entry in kubeconfig                                                                |\n| kcdc    | `kubectl config delete-context`     | Delete the specified context from the kubeconfig                                                 |\n| kccc    | `kubectl config current-context`    | Display the current-context                                                                      |\n| kcgc    | `kubectl config get-contexts` | List of contexts available\n|         |                                     | **General aliases**                                                                              |\n| kdel    | `kubectl delete`                    | Delete resources by filenames, stdin, resources and names, or by resources and label selector    |\n| kdelf   | `kubectl delete -f`                 | Delete a pod using the type and name specified in -f argument                                    |\n|         |                                     | **Pod management**                                                                               |\n| kgp     | `kubectl get pods`                  | List all pods in ps output format                                                                |\n| kgpw    | `kgp --watch`                       | After listing/getting the requested object, watch for changes                                    |\n| kgpwide | `kgp -o wide`                       | Output in plain-text format with any additional information. For pods, the node name is included |\n| kep     | `kubectl edit pods`                 | Edit pods from the default editor                                                                |\n| kdp     | `kubectl describe pods`             | Describe all pods                                                                                |\n| kdelp   | `kubectl delete pods`               | Delete all pods matching passed arguments                                                        |\n| kgpl    | `kgp -l`                            | Get pod by label. Example: `kgpl \"app=myapp\" -n myns`                                            |\n|         |                                     | **Service management**                                                                           |\n| kgs     | `kubectl get svc`                   | List all services in ps output format                                                            |\n| kgsw    | `kgs --watch`                       | After listing all services, watch for changes                                                    |\n| kgswide | `kgs -o wide`                       | After listing all services, output in plain-text format with any additional information          |\n| kes     | `kubectl edit svc`                  | Edit services(svc) from the default editor                                                       |\n| kds     | `kubectl describe svc`              | Describe all services in detail                                                                  |\n| kdels   | `kubectl delete svc`                | Delete all services matching passed argument                                                     |\n|         |                                     | **Ingress management**                                                                           |\n| kgi     | `kubectl get ingress`               | List ingress resources in ps output format                                                       |\n| kei     | `kubectl edit ingress`              | Edit ingress resource from the default editor                                                    |\n| kdi     | `kubectl describe ingress`          | Describe ingress resource in detail                                                              |\n| kdeli   | `kubectl delete ingress`            | Delete ingress resources matching passed argument                                                |\n|         |                                     | **Namespace management**                                                                         |\n| kgns    | `kubectl get namespaces`            | List the current namespaces in a cluster                                                         |\n| kcn     | `kubectl config set-context ...`    | Change current namespace |\n| kens    | `kubectl edit namespace`            | Edit namespace resource from the default editor                                                  |\n| kdns    | `kubectl describe namespace`        | Describe namespace resource in detail                                                            |\n| kdelns  | `kubectl delete namespace`          | Delete the namespace. WARNING! This deletes everything in the namespace                          |\n|         |                                     | **ConfigMap management**                                                                         |\n| kgcm    | `kubectl get configmaps`            | List the configmaps in ps output format                                                          |\n| kecm    | `kubectl edit configmap`            | Edit configmap resource from the default editor                                                  |\n| kdcm    | `kubectl describe configmap`        | Describe configmap resource in detail                                                            |\n| kdelcm  | `kubectl delete configmap`          | Delete the configmap                                                                             |\n|         |                                     | **Secret management**                                                                            |\n| kgsec   | `kubectl get secret`                | Get secret for decoding                                                                          |\n| kdsec   | `kubectl describe secret`           | Describe secret resource in detail                                                               |\n| kdelsec | `kubectl delete secret`             | Delete the secret                                                                                |\n|         |                                     | **Deployment management**                                                                        |\n| kgd     | `kubectl get deployment`            | Get the deployment                                                                               |\n| kgdw    | `kgd --watch`                       | After getting the deployment, watch for changes                                                  |\n| kgdwide | `kgd -o wide`                       | After getting the deployment, output in plain-text format with any additional information        |\n| ked     | `kubectl edit deployment`           | Edit deployment resource from the default editor                                                 |\n| kdd     | `kubectl describe deployment`       | Describe deployment resource in detail                                                           |\n| kdeld   | `kubectl delete deployment`         | Delete the deployment                                                                            |\n| ksd     | `kubectl scale deployment`          | Scale a deployment                                                                               |\n| krsd    | `kubectl rollout status deployment` | Check the rollout status of a deployment                                                         |\n| kres    | `kubectl set env $@ REFRESHED_AT=...` | Recreate all pods in deployment with zero-downtime                                                         |\n|         |                                     | **Rollout management**                                                                           |\n| kgrs    | `kubectl get rs`                    | To see the ReplicaSet `rs` created by the deployment                                             |\n| krh     | `kubectl rollout history`           | Check the revisions of this deployment                                                           |\n| kru     | `kubectl rollout undo`              | Rollback to the previous revision                                                                |\n|         |                                     | **Port forwarding**                                                                              |\n| kpf     | `kubectl port-forward`              | Forward one or more local ports to a pod                                                         |\n|         |                                     | **Tools for accessing all information**                                                          |\n| kga     | `kubectl get all`                   | List all resources in ps format                                                                  |\n| kgaa    | `kubectl get all --all-namespaces`  | List the requested object(s) across all namespaces                                               |\n|         |                                     | **Logs**                                                                                         |\n| kl      | `kubectl logs`                      | Print the logs for a container or resource                                                       |\n| klf     | `kubectl logs -f`                   | Stream the logs for a container or resource (follow)                                             |\n|         |                                     | **File copy**                                                                                    |\n| kcp     | `kubectl cp`                        | Copy files and directories to and from containers                                                |\n|         |                                     | **Node management**                                                                              |\n| kgno    | `kubectl get nodes`                 | List the nodes in ps output format                                                               |\n| keno    | `kubectl edit node`                 | Edit nodes resource from the default editor                                                      |\n| kdno    | `kubectl describe node`             | Describe node resource in detail                                                                 |\n| kdelno  | `kubectl delete node`               | Delete the node                                                                                  |\n|         |                                   | **Persistent Volume Claim management**                                                           |\n| kgpvc   | `kubectl get pvc`                   | List all PVCs                                                                                    |\n| kgpvcw  | `kgpvc --watch`                     | After listing/getting the requested object, watch for changes                                    |\n| kepvc   | `kubectl edit pvc`                  | Edit pvcs from the default editor                                                                |\n| kdpvc   | `kubectl describe pvc`              | Descirbe all pvcs                                                                                |\n| kdelpvc | `kubectl delete pvc`                | Delete all pvcs matching passed arguments                                                        |\n|         |                                     |                                                                                                  |\n| kgss    | `kubectl get statefulset`           | List the statefulsets in ps format                                                               |\n| kgssw   | `kgss --watch`                      | After getting the list of statefulsets, watch for changes                                        |\n| kgsswide| `kgss -o wide`                      | After getting the statefulsets, output in plain-text format with any additional information      |\n| kess    | `kubectl edit statefulset`          | Edit statefulset resource from the default editor                                                |\n| kdss    | `kubectl describe statefulset`      | Describe statefulset resource in detail                                                          |\n| kdelss  | `kubectl delete statefulset`        | Delete the statefulset                                                                           |\n| ksss    | `kubectl scale statefulset`         | Scale a statefulset                                                                              |\n| krsss   | `kubectl rollout status statefulset`| Check the rollout status of a deployment                                                         |\n"
  },
  {
    "path": "plugins/kubectl/kubectl.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# This command is used a LOT both below and in daily life\nalias k=kubectl\n\n# Execute a kubectl command against all namespaces\nfunction kca {\n  kubectl \"$@\" --all-namespaces\n}\n\n# Apply a YML file\nalias kaf='kubectl apply -f'\n\n# Drop into an interactive terminal on a container\nalias keti='kubectl exec -ti'\n\n# Manage configuration quickly to switch contexts between local, dev ad staging.\nalias kcuc='kubectl config use-context'\nalias kcsc='kubectl config set-context'\nalias kcdc='kubectl config delete-context'\nalias kccc='kubectl config current-context'\n\n# List all contexts\nalias kcgc='kubectl config get-contexts'\n\n# General aliases\nalias kdel='kubectl delete'\nalias kdelf='kubectl delete -f'\n\n# Pod management.\nalias kgp='kubectl get pods'\nalias kgpw='kgp --watch'\nalias kgpwide='kgp -o wide'\nalias kep='kubectl edit pods'\nalias kdp='kubectl describe pods'\nalias kdelp='kubectl delete pods'\n\n# get pod by label: kgpl \"app=myapp\" -n myns\nalias kgpl='kgp -l'\n\n# Service management.\nalias kgs='kubectl get svc'\nalias kgsw='kgs --watch'\nalias kgswide='kgs -o wide'\nalias kes='kubectl edit svc'\nalias kds='kubectl describe svc'\nalias kdels='kubectl delete svc'\n\n# Ingress management\nalias kgi='kubectl get ingress'\nalias kei='kubectl edit ingress'\nalias kdi='kubectl describe ingress'\nalias kdeli='kubectl delete ingress'\n\n# Namespace management\nalias kgns='kubectl get namespaces'\nalias kens='kubectl edit namespace'\nalias kdns='kubectl describe namespace'\nalias kdelns='kubectl delete namespace'\nalias kcn='kubectl config set-context $(kubectl config current-context) --namespace'\n\n# ConfigMap management\nalias kgcm='kubectl get configmaps'\nalias kecm='kubectl edit configmap'\nalias kdcm='kubectl describe configmap'\nalias kdelcm='kubectl delete configmap'\n\n# Secret management\nalias kgsec='kubectl get secret'\nalias kdsec='kubectl describe secret'\nalias kdelsec='kubectl delete secret'\n\n# Deployment management.\nalias kgd='kubectl get deployment'\nalias kgdw='kgd --watch'\nalias kgdwide='kgd -o wide'\nalias ked='kubectl edit deployment'\nalias kdd='kubectl describe deployment'\nalias kdeld='kubectl delete deployment'\nalias ksd='kubectl scale deployment'\nalias krsd='kubectl rollout status deployment'\nfunction kres {\n  kubectl set env \"$@\" \"REFRESHED_AT=$(date +%Y%m%d%H%M%S)\"\n}\n\n# Rollout management.\nalias kgrs='kubectl get rs'\nalias krh='kubectl rollout history'\nalias kru='kubectl rollout undo'\n\n# Statefulset management.\nalias kgss='kubectl get statefulset'\nalias kgssw='kgss --watch'\nalias kgsswide='kgss -o wide'\nalias kess='kubectl edit statefulset'\nalias kdss='kubectl describe statefulset'\nalias kdelss='kubectl delete statefulset'\nalias ksss='kubectl scale statefulset'\nalias krsss='kubectl rollout status statefulset'\n\n# Port forwarding\nalias kpf=\"kubectl port-forward\"\n\n# Tools for accessing all information\nalias kga='kubectl get all'\nalias kgaa='kubectl get all --all-namespaces'\n\n# Logs\nalias kl='kubectl logs'\nalias klf='kubectl logs -f'\n\n# File copy\nalias kcp='kubectl cp'\n\n# Node Management\nalias kgno='kubectl get nodes'\nalias keno='kubectl edit node'\nalias kdno='kubectl describe node'\nalias kdelno='kubectl delete node'\n\n# PVC management.\nalias kgpvc='kubectl get pvc'\nalias kgpvcw='kgpvc --watch'\nalias kepvc='kubectl edit pvc'\nalias kdpvc='kubectl describe pvc'\nalias kdelpvc='kubectl delete pvc'\n"
  },
  {
    "path": "plugins/npm/README.md",
    "content": "# npm plugin\n\nThe npm plugin provides completion as well as adding many useful aliases.\n\nTo use it, add npm to the plugins array of your bashrc file:\n\n```bash\nplugins=(... npm)\n```\n\n## Aliases\n\n| Alias   | Command                      | Descripton                                                      |\n|:------  |:-----------------------------|:----------------------------------------------------------------|\n| `npmg`  | `npm i -g`                   | Install dependencies globally                                   |\n| `npmS`  | `npm i -S`                   | Install and save to dependencies in your package.json           |\n| `npmD`  | `npm i -D`                   | Install and save to dev-dependencies in your package.json       |\n| `npmE`  | `PATH=\"$(npm bin)\":\"$PATH\"`  | Run command from node_modules folder based on current directory |\n| `npmO`  | `npm outdated`               | Check which npm modules are outdated                            |\n| `npmV`  | `npm -v`                     | Check package versions                                          |\n| `npmL`  | `npm list`                   | List installed packages                                         |\n| `npmL0` | `npm ls --depth=0`           | List top-level installed packages                               |\n| `npmst` | `npm start`                  | Run npm start                                                   |\n| `npmt`  | `npm test`                   | Run npm test                                                    |\n| `npmR`  | `npm run`                    | Run npm scripts                                                 |\n| `npmP`  | `npm publish`                | Run npm publish                                                 |\n| `npmI`  | `npm init`                   | Run npm init                                                    |\n"
  },
  {
    "path": "plugins/npm/npm.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# Install dependencies globally\nalias npmg=\"npm i -g \"\n\n# npm package names are lowercase\n# Thus, we've used camelCase for the following aliases:\n\n# Install and save to dependencies in your package.json\n# npms is used by https://www.npmjs.com/package/npms\nalias npmS=\"npm i -S \"\n\n# Install and save to dev-dependencies in your package.json\n# npmd is used by https://github.com/dominictarr/npmd\nalias npmD=\"npm i -D \"\n\n# Execute command from node_modules folder based on current directory\n# i.e npmE gulp\nalias npmE='PATH=\"$(npm bin)\":\"$PATH\"'\n\n# Check which npm modules are outdated\nalias npmO=\"npm outdated\"\n\n# Check package versions\nalias npmV=\"npm -v\"\n\n# List packages\nalias npmL=\"npm list\"\n\n# List top-level installed packages\nalias npmL0=\"npm ls --depth=0\"\n\n# Run npm start\nalias npmst=\"npm start\"\n\n# Run npm test\nalias npmt=\"npm test\"\n\n# Run npm scripts\nalias npmR=\"npm run\"\n\n# Run npm publish\nalias npmP=\"npm publish\"\n\n# Run npm init\nalias npmI=\"npm init\"\n"
  },
  {
    "path": "plugins/nvm/README.md",
    "content": "# nvm plugin\n\nThis plugin automatically source nvm[1]\n\n## Installation\n\n### Install nvm\n\nLets install[2] the nvm without updaing shell config!\n\n```bash\nexport NVM_DIR=\"$HOME/.nvm\" && (\n  git clone https://github.com/nvm-sh/nvm.git \"$NVM_DIR\"\n  cd \"$NVM_DIR\"\n  git checkout `git describe --abbrev=0 --tags --match \"v[0-9]*\" $(git rev-list --tags --max-count=1)`\n) && \\. \"$NVM_DIR/nvm.sh\"\n```\n\n### Include nvm as plugin\n\n```bash\nplugins=(\n  git\n  nvm\n)\n```\n\n## nvm completion configuration\n\n```bash\ncompletions=(\n  git\n  composer\n  ssh\n  nvm\n)\n```\n\n## `.nvmrc` autoload\n\nIf set, the plugin will automatically load a node version when it finds a\n`.nvmrc` file[3] in the current working directory indicating which node version to load.\nThis can be done by adding the following to your `.bashrc`:\n\n```bash\nOMB_PLUGIN_NVM_AUTO_USE=true\n```\n\n[1]: https://github.com/nvm-sh/nvm\n[2]: https://github.com/nvm-sh/nvm#manual-install\n[3]: https://github.com/nvm-sh/nvm#nvmrc\n"
  },
  {
    "path": "plugins/nvm/nvm.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# Description: automatically load nvm\n#\n# @var[opt] OMB_PLUGIN_NVM_AUTO_USE enable .nvmrc autoload\n\n# Set NVM_DIR if it isn't already defined\n[[ -z \"$NVM_DIR\" ]] && export NVM_DIR=\"$HOME/.nvm\"\n\n\n# Try to load nvm only if command not already available\nif ! _omb_util_command_exists nvm; then\n  # shellcheck source=/dev/null\n  [[ -s $NVM_DIR/nvm.sh ]] && source \"$NVM_DIR/nvm.sh\"\nfi\n\n#------------------------------------------------------------------------------\n# Optional .nvmrc autoload\n#\n# This part is originally from the official nvm documentation (README.md).  The\n# current version is based on the following lines:\n#\n#   https://github.com/nvm-sh/nvm/blob/99352a64d25ce27d49ff6a449663ce3d7c12e5b5/README.md?plain=1#L686-L726\n#\n# Here is the license of the original project:\n#\n# The MIT License (MIT)\n#\n# Copyright (c) 2010 Tim Caswell\n# Copyright (c) 2014 Jordan Harband\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n#\nif _omb_util_command_exists nvm && [[ ${OMB_PLUGIN_NVM_AUTO_USE-} == true ]]; then\n  function _omb_plugin_nvm_find_up {\n    local path=$PWD\n    while [[ $path && ! -e $path/$1 ]]; do\n      path=${path%/*}\n    done\n    _omb_util_print \"$path\"\n  }\n\n  function _omb_plugin_nvm_cd {\n    command cd \"$@\" || return \"$?\"\n    local nvm_path=$(_omb_plugin_nvm_find_up .nvmrc)\n\n    # If there are no .nvmrc file, use the default nvm version\n    if [[ $nvm_path != *[^[:space:]]* ]]; then\n\n      local default_version\n      default_version=$(nvm version default)\n\n      # If there is no default version, set it to `node`\n      # This will use the latest version on your machine\n      if [[ $default_version == \"N/A\" ]]; then\n        nvm alias default node\n        default_version=$(nvm version default)\n      fi\n\n      # If the current version is not the default version, set it to use the default version\n      if [[ $(nvm current) != \"$default_version\" ]]; then\n        nvm use default\n      fi\n\n    elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then\n      local nvm_version\n      nvm_version=$(< \"$nvm_path\"/.nvmrc)\n\n      local locally_resolved_nvm_version\n      # `nvm ls` will check all locally-available versions.  If there are\n      # multiple matching versions, take the latest one.  Remove the `->` and\n      # `*` characters and spaces.  `locally_resolved_nvm_version` will be\n      # `N/A` if no local versions are found.\n      locally_resolved_nvm_version=$(nvm ls --no-colors \"$nvm_version\" | command sed -n '${s/->//g;s/[*[:space:]]//g;p;}')\n\n      # If it is not already installed, install it\n      if [[ $locally_resolved_nvm_version == N/A ]]; then\n        nvm install \"$nvm_version\"\n      elif [[ $(nvm current) != \"$locally_resolved_nvm_version\" ]]; then\n        nvm use \"$nvm_version\"\n      fi\n    fi\n  }\n  alias cd='_omb_plugin_nvm_cd'\nfi\n#------------------------------------------------------------------------------\n"
  },
  {
    "path": "plugins/progress/README.md",
    "content": "# Using the Progress Bar Script\n\n## Description\n\nThis script provides a simple progress bar TUI for the terminal platform. It allows you to visualize the progress of a task being executed in your shell script.\n\n## Usage\n\nYou can use the function `progress` from the interactive settings with Oh My\nBash.  The function handles printing of the progress bar.\n\n1. **Enable plugin:**\n\n  - Add the plugin name `progress` in the `plugins` array in `~/.bashrc`.\n\n  ```shell\n  # bashrc\n\n  plugins=(... progress)\n  ```\n\n2. **Invoke `progress` Function:**\n   - Within a shell function, call the `progress` function whenever you want to display the progress bar.\n   - Pass two parameters to the `progress` function:\n     - `value`: The progress percentage (0-100) of the task. Passing 0 will reset the progress bar status.\n     - `message`: Optional. A status message to display alongside the progress bar.\n\n   ```bash\n   # Example usage:\n   progress 25 \"Processing data...\"  # Displays a 25% progress bar with the status \"Processing data...\"\n   ```\n\nTo change the delay of the progress bar, please overwrite the `delay` function.\n\n```bash\n# Example: change the delay to 0.1 sec\nfunction delay { sleep 0.1; }\n```\n\n_⚠️ if you want to add only the plugin and not Oh My Bash, you can copy the file\n`progress.plugin.sh` to a place you like and source it in `~/.basrhc` (for\ninteractive uses) or in a shell script (for a standalone shell program).  You\nmay instead copy and paste the functions directly into a script file, in which\ncase the plugin will not receive updates and possible errors will have to be\nsolved by you_\n\n\n## Example\n\n```bash\n# bashrc\n\nfunction example {\n  # Example: Your code for the shell function here:  Invoke the progress\n  # function to display the progress bar as your function progresses.  This\n  # displays a 25% progress bar with the status \"Processing data...\":\n  progress 25 \"Processing data...\"\n```\n\nThis will visually represent the progress of your function's execution in the\nterminal. Adjust the `progress` function calls according to the progress of\nyour task.\n"
  },
  {
    "path": "plugins/progress/progress.plugin.sh",
    "content": "#! bash oh-my-bash.module\n############################---Description---###################################\n#                                                                              #\n# Summary       : Show a progress bar GUI on terminal platform                 #\n# Support       : destro.nnt@gmail.com                                         #\n# Created date  : Aug 12,2014                                                  #\n# Latest Modified date : Dec 19,2024                                           #\n#                                                                              #\n################################################################################\n\n############################---Usage---#########################################\n\n# Copy below functions (delay and progress fuctions) into your shell script directly\n# Then invoke progress function to show progress bar\n\n# In other way, you could import source indirectly then using. Nothing different\n\n################################################################################\n\n# Global variable to store progress value\n_omb_plugin_progress_value=0\n\n_omb_plugin_progress_clear_line=\n\n#\n# Description : delay executing script\n#\nfunction delay {\n  sleep 0.2\n}\n\n#\n# Description : print out executing progress\n#\nfunction progress {\n  local value=$1\n  local message=$2\n\n  if [[ ! $value ]]; then\n    _omb_util_print_lines \\\n      'Usage: progress <value> [message]' \\\n      '' \\\n      'Options:' \\\n      '  value    The value for the progress bar. Use 0 to reset.' \\\n      '  message  The optional message to display next to the progress bar.'\n    return 2\n  fi\n\n  if ((value < 0)); then\n    _omb_log_error \"invalid value: value' (expect: 0-100)\" >&2\n    return 2\n  fi\n\n  # Reset the progress value\n  if ((value == 0)); then\n    _omb_plugin_progress_value=0\n    return 0\n  fi\n\n  # Get a clear line escape sequence\n  local clear_line=$_omb_plugin_progress_clear_line\n  if [[ ! $clear_line ]]; then\n    clear_line=$(tput el 2>/dev/null || tput ce 2>/dev/null)\n    if [[ ! $clear_line ]]; then\n      clear_line=$'\\e[K'\n    fi\n    _omb_plugin_progress_clear_line=$clear_line\n  fi\n\n  if ((_omb_plugin_progress_value <=   0 && value >=   0)); then printf \"%s[............................] (0%%)  %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=   5 && value >=   5)); then printf \"%s[#...........................] (5%%)  %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  10 && value >=  10)); then printf \"%s[##..........................] (10%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  15 && value >=  15)); then printf \"%s[###.........................] (15%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  20 && value >=  20)); then printf \"%s[####........................] (20%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  25 && value >=  25)); then printf \"%s[#####.......................] (25%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  30 && value >=  30)); then printf \"%s[######......................] (30%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  35 && value >=  35)); then printf \"%s[#######.....................] (35%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  40 && value >=  40)); then printf \"%s[########....................] (40%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  45 && value >=  45)); then printf \"%s[#########...................] (45%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  50 && value >=  50)); then printf \"%s[##########..................] (50%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  55 && value >=  55)); then printf \"%s[###########.................] (55%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  60 && value >=  60)); then printf \"%s[############................] (60%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  65 && value >=  65)); then printf \"%s[#############...............] (65%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  70 && value >=  70)); then printf \"%s[##############..............] (70%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  75 && value >=  75)); then printf \"%s[################............] (75%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  80 && value >=  80)); then printf \"%s[##################..........] (80%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  85 && value >=  85)); then printf \"%s[#####################.......] (85%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  90 && value >=  90)); then printf \"%s[########################....] (90%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <=  95 && value >=  95)); then printf \"%s[###########################.] (95%%) %s\\r\" \"$clear_line\" \"$message\"; delay; fi\n  if ((_omb_plugin_progress_value <= 100 && value >= 100)); then\n    # Display the finished progress bar, and then clear with a new line.\n    printf \"%s[############################] (100%%) %s\\r\" \"$clear_line\" \"$message\"\n    delay\n    printf 'Done!%s\\n' \"$clear_line\"\n    value=0\n  fi\n\n  _omb_plugin_progress_value=$value\n}\n"
  },
  {
    "path": "plugins/pyenv/README.md",
    "content": "# pyenv plugin\n\nThe pyenv plugin will configure pyenv paths.\n"
  },
  {
    "path": "plugins/pyenv/pyenv.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# @chopnico 2021\n\nif [[ -d ~/.pyenv ]]; then\n  export PYENV_ROOT=~/.pyenv\n  export PATH=$PYENV_ROOT/bin${PATH:+:$PATH}\n  eval -- \"$(pyenv init --path)\"\n  eval -- \"$(pyenv init -)\"\nfi\n"
  },
  {
    "path": "plugins/rbenv/README.md",
    "content": "# rbenv plugin\n\nThe rbenv plugin will configure rbenv paths.\n\n## List of aliases\n\n| Alias  | Command          | Description                          |\n|--------|------------------|--------------------------------------|\n| rubies | 'rbenv versions' | shows all installed versions of ruby |\n"
  },
  {
    "path": "plugins/rbenv/rbenv.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nif [[ -d ~/.rbenv ]]; then\n  export RBENV_ROOT=~/.rbenv\n  export PATH=$RBENV_ROOT/bin:$PATH\n  eval -- \"$(rbenv init - bash)\"\n\n  alias rubies='rbenv versions'\nfi\n"
  },
  {
    "path": "plugins/sdkman/README.md",
    "content": "# sdkman plugin\n\nThis plugin will automatically source [sdkman](https://sdkman.io/).\n\n## Installation\n\n### Install sdkman\n\nLet's [install the sdkman](https://sdkman.io/install) without updating shell config!\n\n```bash\n$ curl -s \"https://get.sdkman.io?rcupdate=false\" | bash\n```\n\n### Include sdkman as plugin\n\n```bash\nplugins=(\n  git\n  sdkman\n)\n```\n"
  },
  {
    "path": "plugins/sdkman/sdkman.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Set SDKMAN_DIR if it isn't already defined\n[[ ${SDKMAN_DIR-} ]] || export SDKMAN_DIR=~/.sdkman\n\n# Try to load sdk only if the command is not available\nif ! _omb_util_command_exists sdk && [[ -s $SDKMAN_DIR/bin/sdkman-init.sh ]]; then\n  source \"$SDKMAN_DIR/bin/sdkman-init.sh\"\nfi\n"
  },
  {
    "path": "plugins/starship/README.md",
    "content": "# starship plugin\n\nInitializes [starship](https://github.com/starship/starship), the minimal, blazing-fast, and infinitely customizable prompt for any shell!\n\nTo use it, add `starship` to the plugins array in your `.bashrc` file:\n\n```bash\nplugins=(... starship)\n```\n\n**Note:** you have to [install starship](https://github.com/starship/starship?tab=readme-ov-file#step-1-install-starship) first.\n\n## ⚠️ ENABLING THIS PLUGIN WILL UNSET YOUR OSH_THEME VARIABLE\n"
  },
  {
    "path": "plugins/starship/starship.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Check if starship is installed\nif _omb_util_command_exists starship; then\n  # ignore oh-my-bash theme\n  unset -v OSH_THEME\n  eval -- \"$(starship init bash)\"\nelse\n  _omb_util_print '[oh-my-bash] starship not found, please install it from https://github.com/starship/starship' >&2\nfi\n"
  },
  {
    "path": "plugins/sudo/README.md",
    "content": "# sudo\n\nEasily prefix your current or previous commands with `sudo` by pressing <kbd>esc</kbd> twice.\n\nTo use it, add `sudo` to the plugins array in your bashrc file:\n\n```bash\nplugins=(... sudo)\n```\n\n## Usage\n\n### Current typed commands\n\nSay you have typed a long command and forgot to add `sudo` in front:\n\n```console\n$ apt-get install build-essential\n```\n\nBy pressing the <kbd>esc</kbd> key twice, you will have the same command with `sudo` prefixed without typing:\n\n```console\n$ sudo apt-get install build-essential\n```\n\n### Previous executed commands\n\nSay you want to delete a system file and denied:\n\n```console\n$ rm some-system-file.txt\n-su: some-system-file.txt: Permission denied\n$\n```\n\nBy pressing the <kbd>esc</kbd> key twice, you will have the same command with `sudo` prefixed without typing:\n\n```console\n$ rm some-system-file.txt\n-su: some-system-file.txt: Permission denied\n$ sudo rm some-system-file.txt\nPassword:\n$\n```\n\n## Credits\n\nInspired by ohmyzsh sudo plugin.\n\n"
  },
  {
    "path": "plugins/sudo/sudo.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_plugin_sudo__is_inserted {\n  [[ $READLINE_LINE = 'sudo '* ]]\n}\n\nfunction _omb_plugin_sudo_add_sudo {\n  if [[ ! $READLINE_LINE ]]; then\n    READLINE_LINE=$(fc -ln -1 | command sed 's/^[[:space:]]\\{1,\\}//')\n    READLINE_POINT=${#READLINE_LINE}\n    _omb_plugin_sudo__is_inserted && return\n  fi\n  if _omb_plugin_sudo__is_inserted; then\n    READLINE_LINE=${READLINE_LINE#sudo }\n    ((READLINE_POINT -= 5))\n  else\n    READLINE_LINE=\"sudo $READLINE_LINE\"\n    ((READLINE_POINT += 5))\n  fi\n  ((READLINE_POINT < 0)) && READLINE_POINT=0\n}\n\nbind -m emacs -x '\"\\e\\e\": _omb_plugin_sudo_add_sudo'\nbind -m vi-insert -x '\"\\e\\e\": _omb_plugin_sudo_add_sudo'\nbind -m vi-command -x '\"\\e\\e\": _omb_plugin_sudo_add_sudo'\n"
  },
  {
    "path": "plugins/tmux/README.md",
    "content": "# tmux\n\nThis plugin provides aliases for [tmux](https://github.com/tmux/tmux), the terminal multiplexer.\n\nTo use it, add `tmux` to the plugins array in your `.bashrc` file:\n\n```bash\nplugins=(... tmux)\n```\n\n## Aliases\n\n| Alias      | Command                              | Description                                                 |\n| ---------- | -------------------------------------| ----------------------------------------------------------- |\n| `ta`       | `tmux attach -t`                     | Attach to a named tmux session                              |\n| `tad`      | `tmux attach -d -t`                  | Detach and attach to a named tmux session                   |\n| `tds`      | `_omb_plugin_tmux_directory_session` | Create or attach to a session named after current directory |\n| `tkss`     | `tmux kill-session -t`               | Terminate a named running tmux session                      |\n| `tksv`     | `tmux kill-server`                   | Terminate all running tmux sessions                         |\n| `tl`       | `tmux list-sessions`                 | List running tmux sessions                                  |\n| `to`       | `tmux new-session -A -s`             | Create or attach to a named tmux session                    |\n| `ts`       | `tmux new-session -s`                | Create a new named tmux session                             |\n| `tmuxconf` | `$EDITOR ~/.tmux.conf`               | Open the tmux config file in your editor                    |\n"
  },
  {
    "path": "plugins/tmux/tmux.plugin.bash",
    "content": "#! bash oh-my-bash.module\n\n# tmux plugin: aliases for tmux, the terminal multiplexer.\n# Last reference implementation link:\n# https://github.com/ohmyzsh/ohmyzsh/blob/5c4f27b7166360bd23709f24642b247eac30a147/plugins/tmux/tmux.plugin.zsh\n#\n# Dropped features from upstream:\n#   - alias tmux -> _zsh_tmux_plugin_run (tmux wrapper with autostart/autoconnect)\n#   - function _zsh_tmux_plugin_run (autostart, autoconnect, autoquit, TERM fixing)\n#   - function _zsh_tmux_plugin_preexec (refresh tmux environment variables)\n#   - function _build_tmux_alias (zsh completion wiring)\n#   - ZSH_TMUX_* configuration variables (AUTOSTART, AUTOCONNECT, AUTOQUIT,\n#     AUTONAME_SESSION, AUTOREFRESH, CONFIG, DEFAULT_SESSION_NAME, DETACHED,\n#     FIXTERM, FIXTERM_WITHOUT_256COLOR, FIXTERM_WITH_256COLOR, ITERM2, UNICODE)\n#   - tmux.extra.conf, tmux.only.conf (TERM fix config files)\n\nif ! _omb_util_command_exists tmux; then\n  _omb_util_print '[oh-my-bash] tmux not found, please install it from https://github.com/tmux/tmux' >&2\n  return 0\nfi\n\n# Aliases\nalias ta='tmux attach -t'\nalias tad='tmux attach -d -t'\nalias tkss='tmux kill-session -t'\nalias tksv='tmux kill-server'\nalias tl='tmux list-sessions'\nalias ts='tmux new-session -s'\nalias to='tmux new-session -A -s'\nalias tmuxconf='${EDITOR:-vim} ~/.tmux.conf'\n\n# Create or attach to a tmux session named after the current directory.\nfunction _omb_plugin_tmux_directory_session {\n  local dir=${PWD##*/}\n  local md5\n  if _omb_util_command_exists md5sum; then\n    md5=$(printf '%s' \"$PWD\" | md5sum | cut -d ' ' -f 1)\n  elif _omb_util_command_exists md5; then\n    md5=$(printf '%s' \"$PWD\" | md5)\n  else\n    _omb_util_print '[oh-my-bash] tmux plugin: md5sum or md5 not found, tds requires one of them' >&2\n    return 1\n  fi\n  local session_name=\"${dir}-${md5:0:6}\"\n  tmux new-session -As \"$session_name\"\n}\n\nalias tds='_omb_plugin_tmux_directory_session'\n"
  },
  {
    "path": "plugins/tmux-autoattach/README.md",
    "content": "# tmux-autoattach.plugin\n\nThis tmux plugin will automatically attach a tmux session to your shell session.\n\n## Variables\n\n#### OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR\n\n| Setting            | Description                                                                                                                                                      |\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `detach` (default) | This will allow you to detach from the tmux screen without closing the terminal or shell session.                                                                |\n| `exit`             | This will completely close out your shell session, including your terminal, but keep your tmux sessions intact. This will also close your session if you detach. |\n\n## Common Enable Conditions\n\n*Note* If you prefer to manually start your desktop session using tools like `startx`, you may run into problems starting your desktop session inside of a tmux terminal. You can employ conditionals to control when this plugin should be enabled.\n\n**SSH**\n\n```bash\n[[ ${SSH_TTY-} ]] && plugins+=(tmux-autoattach)\n```\n\n**Wayland**\n\n```bash\n[[ ${DISPLAY_WAYLAND-} ]] && plugins+=(tmux-autoattach)\n```\n\n**X11**\n\n```bash\n[[ ${DISPLAY-} ]] && plugins+=(tmux-autoattach)\n```\n\n**Multiple**\n\n```bash\nif [[ ${DISPLAY-} || ${SSH-} ]]; then\n  plugins+=(tmux-autoattach)\nfi\n```\n"
  },
  {
    "path": "plugins/tmux-autoattach/tmux-autoattach.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# @chopnico 2021\n#\n# tmux-autoattach.plugin.sh\n#\n# A tmux plugin that will automatically attach itself to a bash session.\n\n[[ ${OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR-} ]] || OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR=\"detach\"\n\n# Note on the option \"-As0\": tmux-3.0a and before does not attach to a session\n# as far as the session name is not given by \"-s SESSION_NAME\" [1].  From\n# tmux-3.1, it attaches to an existing session, if any, without specifying the\n# session.  Here, we assume the session name to be \"0\", which is the default\n# name for the first session.\n#\n# [1] https://github.com/ohmybash/oh-my-bash/pull/332\n\nfunction _osh_plugin_tmux_autoattach_exit {\n  [[ ! ${TMUX-} ]] && tmux -2u new -As0 && exit\n}\n\nfunction _osh_plugin_tmux_autoattach_detach {\n  [[ ! ${TMUX-} ]] && tmux -2u new -As0\n}\n\ncase $OSH_PLUGIN_TMUX_AUTOATTACH_BEHAVIOR in\n'exit')\n  _osh_plugin_tmux_autoattach_exit\n  ;;\n'detach' | *)\n  _osh_plugin_tmux_autoattach_detach\n  ;;\nesac\n"
  },
  {
    "path": "plugins/vagrant/README.md",
    "content": "# vagrant plugin\n\n## Introduction\n\nThe `vagrant plugin` adds several useful aliases for [vagrant](https://www.vagrantup.com/downloads) commands and [aliases](#aliases).\n\nTo use them, add `vagrant` to the `plugins` array of your bashrc file:\n\n```bash\nplugins=(... vagrant)\n```\n\n## Aliases\n\n| Command            | Description                                                  |\n|:-------------------|:-------------------------------------------------------------|\n| `va`               | command `vagrant`                                            |\n| `vaver`            | Show the vagrant version in this host                        |\n| `vaconf`           | command `vagrant ssh-config`                                 |\n| `vastat`           | command `vagrant global-status`                              |\n| `vacheck`          | command `vagrant validate`                                   |\n| `vaport`           | command `vagrant port`                                       |\n| `vapvm`            | command `vagrant plugin install *[ virtualbox \\| libvirt ]*` |\n| `vapi`             | command `vagrant plugin install *[ package ]*`               |\n| `vapr`             | command `vagrant plugin uninstall *[ package ]*`             |\n| `vau`              | command `vagrant up *[ virtualbox \\| libvirt ]*`             |\n| `vah`              | command `vagrant halt`                                       |\n| `vat`              | command `vagrant destroy -f`                                 |\n| `vai`              | command `vagrant init -m *[ centos/7 ]*`                     |\n| `varel`            | command `vagrant reload`                                     |\n| `vassh`            | command `vagrant ssh *[ machine1 ]*`                         |\n| `vaba`             | command `vagrant box add`                                    |\n| `vabr`             | command `vagrant box remove`                                 |\n| `vabl`             | command `vagrant box list`                                   |\n"
  },
  {
    "path": "plugins/vagrant/vagrant.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# Author: Enzo Arroyo <enzo@arroyof.com>\n\n# Functions\nfunction vagrant-version() {\n  vagrant --version\n}\n\nfunction vagrant-init() {\n  if [[ $1 ]]; then\n    _omb_util_print \"Vagrant init for : $1 Creating....\"\n    vagrant init -m \"$1\"\n  else\n    _omb_util_print \"Usage : vai <box name>\" >&2\n    _omb_util_print \"Example : vai centos/7\" >&2\n    return 2\n  fi\n}\n\nfunction vagrant-up() {\n  if [[ $1 ]]; then\n    _omb_util_print \"Vagrant up for provider : $1 Running....\"\n    vagrant up --provider \"$1\"\n  else\n    _omb_util_print \"Vagrant up for provider : virtualbox Running....\"\n    vagrant up\n  fi\n}\n\nfunction vagrant-plugin-vm() {\n  case \"$1\" in\n  \"virtualbox\")\n    _omb_util_print \"Vagrant plugin install for provider : $1 Running....\"\n    vagrant plugin install vagrant-vbguest\n    ;;\n  \"libvirt\")\n    _omb_util_print \"Vagrant plugin install for provider : $1 Running....\"\n    vagrant plugin install vagrant-libvirt\n    ;;\n  *)\n    _omb_util_print \"Usage : vapvm <provider name>\" >&2\n    _omb_util_print \"Example : vapvm virtualbox\" >&2\n    return 2\n    ;;\n  esac\n}\n\nfunction vagrant-status() {\n  if [[ -f Vagrantfile ]]; then\n    vagrant status\n  else\n    vagrant global-status\n  fi\n}\n\nfunction vagrant-ssh() {\n  local VMCOUNT\n  VMCOUNT=$(vagrant status | grep -c running)\n  local VMDEFAULT\n  VMDEFAULT=$(vagrant status | grep -w default | grep -c running)\n\n  if ((VMDEFAULT == 1)); then\n    if [[ $1 ]]; then\n      _omb_util_print \"SKIP : $1 Server....\"\n    fi\n    _omb_util_print \"Login to : default Server....\"\n    vagrant ssh\n  elif [[ $1 ]] && ((VMCOUNT > 1)); then\n    _omb_util_print \"Login to : $1 Server....\"\n    vagrant ssh \"$1\"\n  elif ((VMCOUNT == 0)); then\n    _omb_util_print \"Seems like that not there running servers\" >&2\n    return 1\n  else\n    _omb_util_put $'Please choose a server from this list:\\n\\n'\n    vagrant status | awk '/running/{print $1}'\n    _omb_util_put $'\\nThen fill: vagrant ssh [ option ]\\n'\n  fi\n}\n\n\n# Aliases\nalias va='vagrant'\nalias vaver='vagrant-version'\nalias vaconf='vagrant ssh-config'\nalias vastat='vagrant-status'\nalias vacheck='vagrant validate'\nalias vaport='vagrant port'\nalias vapvm='vagrant-plugin-vm'\nalias vapi='vagrant plugin install'\nalias vapr='vagrant plugin uninstall'\nalias vau='vagrant-up'\nalias vah='vagrant halt'\nalias vat='vagrant destroy -f'\nalias vai='vagrant-init'\nalias varel='vagrant reload'\nalias vassh='vagrant-ssh'\nalias vaba='vagrant box add'\nalias vabr='vagrant box remove'\nalias vavl='vagrant box list'\n"
  },
  {
    "path": "plugins/virtualenvwrapper/README.md",
    "content": "# virtualenvwrapper plugin\n\nThe virtualenvwrapper plugin enables virtualenvwrapper functions in bash.\n\nTo use it, install\n[virtualenvwrapper](https://github.com/python-virtualenvwrapper/virtualenvwrapper) and add\nvirtualenvwrapper to the plugins array of your bashrc file:\n\n```bash\nplugins=(... virtualenvwrapper)\n```\n"
  },
  {
    "path": "plugins/virtualenvwrapper/virtualenvwrapper.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Check if virtualenvwrapper is installed\nif _omb_util_command_exists virtualenvwrapper.sh; then\n  # Source the virtualenvwrapper script\n  source virtualenvwrapper.sh\nelse\n  _omb_util_print '[oh-my-bash] virtualenvwrapper not found, please install it from https://github.com/python-virtualenvwrapper/virtualenvwrapper' >&2\nfi\n"
  },
  {
    "path": "plugins/xterm/README.md",
    "content": "# Xterm Plugin\n\n## Description\n\nThis script automatically sets your xterm title with host and location information. It dynamically updates the title to reflect the current user, host, directory, and command being executed.\n\n## Source\n\nYou can find the original source of this script [here](https://github.com/Bash-it/bash-it/blob/bf2034d13d/plugins/available/xterm.plugin.bash).\n\n## Variables\n\n- `PROMPT_CHAR` (optional): This variable is shared with powerline.\n- `OMB_PLUGIN_XTERM_SHORT_TERM_LINE` (optional): Controls whether to shorten the directory name in the title.\n- `OMB_PLUGIN_XTERM_SHORT_USER` (optional): Overrides the default user name.\n- `OMB_PLUGIN_XTERM_SHORT_HOSTNAME` (optional): Overrides the default hostname.\n\n## Functions\n\n1. **`set_xterm_title`**\n   - Sets the xterm title with the provided string.\n\n## Usage\n\n1. **Enable plugin:**\n\n  - Add the plugin name `xterm` in the `plugins` array in `~/.bashrc`.\n\n  ```shell\n  # bashrc\n\n  plugins=(... xterm)\n  ```\n\n2. **Customization:**\n\n  - Modify the variables and functions as needed to fit your preferences.\n\nThe xterm title will be automatically updated based on your commands and directory changes.\n\n_⚠️ if you want to add only this plugin and not Oh My Bash, you can copy the\nfile `xterm.plugin.bash` in a place you like and edit the file to comment out\nthe line `_omb_module_require plugin:bash-preexec`.  Then, source\n`xterm.plugin.bash` in `~/.basrhc` (for interactive uses) or in a shell script\n(for a standalone shell program).  To make the xterm title be automatically\nupdated, you also need to get a copy of `bash-preexec.sh` (a not up-to-date one\nis found in the repository of Oh My Bash at `tools/bash-preexec.sh`) and source\nit as well.  You may instead copy and paste the functions directly into a\nscript file, in which case the plugin will not receive updates and possible\nerrors will have to be solved by you_\n\n## Dependencies\n\nThis plugin relies on `bash-preexec.sh` for the preexec and precmd hooks.\n"
  },
  {
    "path": "plugins/xterm/xterm.plugin.bash",
    "content": "#! bash oh-my-bash.module\n# Description: automatically set your xterm title with host and location info'\n# Source: https://github.com/Bash-it/bash-it/blob/bf2034d13d/plugins/available/xterm.plugin.bash\n#\n# @var[opt] PROMPT_CHAR ... This variable is shared with powerline\n# @var[opt] OMB_PLUGIN_XTERM_SHORT_TERM_LINE\n# @var[opt] OMB_PLUGIN_XTERM_SHORT_USER\n# @var[opt] OMB_PLUGIN_XTERM_SHORT_HOSTNAME\n#\n\n_omb_module_require plugin:bash-preexec\n\nfunction _omb_plugin_xterm_short_dirname {\n  local dir_name=${PWD/~/\\~}\n  if [[ ${OMB_PLUGIN_XTERM_SHORT_TERM_LINE-} == true ]] && ((${#dir_name} > 8)); then\n    dir_name=${dir_name##*/}\n  fi\n  _omb_util_print \"$dir_name\"\n}\n\nfunction _omb_plugin_xterm_short_command {\n  local input_command=\"$*\"\n  if [[ ${OMB_PLUGIN_XTERM_SHORT_TERM_LINE-} == true ]] && ((${#input_command} > 8)); then\n    input_command=${input_command%% *}\n  fi\n  _omb_util_print \"$input_command\"\n}\n\nfunction _omb_plugin_xterm_set_title {\n  local title=${1:-terminal}\n  printf '\\e]0;%s\\e\\\\' \"$title\"\n}\n\nfunction _omb_plugin_xterm_precmd_title {\n  local user=${OMB_PLUGIN_XTERM_SHORT_USER:-$USER}\n  local host=${OMB_PLUGIN_XTERM_SHORT_HOSTNAME:-$HOSTNAME}\n  _omb_plugin_xterm_set_title \"$user@$host $(_omb_plugin_xterm_short_dirname) ${PROMPT_CHAR:-\\$}\"\n}\n\nfunction _omb_plugin_xterm_preexec_title {\n  local command_line=${BASH_COMMAND:-${1:-}}\n  local directory_name=$(_omb_plugin_xterm_short_dirname)\n  local short_command=$(_omb_plugin_xterm_short_command \"$command_line\")\n  local user=${OMB_PLUGIN_XTERM_SHORT_USER:-$USER}\n  local host=${OMB_PLUGIN_XTERM_SHORT_HOSTNAME:-$HOSTNAME}\n  _omb_plugin_xterm_set_title \"$short_command {$directory_name} ($user@$host)\"\n}\n\nfunction set_xterm_title { _omb_plugin_xterm_set_title \"$@\"; }\n\nprecmd_functions+=(_omb_plugin_xterm_precmd_title)\npreexec_functions+=(_omb_plugin_xterm_preexec_title)\n"
  },
  {
    "path": "plugins/zellij-autoattach/README.md",
    "content": "# zellij-autoattach.plugin\n\nThis zellij plugin will automatically attach a zellij session to your shell session.\n\n## Variables\n\n#### OSH_PLUGIN_ZELLIJ_AUTOATTACH_BEHAVIOR\n\n| Setting            | Description                                                                                                                                                      |\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `detach` (default) | This will allow you to detach from the zellij screen without closing the terminal or shell session.                                                                |\n| `exit`             | This will completely close out your shell session, including your terminal, but keep your zellij sessions intact. This will also close your session if you detach. |\n\n## Common Enable Conditions\n\n*Note* If you prefer to manually start your desktop session using tools like `startx`, you may run into problems starting your desktop session inside of a zellij terminal. You can employ conditionals to control when this plugin should be enabled.\n\n**SSH**\n\n```bash\n[[ ${SSH_TTY-} ]] && plugins+=(zellij-autoattach)\n```\n\n**Wayland**\n\n```bash\n[[ ${DISPLAY_WAYLAND-} ]] && plugins+=(zellij-autoattach)\n```\n\n**X11**\n\n```bash\n[[ ${DISPLAY-} ]] && plugins+=(zellij-autoattach)\n```\n\n**Multiple**\n\n```bash\nif [[ ${DISPLAY-} || ${SSH-} ]]; then\n  plugins+=(zellij-autoattach)\nfi\n```\n"
  },
  {
    "path": "plugins/zellij-autoattach/zellij-autoattach.plugin.sh",
    "content": "#! bash oh-my-bash.module\n# @chopnico 2021\n# @NN--- 2025\n#\n# zellij-autoattach.plugin.sh\n#\n# A zellij plugin that will automatically attach itself to a bash session.\n# This plugin is derived from tmux-autoattach.plugin.sh.\n\n[[ ${OSH_PLUGIN_ZELLIJ_AUTOATTACH_BEHAVIOR-} ]] || OSH_PLUGIN_ZELLIJ_AUTOATTACH_BEHAVIOR=\"detach\"\n\nfunction _osh_plugin_zellij_autoattach_exit {\n  [[ ! ${ZELLIJ-} ]] && zellij attach --create default && exit\n}\n\nfunction _osh_plugin_zellij_autoattach_detach {\n  [[ ! ${ZELLIJ-} ]] && zellij attach --create default\n}\n\ncase $OSH_PLUGIN_ZELLIJ_AUTOATTACH_BEHAVIOR in\n'exit')\n  _osh_plugin_zellij_autoattach_exit\n  ;;\n'detach' | *)\n  _osh_plugin_zellij_autoattach_detach\n  ;;\nesac\n"
  },
  {
    "path": "plugins/zoxide/README.md",
    "content": "# zoxide plugin\n\nInitializes [zoxide](https://github.com/ajeetdsouza/zoxide), a smarter cd\ncommand for your terminal.\n\n![Tutorial](https://raw.githubusercontent.com/ajeetdsouza/zoxide/97dc08347d9dbf5b5a4516b79e0ac27366b962ce/contrib/tutorial.webp)\n\nTo use it, add `zoxide` to the plugins array in your `.bashrc` file:\n\n```bash\nplugins=(... zoxide)\n```\n\n**Note:** you have to [install zoxide](https://github.com/ajeetdsouza/zoxide#step-1-install-zoxide) first.\n"
  },
  {
    "path": "plugins/zoxide/zoxide.plugin.sh",
    "content": "#! bash oh-my-bash.module\n\n# Check if zoxide is installed\nif _omb_util_command_exists zoxide; then\n  eval -- \"$(zoxide init bash)\"\nelse\n  _omb_util_print '[oh-my-bash] zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide' >&2\nfi\n"
  },
  {
    "path": "templates/bash_profile.osh-template",
    "content": "# .bash_profile -*- mode: sh -*-\n\n# Load login settings and environment variables\nif [[ -f ~/.profile ]]; then\n  source ~/.profile\nfi\n\n# Load interactive settings\nif [[ -f ~/.bashrc ]]; then\n  source ~/.bashrc\nfi\n"
  },
  {
    "path": "templates/bashrc.osh-template",
    "content": "# Enable the subsequent settings only in interactive sessions\ncase $- in\n  *i*) ;;\n    *) return;;\nesac\n\n# Path to your oh-my-bash installation.\nexport OSH=~/.oh-my-bash\n\n# Set name of the theme to load. Optionally, if you set this to \"random\"\n# it'll load a random theme each time that oh-my-bash is loaded.\nOSH_THEME=\"font\"\n\n# If you set OSH_THEME to \"random\", you can ignore themes you don't like.\n# OMB_THEME_RANDOM_IGNORED=(\"powerbash10k\" \"wanelo\")\n# You can also specify the list from which a theme is randomly selected:\n# OMB_THEME_RANDOM_CANDIDATES=(\"font\" \"powerline-light\" \"minimal\")\n\n# Uncomment the following line to use case-sensitive completion.\n# OMB_CASE_SENSITIVE=\"true\"\n\n# Uncomment the following line to use hyphen-insensitive completion. Case\n# sensitive completion must be off. _ and - will be interchangeable.\n# OMB_HYPHEN_SENSITIVE=\"false\"\n\n# Uncomment the following line to disable bi-weekly auto-update checks.\n# DISABLE_AUTO_UPDATE=\"true\"\n\n# Uncomment the following line to change how often to auto-update (in days).\n# export UPDATE_OSH_DAYS=13\n\n# Uncomment the following line to disable colors in ls.\n# DISABLE_LS_COLORS=\"true\"\n\n# Uncomment the following line to disable auto-setting terminal title.\n# DISABLE_AUTO_TITLE=\"true\"\n\n# Uncomment the following line to enable command auto-correction.\n# ENABLE_CORRECTION=\"true\"\n\n# Uncomment the following line to display red dots whilst waiting for completion.\n# COMPLETION_WAITING_DOTS=\"true\"\n\n# Uncomment the following line if you want to disable marking untracked files\n# under VCS as dirty. This makes repository status check for large repositories\n# much, much faster.\n# DISABLE_UNTRACKED_FILES_DIRTY=\"true\"\n\n# Uncomment the following line if you don't want the repository to be considered dirty\n# if there are untracked files.\n# SCM_GIT_DISABLE_UNTRACKED_DIRTY=\"true\"\n\n# Uncomment the following line if you want to completely ignore the presence\n# of untracked files in the repository.\n# SCM_GIT_IGNORE_UNTRACKED=\"true\"\n\n# Uncomment the following line if you want to change the command execution time\n# stamp shown in the history command output.  One of the following values can\n# be used to specify the timestamp format.\n# * 'mm/dd/yyyy'     # mm/dd/yyyy + time\n# * 'dd.mm.yyyy'     # dd.mm.yyyy + time\n# * 'yyyy-mm-dd'     # yyyy-mm-dd + time\n# * '[mm/dd/yyyy]'   # [mm/dd/yyyy] + [time] with colors\n# * '[dd.mm.yyyy]'   # [dd.mm.yyyy] + [time] with colors\n# * '[yyyy-mm-dd]'   # [yyyy-mm-dd] + [time] with colors\n# If not set, the default value is 'yyyy-mm-dd'.\n# HIST_STAMPS='yyyy-mm-dd'\n\n# Uncomment the following line if you do not want OMB to overwrite the existing\n# aliases by the default OMB aliases defined in lib/*.sh\n# OMB_DEFAULT_ALIASES=\"check\"\n\n# Would you like to use another custom folder than $OSH/custom?\n# OSH_CUSTOM=/path/to/new-custom-folder\n\n# To disable the uses of \"sudo\" by oh-my-bash, please set \"false\" to\n# this variable.  The default behavior for the empty value is \"true\".\nOMB_USE_SUDO=true\n\n# To enable/disable display of Python virtualenv and condaenv\n# OMB_PROMPT_SHOW_PYTHON_VENV=true  # enable\n# OMB_PROMPT_SHOW_PYTHON_VENV=false # disable\n\n# To enable/disable Spack environment information\n# OMB_PROMPT_SHOW_SPACK_ENV=true  # enable\n# OMB_PROMPT_SHOW_SPACK_ENV=false # disable\n\n# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)\n# Custom completions may be added to ~/.oh-my-bash/custom/completions/\n# Example format: completions=(ssh git bundler gem pip pip3)\n# Add wisely, as too many completions slow down shell startup.\ncompletions=(\n  git\n  composer\n  ssh\n)\n\n# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)\n# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/\n# Example format: aliases=(vagrant composer git-avh)\n# Add wisely, as too many aliases slow down shell startup.\naliases=(\n  general\n)\n\n# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)\n# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/\n# Example format: plugins=(rails git textmate ruby lighthouse)\n# Add wisely, as too many plugins slow down shell startup.\nplugins=(\n  git\n  bashmarks\n)\n\n# Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)\n# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/\n# Example format:\n#  if [ \"$DISPLAY\" ] || [ \"$SSH\" ]; then\n#      plugins+=(tmux-autoattach)\n#  fi\n\n# If you want to reduce the initialization cost of the \"tput\" command to\n# initialize color escape sequences, you can uncomment the following setting.\n# This disables the use of the \"tput\" command, and the escape sequences are\n# initialized to be the ANSI version:\n#\n#OMB_TERM_USE_TPUT=no\n\nsource \"$OSH\"/oh-my-bash.sh\n\n# User configuration\n# export MANPATH=\"/usr/local/man:$MANPATH\"\n\n# You may need to manually set your language environment\n# export LANG=en_US.UTF-8\n\n# Preferred editor for local and remote sessions\n# if [[ -n $SSH_CONNECTION ]]; then\n#   export EDITOR='vim'\n# else\n#   export EDITOR='mvim'\n# fi\n\n# Compilation flags\n# export ARCHFLAGS=\"-arch x86_64\"\n\n# ssh\n# export SSH_KEY_PATH=\"~/.ssh/rsa_id\"\n\n# Set personal aliases, overriding those provided by oh-my-bash libs,\n# plugins, and themes. Aliases can be placed here, though oh-my-bash\n# users are encouraged to define aliases within the OSH_CUSTOM folder.\n# For a full list of active aliases, run `alias`.\n#\n# Example aliases\n# alias bashconfig=\"mate ~/.bashrc\"\n# alias ohmybash=\"mate ~/.oh-my-bash\"\n"
  },
  {
    "path": "themes/90210/90210.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\n\n# Nicely formatted terminal prompt\nfunction _omb_theme_PROMPT_COMMAND(){\n  local python_venv\n  _omb_prompt_get_python_venv\n\n  PS1=\"\\n${_omb_prompt_bold_gray}[${_omb_prompt_navy}\\@${_omb_prompt_bold_gray}]-\"\n  PS1+=\"${_omb_prompt_bold_gray}[${_omb_prompt_green}\\u${_omb_prompt_olive}@${_omb_prompt_green}\\h${_omb_prompt_bold_gray}]-\"\n  PS1+=\"${_omb_prompt_bold_gray}[${_omb_prompt_purple}\\w${_omb_prompt_bold_gray}]-${python_venv}\"\n  PS1+=\"$(scm_prompt_info)\\n${_omb_prompt_reset_color}\\$ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/90210/README.md",
    "content": "# 90210 💜\n\n![theme 90210](90210-dark.png)\n\n- **Brown**: Used to indicate a dirty state in source control management (SCM) and Git prompts.\n- **Bold Green**: Signifies a clean state in SCM and Git prompts.\n- **Green**: Used as a prefix and suffix in SCM and Git prompts.\n- **Bold Gray**: Forms the main structure of the prompt, displaying time, user, host, and current working directory.\n- **Navy**: Represents the time in the prompt.\n- **Green (again)**: Denotes the user and host in the prompt.\n- **Olive**: Marks the separation between the username and hostname.\n- **Purple**: Indicates the current working directory in the prompt.\n\nThese colors help provide visual clues about the status of the source control repository and organize information effectively within the terminal prompt.\n"
  },
  {
    "path": "themes/THEMES.md",
    "content": "## `90210`\n\n[![](90210/90210-dark.png)](90210/90210-dark.png)\n\n## `ab+simple`\n\n[![](absimple/absimple-bash.png)](absimple/absimple-bash.png)\n\n## `agnoster`\n\n[![](agnoster/agnoster-bash-sshot.png)](agnoster/agnoster-bash-sshot.png)\n[![](agnoster/agnoster-dark.png)](agnoster/agnoster-dark.png)\n\n## `axin`\n\n[![](axin/axin-dark.png)](axin/axin-dark.png)\n\n## `bakke`\n\n[![](bakke/bakke-dark.png)](bakke/bakke-dark.png)\n\n## `binaryanomaly`\n\n[![](binaryanomaly/binaryanomaly-dark.png)](binaryanomaly/binaryanomaly-dark.png)\n\n## `bobby`\n\n[![](bobby/bobby-dark.png)](bobby/bobby-dark.png)\n\n## `bobby-python`\n\n[![](bobby-python/bobby-python-dark.png)](bobby-python/bobby-python-dark.png)\n\n## `brainy`\n\n[![](brainy/brainy-dark.png)](brainy/brainy-dark.png)\n\n## `brunton`\n\n[![](brunton/brunton-dark.png)](brunton/brunton-dark.png)\n\n## `candy`\n\n[![](candy/candy-dark.png)](candy/candy-dark.png)\n\n## `clean`\n\n[![](clean/clean-dark.png)](clean/clean-dark.png)\n\n## `cooperkid`\n\n[![](cooperkid/cooperkid-dark.png)](cooperkid/cooperkid-dark.png)\n\n## `copied-duru`\n\n[![](copied-duru/copied-duru-dark.png)](copied-duru/copied-duru-dark.png)\n\n## `cupcake`\n\n[![](cupcake/cupcake-dark.png)](cupcake/cupcake-dark.png)\n\n## `demula`\n\n[![](demula/demula-dark.png)](demula/demula-dark.png)\n\n## `developer`\n\n[![](developer/developer_theme_2024_02_09.png)](developer/developer_theme_2024_02_09.png)\n\n## `dos`\n\n[![](dos/dos-dark.png)](dos/dos-dark.png)\n\n## `doubletime`\n\n[![](doubletime/doubletime-dark.png)](doubletime/doubletime-dark.png)\n\n## `doubletime_multiline`\n\n[![](doubletime_multiline/doubletime_multiline-dark.png)](doubletime_multiline/doubletime_multiline-dark.png)\n\n## `doubletime_multiline_pyonly`\n\n[![](doubletime_multiline_pyonly/doubletime_multiline_pyonly-dark.png)](doubletime_multiline_pyonly/doubletime_multiline_pyonly-dark.png)\n\n## `dulcie`\n\n[![](dulcie/dulcie-dark.png)](dulcie/dulcie-dark.png)\n\n## `duru`\n\n[![](duru/duru-dark.png)](duru/duru-dark.png)\n\n## `edsonarios`\n\n[![](edsonarios/edsonarios-dark.png)](edsonarios/edsonarios-dark.png)\n\n## `emperor`\n\n[![](emperor/emperor-dark.png)](emperor/emperor-dark.png)\n\n## `envy`\n\n[![](envy/envy-dark.png)](envy/envy-dark.png)\n\n## `font`\n\n[![](font/font-dark.png)](font/font-dark.png)\n\n## `gallifrey`\n\n[![](gallifrey/gallifrey-dark.png)](gallifrey/gallifrey-dark.png)\n\n## `half-life`\n\n[![](half-life/half-life.theme.png)](half-life/half-life.theme.png)\n\n## `hawaii50`\n\n[![](hawaii50/hawaii50-dark.png)](hawaii50/hawaii50-dark.png)\n\n## `ht`\n\n[![](ht/ht-dark.png)](ht/ht-dark.png)\n\n## `iterate`\n\n[![](iterate/iterate-dark.png)](iterate/iterate-dark.png)\n\n## `kitsune`\n\n[![](kitsune/kitsune-dark.png)](kitsune/kitsune-dark.png)\n\n## `lambda`\n\n[![](lambda/lambda-dark.png)](lambda/lambda-dark.png)\n\n## `luan`\n\n[![](luan/luan-dark.png)](luan/luan-dark.png)\n\n## `lucky`\n\n[![](lucky/lucky-dark.png)](lucky/lucky-dark.png)\n\n## `mairan`\n\n[![](mairan/mairan-dark.png)](mairan/mairan-dark.png)\n\n## `mbriggs`\n\n[![](mbriggs/mbriggs-dark.png)](mbriggs/mbriggs-dark.png)\n\n## `minimal`\n\n[![](minimal/minimal-dark.png)](minimal/minimal-dark.png)\n\n## `minimal-gh`\n\n[![](minimal-gh/minimal-gh-dark.png)](minimal-gh/minimal-gh-dark.png)\n\n## `modern`\n\n[![](modern/modern-dark.png)](modern/modern-dark.png)\n\n## `modern-t`\n\n[![](modern-t/modern-t-dark.png)](modern-t/modern-t-dark.png)\n\n## `morris`\n\n[![](morris/morris-dark.png)](morris/morris-dark.png)\n\n## `n0qorg`\n\n[![](n0qorg/n0qorg-dark.png)](n0qorg/n0qorg-dark.png)\n\n## `nekolight`\n\n[![](nekolight/nekolight-dark.jpg)](nekolight/nekolight-dark.jpg)\n\n## `nekonight`\n\n[![](nekonight/nekonight-dark.jpg)](nekonight/nekonight-dark.jpg)\n\n## `nekonight_moon`\n\n[![](nekonight_moon/nekonight_moon-dark.jpg)](nekonight_moon/nekonight_moon-dark.jpg)\n\n## `nwinkler`\n\n[![](nwinkler/nwinkler-dark.png)](nwinkler/nwinkler-dark.png)\n\n## `nwinkler_random_colors`\n\n[![](nwinkler_random_colors/screenshot.png)](nwinkler_random_colors/screenshot.png)\n[![](nwinkler_random_colors/nwinkler_random_colors-dark.png)](nwinkler_random_colors/nwinkler_random_colors-dark.png)\n\n## `pete`\n\n[![](pete/pete-dark.png)](pete/pete-dark.png)\n\n## `powerbash10k`\n\n[![](powerbash10k/powerbash10k-dark.png)](powerbash10k/powerbash10k-dark.png)\n\n## `powerline`\n\n[![](powerline/powerline-dark.png)](powerline/powerline-dark.png)\n\n## `powerline-icon`\n\n[![](powerline-icon/powerline-icon-dark.png)](powerline-icon/powerline-icon-dark.png)\n\n## `powerline-light`\n\n[![](powerline-light/powerline-light.png)](powerline-light/powerline-light.png)\n\n## `powerline-multiline`\n\n[![](powerline-multiline/powerline-multiline-dark.png)](powerline-multiline/powerline-multiline-dark.png)\n\n## `powerline-naked`\n\n[![](powerline-naked/powerline-naked-dark.png)](powerline-naked/powerline-naked-dark.png)\n\n## `powerline-plain`\n\n[![](powerline-plain/powerline-plain-dark.png)](powerline-plain/powerline-plain-dark.png)\n\n## `powerline-wizard`\n\n[![](powerline-wizard/powerline-wizard-dark.png)](powerline-wizard/powerline-wizard-dark.png)\n\n## `primer`\n\n[![](primer/primer-dark.png)](primer/primer-dark.png)\n\n## `pro`\n\n[![](pro/pro-dark.png)](pro/pro-dark.png)\n\n## `pure`\n\n[![](pure/pure-dark.png)](pure/pure-dark.png)\n\n## `purity`\n\n[![](purity/purity-dark.png)](purity/purity-dark.png)\n\n## `pzq`\n\n[![](pzq/pzq-dark.png)](pzq/pzq-dark.png)\n\n## `rainbowbrite`\n\n[![](rainbowbrite/rainbowbrite-dark.png)](rainbowbrite/rainbowbrite-dark.png)\n\n## `rana`\n\n[![](rana/rana-dark.png)](rana/rana-dark.png)\n\n## `rjorgenson`\n\n[![](rjorgenson/rjorgenson-dark.png)](rjorgenson/rjorgenson-dark.png)\n\n## `robbyrussell`\n\n[![](robbyrussell/robbyrussell-dark.png)](robbyrussell/robbyrussell-dark.png)\n\n## `roderik`\n\n[![](roderik/roderik-dark.png)](roderik/roderik-dark.png)\n\n## `rr`\n\n[![](rr/rr-dark.png)](rr/rr-dark.png)\n\n## `sexy`\n\n[![](sexy/sexy-dark.png)](sexy/sexy-dark.png)\n\n## `simple`\n\n[![](simple/simple-dark.png)](simple/simple-dark.png)\n\n## `sirup`\n\n[![](sirup/sirup-dark.png)](sirup/sirup-dark.png)\n\n## `slick`\n\n[![](slick/slick-dark.png)](slick/slick-dark.png)\n\n## `standard`\n\n[![](standard/standard-dark.png)](standard/standard-dark.png)\n\n## `tonka`\n\n[![](tonka/tonka-dark.png)](tonka/tonka-dark.png)\n\n## `tonotdo`\n\n[![](tonotdo/tonotdo-dark.png)](tonotdo/tonotdo-dark.png)\n\n## `tylenol`\n\n[![](tylenol/tylenol-dark.png)](tylenol/tylenol-dark.png)\n\n## `vscode`\n\n[![](vscode/vscode-dark.png)](vscode/vscode-dark.png)\n\n## `wanelo`\n\n[![](wanelo/wanelo-dark.png)](wanelo/wanelo-dark.png)\n\n## `zitron`\n\n[![](zitron/zitron-dark.png)](zitron/zitron-dark.png)\n\n## `zork`\n\n[![](zork/zork-dark.png)](zork/zork-dark.png)\n"
  },
  {
    "path": "themes/absimple/README.md",
    "content": "# ab+simple theme\n\nThis theme needs a Powerline-patched font to be rendered correctly. The original author of the theme recommends https://github.com/adi1090x/termux-style\n\nThis is a colorful theme based on the agnoster theme, made shorter and simpler.\n\nThe aim of this theme is to only show you relevant information:\nThe git information will only be shown in a git working directory.\nSimilarly, everything will be displayed automatically when appropriate,\nincluding the current user and the hostname,\nwhether the last call exited with an error,\nand whether background jobs are running in this shell.\n\n![bash screenshot](absimple-bash.png)\n"
  },
  {
    "path": "themes/absimple/absimple.theme.sh",
    "content": "#!/usr/bin/env bash\n# vim: ft=bash ts=2 sw=2 sts=2\n#\n# absimple theme: a fork of the agnoster theme\n#\n# Tested on Termux in Android 2022-02-15\n#\n# The aim of this theme is to only show you relevant information: The\n# git information will only be shown in a git working directory.\n# Similarly, everything will be displayed automatically when\n# appropriate, including the current user and the hostname, whether\n# the last call exited with an error, and whether background jobs are\n# running in this shell.\n\n\n# Note: a most part of this theme is the same as \"agnoster\", so let us source\n# the original theme \"agnoster\" and just override its functions.  In this way,\n# the maintenance becomes easier.\nsource \"$OSH/themes/agnoster/agnoster.theme.sh\"\n\n######################################################################\n### Segment drawing\n# A few utility functions to make it easy and re-usable to draw segmented prompts\n\n\n# prints history followed by HH:MM, useful for remembering what\n# we did previously\nfunction prompt_histdt {\n  prompt_segment black default \"\\!\" # \\A\"\n}\n\n# Dir: current working directory\nfunction prompt_dir {\n  prompt_segment blue black '\\W'\n}\n\n######################################################################\n\n# quick right prompt I grabbed to test things.\nfunction __command_rprompt {\n  local times= n=$COLUMNS tz\n  for tz in ZRH:Europe/Zurich PIT:US/Eastern \\\n            MTV:US/Pacific TOK:Asia/Tokyo; do\n    ((n > 40)) || break\n    times=\"$times ${tz%%:*}\\e[30;1m:\\e[0;36;1m\"\n    times=\"$times$(TZ=${tz#*:} date +%H:%M:%S)\\e[0m\"\n    n=$((n - 10))\n  done\n  [[ ! $times ]] || printf '%*s%s\\r' \"$n\" '' \"$times\"\n}\n\n######################################################################\n## Main prompt\n\nfunction build_prompt {\n  [[ ! -z ${AG_EMACS_DIR+x} ]] && prompt_emacsdir\n  prompt_status\n  [[ -z ${AG_NO_HIST+x} ]] && prompt_histdt\n  #[[ -z ${AG_NO_CONTEXT+x} ]] && prompt_context\n  if [[ ${OMB_PROMPT_SHOW_PYTHON_VENV-} ]]; then\n    prompt_virtualenv\n    prompt_condaenv\n  fi\n  prompt_dir\n  prompt_git\n  prompt_end\n}\n\n# from orig...\n# export PS1='$(ansi_single $(text_effect reset)) $(build_prompt) '\n# this doesn't work... new model: create a prompt via a PR variable and\n# use that.\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local RETVAL=$?\n  local PRIGHT=\"\"\n  local CURRENT_BG=NONE\n  local REPLY\n  _omb_theme_agnoster_text_effect reset\n  _omb_theme_agnoster_ansi_single \"$REPLY\"\n  local PR=$REPLY\n  build_prompt\n\n  PS1=\"\"\n  # date randomly or once per hour\n  if (( $(shuf -i 1-20 -n 1 --random-source=/dev/urandom) == 1 )) ; then #TK || (($PSDATE != $(date +%H))) ; then\n    PS1+=\"\\$(date +%a) $(date +%Y-%m-%d) \"\n  fi\n  PSDATE=$(date +%H)\n  # ... and time\n  PS1+=\"$(date +%H:%M:%S) \"\n\n  # uncomment below to use right prompt\n  #     PS1='\\[$(tput sc; printf \"%*s\" $COLUMNS \"$PRIGHT\"; tput rc)\\]'$PR\n  PS1+=$PR\n}\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/agnoster/README.md",
    "content": "# agnoster\n\nIn order for this theme to render correctly, you will need a\n[Powerline-patched font](https://gist.github.com/1595572).\nI recommend: https://github.com/powerline/fonts.git\n```\ngit clone https://github.com/powerline/fonts.git fonts\ncd fonts\nsh install.sh\n```\n\nThe aim of this theme is to only show you *relevant* information. Like most\nprompts, it will only show git information when in a git working directory.\nHowever, it goes a step further: everything from the current user and\nhostname to whether the last call exited with an error to whether background\njobs are running in this shell will all be displayed automatically when\nappropriate.\n\nGenerally speaking, this script has limited support for right\nprompts (ala powerlevel9k on zsh), but it's pretty problematic in Bash.\nThe general pattern is to write out the right prompt, hit \\r, then\nwrite the left. This is problematic for the following reasons:\n- Doesn't properly resize dynamically when you resize the terminal\n- Changes to the prompt (like clearing and re-typing, super common) deletes the prompt\n- Getting the right alignment via columns / tput cols is pretty problematic (and is a bug in this version)\n- Bash prompt escapes (like \\h or \\w) don't get interpolated\n\nall in all, if you really, really want right-side prompts without a\nton of work, recommend going to zsh for now. If you know how to fix this,\nwould appreciate it!\n\n![ScreenShot](agnoster-bash-sshot.png)\n\nThe direct upstream of the theme is [agnoster-bash](https://github.com/speedenator/agnoster-bash).\nThe current base is [`1165d1b3`](https://github.com/speedenator/agnoster-bash/commit/1165d1b3f125f52e7d4df953166d3c62774638fc).\nNew updates in the upstream can be found [here](https://github.com/speedenator/agnoster-bash/compare/1165d1b3f125f52e7d4df953166d3c62774638fc...master).\n"
  },
  {
    "path": "themes/agnoster/agnoster.theme.sh",
    "content": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# MIT License\n#\n# Copyright (c) 2012-2014 Isaac Wolkerstorfer (@agnoster) and contributors.\n# Copyright (c) 2014 Kenny Root (@kruton).\n# Copyright (c) 2017-2021 Erik Selberg and contributors (https://github.com/speedenator/agnoster-bash/contributors).\n# Copyright (c) 2019-present Toan Nguyen and contributors (https://github.com/ohmybash/oh-my-bash/graphs/contributors).\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n#\n#\n# Remarks:\n#\n# * Copyright 2012-2014 Isaac Wolkerstorfer (@agnoster) and contributors.\n#\n#   The agnoster theme originates from @agnoster's Zsh theme [1].  The version\n#   in OMB can be traced back to [1] (updates were stopped in 2014), but the\n#   latest version of the Zsh theme is found in [2].\n#\n#   [1] https://gist.github.com/agnoster/3712874\n#   [2] https://github.com/agnoster/agnoster-zsh-theme\n#\n#   The original theme does not seem to specify the license, so strictly\n#   speaking, we are not explicitly allowed to modify and redistribute the\n#   agnoster theme.  The MIT license is proposed [3], but no action has appeard\n#   to that.\n#\n#   [3] https://github.com/agnoster/agnoster-zsh-theme/pull/152\n#\n# * Copyright 2014 Kenny Root (@kruton)\n#\n#   Then the theme was translated to Bash by @kruton [4].  The license does not\n#   seem to be specified again.\n#\n#   [4] https://gist.github.com/kruton/8345450\n#\n# * Copyright 2017-2021 Erik Selberg (@speedenator)\n#\n#   Then @speedenator has updated the theme by @kruton [5].\n#\n#   [5] https://github.com/speedenator/agnoster-bash\n#\n#   At this time, the MIT license is specified.  However, @speedenator seem to\n#   claim the copyright for the work from 2012, which is actually the copyright\n#   infringement.  The user @speedenator seems to have started to contribute\n#   only from 2017.\n#\n# * Copyright 2019-present Toan Nguyen (@nntoan) and contributors.\n#\n#   The theme is imported into OMB by PR #54 [6].\n#\n#   [6] https://github.com/ohmybash/oh-my-bash/pull/54.\n#\n#------------------------------------------------------------------------------\n# vim: ft=bash ts=2 sw=2 sts=2\n#\n# agnoster's Theme - https://gist.github.com/3712874\n# A Powerline-inspired theme for BASH\n#\n# (Converted from ZSH theme by Kenny Root)\n# https://gist.github.com/kruton/8345450\n#\n# Updated & fixed by Erik Selberg erik@selberg.org 1/14/17\n# Tested on MacOSX, Ubuntu, Amazon Linux\n# Bash v3 and v4\n#\n# # README\n#\n# In order for this theme to render correctly, you will need a\n# [Powerline-patched font](https://gist.github.com/1595572).\n# I recommend: https://github.com/powerline/fonts.git\n# > git clone https://github.com/powerline/fonts.git fonts\n# > cd fonts\n# > install.sh\n\n# In addition, I recommend the\n# [Solarized theme](https://github.com/altercation/solarized/) and, if you're\n# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -\n# it has significantly better color fidelity.\n\n# Install:\n\n# I recommend the following:\n# $ cd home\n# $ mkdir -p .bash/themes/agnoster-bash\n# $ git clone https://github.com/speedenator/agnoster-bash.git .bash/themes/agnoster-bash\n\n# then add the following to your .bashrc:\n\n# export THEME=$HOME/.bash/themes/agnoster-bash/agnoster.bash\n# if [[ -f $THEME ]]; then\n#     export DEFAULT_USER=$(whoami)\n#     source \"$THEME\"\n# fi\n\n#\n# # Goals\n#\n# The aim of this theme is to only show you *relevant* information. Like most\n# prompts, it will only show git information when in a git working directory.\n# However, it goes a step further: everything from the current user and\n# hostname to whether the last call exited with an error to whether background\n# jobs are running in this shell will all be displayed automatically when\n# appropriate.\n\n# Generally speaking, this script has limited support for right\n# prompts (ala powerlevel9k on zsh), but it's pretty problematic in Bash.\n# The general pattern is to write out the right prompt, hit \\r, then\n# write the left. This is problematic for the following reasons:\n# - Doesn't properly resize dynamically when you resize the terminal\n# - Changes to the prompt (like clearing and re-typing, super common) deletes the prompt\n# - Getting the right alignment via columns / tput cols is pretty problematic (and is a bug in this version)\n# - Bash prompt escapes (like \\h or \\w) don't get interpolated\n#\n# all in all, if you really, really want right-side prompts without a\n# ton of work, recommend going to zsh for now. If you know how to fix this,\n# would appreciate it!\n\n# note: requires bash v4+... Mac users - you often have bash3.\n# 'brew install bash' will set you free\nPROMPT_DIRTRIM=${PROMPT_DIRTRIM:-2} # bash4 and above\n\n######################################################################\n## Configurations in Oh My Bash\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\n######################################################################\nDEBUG=0\nfunction debug {\n  if [[ ${DEBUG} -ne 0 ]]; then\n    >&2 echo -e \"$@\"\n  fi\n}\n\n######################################################################\n### Segment drawing\n# A few utility functions to make it easy and re-usable to draw segmented prompts\n\nCURRENT_BG='NONE'\nCURRENT_RBG='NONE'\nSEGMENT_SEPARATOR=''\nRIGHT_SEPARATOR=''\nLEFT_SUBSEG=''\nRIGHT_SUBSEG=''\n\nfunction _omb_theme_agnoster_text_effect {\n  REPLY=\n  case $1 in\n  reset)     REPLY=0 ;;\n  bold)      REPLY=1 ;;\n  underline) REPLY=4 ;;\n  esac\n}\n\n# to add colors, see\n# http://bitmote.com/index.php?post/2012/11/19/Using-ANSI-Color-Codes-to-Colorize-Your-Bash-Prompt-on-Linux\n# under the \"256 (8-bit) Colors\" section, and follow the example for orange below\nfunction _omb_theme_agnoster_fg_color {\n  REPLY=\n  case $1 in\n  black)   REPLY=30 ;;\n  red)     REPLY=31 ;;\n  green)   REPLY=32 ;;\n  yellow)  REPLY=33 ;;\n  blue)    REPLY=34 ;;\n  magenta) REPLY=35 ;;\n  cyan)    REPLY=36 ;;\n  white)   REPLY=37 ;;\n  orange)  REPLY='38;5;166' ;;\n  esac\n}\n\nfunction _omb_theme_agnoster_bg_color {\n  REPLY=\n  case $1 in\n  black)   REPLY=40 ;;\n  red)     REPLY=41 ;;\n  green)   REPLY=42 ;;\n  yellow)  REPLY=43 ;;\n  blue)    REPLY=44 ;;\n  magenta) REPLY=45 ;;\n  cyan)    REPLY=46 ;;\n  white)   REPLY=47 ;;\n  orange)  REPLY='48;5;166' ;;\n  esac\n}\n\n# TIL: declare is global not local, so best use a different name\n# for codes (mycodes) as otherwise it'll clobber the original.\n# this changes from BASH v3 to BASH v4.\nfunction _omb_theme_agnoster_ansi_r {\n  # this doesn't wrap code in \\[ \\]\n  local seq\n  local -a mycodes=(\"${!1}\")\n\n  debug \"ansi: ${!1} all: $* aka ${mycodes[@]}\"\n\n  seq=\"\"\n  local i\n  for ((i = 0; i < ${#mycodes[@]}; i++)); do\n    if [[ $seq ]]; then\n      seq=$seq';'\n    fi\n    seq=$seq${mycodes[i]}\n  done\n  debug 'ansi debug: \\\\[\\\\033['\"$seq\"'m\\\\]'\n  REPLY='\\e['$seq'm'\n}\n\nfunction _omb_theme_agnoster_ansi {\n  _omb_theme_agnoster_ansi_r \"$@\"\n  REPLY='\\['$REPLY'\\]'\n  # PR=$PR'\\['$REPLY'\\]'\n}\n\nfunction _omb_theme_agnoster_ansi_single {\n  REPLY='\\[\\e['$1'm\\]'\n}\n\n_omb_deprecate_defun_print 20000 text_effect _omb_theme_agnoster_text_effect\n_omb_deprecate_defun_print 20000 fg_color _omb_theme_agnoster_fg_color\n_omb_deprecate_defun_print 20000 bg_color _omb_theme_agnoster_bg_color\n_omb_deprecate_defun_put 20000 ansi _omb_theme_agnoster_ansi\n_omb_deprecate_defun_put 20000 ansi_r _omb_theme_agnoster_ansi_r\n_omb_deprecate_defun_put 20000 ansi_single _omb_theme_agnoster_ansi_single\n\n# Begin a segment\n# Takes two arguments, background and foreground. Both can be omitted,\n# rendering default background/foreground.\nfunction prompt_segment {\n  local REPLY\n  local -a codes\n\n  debug \"Prompting $1 $2 $3\"\n\n  # > if commented out from kruton's original... I'm not clear if it did\n  # > anything, but it messed up things like prompt_status - Erik 1/14/17\n  #\n  # I think ( -z $2 && $2 != default ) has been a mistake of ( $2 && $2 !=\n  # default ) because ( -z $2 && $2 != default ) is equivalent to ( -z $2 ).  I\n  # fixed it, so we may turn this on again, but I keep it inside the comment\n  # because I'm not sure if there is any other side effect - Koichi 4/27/25\n  #\n  # See also the same code in the function \"prompt_right_segment\".\n  #\n  # if [[ ! $1 || ( $2 && $2 != default ) ]]; then\n  _omb_theme_agnoster_text_effect reset\n  [[ $REPLY ]] && codes+=(\"$REPLY\")\n  # fi\n  if [[ $1 ]]; then\n    _omb_theme_agnoster_bg_color \"$1\"\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    debug \"Added $REPLY as background to codes\"\n  fi\n  if [[ $2 ]]; then\n    _omb_theme_agnoster_fg_color \"$2\"\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    debug \"Added $REPLY as foreground to codes\"\n  fi\n\n  debug \"Codes: \"\n  # local -p codes\n\n  if [[ $CURRENT_BG != NONE && $1 != $CURRENT_BG ]]; then\n    local -a intermediate=()\n    _omb_theme_agnoster_fg_color \"$CURRENT_BG\"\n    [[ $REPLY ]] && intermediate+=(\"$REPLY\")\n    _omb_theme_agnoster_bg_color \"$1\"\n    [[ $REPLY ]] && intermediate+=(\"$REPLY\")\n    _omb_theme_agnoster_ansi 'intermediate[@]'\n    debug \"pre prompt $REPLY\"\n    PR=\"$PR $REPLY$SEGMENT_SEPARATOR\"\n    _omb_theme_agnoster_ansi 'codes[@]'\n    debug \"post prompt $REPLY\"\n    PR=\"$PR$REPLY \"\n  else\n    debug \"no current BG, codes are (${codes[*]})\"\n    _omb_theme_agnoster_ansi 'codes[@]'\n    PR=\"$PR$REPLY \"\n  fi\n  CURRENT_BG=$1\n  [[ $3 ]] && PR=$PR$3\n}\n\n# End the prompt, closing any open segments\nfunction prompt_end {\n  local REPLY\n  if [[ $CURRENT_BG ]]; then\n    local -a codes=()\n    _omb_theme_agnoster_text_effect reset\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    _omb_theme_agnoster_fg_color \"$CURRENT_BG\"\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    _omb_theme_agnoster_ansi 'codes[@]'\n    PR=\"$PR $REPLY$SEGMENT_SEPARATOR\"\n  fi\n  _omb_theme_agnoster_text_effect reset\n  local -a reset=(${REPLY:+\"$REPLY\"})\n  _omb_theme_agnoster_ansi 'reset[@]'\n  PR=\"$PR $REPLY\"\n  CURRENT_BG=''\n}\n\n### virtualenv prompt\nfunction prompt_virtualenv {\n  # Exclude pyenv\n  [[ $PYENV_VIRTUALENV_INIT == 1 ]] && _omb_util_binary_exists pyenv && return 0\n\n  if [[ -d $VIRTUAL_ENV ]]; then\n    # Python could output the version information in both stdout and\n    # stderr (e.g. if using pyenv, the output goes to stderr).\n    local VERSION_OUTPUT=$(\"$VIRTUAL_ENV\"/bin/python --version 2>&1)\n\n    # The last word of the output of `python --version`\n    # corresponds to the version number.\n    local VENV_VERSION=$(awk '{print $NF}' <<< \"$VERSION_OUTPUT\")\n\n    prompt_segment cyan white \"[v] ${VIRTUAL_ENV_PROMPT:+$VIRTUAL_ENV_PROMPT }$(basename \"$VENV_VERSION\")\"\n  fi\n}\n\n### pyenv prompt\nfunction prompt_pyenv {\n  if [[ $PYENV_VIRTUALENV_INIT == 1 ]] && _omb_util_binary_exists pyenv; then\n    # Priority is shell > local > global\n    # When pyenv shell is set, the environment variable $PYENV_VERSION is set with the value we want\n    if [[ ! ${PYENV_VERSION-} ]]; then\n      # If not set, fall back to pyenv local/global to get the version\n      local PYENV_VERSION=$(pyenv local 2>/dev/null || pyenv global 2>/dev/null)\n    fi\n    # If it is not the system's python, then display additional info\n    if [[ \"$PYENV_VERSION\" != \"system\" ]]; then\n      # It's a pyenv virtualenv, get the version number\n      if [[ -d $PYENV_VIRTUAL_ENV ]]; then\n        local VERSION_OUTPUT=$(\"$PYENV_VIRTUAL_ENV\"/bin/python --version 2>&1)\n        local PYENV_VENV_VERSION=$(awk '{print $NF}' <<< \"$VERSION_OUTPUT\")\n        prompt_segment cyan white \"[$PYENV_VERSION] $(basename \"$PYENV_VENV_VERSION\")\"\n      else\n        prompt_segment cyan white \"$PYENV_VERSION\"\n      fi\n    fi\n  fi\n}\n\n### conda env prompt\nfunction prompt_condaenv {\n  if [[ -d $CONDA_PREFIX ]]; then\n    if [[ ! $CONDA_PROMPT_MODIFIER ]]; then\n      CONDA_PROMPT_MODIFIER=$(basename \"$CONDA_PREFIX\")\n    fi\n    local CONDA_PYTHON_VERSION=$(\"$CONDA_PREFIX\"/bin/python -c 'import platform;print(platform.python_version())')\n    prompt_segment cyan white \"[c] $CONDA_PROMPT_MODIFIER $CONDA_PYTHON_VERSION\"\n  fi\n}\n\n### Prompt components\n# Each component will draw itself, and hide itself if no information needs to be shown\n\n# Context: user@hostname (who am I and where am I)\nfunction prompt_context {\n  local user=$(whoami)\n\n  if [[ $user != $DEFAULT_USER || -n $SSH_CLIENT ]]; then\n    prompt_segment black default \"$user@\\h\"\n  fi\n}\n\n# prints history followed by HH:MM, useful for remembering what\n# we did previously\nfunction prompt_histdt {\n  prompt_segment black default \"\\! [\\A]\"\n}\n\n\nfunction git_status_dirty {\n  dirty=$(_omb_prompt_git status -s 2> /dev/null | tail -n 1)\n  [[ $dirty ]] && _omb_util_print \" ●\"\n}\n\nfunction git_stash_dirty {\n  stash=$(_omb_prompt_git stash list 2> /dev/null | tail -n 1)\n  [[ $stash ]] && _omb_util_print \" ⚑\"\n}\n\n# Git: branch/detached head, dirty status\nfunction prompt_git {\n  local ref dirty\n  if _omb_prompt_git rev-parse --is-inside-work-tree &>/dev/null; then\n    ZSH_THEME_GIT_PROMPT_DIRTY='±'\n    dirty=$(git_status_dirty)\n    stash=$(git_stash_dirty)\n    ref=$(_omb_prompt_git symbolic-ref HEAD 2> /dev/null) ||\n      ref=\"➦ $(_omb_prompt_git describe --exact-match --tags HEAD 2> /dev/null)\" ||\n      ref=\"➦ $(_omb_prompt_git show-ref --head -s --abbrev | head -n1 2> /dev/null)\"\n    if [[ -n $dirty ]]; then\n      prompt_segment yellow black\n    else\n      prompt_segment green black\n    fi\n    PR=\"$PR${ref/refs\\/heads\\// }$stash$dirty\"\n  fi\n}\n\n# Mercurial: clean, modified and uncomitted files\nfunction prompt_hg {\n  local rev st branch\n  if hg id &>/dev/null; then\n    if hg prompt &>/dev/null; then\n      if [[ $(hg prompt \"{status|unknown}\") == '?' ]]; then\n        # if files are not added\n        prompt_segment red white\n        st='±'\n      elif [[ $(hg prompt \"{status|modified}\") ]]; then\n        # if any modification\n        prompt_segment yellow black\n        st='±'\n      else\n        # if working copy is clean\n        prompt_segment green black $CURRENT_FG\n      fi\n      PR=\"$PR$(hg prompt \"☿ {rev}@{branch}\") $st\"\n    else\n      st=\"\"\n      rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')\n      branch=$(hg id -b 2>/dev/null)\n      if hg st | grep -q \"^\\?\"; then\n        prompt_segment red white\n        st='±'\n      elif hg st | grep -q \"^[MA]\"; then\n        prompt_segment yellow black\n        st='±'\n      else\n        prompt_segment green black $CURRENT_FG\n      fi\n      PR=\"$PR☿ $rev@$branch $st\"\n    fi\n  fi\n}\n\n# Dir: current working directory\nfunction prompt_dir {\n  prompt_segment blue black '\\w'\n}\n\n# Status:\n# - was there an error\n# - am I root\n# - are there background jobs?\nfunction prompt_status {\n  local symbols REPLY\n  symbols=()\n  if ((RETVAL != 0)); then\n    _omb_theme_agnoster_fg_color red\n    _omb_theme_agnoster_ansi_single \"$REPLY\"\n    symbols+=$REPLY'✘'\n  fi\n  if ((UID == 0)); then\n    _omb_theme_agnoster_fg_color yellow\n    _omb_theme_agnoster_ansi_single \"$REPLY\"\n    symbols+=$REPLY'⚡'\n  fi\n  if compgen -j &>/dev/null; then\n    _omb_theme_agnoster_fg_color cyan\n    _omb_theme_agnoster_ansi_single \"$REPLY\"\n    symbols+=$REPLY'⚙'\n  fi\n\n  [[ $symbols ]] && prompt_segment black default \"$symbols\"\n}\n\n######################################################################\n#\n# experimental right prompt stuff\n# requires setting prompt_foo to use PRIGHT vs PR\n# doesn't quite work per above\n\nfunction rightprompt {\n  printf \"%*s\" $COLUMNS \"$PRIGHT\"\n}\n\n# quick right prompt I grabbed to test things.\nfunction __command_rprompt {\n  local times= n=$COLUMNS tz\n  for tz in ZRH:Europe/Zurich PIT:US/Eastern \\\n                              MTV:US/Pacific TOK:Asia/Tokyo; do\n    ((n > 40)) || break\n    times=\"$times ${tz%%:*}\\e[30;1m:\\e[0;36;1m\"\n    times=\"$times$(TZ=${tz#*:} date +%H:%M)\\e[0m\"\n    n=$((n - 10))\n  done\n  [[ ! $times ]] || printf '%*s%s\\r' \"$n\" '' \"$times\"\n}\n\n# Begin a segment on the right\n# Takes two arguments, background and foreground. Both can be omitted,\n# rendering default background/foreground.\nfunction prompt_right_segment {\n  local REPLY\n  local -a codes\n\n  debug \"Prompt right\"\n  debug \"Prompting $1 $2 $3\"\n\n  # if [[ ! $1 || ( $2 && $2 != default ) ]]; then\n  _omb_theme_agnoster_text_effect reset\n  [[ $REPLY ]] && codes+=(\"$REPLY\")\n  # fi\n  if [[ $1 ]]; then\n    _omb_theme_agnoster_bg_color \"$1\"\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    debug \"Added $REPLY as background to codes\"\n  fi\n  if [[ $2 ]]; then\n    _omb_theme_agnoster_fg_color \"$2\"\n    [[ $REPLY ]] && codes+=(\"$REPLY\")\n    debug \"Added $REPLY as foreground to codes\"\n  fi\n\n  debug \"Right Codes: \"\n  # local -p codes\n\n  # right always has a separator\n  # if [[ $CURRENT_RBG != NONE && $1 != $CURRENT_RBG ]]; then\n  #     $CURRENT_RBG=\n  # fi\n  local -a intermediate2=()\n  _omb_theme_agnoster_fg_color \"$1\"\n  [[ $REPLY ]] && intermediate2+=(\"$REPLY\")\n  _omb_theme_agnoster_bg_color \"$CURRENT_RBG\"\n  [[ $REPLY ]] && intermediate2+=(\"$REPLY\")\n  # PRIGHT=\"$PRIGHT---\"\n  _omb_theme_agnoster_ansi_r 'intermediate2[@]'\n  debug \"pre prompt $REPLY\"\n  PRIGHT=\"$PRIGHT$REPLY$RIGHT_SEPARATOR\"\n  _omb_theme_agnoster_ansi_r 'codes[@]'\n  debug \"post prompt $REPLY\"\n  PRIGHT=\"$PRIGHT$REPLY \"\n  # else\n  #     debug \"no current BG, codes are (${codes[*]})\"\n  #     _omb_theme_agnoster_ansi 'codes[@]'\n  #     PRIGHT=\"$PRIGHT$REPLY \"\n  # fi\n  CURRENT_RBG=$1\n  [[ $3 ]] && PRIGHT=$PRIGHT$3\n}\n\n######################################################################\n## Emacs prompt --- for dir tracking\n# stick the following in your .emacs if you use this:\n\n# (setq dirtrack-list '(\".*DIR *\\\\([^ ]*\\\\) DIR\" 1 nil))\n# (defun dirtrack-filter-out-pwd-prompt (string)\n#   \"dirtrack-mode doesn't remove the PWD match from the prompt.  This does.\"\n#   ;; TODO: support dirtrack-mode's multiline regexp.\n#   (if (and (stringp string) (string-match (first dirtrack-list) string))\n#       (replace-match \"\" t t string 0)\n#     string))\n# (add-hook 'shell-mode-hook\n#           #'(lambda ()\n#               (dirtrack-mode 1)\n#               (add-hook 'comint-preoutput-filter-functions\n#                         'dirtrack-filter-out-pwd-prompt t t)))\n\nfunction prompt_emacsdir {\n  # no color or other setting... this will be deleted per above\n  PR=\"DIR \\w DIR$PR\"\n}\n\n######################################################################\n## Main prompt\n\nfunction build_prompt {\n  [[ ! -z ${AG_EMACS_DIR+x} ]] && prompt_emacsdir\n  prompt_status\n  #[[ -z ${AG_NO_HIST+x} ]] && prompt_histdt\n  [[ -z ${AG_NO_CONTEXT+x} ]] && prompt_context\n  if [[ ${OMB_PROMPT_SHOW_PYTHON_VENV-} ]]; then\n    prompt_virtualenv\n    prompt_pyenv\n    prompt_condaenv\n  fi\n  prompt_dir\n  prompt_git\n  prompt_hg\n  prompt_end\n}\n\n# from orig...\n# export PS1='$(ansi_single $(text_effect reset)) $(build_prompt) '\n# this doesn't work... new model: create a prompt via a PR variable and\n# use that.\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local RETVAL=$?\n  local PRIGHT=\"\"\n  local CURRENT_BG=NONE\n  local REPLY\n  _omb_theme_agnoster_text_effect reset\n  _omb_theme_agnoster_ansi_single \"$REPLY\"\n  local PR=$REPLY\n  build_prompt\n\n  # uncomment below to use right prompt\n  #     PS1='\\[$(tput sc; printf \"%*s\" $COLUMNS \"$PRIGHT\"; tput rc)\\]'$PR\n  PS1=$PR\n}\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/axin/README.md",
    "content": "# Axin\n\n![Theme Axin](axin-dark.png)\n\nAxin Bash Prompt, inspired by theme \"Sexy\" and \"Bobby\"\n"
  },
  {
    "path": "themes/axin/axin.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Axin Bash Prompt, inspired by theme \"Sexy\" and \"Bobby\"\n# thanks to them\n\nif [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color &>/dev/null; then\n  export TERM=gnome-256color\nelif [[ $TERM != dumb ]] && infocmp xterm-256color &>/dev/null; then\n  export TERM=xterm-256color\nfi\n\nMAGENTA=$_omb_prompt_bold_red\nWHITE=$_omb_prompt_bold_silver\nORANGE=$_omb_prompt_bold_olive\nGREEN=$_omb_prompt_bold_green\nPURPLE=$_omb_prompt_bold_purple\nRESET=$_omb_prompt_normal\nif ((_omb_term_colors >= 256)); then\n  ORANGE=$_omb_prompt_bold'\\['$(tput setaf 172)'\\]'\n  GREEN=$_omb_prompt_bold'\\['$(tput setaf 190)'\\]'\n  PURPLE=$_omb_prompt_bold'\\['$(tput setaf 141)'\\]'\nfi\n\nOMB_PROMPT_VIRTUALENV_FORMAT='( %s ) '\nOMB_PROMPT_CONDAENV_FORMAT='( %s ) '\nOMB_PROMPT_CONDAENV_USE_BASENAME=true\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local python_venv\n  _omb_prompt_get_python_venv\n  PS1=\"$python_venv${MAGENTA}\\u ${WHITE}@ ${ORANGE}\\h ${WHITE}in ${GREEN}\\w${WHITE}$SCM_THEME_PROMPT_PREFIX$(clock_prompt) ${PURPLE}\\$(scm_prompt_info) \\n\\$ ${RESET}\"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${_omb_prompt_white}\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/bakke/README.md",
    "content": "# Bakke\n\n![theme Bakke](bakke-dark.png)\n\n- **Version Control State Indicators:** It uses brown to indicate a dirty state and bold green for a clean state in version control-related prompts such as Git.\n- **Prompt Prefix and Suffix:** It uses green as a prefix and suffix in version control-related prompts.\n- **Virtual Environments:** It displays information about Python virtual environments, such as virtualenv and condaenv, in parentheses and with specific colors.\n- **Main Prompt Structure:** It uses bold gray to form the main structure of the prompt, which includes the username, host, and current working directory.\n- **Additional Features:** It allows displaying additional information, such as the Ruby environment if present, and the use of RVM.\n\nOverall, this theme offers a pleasant and functional user experience when working in the terminal, with a focus on clarity and relevant information for the user.\n"
  },
  {
    "path": "themes/bakke/bakke.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:-false}\nOMB_PROMPT_VIRTUALENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\nOMB_PROMPT_CONDAENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    #PS1=\"${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info)${_omb_prompt_purple}$(_omb_prompt_print_ruby_env) ${_omb_prompt_olive}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w ${_omb_prompt_reset_color}\\n${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n    #PS1=\"\\n${_omb_prompt_purple}\\h: ${_omb_prompt_reset_color} ${_omb_prompt_green}\\w\\n${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n    #PS1=\"\\n${_omb_prompt_teal}\\h: ${_omb_prompt_reset_color} ${_omb_prompt_olive}\\w\\n${_omb_prompt_brown}$(scm_char)${_omb_prompt_brown}$(scm_prompt_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n\n    local python_venv\n    _omb_prompt_get_python_venv\n\n    PS1=\"\\n${python_venv:+$python_venv }${_omb_prompt_teal}\\h: ${_omb_prompt_reset_color} ${_omb_prompt_olive}\\w ${_omb_prompt_green}$(scm_prompt_info)\\n${_omb_prompt_reset_color}→ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/binaryanomaly/README.md",
    "content": "# Binary Anomaly\n\n![Binaryanomaly Theme](binaryanomaly-dark.png)\n\n- **Reboot Required Detection:**\n  - If a system reboot is required, a warning message will be displayed in bright yellow, indicating \"Reboot required!\".\n- **Color Assignment:**\n  - The color of the hostname changes based on the connection:\n    - Lime green for remote sessions via SSH.\n    - Light orange for local sessions.\n  - The color of the username changes based on the user's status:\n    - Brown for root users.\n    - Teal green for regular users.\n- **Version Control Information:**\n  - Git-related prompts display a dirty or clean state indicator:\n    - Brown for dirty state.\n    - Bold green for clean state.\n  - The prefix and suffix of the version control are in light gray to highlight this information clearly in the prompt.\n"
  },
  {
    "path": "themes/binaryanomaly/binaryanomaly.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Set term to 256color mode, if 256color is not supported, colors won't work properly\nif [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then\n  export TERM=gnome-256color\nelif infocmp xterm-256color >/dev/null 2>&1; then\n  export TERM=xterm-256color\nfi\n\n# Detect whether a rebbot is required\nfunction show_reboot_required() {\n  if [ ! -z \"$_bf_prompt_reboot_info\" ]; then\n    if [ -f /var/run/reboot-required ]; then\n      _omb_util_put \"Reboot required!\"\n    fi\n  fi\n}\n\n# Set different host color for local and remote sessions\nfunction set_host_color() {\n  # Detect if connection is through SSH\n  if [[ ! -z $SSH_CLIENT ]]; then\n    _omb_util_put \"${lime_yellow}\"\n  else\n    _omb_util_put \"${light_orange}\"\n  fi\n}\n\n# Set different username color for users and root\nfunction set_user_color() {\n  case $(id -u) in\n    0)\n      _omb_util_put \"${_omb_prompt_brown}\"\n      ;;\n    *)\n      _omb_util_put \"${_omb_prompt_teal}\"\n      ;;\n  esac\n}\n\nfunction scm_prompt {\n  CHAR=$(scm_char)\n  if [ $CHAR = $SCM_NONE_CHAR ]\n    then\n      return\n    else\n      _omb_util_print \"[$(scm_char)$(scm_prompt_info)]\"\n  fi\n}\n\n# Define custom colors we need\n# non-printable bytes in PS1 need to be contained within \\[ \\].\n# Otherwise, bash will count them in the length of the prompt\nfunction set_custom_colors() {\n  dark_grey=\"\\[$(tput setaf 8)\\]\"\n  light_grey=\"\\[$(tput setaf 248)\\]\"\n\n  light_orange=\"\\[$(tput setaf 172)\\]\"\n  bright_yellow=\"\\[$(tput setaf 220)\\]\"\n  lime_yellow=\"\\[$(tput setaf 190)\\]\"\n\n  powder_blue=\"\\[$(tput setaf 153)\\]\"\n}\n\nfunction __ps_time {\n  _omb_util_print \"$(clock_prompt)${_omb_prompt_normal}\\n\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  ps_reboot=\"${bright_yellow}$(show_reboot_required)${_omb_prompt_normal}\\n\"\n\n  ps_username=\"$(set_user_color)\\u${_omb_prompt_normal}\"\n  ps_uh_separator=\"${dark_grey}@${_omb_prompt_normal}\"\n  ps_hostname=\"$(set_host_color)\\h${_omb_prompt_normal}\"\n\n  ps_path=\"${_omb_prompt_olive}\\w${_omb_prompt_normal}\"\n  ps_scm_prompt=\"${light_grey}$(scm_prompt)\"\n\n  ps_user_mark=\"${_omb_prompt_normal} ${_omb_prompt_normal}\"\n  ps_user_input=\"${_omb_prompt_normal}\"\n\n  # Set prompt\n  PS1=\"$ps_reboot$(__ps_time)$ps_username$ps_uh_separator$ps_hostname $ps_path $ps_scm_prompt$ps_user_mark$ps_user_input\"\n}\n\n# Initialize custom colors\nset_custom_colors\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$dark_grey\"}\n\n# scm theming\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${light_grey}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓${light_grey}\"\nSCM_GIT_CHAR=\"${_omb_prompt_green}±${light_grey}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${light_grey}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${light_grey}\"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/bobby/README.md",
    "content": "# Bobby\n\n![theme Bobby](bobby-dark.png)\n\n## Styles and Colors\n\nThis repository presents a custom Bash prompt configuration utilizing various styles and colors to enhance the visual appearance and usability of the terminal.\n\n## Color Assignments\n\n- **Brown**: Used to indicate a dirty state in source control management (SCM) and Git prompts.\n- **Bold Green**: Signifies a clean state in SCM and Git prompts.\n- **Green**: Used as a prefix and suffix in SCM and Git prompts.\n- **Olive**: Represents the current working directory in the prompt.\n- **Purple**: Denotes the hostname in the prompt.\n- **Teal**: Used to display version control information in SCM prompts.\n- **Light Gray**: Forms the main structure of the prompt, displaying time, user, host, and current working directory.\n- **Bright Yellow**: Indicates a warning message, such as a required system reboot.\n\n## Styles and Functions\n\n- **SCM Themes**: Customized themes for source control management (SCM) prompts, displaying indicators for dirty and clean states.\n- **Clock Display**: Incorporates a clock function to show the current time in the prompt, with the option to display a clock character.\n- **Battery Status**: Includes a battery function to show battery status in the prompt.\n\nFeel free to customize the color assignments and styles according to your preferences by modifying the relevant sections in the Bash prompt configuration file. Adjust the colors, prompt structure, and additional functions to suit your needs.\n"
  },
  {
    "path": "themes/bobby/bobby.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction __bobby_clock {\n  _omb_util_put \"$(clock_prompt) \"\n\n  if [ \"${THEME_SHOW_CLOCK_CHAR}\" == \"true\" ]; then\n    _omb_util_put \"$(clock_char) \"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    #PS1=\"${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info)${_omb_prompt_purple}$(_omb_prompt_print_ruby_env) ${_omb_prompt_olive}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w ${_omb_prompt_reset_color}\\n${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n    PS1=\"\\n$(battery_char) $(__bobby_clock)${_omb_prompt_olive}$(_omb_prompt_print_ruby_env) ${_omb_prompt_purple}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w\\n${_omb_prompt_bold_teal}$(scm_prompt_char_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n}\n\nTHEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-\"true\"}\nTHEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-\"$_omb_prompt_brown\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_bold_teal\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%Y-%m-%d %H:%M:%S\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/bobby-python/bobby-python.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nCONDAENV_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    #PS1=\"${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info)${_omb_prompt_purple}$(_omb_prompt_print_ruby_env) ${_omb_prompt_olive}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w ${_omb_prompt_reset_color}\\n${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n    PS1=\"\\n${_omb_prompt_olive}$(python_version_prompt) ${_omb_prompt_purple}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w\\n${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/brainy/README.md",
    "content": "# Brainy theme\n\nSimple colorful terminal prompt theme (inspired by a number of themes).\n\n## Features\n\n### Prompt Segments\n\n- Username & Hostname\n- Current Directory\n- SCM Information\n- Battery Charge\n- Clock\n- [Todo.txt](https://github.com/ginatrapani/todo.txt-cli) status\n- Ruby Environment\n- Python Environment\n- Exit Code\n\n### Others\n\n- Indicator for cached `sudo` credential\n- Indicator for ssh login\n- `brainy` command for showing/hiding various prompt segments on-the-fly\n\n## Configuration\n\nVarious prompt segments can be shown/hidden or modified according to your choice. There are two ways for doing that:\n\n1. On-the-fly using `brainy` command\n2. Theme Environment Variables\n\n### On-the-fly using `brainy` command\n\nThis theme provides a command for showing/hiding prompt segments.\n\n`brainy show <segment>`\n\n`brainy hide <segment>`\n\nTab-completion for this command is enabled by default.\n\nConfiguration specified by this command will only be applied to current and subsequent child shells.\n\n### Theme Environment Variables\n\nThis is used for permanent settings that apply to all terminal sessions. You have to define the value of specific theme variables in your `bashrc` (or equivalent) file.\n\nThe name of the variables are listed below along with their default values.\n\n#### User Information\n\nIndicator for cached `sudo` credential (see `sudo` manpage for more information):\n\n`THEME_SHOW_SUDO=true`\n\n#### SCM Information\n\nInformation about SCM repository status:\n\n`THEME_SHOW_SCM=true`\n\n#### Ruby Environment\n\nRuby environment version information:\n\n`THEME_SHOW_RUBY=false`\n\n#### Python Environment\n\nPython version and virtual environment information:\n\n`THEME_SHOW_PYTHON=false`\n\n#### ToDo.txt status\n\n[Todo.txt](https://github.com/ginatrapani/todo.txt-cli) status:\n\n`THEME_SHOW_TODO=false`\n\n#### Clock\n\n`THEME_SHOW_CLOCK=true`\n\n`THEME_CLOCK_COLOR=$bold_cyan`\n\nFormat of the clock (see `date` manpage for more information):\n\n`THEME_CLOCK_FORMAT=\"%H:%M:%S\"`\n\n#### Battery Charge\n\nBattery charge percentage:\n\n`THEME_SHOW_BATTERY=false`\n\n#### Exit Code\n\nExit code of the last command:\n\n`THEME_SHOW_EXITCODE=true`\n\n## Prompt Segments Order\n\nCurrently available prompt segments are:\n\n- battery\n- char\n- clock\n- dir\n- exitcode\n- python\n- ruby\n- scm\n- todo\n- user_info\n\nThree environment variables can be defined to rearrange the segments order. The default values are:\n\n`___BRAINY_TOP_LEFT=\"user_info dir scm\"`\n\n`___BRAINY_TOP_RIGHT=\"python ruby todo clock battery\"`\n\n`___BRAINY_BOTTOM=\"exitcode char\"`\n"
  },
  {
    "path": "themes/brainy/brainy.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Brainy Bash Prompt for Bash-it\n# by MunifTanjim\n\n#############\n## Parsers ##\n#############\n\nfunction ____brainy_top_left_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  if [[ ${args[3]} ]]; then\n    _TOP_LEFT+=${args[2]}${args[3]}\n  fi\n  _TOP_LEFT+=${args[0]}${args[1]}\n  if [[ ${args[4]} ]]; then\n    _TOP_LEFT+=${args[2]}${args[4]}\n  fi\n  _TOP_LEFT+=\" \"\n}\n\nfunction ____brainy_top_right_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  _TOP_RIGHT+=\" \"\n  if [[ ${args[3]} ]]; then\n    _TOP_RIGHT+=${args[2]}${args[3]}\n  fi\n  _TOP_RIGHT+=${args[0]}${args[1]}\n  if [[ ${args[4]} ]]; then\n    _TOP_RIGHT+=${args[2]}${args[4]}\n  fi\n  __TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN + ${#args[1]} + ${#args[3]} + ${#args[4]} + 1))\n  ((__SEG_AT_RIGHT += 1))\n}\n\nfunction ____brainy_bottom_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  _BOTTOM+=${args[0]}${args[1]}\n  ((${#args[1]} > 0)) && _BOTTOM+=\" \"\n}\n\nfunction ____brainy_top {\n  local _TOP_LEFT=\"\"\n  local _TOP_RIGHT=\"\"\n  local __TOP_RIGHT_LEN=0\n  local __SEG_AT_RIGHT=0\n\n  local seg info\n  for seg in ${___BRAINY_TOP_LEFT}; do\n    info=$(___brainy_prompt_\"$seg\")\n    [[ $info ]] && ____brainy_top_left_parse \"$info\"\n  done\n\n  local ___cursor_right='\\033[500C'\n  _TOP_LEFT+=$___cursor_right\n\n  for seg in ${___BRAINY_TOP_RIGHT}; do\n    info=$(___brainy_prompt_\"$seg\")\n    [[ $info ]] && ____brainy_top_right_parse \"$info\"\n  done\n\n  ((__TOP_RIGHT_LEN > 0)) && ((__TOP_RIGHT_LEN--))\n  local ___cursor_adjust=\"\\033[${__TOP_RIGHT_LEN}D\"\n  _TOP_LEFT+=$___cursor_adjust\n\n  printf \"%s%s\" \"$_TOP_LEFT\" \"$_TOP_RIGHT\"\n}\n\nfunction ____brainy_bottom {\n  local _BOTTOM=\"\" seg\n  for seg in $___BRAINY_BOTTOM; do\n    local info=$(___brainy_prompt_\"$seg\")\n    [[ $info ]] && ____brainy_bottom_parse \"$info\"\n  done\n  printf \"\\n%s\" \"$_BOTTOM\"\n}\n\n##############\n## Segments ##\n##############\n\nfunction ___brainy_prompt_user_info {\n  local color=$_omb_prompt_bold_navy\n  if [[ $THEME_SHOW_SUDO == true ]]; then\n    if [[ $(sudo -n id -u 2>&1) == 0 ]]; then\n      color=$_omb_prompt_bold_brown\n    fi\n  fi\n  local box=\"[|]\"\n  local info=\"\\u@\\H\"\n  if [[ $SSH_CLIENT ]]; then\n    printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n  else\n    printf \"%s|%s\" \"$color\" \"$info\"\n  fi\n}\n\nfunction ___brainy_prompt_dir {\n  local color=$_omb_prompt_bold_olive\n  local box=\"[|]\"\n  local info=\"\\w\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\nfunction ___brainy_prompt_scm {\n  [[ $THEME_SHOW_SCM != true ]] && return\n  local color=$_omb_prompt_bold_green\n  local box=\"$(scm_char) \"\n  local info=\"$(scm_prompt_info)\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\nfunction ___brainy_prompt_python {\n  [[ $THEME_SHOW_PYTHON != true ]] && return\n  local color=$_omb_prompt_bold_olive\n  local box=\"[|]\"\n  local python_env\n  _omb_prompt_get_python_env || return 0\n  printf \"%s|%s|%s|%s\" \"$color\" \"${python_env}\" \"$_omb_prompt_bold_navy\" \"$box\"\n}\n\nfunction ___brainy_prompt_ruby {\n  [[ $THEME_SHOW_RUBY != true ]] && return\n  local color=$_omb_prompt_bold_white\n  local box=\"[|]\"\n  local info=\"rb-$(_omb_prompt_print_ruby_env)\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_brown\" \"$box\"\n}\n\nfunction ___brainy_prompt_todo {\n  [[ $THEME_SHOW_TODO != true ]] && return\n  _omb_util_binary_exists todo.sh || return\n  local color=$_omb_prompt_bold_white\n  local box=\"[|]\"\n  local info=\"t:$(todo.sh ls | command grep -E \"TODO: [0-9]+ of ([0-9]+)\" | awk '{ print $4 }' )\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_green\" \"$box\"\n}\n\nfunction ___brainy_prompt_clock {\n  [[ $THEME_SHOW_CLOCK != true ]] && return\n  local color=$THEME_CLOCK_COLOR\n  local box=\"[|]\"\n  local info=\"$(date +\"${THEME_CLOCK_FORMAT}\")\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_purple\" \"$box\"\n}\n\nfunction ___brainy_prompt_battery {\n  [[ -e $OSH/plugins/battery/battery.plugin.sh ]] || return 0\n  [[ $THEME_SHOW_BATTERY != true ]] && return\n  local info=$(battery_percentage)\n  local color=$_omb_prompt_bold_green\n  if ((info < 50)); then\n    color=$_omb_prompt_bold_olive\n  elif ((info < 25)); then\n    color=$_omb_prompt_bold_brown\n  fi\n  local box=\"[|]\"\n  ac_adapter_connected && info+=\"+\"\n  [[ $info == 100+ ]] && info=\"AC\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\nfunction ___brainy_prompt_exitcode {\n  [[ $THEME_SHOW_EXITCODE != true ]] && return\n  local color=$_omb_prompt_bold_purple\n  ((exitcode != 0)) && printf \"%s|%s\" \"$color\" \"$exitcode\"\n}\n\nfunction ___brainy_prompt_char {\n  local color=$_omb_prompt_bold_white\n  local prompt_char=\"${__BRAINY_PROMPT_CHAR_PS1}\"\n  printf \"%s|%s\" \"$color\" \"${prompt_char}\"\n}\n\n#########\n## cli ##\n#########\n\nfunction __brainy_show {\n  local _seg=${1:-}\n  export \"THEME_SHOW_${_seg}=true\"\n}\n\nfunction __brainy_hide {\n  local _seg=${1:-}\n  export \"THEME_SHOW_${_seg}=false\"\n}\n\nfunction _brainy_completion {\n  COMPREPLY=()\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local _action=${COMP_WORDS[1]}\n  local actions=\"show hide\"\n  local segments=\"battery clock exitcode python ruby scm sudo todo\"\n  case $_action in\n  show | hide)\n    _omb_util_split COMPREPLY \"$(compgen -W \"$segments\" -- \"$cur\")\" $'\\n' ;;\n  *)\n    _omb_util_split COMPREPLY \"$(compgen -W \"$actions\" -- \"$cur\")\" $'\\n' ;;\n  esac\n  return 0\n}\n\nfunction brainy {\n  local action=${1:-}\n  shift\n  local segs IFS=$' \\t\\n'\n  _omb_util_split segs \"$*\"\n  local func\n  case $action in\n  show)\n    func=__brainy_show;;\n  hide)\n    func=__brainy_hide;;\n  *)\n    printf 'brainy: %s: unrecognized action\\n' \"$action\" >&2\n    return 1 ;;\n  esac\n  local seg\n  for seg in \"${segs[@]}\"; do\n    seg=$(printf \"%s\" \"$seg\" | tr '[:lower:]' '[:upper:]')\n    \"$func\" \"$seg\"\n  done\n}\n\ncomplete -F _brainy_completion brainy\n\n###############\n## Variables ##\n###############\n\nexport SCM_THEME_PROMPT_PREFIX=\"\"\nexport SCM_THEME_PROMPT_SUFFIX=\"\"\n\nexport RBENV_THEME_PROMPT_PREFIX=\"\"\nexport RBENV_THEME_PROMPT_SUFFIX=\"\"\nexport RBFU_THEME_PROMPT_PREFIX=\"\"\nexport RBFU_THEME_PROMPT_SUFFIX=\"\"\nexport RVM_THEME_PROMPT_PREFIX=\"\"\nexport RVM_THEME_PROMPT_SUFFIX=\"\"\n\nexport SCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nexport SCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\n\nTHEME_SHOW_SUDO=${THEME_SHOW_SUDO:-\"true\"}\nTHEME_SHOW_SCM=${THEME_SHOW_SCM:-\"true\"}\nTHEME_SHOW_RUBY=${THEME_SHOW_RUBY:-\"false\"}\nTHEME_SHOW_PYTHON=${THEME_SHOW_PYTHON:-\"false\"}\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_SHOW_TODO=${THEME_SHOW_TODO:-\"false\"}\nTHEME_SHOW_BATTERY=${THEME_SHOW_BATTERY:-\"false\"}\nTHEME_SHOW_EXITCODE=${THEME_SHOW_EXITCODE:-\"true\"}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_bold_white\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H:%M:%S\"}\n\n__BRAINY_PROMPT_CHAR_PS1=${THEME_PROMPT_CHAR_PS1:-\">\"}\n__BRAINY_PROMPT_CHAR_PS2=${THEME_PROMPT_CHAR_PS2:-\"\\\\\"}\n\n___BRAINY_TOP_LEFT=${___BRAINY_TOP_LEFT:-\"user_info dir scm\"}\n___BRAINY_TOP_RIGHT=${___BRAINY_TOP_RIGHT:-\"python ruby todo clock battery\"}\n___BRAINY_BOTTOM=${___BRAINY_BOTTOM:-\"exitcode char\"}\n\n############\n## Prompt ##\n############\n\nfunction __brainy_ps1 {\n  printf \"%s%s%s\" \"$(____brainy_top)\" \"$(____brainy_bottom)\" \"$_omb_prompt_normal\"\n}\n\nfunction __brainy_ps2 {\n  local color=$_omb_prompt_bold_white\n  printf \"%s%s%s\" \"$color\" \"${__BRAINY_PROMPT_CHAR_PS2}  \" \"$_omb_prompt_normal\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local exitcode=$? # used by segment \"exitcode\"\n  PS1=$(__brainy_ps1)\n  PS2=$(__brainy_ps2)\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/brunton/brunton.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\nfunction is_vim_shell {\n  if [ ! -z \"$VIMRUNTIME\" ]\n  then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction scm_prompt {\n  CHAR=$(scm_char)\n  if [ $CHAR = $SCM_NONE_CHAR ]\n  then\n    return\n  else\n    _omb_util_print \" $(scm_char) (${_omb_prompt_white}$(scm_prompt_info)${_omb_prompt_normal})\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  PS1=\"${_omb_prompt_white}${_omb_prompt_background_navy} \\u${_omb_prompt_normal}\"\n  PS1+=\"${_omb_prompt_background_navy}@${_omb_prompt_brown}${_omb_prompt_background_navy}\\h $(clock_prompt) ${_omb_prompt_reset_color}\"\n  PS1+=\"${_omb_prompt_normal} $(battery_charge)\\n\"\n  PS1+=\"${_omb_prompt_bold_black}${_omb_prompt_background_white} \\w \"\n  PS1+=\"${_omb_prompt_normal}$(scm_prompt)$(is_vim_shell)\\n\"\n  PS1+=\"${_omb_prompt_white}>${_omb_prompt_normal} \"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_navy$_omb_prompt_background_white\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\" %H:%M:%S\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/candy/candy.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"${_omb_prompt_green}\\u@\\h $(clock_prompt) ${_omb_prompt_reset_color}${_omb_prompt_white}\\w${_omb_prompt_reset_color}$(scm_prompt_info)${_omb_prompt_navy} →${_omb_prompt_bold_navy} ${_omb_prompt_reset_color} \";\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_navy\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%I:%M:%S\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/clean/clean.theme.sh",
    "content": "#! bash oh-my-bash.module\n# git theming\nZSH_THEME_GIT_PROMPT_PREFIX=\"${_omb_prompt_bold_navy}(${_omb_prompt_olive}%B\"\nZSH_THEME_GIT_PROMPT_SUFFIX=\"%b${_omb_prompt_bold_navy})${_omb_prompt_reset_color} \"\nZSH_THEME_GIT_PROMPT_CLEAN=\"\"\nZSH_THEME_GIT_PROMPT_DIRTY=\"${_omb_prompt_bold_brown}✗\"\n\n\n# LS colors, made with http://geoff.greer.fm/lscolors/\nexport LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\nexport LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'\n\nfunction _omb_theme_PROMPT_COMMAND() {\n\n    if [ \"$(whoami)\" = root ]; then no_color=$_omb_prompt_brown; else no_color=$_omb_prompt_white; fi\n\n    PS1=\"${no_color}\\u${_omb_prompt_reset_color}:${_omb_prompt_navy}\\W/${_omb_prompt_reset_color} \\[\\$(scm_prompt_info)\\]$ \"\n    RPROMPT='[\\t]'\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/cooperkid/cooperkid.theme.sh",
    "content": "#! bash oh-my-bash.module\n# ------------------------------------------------------------------#\n#          FILE: cooperkid.zsh-theme                                #\n#            BY: Alfredo Bejarano                                   #\n#      BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net)      #\n# ------------------------------------------------------------------#\n\nSCM_THEME_PROMPT_DIRTY=\"${_omb_prompt_brown} ✗${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_AHEAD=\"${_omb_prompt_olive} ↑${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_CLEAN=\"${_omb_prompt_green} ✓${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_PREFIX=\" \"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nGIT_SHA_PREFIX=\"${_omb_prompt_navy}\"\nGIT_SHA_SUFFIX=\"${_omb_prompt_reset_color}\"\n\nfunction git_short_sha() {\n  SHA=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) && _omb_util_print \"$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    local return_status=\"\"\n    local ruby=\"${_omb_prompt_brown}$(_omb_prompt_print_ruby_env)${_omb_prompt_reset_color}\"\n    local user_host=\"${_omb_prompt_green}\\h @ \\w${_omb_prompt_reset_color}\"\n    local git_branch=\"$(git_short_sha)${_omb_prompt_teal}$(scm_prompt_info)${_omb_prompt_reset_color}\"\n    local prompt_symbol=' '\n    local prompt_char=\"${_omb_prompt_purple}>_${_omb_prompt_reset_color} \"\n\n    PS1=\"\\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\\n${prompt_char}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/copied-duru/README.md",
    "content": "# Copied-Duru Theme\n\nThis theme is heavily inspired by the \"Sexy\" and \"Duru\" themes. The goal was to combine the color scheme of \"Sexy\" with the style of \"Duru\", and that is exactly what this theme achieves!\n\n## Features\n\n- **Colorful Prompt:** Utilizes the vibrant color scheme from the \"Sexy\" theme.\n- **Informative Prompt:** Displays useful information such as the current time, user, host, current directory, Git branch, and Python virtual environment.\n\n## Usage\n\n- **Python Virtual Environment**Displayed in magenta\n- **User and Host:** Displayed in purple and white\n- **Current Time:** Displayed in Yellow\n- **Current Directory:** Displayed in purple\n- **Git Branch** Displayed in magenta"
  },
  {
    "path": "themes/copied-duru/copied-duru.theme.sh",
    "content": "#! bash oh-my-bash.module\n# \"Copied-Duru\" Prompt, inspired by \"Sexy\" and obviously \"Duru\"\n\nsource \"$OSH/themes/sexy/sexy.theme.sh\"\n\nif [[ $COLORTERM == gnome-* && $TERM == xterm ]] && infocmp gnome-256color &>/dev/null; then\n  export TERM=gnome-256color\nelif [[ $TERM != dumb ]] && infocmp xterm-256color &>/dev/null; then\n  export TERM=xterm-256color\nfi\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local current_time='\\D{%H:%M:%S}'\n  local python_venv=\n  local just_a_format=' '$MAGENTA'(%s)'\n\n  if [[ $VIRTUAL_ENV ]]; then\n    printf -v python_venv \"$just_a_format\" \"${VIRTUAL_ENV##*/}\"\n  elif [[ $CONDA_DEFAULT_ENV ]]; then\n    printf -v python_venv \"$just_a_format\" \"${CONDA_DEFAULT_ENV##*/}\"\n  fi\n\n  local git_prefix=\n  [[ $(_omb_prompt_git branch 2> /dev/null) ]] && git_prefix=' on '\n  \n  PS1=$GREEN'#'$python_venv' '$PURPLE'\\u@'$WHITE'\\h'$GREEN\n  PS1+=' '$current_time'>'$RESET\n  PS1+=' '$PURPLE'<\\w'$WHITE$git_prefix$MAGENTA$(parse_git_branch)\n  PS1+=$PURPLE'>'$RESET'\\n'$GREEN'$ '$RESET\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/cupcake/cupcake.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Emoji-based theme to display source control management and\n# virtual environment info beside the ordinary bash prompt.\n\n# Theme inspired by:\n#  - Naming your Terminal tabs in OSX Lion - http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/\n#  - Bash_it sexy theme\n\n# Demo:\n# ┌ⓔ virtualenv 💁user @ 💻 host in 📁directory on 🌿branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗\n# └❯ cd .bash-it/themes/cupcake\n\n# virtualenv prompts\nVIRTUALENV_CHAR=\"ⓔ \"\nOMB_PROMPT_VIRTUALENV_FORMAT='%s'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\n# SCM prompts\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=\"[±] \"\nSCM_GIT_BEHIND_CHAR=\"${_omb_prompt_brown}↓${_omb_prompt_normal}\"\nSCM_GIT_AHEAD_CHAR=\"${_omb_prompt_bold_green}↑${_omb_prompt_normal}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${_omb_prompt_bold_olive}•${_omb_prompt_normal}\"\nSCM_GIT_STAGED_CHAR=\"${_omb_prompt_bold_green}+${_omb_prompt_normal}\"\n\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# Git status prompts\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n# ICONS =======================================================================\n\nicon_start=\"┌\"\nicon_user=\"💁  \"\nicon_host=\" @ 💻  \"\nicon_directory=\" in 📁  \"\nicon_branch=\"🌿\"\nicon_end=\"└❯ \"\n\n# extra spaces ensure legiblity in prompt\n\n# FUNCTIONS ===================================================================\n\n# Rename tab\nfunction tabname {\n  printf '\\e]1;%s\\a' \"$1\"\n}\n\n# Rename window\nfunction winname {\n  printf '\\e]2;%s\\a' \"$1\"\n}\n\n# PROMPT OUTPUT ===============================================================\n\n# Displays the current prompt\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1='\\n'$icon_start$(_omb_prompt_print_python_venv)\n  PS1+=$icon_user$_omb_prompt_bold_brown'\\u'\n  PS1+=$_omb_prompt_normal$icon_host$_omb_prompt_bold_teal'\\h'\n  PS1+=$_omb_prompt_normal$icon_directory$_omb_prompt_bold_purple'\\W'\n  PS1+=$_omb_prompt_normal$([[ -n $(_omb_prompt_git branch 2> /dev/null) ]] && _omb_util_print \" on $icon_branch  \")\n  PS1+=$_omb_prompt_white$(scm_prompt_info)$_omb_prompt_normal'\\n'$icon_end\n  PS2=$icon_end\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/demula/demula.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Theme inspired on:\n#  - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n#  - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n#  - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n#  - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n#  - Bash_it modern theme\n#\n# Screenshot: http://goo.gl/VCmX5\n# by Jesus de Mula <jesus@demula.name>\n\n# For the real Monokai colors you should add these to your .XDefaults or\n# terminal configuration:\n#! ----------------------------------------------------------- TERMINAL COLORS\n#! monokai - http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/\n#*background: #272822\n#*foreground: #E2DA6E\n#*color0: black\n#! mild red\n#*color1: #CD0000\n#! light green\n#*color2: #A5E02D\n#! orange (yellow)\n#*color3: #FB951F\n#! \"dark\" blue\n#*color4: #076BCC\n#! hot pink\n#*color5: #F6266C\n#! cyan\n#*color6: #64D9ED\n#! gray\n#*color7: #E5E5E5\n\n# ----------------------------------------------------------------- COLOR CONF\nD_DEFAULT_COLOR=\"${_omb_prompt_normal}\"\nD_INTERMEDIATE_COLOR=\"${_omb_prompt_white}\"\nD_USER_COLOR=\"${_omb_prompt_purple}\"\nD_SUPERUSER_COLOR=\"${_omb_prompt_brown}\"\nD_MACHINE_COLOR=\"${_omb_prompt_teal}\"\nD_DIR_COLOR=\"${_omb_prompt_green}\"\nD_SCM_COLOR=\"${_omb_prompt_olive}\"\nD_BRANCH_COLOR=\"${_omb_prompt_olive}\"\nD_CHANGES_COLOR=\"${_omb_prompt_white}\"\nD_CMDFAIL_COLOR=\"${_omb_prompt_brown}\"\nD_VIMSHELL_COLOR=\"${_omb_prompt_teal}\"\n\n# ------------------------------------------------------------------ FUNCTIONS\ncase $TERM in\n  xterm*)\n      TITLEBAR=\"\\033]0;\\w\\007\"\n      ;;\n  *)\n      TITLEBAR=\"\"\n      ;;\nesac\n\nfunction is_vim_shell {\n  if [ ! -z \"$VIMRUNTIME\" ];\n  then\n    _omb_util_print \"${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}\\\nvim shell${D_DEFAULT_COLOR} \"\n  fi\n}\n\nfunction mitsuhikos_lastcommandfailed {\n  code=$?\n  if [ $code != 0 ];\n  then\n    _omb_util_print \"${D_INTERMEDIATE_COLOR}exited ${D_CMDFAIL_COLOR}\\\n$code ${D_DEFAULT_COLOR}\"\n  fi\n}\n\n# vcprompt for scm instead of oh-my-bash default\nfunction demula_vcprompt {\n  if [ ! -z \"$VCPROMPT_EXECUTABLE\" ];\n  then\n    local D_VCPROMPT_FORMAT=\"on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:\\\n${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}\"\n    $VCPROMPT_EXECUTABLE -f \"$D_VCPROMPT_FORMAT\"\n  fi\n}\n\n# checks if the plugin is installed before calling battery_charge\nfunction safe_battery_charge {\n  if [ -e \"${OSH}/plugins/battery/battery.plugin.sh\" ];\n  then\n    battery_charge\n  fi\n}\n\n# -------------------------------------------------------------- PROMPT OUTPUT\nfunction _omb_theme_PROMPT_COMMAND {\n  local LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)\n  local SAVE_CURSOR='\\033[s'\n  local RESTORE_CURSOR='\\033[u'\n  local MOVE_CURSOR_RIGHTMOST='\\033[500C'\n  local MOVE_CURSOR_5_LEFT='\\033[5D'\n\n  if [ $(uname) = \"Linux\" ];\n  then\n    PS1=\"${TITLEBAR}\n${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\\\n$(safe_battery_charge)${RESTORE_CURSOR}\\\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n  else\n    PS1=\"${TITLEBAR}\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\\\n$(safe_battery_charge)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n  fi\n\n  PS2=\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/developer/developer.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" $_omb_prompt_green|\"\nSCM_THEME_PROMPT_SUFFIX=\"$_omb_prompt_green|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" $_omb_prompt_green|\"\nGIT_THEME_PROMPT_SUFFIX=\"$_omb_prompt_green|\"\n\nRVM_THEME_PROMPT_PREFIX='|'\nRVM_THEME_PROMPT_SUFFIX='|'\n\nfunction __bobby_clock {\n  _omb_util_put \"$(clock_prompt) \"\n\n  if [[ $THEME_SHOW_CLOCK_CHAR == true ]]; then\n    _omb_util_put \"$(clock_char) \"\n  fi\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readNodeVersion {\n  local val_node=$(node --version 2>/dev/null)\n  if _omb_util_command_exists nvm; then\n    val_node=\"nvm $val_node\"\n  else\n    # Si nvm no está instalado, utilizar \"njs\"\n    val_node=\"njs $val_node\"\n  fi\n  REPLY=$val_node\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readGoVersion {\n  local val_go=$(go version 2>/dev/null | cut -d ' ' -f 3 | cut -d 'o' -f 2)\n  REPLY=\"go $val_go\"\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__read_ruby_version {\n  local val_rb=$(ruby --version 2>/dev/null | cut -d ' ' -f 2)\n  if _omb_util_command_exists rvm; then\n    val_rb=\"rvm $val_rb\"\n  else\n    # Si nvm no está instalado, utilizar \"njs\"\n    val_rb=\"rb $val_rb\"\n  fi\n  REPLY=$val_rb\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readPyVersion {\n  local val_py=$(python --version 2>/dev/null | cut -d ' ' -f 2)\n  if _omb_util_command_exists conda; then\n    local condav=$(conda env list | awk '$2 == \"*\" {print $1}')\n    val_py=\"conda<$condav> $val_py\"\n  else\n    # Si nvm no está instalado, utilizar \"njs\"\n    val_py=\"py $val_py\"\n  fi\n  REPLY=$val_py\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuLoad__cpuLoad {\n  # Ejecutar el comando top en modo batch, filtrar por el nombre de usuario\n  # actual.  Extraer el porcentaje de carga de la CPU excluyendo el estado\n  # \"idle\" usando awk\n  local cpu_load=$(top -b -n 1 -u \"$USER\" | awk -F ',' '/Cpu\\(s\\)/ {gsub(/[^.0-9]/,\"\",$4);printf(\"%d\", 100.0 - $4)}')\n\n  # Almacenar la carga de la CPU en la variable 'REPLY'\n  REPLY=$cpu_load\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuLoad {\n  _omb_theme_developer__readCpuLoad__cpuLoad\n  local current_cpu_load=$REPLY\n\n  local color=$_omb_prompt_reset_color\n  # Condicional para verificar los rangos\n  if ((current_cpu_load <= 40)); then\n    color=$_omb_prompt_teal\n  elif ((current_cpu_load >= 41 && current_cpu_load <= 50)); then\n    color=$_omb_prompt_reset_color\n  elif ((current_cpu_load >= 51 && current_cpu_load <= 60)); then\n    color=$_omb_prompt_olive\n  elif ((current_cpu_load >= 61 && current_cpu_load <= 75)); then\n    color=$_omb_prompt_red\n  elif ((current_cpu_load >= 76)); then\n    color=$_omb_prompt_red'!'\n  fi\n  REPLY=$color$current_cpu_load\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuTemp_genericLinuxTemp {\n  local file=${1:-/sys/class/thermal/thermal_zone0/temp}\n  if [[ ! -e $file ]]; then\n    REPLY=\n    return 1\n  fi\n\n  local temp_linux=$(< \"$file\")\n  local temp_in_c=$((temp_linux / 1000))\n  REPLY=$temp_in_c\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuTemp_OPi5pTemp {\n  _omb_theme_developer__readCpuTemp_genericLinuxTemp /sys/class/thermal/thermal_zone4/temp\n}\n\n# if is a specific platfor use spacific configuration otherwise use default\n# linux configuration.\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuTemp_currentPlatform {\n  # 2 ways to detect the platform 1) use a env var 2) some scrapping from the\n  # current system info (this is bash so just linux is considered) env var is\n  # $PROMPT_THEME_PLATFORM\n  # TODO: this is a first basic implementation this could be better but for now\n  # is ok\n  local platform_according_env=$PROMPT_THEME_PLATFORM\n\n  # if opi5 -> search for rk3588 tag in kernel and ...\n  local opi5p_kernel_tag=$(uname --kernel-release 2>/dev/null | cut -d '-' -f 3)\n\n  if [[ $platform_according_env == OPI5P || $opi5p_kernel_tag == rk3588 ]]; then\n    REPLY=OPI5P\n  else\n    REPLY=linux\n  fi\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readCpuTemp {\n  _omb_theme_developer__readCpuTemp_currentPlatform\n  local currentPlatform=$REPLY\n\n  if [[ $currentPlatform == linux ]]; then\n    _omb_theme_developer__readCpuTemp_genericLinuxTemp\n  elif [[ $currentPlatform == OPI5P ]]; then\n    _omb_theme_developer__readCpuTemp_OPi5pTemp\n  fi\n  local temp_in_c=$REPLY\n  [[ $REPLY ]] || return 0\n\n  local color\n  # Condicional para verificar los rangos\n  if ((temp_in_c >= 1 && temp_in_c <= 40)); then\n    color=$_omb_prompt_teal\n  elif ((temp_in_c >= 41 && temp_in_c <= 50)); then\n    color=$_omb_prompt_reset_color\n  elif ((temp_in_c >= 51 && temp_in_c <= 60)); then\n    color=$_omb_prompt_olive\n  elif ((temp_in_c >= 61 && temp_in_c <= 75)); then\n    color=$_omb_prompt_red\n  elif ((temp_in_c >= 76 && temp_in_c)); then\n    color=$_omb_prompt_red!\n  fi\n  REPLY=\"$color${temp_in_c}°\"\n}\n\n## @var[out] REPLY\nfunction _omb_theme_developer__readDefaultIp {\n  # this should work on every \"new\" linux distro\n\n  # Obtiene el nombre de la interfaz de red activa\n  local interface=$(ip -o -4 route show to default 2>/dev/null | awk '{print $5}')\n\n  # Obtiene la dirección IP de la interfaz de red activa\n  local ip_address=$(ip -o -4 address show dev \"$interface\" 2>/dev/null | awk '{split($4, a, \"/\"); print a[1]}')\n\n  REPLY=$ip_address\n}\n\n# prompt constructor\nfunction _omb_theme_PROMPT_COMMAND {\n  local REPLY\n  _omb_theme_developer__readCpuTemp\n  local cputemp=$REPLY\n  _omb_theme_developer__readCpuLoad # this is very slow\n  local cpuload=$REPLY\n  _omb_theme_developer__readPyVersion\n  local pyversion=$REPLY\n  _omb_theme_developer__readNodeVersion\n  local nodeversion=$REPLY\n  _omb_theme_developer__readGoVersion\n  local goversion=$REPLY\n  _omb_theme_developer__readDefaultIp\n  local defaultip=$REPLY\n\n  local tech_versions=$nodeversion\n  [[ $pyversion ]] && tech_versions+=${tech_versions:+$RVM_THEME_PROMPT_PREFIX}$pyversion\n  [[ $goversion ]] && tech_versions+=${tech_versions:+$RVM_THEME_PROMPT_PREFIX}$goversion\n  [[ $tech_versions ]] && tech_versions=$_omb_prompt_reset_color$tech_versions\n\n  local top_bar=\"\\n$(battery_char)$(__bobby_clock)$tech_versions${cputemp:+ $cputemp}${cpuload:+ $cpuload%} $_omb_prompt_purple\\h${defaultip:+ ($defaultip)} ${_omb_prompt_reset_color}in $_omb_prompt_green\\w\\n\"\n\n  local prompt_line=\"$_omb_prompt_bold_teal$(scm_prompt_char_info) $_omb_prompt_green→$_omb_prompt_reset_color \"\n\n  # defining the final prompt\n  PS1=\"$top_bar$prompt_line\"\n}\n\nTHEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-\"true\"}\nTHEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-\"$_omb_prompt_brown\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_bold_teal\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%Y-%m-%d %H:%M\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/dos/dos.theme.sh",
    "content": "#! bash oh-my-bash.module\nPROMPT=\"\\w>>\"\n"
  },
  {
    "path": "themes/doubletime/doubletime.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=''\nSCM_THEME_PROMPT_CLEAN=''\nSCM_GIT_CHAR=\"${_omb_prompt_bold_teal}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nif [[ $RVM_THEME_PROMPT_COLOR ]]; then\n  RVM_THEME_PROMPT_COLOR=$(printf \"${RVM_THEME_PROMPT_COLOR//%/%%}\");\nelse\n  RVM_THEME_PROMPT_COLOR=$_omb_prompt_brown\nfi\nRVM_THEME_PROMPT_PREFIX=\"(${RVM_THEME_PROMPT_COLOR}rb${_omb_prompt_normal}: \"\nRVM_THEME_PROMPT_SUFFIX=\") \"\nif [[ $VIRTUALENV_THEME_PROMPT_COLOR ]]; then\n  VIRTUALENV_THEME_PROMPT_COLOR=$(printf \"${VIRTUALENV_THEME_PROMPT_COLOR//%/%%}\");\nelse\n  VIRTUALENV_THEME_PROMPT_COLOR=$_omb_prompt_green\nfi\nOMB_PROMPT_VIRTUALENV_FORMAT=\"(${VIRTUALENV_THEME_PROMPT_COLOR}py${_omb_prompt_normal}: %s) \"\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nif [[ $THEME_PROMPT_HOST_COLOR ]]; then\n  THEME_PROMPT_HOST_COLOR=$(printf \"${THEME_PROMPT_HOST_COLOR//%/%%}\");\nelse\n  THEME_PROMPT_HOST_COLOR=$_omb_prompt_navy\nfi\n\nfunction doubletime_scm_prompt {\n  CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  elif [[ $CHAR == \"$SCM_GIT_CHAR\" ]]; then\n    _omb_util_print \"$(git_prompt_status)\"\n  else\n    _omb_util_print \"[$(scm_prompt_info)]\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  # Save history\n  history -a\n  history -c\n  history -r\n  PS1=\"\n$(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env)\\w\n$(doubletime_scm_prompt)$_omb_prompt_reset_color $ \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nfunction git_prompt_status {\n  local git_status_output\n  git_status_output=$(_omb_prompt_git status 2> /dev/null )\n  if grep -q 'Changes not staged' <<< \"$git_status_output\"; then\n    git_status=\"${_omb_prompt_bold_brown}$(scm_prompt_info) ✗\"\n  elif grep -q 'Changes to be committed' <<< \"$git_status_output\"; then\n     git_status=\"${_omb_prompt_bold_olive}$(scm_prompt_info) ^\"\n  elif grep -q 'Untracked files' <<< \"$git_status_output\"; then\n     git_status=\"${_omb_prompt_bold_teal}$(scm_prompt_info) +\"\n  elif grep -q 'nothing to commit' <<< \"$git_status_output\"; then\n     git_status=\"${_omb_prompt_bold_green}$(scm_prompt_info) ${_omb_prompt_green}✓\"\n  else\n    git_status=$(scm_prompt_info)\n  fi\n  _omb_util_print \"[$git_status${_omb_prompt_normal}]\"\n\n}\n"
  },
  {
    "path": "themes/doubletime_multiline/doubletime_multiline.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/doubletime/doubletime.theme.sh\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  # Save history\n  history -a\n  history -c\n  history -r\n  PS1=\"\n$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv)$(_omb_prompt_print_ruby_env)\n\\w\n$(doubletime_scm_prompt)$_omb_prompt_reset_color $ \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/doubletime/doubletime.theme.sh\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  # Save history\n  history -a\n  history -c\n  history -r\n  PS1=\"\n$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\\u@${THEME_PROMPT_HOST}$_omb_prompt_reset_color] $(_omb_prompt_print_python_venv)\n\\w\n$(doubletime_scm_prompt)$_omb_prompt_reset_color $ \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/dulcie/dulcie.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Simplistic one-liner theme to display source control management info beside\n# the ordinary Linux bash prompt.\n#\n# Demo:\n#\n# [ritola@localhost ~]$ cd .bash-it/themes/dulcie\n# [ritola@localhost |master ✓| dulcie]$ # This is single line mode\n# |bash-it|± master ✓|\n# [ritola@localhost dulcie]$ # In multi line, the SCM info is in the separate line\n#\n# Configuration. Change these by adding them in your .bash_profile\n\nDULCIE_COLOR=${DULCIE_COLOR:=1} # 0 = monochrome, 1 = colorful\nDULCIE_MULTILINE=${DULCIE_MULTILINE:=1} # 0 = Single line, 1 = SCM in separate line\n\nfunction dulcie_color {\n  echo -en \"\\[\\e[38;5;${1}m\\]\"\n}\n\nfunction dulcie_background {\n  echo -en \"\\[\\e[48;5;${1}m\\]\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  color_user_root=$(dulcie_color 169)\n  color_user_nonroot=\"${_omb_prompt_green}\"\n  color_host_local=$(dulcie_color 230)\n  color_host_remote=$(dulcie_color 214)\n  color_rootdir=$(dulcie_color 117)\n  color_workingdir=$(dulcie_color 117)\n  background_scm=$(dulcie_background 238)\n\n  SCM_THEME_ROOT_SUFFIX=\"|$(scm_char) \"\n\n  # Set colors\n  if [ \"${DULCIE_COLOR}\" -eq \"1\" ]; then\n    if [[ $EUID -ne 0 ]]; then\n      color_user=\"${color_user_nonroot}\"\n    else\n      color_user=\"${color_user_root}\"\n    fi\n\n    if [[ -n \"${SSH_CLIENT}\" ]]; then\n      color_host=\"${color_host_remote}\"\n    else\n      color_host=\"${color_host_local}\"\n    fi\n\n    DULCIE_USER=\"${color_user}\\u${_omb_prompt_reset_color}\"\n    DULCIE_HOST=\"${color_host}\\h${_omb_prompt_reset_color}\"\n    DULCIE_WORKINGDIR=\"${color_workingdir}\\W${_omb_prompt_reset_color}\"\n    DULCIE_PROMPTCHAR=\"${color_user}\"'\\$'\"${_omb_prompt_reset_color}\"\n\n    SCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗${_omb_prompt_reset_color}\"\n    SCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\n    DULCIE_SCM_BACKGROUND=\"${background_scm}\"\n    DULCIE_SCM_DIR_COLOR=\"${color_rootdir}\"\n    SCM_THEME_ROOT_SUFFIX=\"${_omb_prompt_reset_color}${SCM_THEME_ROOT_SUFFIX}\"\n    SCM_THEME_PROMPT_DIRTY=\" $(dulcie_color 1)✗${_omb_prompt_reset_color}\"\n    SCM_THEME_PROMPT_CLEAN=\" $(dulcie_color 10)✓${_omb_prompt_reset_color}\"\n  else\n    DULCIE_USER='\\u'\n    DULCIE_HOST='\\h'\n    DULCIE_WORKINGDIR='\\W'\n    DULCIE_PROMPTCHAR='\\$'\n\n    DULCIE_SCM_BACKGROUND=\"\"\n    DULCIE_SCM_DIR_COLOR=\"\"\n    SCM_THEME_DIR_COLOR=\"\"\n    SCM_THEME_PROMPT_DIRTY=\" ✗\"\n    SCM_THEME_PROMPT_CLEAN=\" ✓\"\n  fi\n\n  # Change terminal title\n  printf \"\\033]0;%s@%s:%s\\007\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/\\~}\"\n\n  # Open the new terminal in the same directory\n  _omb_util_function_exists __vte_osc7 && __vte_osc7\n\n  PS1=\"${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]\"\n  if [[ \"${DULCIE_MULTILINE}\" -eq \"1\" ]]; then\n    PS1=\"${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]\"\n    if [[ \"$(scm_prompt_info)\" ]]; then\n      SCM_THEME_PROMPT_PREFIX=\"${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}\"\n      SCM_THEME_PROMPT_SUFFIX=\"|${_omb_prompt_normal}\"\n      PS1=\"$(scm_prompt_info)\\n${PS1}\"\n    fi\n  else\n    SCM_THEME_PROMPT_PREFIX=\" ${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}\"\n    SCM_THEME_PROMPT_SUFFIX=\"|${_omb_prompt_normal}\"\n    PS1=\"${_omb_prompt_reset_color}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${_omb_prompt_reset_color} ${DULCIE_WORKINGDIR}]\"\n  fi\n  PS1=\"${PS1}${DULCIE_PROMPTCHAR} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/duru/duru.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_teal} on ${_omb_prompt_green}\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}with changes\"\nSCM_THEME_PROMPT_CLEAN=\"\"\n\nfunction venv {\n  if [ -n \"$VIRTUAL_ENV\" ]\n  then\n    local env=$VIRTUAL_ENV\n    _omb_util_print \"${gray} in ${_omb_prompt_red}${env##*/} \"\n  fi\n}\n\nfunction last_two_dirs {\n  pwd|rev|awk -F / '{print $1,$2}'|rev|sed s_\\ _/_|sed \"s|$(sed 's,\\/,,'<<<\"$HOME\")|~|g\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  PS1=\"${_omb_prompt_olive}# ${_omb_prompt_reset_color}$(last_two_dirs)$(scm_prompt_info)${_omb_prompt_reset_color}$(venv)${_omb_prompt_reset_color} ${_omb_prompt_teal}\\n> ${_omb_prompt_reset_color}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/edsonarios/edsonarios.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# If you want the same background color that the screenshot, modify the\n# background option in your terminal with the code: #333333\n\n# For unstaged(*) and staged(+) values next to branch name in __git_ps1\nGIT_PS1_SHOWDIRTYSTATE=\"enabled\"\nOMB_PROMPT_VIRTUALENV_FORMAT=' [%s]'\nOMB_PROMPT_CONDAENV_FORMAT=' [%s]'\n\nOMB_THEME_EDSONARIOS_STATUS_BAD=\"${_omb_prompt_bold_brown}❯_${_omb_prompt_normal} \"\nOMB_THEME_EDSONARIOS_STATUS_OK=\"${_omb_prompt_bold_green}❯_${_omb_prompt_normal} \"\n\nfunction _omb_theme_PROMPT_COMMAND {\n  if (($? == 0)); then\n    local ret_status=${OMB_THEME_EDSONARIOS_STATUS_OK-}\n  else\n    local ret_status=${OMB_THEME_EDSONARIOS_STATUS_BAD-}\n  fi\n\n  # If the current directory is the same as HOME, will just show \"~/\".  If not,\n  # show the complete route unlike \\w.\n  if [[ $PWD == \"$HOME\" ]]; then\n    local directory='\\W/'\n  else\n    local directory=\"$PWD/\"\n  fi\n\n  local python_venv\n  _omb_prompt_get_python_venv\n\n  PS1=\"\\n⚡ \\t $_omb_prompt_bold_teal${directory}$_omb_prompt_bold_purple$python_venv$_omb_prompt_bold_green$(__git_ps1 \" (%s)\") \\n${ret_status}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/emperor/emperor.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction get_hour_color {\n    hour_color=$_omb_prompt_brown\n    min=$(date +%M)\n    if [ \"$min\" -lt \"15\" ]; then\n        hour_color=$_omb_prompt_white\n    elif [ \"$min\" -lt \"30\" ]; then\n        hour_color=$_omb_prompt_green\n    elif [ \"$min\" -lt \"45\" ]; then\n        hour_color=$_omb_prompt_olive\n    else\n        hour_color=$_omb_prompt_brown\n    fi\n    _omb_util_print \"$hour_color\"\n}\n\nfunction __emperor_clock {\n  THEME_CLOCK_COLOR=$(get_hour_color)\n  clock_prompt\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"\\n$(__emperor_clock)${_omb_prompt_purple}\\h ${_omb_prompt_reset_color}in ${prompt_color}\\w\\n${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n}\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H \"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/envy/envy.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"\\n${_omb_prompt_olive}$(_omb_prompt_print_ruby_env) ${_omb_prompt_purple}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w\\n${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_green}$(scm_prompt_info) ${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/font/font.theme.sh",
    "content": "#! bash oh-my-bash.module\n#\n# One line prompt showing the following configurable information\n# for git:\n# time (virtual_env) username@hostname pwd git_char|git_branch git_dirty_status|→\n#\n# The → arrow shows the exit status of the last command:\n# - bold green: 0 exit status\n# - bold red: non-zero exit status\n#\n# Example outside git repo:\n# 07:45:05 user@host ~ →\n#\n# Example inside clean git repo:\n# 07:45:05 user@host .oh-my-bash ±|master|→\n#\n# Example inside dirty git repo:\n# 07:45:05 user@host .oh-my-bash ±|master ✗|→\n#\n# Example with virtual environment:\n# 07:45:05 (venv) user@host ~ →\n#\n\nSCM_NONE_CHAR=''\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_green}|\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\nSCM_GIT_SHOW_MINIMAL_INFO=true\n\nCLOCK_THEME_PROMPT_PREFIX=''\nCLOCK_THEME_PROMPT_SUFFIX=' '\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_bold_navy\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%I:%M:%S\"}\n\nOMB_PROMPT_VIRTUALENV_FORMAT='(%s) '\nOMB_PROMPT_CONDAENV_FORMAT='(%s) '\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    # This needs to be first to save last command return code\n    local RC=\"$?\"\n\n    local hostname=\"${_omb_prompt_bold_gray}\\u@\\h\"\n    local python_venv; _omb_prompt_get_python_venv\n    python_venv=$_omb_prompt_white$python_venv\n    local spack_env; _omb_prompt_get_spack_env\n    spack_env=$_omb_prompt_white$spack_env\n\n    # Set return status color\n    if [[ ${RC} == 0 ]]; then\n        ret_status=\"${_omb_prompt_bold_green}\"\n    else\n        ret_status=\"${_omb_prompt_bold_brown}\"\n    fi\n\n    # Append new history lines to history file\n    history -a\n\n    PS1=\"$(clock_prompt)$spack_env$python_venv${hostname} ${_omb_prompt_bold_teal}\\W $(scm_prompt_char_info)${ret_status}→ ${_omb_prompt_normal}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/gallifrey/gallifrey.theme.sh",
    "content": "#! bash oh-my-bash.module\n# scm theming\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_olive}(\"\nSCM_THEME_PROMPT_SUFFIX=\")${_omb_prompt_normal}\"\n\nSCM_THEME_PROMPT_DIRTY=\"*\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_GIT_CHAR=\"g\"\nSCM_SVN_CHAR=\"s\"\nSCM_HG_CHAR=\"h\"\n\n### TODO: openSUSE has already colors enabled, check if those differs from stock\n# LS colors, made with http://geoff.greer.fm/lscolors/\n# export LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\n# export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'\n\nfunction scm_prompt {\n    CHAR=$(scm_char)\n    if [ $CHAR = $SCM_NONE_CHAR ]\n        then\n            return\n        else\n            _omb_util_print \"$(scm_prompt_info) \"\n    fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n    ps_host=\"${_omb_prompt_green}\\h${_omb_prompt_normal}\";\n    ps_user_mark=\"${_omb_prompt_bold}\\$${_omb_prompt_normal}\";\n    ps_root_mark=\"${_omb_prompt_normal}§\"\n    ps_path=\"${_omb_prompt_normal}\\w\";\n\n    # make it work\n    case $(id -u) in\n        0) PS1=\"$ps_host $ps_path $(scm_prompt)$ps_root_mark \"\n            ;;\n        *) PS1=\"$ps_host $ps_path $(scm_prompt)$ps_user_mark \"\n            ;;\n    esac\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/garo/garo.theme.sh",
    "content": "#! bash oh-my-bash.module\n#\n# One line prompt showing the following configurable information\n# for git:\n# (virtual_env) username pwd git_char|git_branch git_dirty_status|→\n#\n# The → arrow shows the exit status of the last command:\n# - bold green: 0 exit status\n# - bold red: non-zero exit status\n#\n# Example outside git repo:\n# 07:45:05 user@host ~ →\n#\n# Example inside clean git repo:\n# 07:45:05 user@host ~/.oh-my-bash ±|master|→\n#\n# Example inside dirty git repo:\n# 07:45:05 user@host ~/.oh-my-bash ±|master ✗|→\n#\n# Example with virtual environment:\n# 07:45:05 (venv) user@host ~ →\n#\n\nSCM_NONE_CHAR=''\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_green}|\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\nSCM_GIT_SHOW_MINIMAL_INFO=true\n\nOMB_PROMPT_VIRTUALENV_FORMAT='(%s) '\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    # This needs to be first to save last command return code\n    local RC=\"$?\"\n\n    local hostname=\"${_omb_prompt_bold_gray}\\u\"\n    local python_venv; _omb_prompt_get_python_venv\n    python_venv=$_omb_prompt_white$python_venv\n\n    # Set return status color\n    if [[ ${RC} == 0 ]]; then\n        ret_status=\"${_omb_prompt_bold_green}\"\n    else\n        ret_status=\"${_omb_prompt_bold_brown}\"\n    fi\n\n    # Append new history lines to history file\n    history -a\n\n    PS1=\"$python_venv${hostname} ${_omb_prompt_bold_teal}\\w $(scm_prompt_char_info)${ret_status}→ ${_omb_prompt_normal}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/half-life/half-life.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nOSH_THEME_GIT_PROMPT_DIRTY=\"✗\"\nOSH_THEME_GIT_PROMPT_CLEAN=\"✓\"\n\n# Nicely formatted terminal prompt\nfunction _omb_theme_half_way_prompt_scm {\n  local CHAR=$(scm_char)\n  if [[ $CHAR != \"$SCM_NONE_CHAR\" ]]; then\n    printf '%s' \" on ${_omb_prompt_navy}$(git_current_branch)$(parse_git_dirty)${_omb_prompt_normal} \"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local ps_username=\"${_omb_prompt_purple}\\u${_omb_prompt_normal}\"\n  local ps_path=\"${_omb_prompt_green}\\w${_omb_prompt_normal}\"\n  local ps_user_mark=\"${_omb_prompt_red}λ${_omb_prompt_normal}\"\n\n  local python_venv\n  _omb_prompt_get_python_venv\n\n  PS1=\"$ps_username in $python_venv$ps_path$(_omb_theme_half_way_prompt_scm) $ps_user_mark \"\n}\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:-false}\nOMB_PROMPT_VIRTUALENV_FORMAT=\"${_omb_prompt_olive}(%s)${_omb_prompt_reset_color} \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/hawaii50/hawaii50.theme.sh",
    "content": "#! bash oh-my-bash.module\n#\n# This theme was obviously inspired a lot by\n#\n# - Demula theme\n#\n# which in itself was inspired by :\n#\n# - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n# - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n# - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n# - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n# - Bash_it modern theme\n#\n# Hawaii50 theme supports :\n#\n# - configurable directory length\n# - hg, svn, git detection (I work in all of them)\n# - virtualenv, rvm + gemsets\n#\n# Screenshot: http://i.imgur.com/4IAMJ.png\n#\n# by Ryan Kanno <ryankanno@localkinegrinds.com>\n#\n# And yes, we code out in Hawaii. :D\n#\n# Note: I also am really new to this bash scripting game, so if you see things\n# that are flat out wrong, or if you think of something neat, just send a pull\n# request.  This probably only works on a Mac - as some functions are OS\n# specific like getting ip, etc.\n#\n\n# IMPORTANT THINGS TO CHANGE ==================================================\n\n# Show IP in prompt\n# One thing to be weary about if you have slow Internets\nIP_ENABLED=1\n\n# virtual prompts\nVIRTUAL_PROMPT_ENABLED=1\n\n# COLORS ======================================================================\nORANGE='\\[\\e[0;33m\\]'\n\nDEFAULT_COLOR=\"${_omb_prompt_white}\"\n\nUSER_COLOR=\"${_omb_prompt_purple}\"\nSUPERUSER_COLOR=\"${_omb_prompt_brown}\"\nMACHINE_COLOR=$ORANGE\nIP_COLOR=$ORANGE\nDIRECTORY_COLOR=\"${_omb_prompt_green}\"\n\nVE_COLOR=\"${_omb_prompt_teal}\"\nRVM_COLOR=\"${_omb_prompt_teal}\"\n\nREF_COLOR=\"${_omb_prompt_purple}\"\n\n# SCM prompts\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_PREFIX=' on '\nSCM_THEME_PROMPT_SUFFIX=''\n\n# rvm prompts\nRVM_THEME_PROMPT_PREFIX=''\nRVM_THEME_PROMPT_SUFFIX=''\n\n# virtualenv prompts\nOMB_PROMPT_VIRTUALENV_FORMAT='%s'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nVIRTUAL_THEME_PROMPT_PREFIX=' using '\nVIRTUAL_THEME_PROMPT_SUFFIX=''\n\n# Max length of PWD to display\nMAX_PWD_LENGTH=20\n\n# Max length of Git Hex to display\nMAX_GIT_HEX_LENGTH=5\n\n# IP address\nIP_SEPARATOR=', '\n\n# FUNCS =======================================================================\n\nfunction get_ip_info {\n    local myip=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\\.]+')\n    echo -e \"$(ips | sed -e :a -e '$!N;s/\\n/${IP_SEPARATOR}/;ta' | sed -e 's/127\\.0\\.0\\.1\\${IP_SEPARATOR}//g'), ${myip}\"\n}\n\n# Displays ip prompt\nfunction ip_prompt_info() {\n    if [[ $IP_ENABLED == 1 ]]; then\n        echo -e \" ${DEFAULT_COLOR}(${IP_COLOR}$(get_ip_info)${DEFAULT_COLOR})\"\n    fi\n}\n\n# Displays virtual info prompt (virtualenv/rvm)\nfunction virtual_prompt_info() {\n    local python_venv; _omb_prompt_get_python_venv\n    local ruby_env; _omb_prompt_get_ruby_env\n    local virtual_prompt=\"\"\n\n    local prefix=${VIRTUAL_THEME_PROMPT_PREFIX}\n    local suffix=${VIRTUAL_THEME_PROMPT_SUFFIX}\n\n    # If no virtual info, just return\n    [[ $python_venv$ruby_env ]] || return\n\n    # If virtual_env info present, append to prompt\n    [[ $python_venv ]] && virtual_prompt=\"virtualenv: ${VE_COLOR}$python_venv${DEFAULT_COLOR}\"\n\n    if [[ $ruby_env ]]; then\n        virtual_prompt=\"${virtual_prompt:+$virtual_prompt, }rvm: ${RVM_COLOR}$ruby_env${DEFAULT_COLOR}\"\n    fi\n    echo -e \"$prefix$virtual_prompt$suffix\"\n}\n\n# Parse git info\nfunction git_prompt_info() {\n    if [[ -n $(_omb_prompt_git status -s 2> /dev/null |grep -v ^# |grep -v \"working directory clean\") ]]; then\n        local state=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n    else\n        local state=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n    fi\n    local prefix=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n    local suffix=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n    local ref=$(_omb_prompt_git symbolic-ref HEAD 2> /dev/null) || return\n    local commit_id=$(_omb_prompt_git rev-parse HEAD 2>/dev/null) || return\n\n    echo -e \"$prefix${REF_COLOR}${ref#refs/heads/}${DEFAULT_COLOR}:${commit_id:0:$MAX_GIT_HEX_LENGTH}$state$suffix\"\n}\n\n# Parse hg info\nfunction hg_prompt_info() {\n    if [[ -n $(command hg status 2> /dev/null) ]]; then\n        local state=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n    else\n        local state=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n    fi\n    local prefix=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n    local suffix=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n    local branch=$(command hg summary 2> /dev/null | grep branch | awk '{print $2}')\n    local changeset=$(command hg summary 2> /dev/null | grep parent | awk '{print $2}')\n\n    echo -e \"$prefix${REF_COLOR}${branch}${DEFAULT_COLOR}:${changeset#*:}$state$suffix\"\n}\n\n# Parse svn info\nfunction svn_prompt_info() {\n    if [[ -n $(command svn status --ignore-externals -q 2> /dev/null) ]]; then\n        local state=${SVN_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n    else\n        local state=${SVN_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n    fi\n    local prefix=${SVN_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n    local suffix=${SVN_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n    local ref=$(command svn info 2> /dev/null | awk -F/ '/^URL:/ { for (i=0; i<=NF; i++) { if ($i == \"branches\" || $i == \"tags\" ) { print $(i+1); break }; if ($i == \"trunk\") { print $i; break } } }') || return\n    [[ -z $ref ]] && return\n\n    local revision=$(command svn info 2> /dev/null | sed -ne 's#^Revision: ##p' )\n\n    echo -e \"$prefix${REF_COLOR}$ref${DEFAULT_COLOR}:$revision$state$suffix\"\n}\n\n# Displays last X characters of pwd\nfunction limited_pwd() {\n\n    # Replace $HOME with ~ if possible\n    local RELATIVE_PWD=${PWD/#$HOME/\\~}\n\n    local offset=$((${#RELATIVE_PWD}-MAX_PWD_LENGTH))\n\n    if ((offset > 0)); then\n        local truncated_symbol=\"...\"\n        local TRUNCATED_PWD=${RELATIVE_PWD:$offset:$MAX_PWD_LENGTH}\n        echo -e \"${truncated_symbol}/${TRUNCATED_PWD#*/}\"\n    else\n        echo -e \"${RELATIVE_PWD}\"\n    fi\n}\n\n# Displays the current prompt\nfunction _omb_theme_PROMPT_COMMAND() {\n    local UC=$USER_COLOR\n    ((UID == 0)) && UC=$SUPERUSER_COLOR\n\n    if [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then\n        PS1=\"$(scm_char) ${UC}\\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${_omb_prompt_reset_color} \\$ \"\n    else\n        PS1=\"$(scm_char) ${UC}\\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${_omb_prompt_reset_color} \\$ \"\n    fi\n    PS2='> '\n    PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/ht/ht.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Harrison's Theme (ht)\n\n# Description:\n# Simple prompt that shows basic working directory and exit code info\n# Works with 8 color terminals\n\n# Example prompt:\n# ● [harrison@ubN2] in src ± |dev ✗|\n\n# OMB SCM Prompt overrides\nSCM_GIT_SHOW_MINIMAL_INFO=\"true\"\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_red}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓${_omb_prompt_normal}\"\nSCM_NONE_CHAR=\"\"\n\nfunction _omb_theme_ht_exit_color {\n  case $1 in\n  0)\n    _omb_util_print \"$_omb_prompt_green\"\n    ;;\n  1)\n    _omb_util_print \"$_omb_prompt_red\"\n    ;;\n  2)\n    _omb_util_print \"$_omb_prompt_gray\"\n    ;;\n  126)\n    _omb_util_print \"$_omb_prompt_cyan\"\n    ;;\n  127)\n    _omb_util_print \"$_omb_prompt_magenta\"\n    ;;\n  130)\n    _omb_util_print \"$_omb_prompt_black\"\n    ;;\n  148)\n    _omb_util_print \"$_omb_prompt_yellow\"\n    ;;\n  *)\n    _omb_util_print \"$_omb_prompt_blue\"\n    ;;\n  esac\n}\n\n# Displays the current prompt\nfunction _omb_theme_PROMPT_COMMAND {\n  # Capture exit code\n  # NOTE: DO NOT MOVE\n  local EXIT_CODE=$?\n\n  # Start prompt blank\n  PS1=\"\"\n\n  # Exit code indicator\n  PS1+=\"$(_omb_theme_ht_exit_color \"$EXIT_CODE\")●$_omb_prompt_reset_color\"\n\n  # Environment info\n  local rbenv virtualenv\n  _omb_prompt_get_rbenv &&\n    PS1+=$_omb_prompt_red$rbenv$_omb_prompt_reset_color\n  _omb_prompt_get_virtualenv &&\n    PS1+=$_omb_prompt_green$virtualenv$_omb_prompt_reset_color\n\n  # User and host\n  local user_host_prefix=\" $_omb_prompt_reset_color[\"\n  local user_host_suffix=\"$_omb_prompt_reset_color]\"\n  local user=\"$_omb_prompt_blue\\u\"\n  local host=\"$_omb_prompt_cyan\\H\"\n  local at=\"$_omb_prompt_reset_color@\"\n  PS1+=\"$user_host_prefix$user$at$host$user_host_suffix\"\n\n  # Working directory\n  PS1+=\" in $_omb_prompt_magenta\\W$_omb_prompt_reset_color\"\n\n  # SCM\n  PS1+=\" $(scm_prompt_char_info)\"\n\n  # End prompt\n  PS1+=\"\\n${_omb_prompt_green}➜ $_omb_prompt_normal\"\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/iterate/iterate.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_GIT_CHAR=\"± \"\nSCM_HG_CHAR=\"☿ \"\nSCM_SVN_CHAR=\"⑆ \"\nSCM_NONE_CHAR=\"\"\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\"|\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}| \"\nSCM_GIT_AHEAD_CHAR=\"${_omb_prompt_green}+\"\nSCM_GIT_BEHIND_CHAR=\"${_omb_prompt_brown}-\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_teal}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_teal}| \"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"| \"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\"|\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"| \"\n\nRBENV_THEME_PROMPT_PREFIX=\"|\"\nRBENV_THEME_PROMPT_SUFFIX=\"| \"\n\nRBFU_THEME_PROMPT_PREFIX=\"|\"\nRBFU_THEME_PROMPT_SUFFIX=\"| \"\n\nfunction git_prompt_info {\n  git_prompt_vars\n  echo -e \"$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_GIT_AHEAD$SCM_GIT_BEHIND$SCM_GIT_STASH$SCM_SUFFIX\"\n}\n\nLAST_PROMPT=\"\"\nfunction _omb_theme_PROMPT_COMMAND() {\n    local new_PS1=\"${_omb_prompt_bold_teal}$(scm_char)${_omb_prompt_olive}$(_omb_prompt_print_ruby_env)${_omb_prompt_green}\\w $(scm_prompt_info)\"\n    local new_prompt=$(PS1=\"$new_PS1\" \"$BASH\" --norc -i </dev/null 2>&1 | sed -n '${s/^\\(.*\\)exit$/\\1/p;}')\n\n    if [ \"$LAST_PROMPT\" = \"$new_prompt\" ]; then\n        new_PS1=\"\"\n    else\n        LAST_PROMPT=\"$new_prompt\"\n    fi\n\n    local wrap_char=\"\"\n    [[ ${#new_PS1} -gt $(($COLUMNS/1)) ]] && wrap_char=\"\\n\"\n    PS1=\"${new_PS1}${_omb_prompt_green}${wrap_char}→${_omb_prompt_reset_color} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/kitsune/kitsune.theme.sh",
    "content": "#! bash oh-my-bash.module\n# This is combination of works from two different people which I combined for my requirement.\n# Original PS1 was from reddit user /u/Allevil669 which I found in thread: https://www.reddit.com/r/linux/comments/1z33lj/linux_users_whats_your_favourite_bash_prompt/\n# I used that PS1 to the bash-it theme 'morris', and customized it to my liking. All credits to /u/Allevil669 and morris.\n#\n# prompt theming\n\n_omb_module_require plugin:battery\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local status=$?\n\n  # added TITLEBAR for updating the tab and window titles with the pwd\n  local TITLEBAR\n  case $TERM in\n  xterm* | screen)\n    TITLEBAR=$'\\1\\e]0;'$USER@${HOSTNAME%%.*}:${PWD/#$HOME/~}$'\\e\\\\\\2' ;;\n  *)\n    TITLEBAR= ;;\n  esac\n\n  local SC\n  if ((status == 0)); then\n    SC=\"$_omb_prompt_teal-$_omb_prompt_bold_green(${_omb_prompt_green}^_^$_omb_prompt_bold_green)\";\n  else\n    SC=\"$_omb_prompt_teal-$_omb_prompt_bold_green(${_omb_prompt_brown}T_T$_omb_prompt_bold_green)\";\n  fi\n\n  local BC=$(battery_percentage)\n  [[ $BC == no && $BC == -1 ]] && BC=\n  BC=${BC:+${_omb_prompt_teal}-${_omb_prompt_green}($BC%)}\n\n  local python_venv\n  _omb_prompt_get_python_venv\n\n  PS1=$TITLEBAR\"\\n${_omb_prompt_teal}┌─${_omb_prompt_bold_white}[\\u@\\h]${_omb_prompt_teal}─${_omb_prompt_bold_olive}(\\w)$(scm_prompt_info)$python_venv\\n${_omb_prompt_teal}└─${_omb_prompt_bold_green}[\\A]$SC$BC${_omb_prompt_teal}-${_omb_prompt_bold_teal}[${_omb_prompt_green}${_omb_prompt_bold_green}\\$${_omb_prompt_bold_teal}]${_omb_prompt_green} \"\n}\n\n# scm theming\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_teal}(\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_bold_teal})${_omb_prompt_reset_color}\"\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:-false}\nOMB_PROMPT_VIRTUALENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\nOMB_PROMPT_CONDAENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/lambda/lambda.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Emoji-based theme to display source control management and\n# virtual environment info beside the ordinary bash prompt.\n\n# Theme inspired by:\n#  - Bash_it cupcake theme\n\n# Demo:\n# ╭─ⓔ virtualenv 💁user at 💻 host in 📁directory on (🌿branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗)\n# ╰λ cd .bash-it/themes/lambda\n\n# virtualenv prompts\nVIRTUALENV_CHAR=\"ⓔ \"\nOMB_PROMPT_VIRTUALENV_FORMAT='%s'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\n# SCM prompts\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=\"[±] \"\nSCM_GIT_BEHIND_CHAR=\"${_omb_prompt_brown}↓${_omb_prompt_normal}\"\nSCM_GIT_AHEAD_CHAR=\"${_omb_prompt_bold_green}↑${_omb_prompt_normal}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${_omb_prompt_bold_olive}•${_omb_prompt_normal}\"\nSCM_GIT_STAGED_CHAR=\"${_omb_prompt_bold_green}+${_omb_prompt_normal}\"\n\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\n\n# Git status prompts\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n# ICONS =======================================================================\n\nicon_start=\"╭─\"\nicon_user=\" 💁 \"\nicon_host=\" at 💻 \"\nicon_directory=\" in 📁 \"\nicon_branch=\"🌿\"\nicon_end=\"╰λ \"\n\n# extra spaces ensure legiblity in prompt\n\n# FUNCTIONS ===================================================================\n\n# Rename tab\nfunction tabname {\n  printf '\\e]1;%s\\a' \"$1\"\n}\n\n# Rename window\nfunction winname {\n  printf '\\e]2;%s\\a' \"$1\"\n}\n\n# PROMPT OUTPUT ===============================================================\n\n# Displays the current prompt\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1=$icon_start$(_omb_prompt_print_python_venv)\n  PS1+=$icon_user$_omb_prompt_bold_brown'\\u'\n  PS1+=$_omb_prompt_normal$icon_host$_omb_prompt_bold_teal'\\h'\n  PS1+=$_omb_prompt_normal$icon_directory$_omb_prompt_bold_purple'\\w'\n  PS1+=$_omb_prompt_normal$([[ -n $(_omb_prompt_git branch 2> /dev/null) ]] && _omb_util_print \" on (${icon_branch} \")\n  PS1+=$_omb_prompt_white$(scm_prompt_info)$_omb_prompt_normal'\\n'$icon_end\n  PS2=$icon_end\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/luan/luan.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\"(${_omb_prompt_olive}\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_normal})\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\"(${_omb_prompt_olive}\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_normal})\"\n\nOMB_PROMPT_RVM_FORMAT=\"%s\"\nOMB_PROMPT_VIRTUALENV_FORMAT='(%s) '\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local dtime=\"$(clock_prompt)\"\n  local user_host=\"${_omb_prompt_green}\\u@${_omb_prompt_teal}\\h${_omb_prompt_normal}\"\n  local current_dir=\"${_omb_prompt_bold_navy}\\w${_omb_prompt_normal}\"\n  local ruby_env python_venv\n  _omb_prompt_get_ruby_env && ruby_env=\"$_omb_prompt_bold_brown$ruby_env$_omb_prompt_normal \"\n  _omb_prompt_get_python_venv\n  local git_branch=\"$(scm_prompt_info)${_omb_prompt_normal}\"\n  local prompt=\"${_omb_prompt_bold_green}\\$${_omb_prompt_normal} \"\n  local arrow=\"${_omb_prompt_bold_white}▶${_omb_prompt_normal} \"\n  local prompt=\"${_omb_prompt_bold_green}\\$${_omb_prompt_normal} \"\n\n  PS1=\"${dtime}${user_host}:${current_dir} ${python_venv}${ruby_env}${git_branch}\n      $arrow $prompt\"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_olive\"}\nTHEME_CLOCK_FORMAT=${THEME_TIME_FORMAT:-\"%I:%M:%S \"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/lucky/lucky.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Oh My Bash Theme: lucky\n# Author: meizikeai@163.com\n# Description: A minimal theme with Git status, Python venv, and hostname info.\n\nSCM_GIT_SHOW_MINIMAL_INFO=${SCM_GIT_SHOW_MINIMAL_INFO:-true}\nSCM_THEME_PROMPT_CLEAN=$_omb_prompt_green${SCM_THEME_PROMPT_CLEAN:-'✔'}\nSCM_THEME_PROMPT_DIRTY=$_omb_prompt_brown${SCM_THEME_PROMPT_DIRTY:-'✘'}\nSCM_THEME_BRANCH_PREFIX=${SCM_THEME_BRANCH_PREFIX:-:}\nSCM_THEME_PROMPT_PREFIX=' '$_omb_prompt_white'on '$_omb_prompt_navy'git'$_omb_prompt_purple\nSCM_THEME_PROMPT_SUFFIX=$_omb_prompt_normal\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local python_venv\n  _omb_prompt_get_python_venv\n  PS1=$python_venv\n  PS1+=$_omb_prompt_teal'\\u '$_omb_prompt_white'@ '$_omb_prompt_green'\\h '\n  PS1+=$_omb_prompt_white'in '$_omb_prompt_bold_olive'\\w'\n  PS1+=$(scm_prompt_info)\n  PS1+=$_omb_prompt_white' ['$(clock_prompt)$_omb_prompt_white']\\n'\n  PS1+=$_omb_prompt_bold_brown'\\$ '$_omb_prompt_normal\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/mairan/mairan.theme.sh",
    "content": "#! bash oh-my-bash.module\n# Mairan Bash Prompt, inspired by \"Zork\"\n\nif tput setaf 1 &> /dev/null; then\n  if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then\n    MAGENTA=$(tput setaf 9)\n    ORANGE=$(tput setaf 172)\n    GREEN=$(tput setaf 190)\n    PURPLE=$(tput setaf 141)\n    WHITE=$(tput setaf 0)\n  else\n    MAGENTA=$(tput setaf 5)\n    ORANGE=$(tput setaf 4)\n    GREEN=$(tput setaf 2)\n    PURPLE=$(tput setaf 1)\n    WHITE=$(tput setaf 7)\n  fi\n  BOLD=$(tput bold)\n  RESET=$(tput sgr0)\nelse\n  MAGENTA=\"\\033[1;31m\"\n  ORANGE=\"\\033[1;33m\"\n  GREEN=\"\\033[1;32m\"\n  PURPLE=\"\\033[1;35m\"\n  WHITE=\"\\033[1;37m\"\n  BOLD=\"\"\n  RESET=\"\\033[m\"\nfi\n\n# prompt_symbol='λ'\n# prompt_symbol='⚡'\nprompt_symbol=''\nBRACKET_COLOR=$ORANGE\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\nxterm*)\n  TITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n  ;;\n*)\n  TITLEBAR=\"\"\n  ;;\nesac\n\nPS3=\">> \"\n\nfunction __my_rvm_ruby_version {\n  local gemset=$(awk -F'@' '{print $2}' <<< \"$GEM_HOME\")\n  [[ $gemset ]] && gemset=@$gemset\n  local version=$(awk -F'-' '{print $2}' <<< \"$MY_RUBY_HOME\")\n  local full=$version$gemset\n  [[ $full ]] && _omb_util_print \"[$full]\"\n}\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  else\n    _omb_util_print \"[$(scm_char)][$GREEN$(scm_prompt_info)]\"\n  fi\n}\n\n# show chroot if exist\nfunction chroot {\n  if [[ $debian_chroot ]]; then\n    local my_ps_chroot=$_omb_prompt_bold_teal$debian_chroot$_omb_prompt_normal\n    _omb_util_print \"($my_ps_chroot)\"\n  fi\n}\n\n# show virtualenvwrapper\nfunction my_ve {\n  if [[ $VIRTUAL_ENV ]]; then\n    local ve=$(basename \"$VIRTUAL_ENV\")\n    local my_ps_ve=$_omb_prompt_bold_purple$ve$_omb_prompt_normal\n    _omb_util_print \"($my_ps_ve)\"\n  fi\n  _omb_util_print \"\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local my_ps_host=\"$BOLD$ORANGE\\h${_omb_prompt_normal}\"\n  # yes, these are the the same for now ...\n  local my_ps_host_root=\"$ORANGE\\h${_omb_prompt_normal}\"\n\n  local my_ps_user=\"$BOLD$GREEN\\u${_omb_prompt_normal}\"\n  local my_ps_root=\"${_omb_prompt_bold_brown}\\u${_omb_prompt_normal}\"\n\n  # nice prompt\n  case $(id -u) in\n  0) PS1=\"\\n${TITLEBAR}${BRACKET_COLOR}┌─${_omb_prompt_normal}$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_green}\\w${_omb_prompt_normal}]$(is_vim_shell)${BRACKET_COLOR}\n└─▪ ${prompt_symbol} ${_omb_prompt_normal}\"\n     ;;\n  *) PS1=\"\\n${TITLEBAR}${BRACKET_COLOR}┌─${_omb_prompt_normal}$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)${_omb_prompt_normal}$(__my_rvm_ruby_version)[${_omb_prompt_green}\\w${_omb_prompt_normal}]$(is_vim_shell)${BRACKET_COLOR}\n└─▪ ${prompt_symbol} ${_omb_prompt_normal}\"\n     ;;\n  esac\n}\n\nPS2=\"└─▪ \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/mbriggs/mbriggs.theme.sh",
    "content": "#! bash oh-my-bash.module\n# ------------------------------------------------------------------#\n#          FILE: mbriggs.zsh-theme                                  #\n#            BY: Matt Briggs (matt@mattbriggs.net)                  #\n#      BASED ON: smt by Stephen Tudor (stephen@tudorstudio.com)     #\n# ------------------------------------------------------------------#\n\nSCM_THEME_PROMPT_DIRTY=\"${_omb_prompt_brown}⚡${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_AHEAD=\"${_omb_prompt_brown}!${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_CLEAN=\"${_omb_prompt_green}✓${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_PREFIX=\" \"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nGIT_SHA_PREFIX=\" ${_omb_prompt_olive}\"\nGIT_SHA_SUFFIX=\"${_omb_prompt_reset_color}\"\n\nfunction git_short_sha() {\n  SHA=$(_omb_prompt_git rev-parse --short HEAD 2> /dev/null) &&\n    _omb_util_print \"$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    local return_status=\"\"\n    local ruby=\"${_omb_prompt_brown}$(_omb_prompt_print_ruby_env)${_omb_prompt_reset_color}\"\n    local user_host=\"${_omb_prompt_green}\\h${_omb_prompt_reset_color}\"\n    local current_path=\"\\w\"\n    local n_commands=\"\\!\"\n    local git_branch=\"$(git_short_sha)$(scm_prompt_info)\"\n    local prompt_symbol='λ'\n    local open='('\n    local close=')'\n    local prompt_char=' \\$ '\n\n    PS1=\"\\n${n_commands} ${user_host} ${prompt_symbol} ${ruby} ${open}${current_path}${git_branch}${close}${return_status}\\n${prompt_char}\"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/minimal/minimal.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_teal}(${_omb_prompt_green}\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_teal})\"\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\n\nfunction _omb_theme_PROMPT_COMMAND {\n  PS1=\"$(scm_prompt_info)${_omb_prompt_reset_color} ${_omb_prompt_teal}\\W${_omb_prompt_reset_color} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/minimal-gh/minimal-gh.theme.sh",
    "content": "#! bash oh-my-bash.module\n#\n#========================================================================================\n#\n#  ###    ###  ##  ##     ##  ##  ###    ###    ###    ##             ####    ##   ##\n#  ## #  # ##  ##  ####   ##  ##  ## #  # ##   ## ##   ##            ##       ##   ##\n#  ##  ##  ##  ##  ##  ## ##  ##  ##  ##  ##  ##   ##  ##            ##  ###  #######\n#  ##      ##  ##  ##    ###  ##  ##      ##  #######  ##            ##   ##  ##   ##\n#  ##      ##  ##  ##     ##  ##  ##      ##  ##   ##  ######         ####    ##   ##\n#\n#========================================================================================\n#\n# Un tema creado por @AlexGh12 para el proyecto de @ohmybash en CDMX 🇲🇽\n#\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  # Obtenemos IP segun el sistema operativo\n  local IP\n  case $OSTYPE in\n  linux-gnu)\n    # 2025-09-21 hostname is not a part of GNU/Linux.  In fact, Arch Linux\n    # does not include \"hostname\" by default.\n    # https://www.reddit.com/r/arch/comments/1nlv59f/bash_hostname_commend_not_found/\n    { IP=$(ip addr 2>/dev/null | awk '$1 == \"inet\" {sub(/\\/.*/, \"\", $2); if ($2 == \"127.0.0.1\") next; print $2; exit}'); [[ $IP ]]; } ||\n      { IP=$(ip addr 2>/dev/null | awk '$1 == \"inet6\" {sub(/\\/.*/, \"\", $2); if ($2 == \"::1\") next; print $2; exit}'); [[ $IP ]]; } ||\n      IP=$(hostname -I 2>/dev/null | awk '{print $1}')\n    ;;\n  darwin*)\n    IP=$(ifconfig en0 | awk '$1==\"inet\" {print $2}')\n    ;;\n  esac\n  [[ $IP ]] || IP=\"127.0.0.1\"  # Default to localhost if OS is not recognized\n\n  local HORA=$(date +%H)\n  local MERIDIANO\n  if ((10#$HORA > 12)); then\n    MERIDIANO=\"pm\";\n  else\n    MERIDIANO=\"am\";\n  fi\n\n  PS1=\"\\n${_omb_prompt_gray}\\T${MERIDIANO} ${_omb_prompt_green}\\u@$IP ${_omb_prompt_gray}\\h ${_omb_prompt_olive}\\${PWD} $(scm_prompt_info)\\n${_omb_prompt_gray}\\$ ${_omb_prompt_normal}\"\n}\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_white}- ${_omb_prompt_bold_teal}\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nOMB_PROMPT_VIRTUALENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\nOMB_PROMPT_CONDAENV_FORMAT=\"${_omb_prompt_bold_gray}(%s)${_omb_prompt_reset_color}\"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/modern/modern.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\ncase $TERM in\nxterm*)\n  TITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n  ;;\n*)\n  TITLEBAR=\"\"\n  ;;\nesac\n\nPS3=\">> \"\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  else\n    _omb_util_print \"[$(scm_char)][$(scm_prompt_info)]\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local last_exit=$? border_color\n  if ((last_exit != 0)); then\n    border_color=$_omb_prompt_bold_brown\n  else\n    border_color=$_omb_prompt_normal\n  fi\n\n  PS1=$TITLEBAR\n  PS1=$PS1$border_color'┌─'$_omb_prompt_normal\n  PS1=$PS1$(modern_scm_prompt)[$_omb_prompt_teal'\\W'$_omb_prompt_normal][$(battery_charge)]$(is_vim_shell)$'\\n'\n  PS1=$PS1$border_color'└─▪'$_omb_prompt_normal' '\n}\n\nPS2=\"└─▪ \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/modern-t/modern-t.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\ncase $TERM in\nxterm*)\n  TITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n  ;;\n*)\n  TITLEBAR=\"\"\n  ;;\nesac\n\nPS3=\">> \"\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  else\n    _omb_util_print \"[$(scm_char)][$(scm_prompt_info)]\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  if (($? != 0)); then\n    local border_color=$_omb_prompt_bold_brown\n  else\n    local border_color=$_omb_prompt_normal\n  fi\n\n  local todo_count=\n  _omb_util_binary_exists t &&\n    todo_count=[${_omb_prompt_teal}$(command t | wc -l | sed -e's/ *//')${_omb_prompt_reset_color}]\n\n  PS1=\"${TITLEBAR}${border_color}┌─$todo_count${_omb_prompt_normal}$(modern_scm_prompt)[${_omb_prompt_teal}\\W${_omb_prompt_normal}]$(is_vim_shell)\"\n  PS1+=\"\\n${border_color}└─▪${_omb_prompt_normal} \"\n}\n\nPS2=\"└─▪ \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nif [[ -t 2 ]] && ! _omb_util_binary_exists t; then\n  _omb_util_print \"${_omb_term_bold_navy}oh-my-bash (theme:modern-t)${_omb_term_normal}: command \\\"t\\\" not found. The theme \\\"Modern T\\\" depends on a todo-list manager \\\"t\\\" (${_omb_term_underline}https://github.com/sjl/t${_omb_term_normal}).\" >&2\nfi\n"
  },
  {
    "path": "themes/morris/morris.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# prompt theming\n\n# added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\007\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\tscreen)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\033\\\\\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nfunction _omb_theme_PROMPT_COMMAND() {\n\tPS1=\"${TITLEBAR}[\\u@\\h \\W $(scm_prompt_info)]\\$ \"\n}\n\n# scm theming\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_green}(\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green})${_omb_prompt_reset_color}\"\n\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/n0qorg/n0qorg.theme.sh",
    "content": "#! bash oh-my-bash.module\n# n0qorg theme by Florian Baumann <flo@noqqe.de>\n\n## look-a-like\n# host directory (branch*)»\n# for example:\n# ananas ~/Code/bash-it/themes (master*)»\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"${_omb_prompt_bold_navy}[$(hostname)]${_omb_prompt_normal} \\w${_omb_prompt_normal} ${_omb_prompt_bold_white}[$(git_prompt_info)]${_omb_prompt_normal}» \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\n## git-theme\n# feel free to change git chars.\nGIT_THEME_PROMPT_DIRTY=\"${_omb_prompt_bold_navy}*${_omb_prompt_bold_white}\"\nGIT_THEME_PROMPT_CLEAN=\"\"\nGIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_navy}(${_omb_prompt_bold_white}\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_bold_navy})\"\n\n## alternate chars\nSCM_THEME_PROMPT_DIRTY=\"*\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"(\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/nekolight/README.md",
    "content": "# NekoLight prompt theme\n\nNekolight is an Oh-My-Bash prompt theme inspired by Starship and designed to be simple and lightweight.\n\n![Nekolight theme](nekolight-dark.jpg)\n\n## 🚀 Installation\n\nPrerequisites\n- A Nerd Font or Powerline Font installed and enabled in your terminal (for example, try the FiraCode Nerd Font).\n\nAfter installing the Nerd Fonts font, just modify the following line in your ~/.bashrc\n\n```shell\nOSH_THEME=\"nekolight\"\n```\n\nand then to load the theme in your terminal you must type `source ~/.bashrc`.\n"
  },
  {
    "path": "themes/nekolight/nekolight.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n_omb_theme_nekolight_version='1.0.0'\n_omb_theme_nekolight_symbol=\"\"\n\nfunction _omb_theme_nekolight_git_info() {\n  if _omb_prompt_git rev-parse --is-inside-work-tree &>/dev/null; then\n    local branch=$(_omb_prompt_git symbolic-ref --short HEAD 2>/dev/null || _omb_prompt_git rev-parse --short HEAD 2>/dev/null)\n\n    if _omb_prompt_git diff --quiet 2>/dev/null && _omb_prompt_git diff --cached --quiet 2>/dev/null; then\n      _omb_util_print \"on ${_omb_prompt_bold_green} ${_omb_theme_nekolight_symbol} ${branch} ${_omb_prompt_normal}\"\n    else\n      _omb_util_print \"on ${_omb_prompt_bold_red} ${_omb_theme_nekolight_symbol} ${branch}${_omb_prompt_normal}\"\n    fi\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local display_dir=\"${_omb_prompt_bold_blue}\\w${_omb_prompt_normal}\"\n  local git_status=$(_omb_theme_nekolight_git_info)\n\n  PS1=\"${display_dir} ${git_status}\\n❯ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/nekonight/nekonight.base.sh",
    "content": "#! bash oh-my-bash.module\n\nicon_start=\"╭─\"\nicon_user=\" ${_omb_theme_nekonight_icon_emoji} ${_omb_prompt_bold_olive}\\u${_omb_prompt_normal}\"\nicon_host=\" at ${_omb_theme_nekonight_icon_emoji} ${_omb_prompt_bold_cyan}\\h${_omb_prompt_normal}\"\nicon_directory=\" in ${_omb_theme_nekonight_icon_emoji} ${_omb_prompt_bold_magenta}\\w${_omb_prompt_normal}\"\nicon_end=\"╰─${_omb_prompt_bold_white}λ${_omb_prompt_normal}\"\n\nfunction _omb_theme_nekonight_git_prompt_info() {\n  local branch_name\n  branch_name=$(_omb_prompt_git symbolic-ref --short HEAD 2>&-)\n  local git_status=\"\"\n\n  local icon_emoji=\"${_omb_theme_nekonight_icon_emoji:-🐱}\"\n\n  if [[ -n $branch_name ]]; then\n    git_status=\"${_omb_prompt_bold_white} (${icon_emoji} $branch_name $(_omb_theme_nekonight_scm_git_status))${_omb_prompt_normal}\"\n  fi\n\n  echo -n \"$git_status\"\n}\n\nfunction _omb_theme_nekonight_scm_git_status() {\n  local git_status=\"\"\n\n  if _omb_prompt_git rev-list --count --left-right @{upstream}...HEAD 2>&- | grep -Eq '^[0-9]+[[:blank:]][0-9]+$'; then\n    git_status+=\"${_omb_prompt_brown}↓${_omb_prompt_normal} \"\n  fi\n\n  if [[ -n $(_omb_prompt_git diff --cached --name-status 2>&-) ]]; then\n    git_status+=\"${_omb_prompt_green}+${_omb_prompt_normal}\"\n  fi\n\n  if [[ -n $(_omb_prompt_git diff --name-status 2>&-) ]]; then\n    git_status+=\"${_omb_prompt_yellow}•${_omb_prompt_normal}\"\n  fi\n\n  if [[ -n $(_omb_prompt_git ls-files --others --exclude-standard 2>&-) ]]; then\n    git_status+=\"${_omb_prompt_red}⌀${_omb_prompt_normal}\"\n  fi\n\n  echo -n \"$git_status\"\n}\n"
  },
  {
    "path": "themes/nekonight/nekonight.theme.sh",
    "content": "#! bash oh-my-bash.module\n# nekonight Bash prompt with source control management\n# Author: Bruno Ciccarino <brunociccarinoo@gmail.com>\n#\n# Theme inspired by:\n#  - Bash_it cupcake theme\n# Demo:\n# ╭─🐱 virtualenv 🐱user at 🐱host in 🐱directory on (🐱branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗)\n# ╰λ cd ~/path/to/your-directory\n\n_omb_theme_nekonight_icon_emoji=\"🐱\"\n\nsource \"$OSH/themes/nekonight/nekonight.base.sh\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1=\"${icon_start}${icon_user}${icon_host}${icon_directory} in $(_omb_theme_nekonight_git_prompt_info)\\n${icon_end} \"\n}\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/nekonight_moon/nekonight_moon.theme.sh",
    "content": "#! bash oh-my-bash.module\n# nekonight-moon Bash prompt with source control management\n# Author: Bruno Ciccarino <brunociccarinoo@gmail.com>\n#\n# Theme inspired by:\n#  - Bash_it cupcake theme\n# Demo:\n# ╭─🌙 virtualenv 🌙user at 🌙host in 🌙directory on (🌙branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗)\n# ╰λ cd ~/path/to/your-directory\n\n_omb_theme_nekonight_icon_emoji=\"🌙\"\n\nsource \"$OSH/themes/nekonight/nekonight.base.sh\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1=\"${icon_start}${icon_user}${icon_host}${icon_directory} in $(_omb_theme_nekonight_git_prompt_info)\\n${icon_end} \"\n}\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/nwinkler/nwinkler.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Two line prompt showing the following information:\n# (time) SCM [username@hostname] pwd (SCM branch SCM status)\n# →\n#\n# Example:\n# (14:00:26) ± [foo@bar] ~/.oh-my-bash (master ✓)\n# →\n#\n# The arrow on the second line is showing the exit status of the last command:\n# * Green: 0 exit status\n# * Red: non-zero exit status\n#\n# The exit code functionality currently doesn't work if you are using the 'fasd' plugin,\n# since 'fasd' is messing with the $PROMPT_COMMAND\n\n\nPROMPT_END_CLEAN=\"${_omb_prompt_green}→${_omb_prompt_reset_color}\"\nPROMPT_END_DIRTY=\"${_omb_prompt_brown}→${_omb_prompt_reset_color}\"\n\nfunction prompt_end() {\n  echo -e \"$PROMPT_END\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local exit_status=$?\n  if [[ $exit_status -eq 0 ]]; then PROMPT_END=$PROMPT_END_CLEAN\n    else PROMPT_END=$PROMPT_END_DIRTY\n  fi\n  # Save history\n  #history -a\n  #history -c\n  #history -r\n  PS1=\"($(clock_prompt)) $(scm_char) [${_omb_prompt_navy}\\u${_omb_prompt_reset_color}@${_omb_prompt_green}\\H${_omb_prompt_reset_color}] ${_omb_prompt_olive}\\w${_omb_prompt_reset_color}$(scm_prompt_info) ${_omb_prompt_reset_color}\\n$(prompt_end) \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/nwinkler_random_colors/README.md",
    "content": "# Nwinkler Random Color Theme\n\n## Description\n\nThe *Nwinkler Random Color* Theme is based on the [nwinkler theme](https://github.com/Bash-it/bash-it/wiki/Themes#nwinkler), but it randomizes the colors for:\n\n* time\n* username\n* hostname\n* path\n\nThe random colors are chosen the first time this theme is used and saved to the `~/.nwinkler_random_colors` file. So, the next time you connect to the same machine, you will get the same colors.\n\nTo force new random colors to be selected, run the command:\n\n```sh\nrandomize_nwinkler\n```\n\n## Screenshot\n\nHere it is in action:\n\n![alt text](screenshot.png \"Nwinkler Random Color Theme in Action!\")\n\n## Usage Scenario\n\nThis theme is especially useful when connecting to many different machines and switching between them often. Yes, the hostname *is* present in the prompt. But I argue that it's a lot faster to get a \"feel\" of what machine you are currently on because of the custom colors on that machine's prompt than by reading the hostname.\n\n"
  },
  {
    "path": "themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Two line prompt showing the following information:\n# (time) SCM [username@hostname] pwd (SCM branch SCM status)\n# →\n#\n# Example:\n# (14:00:26) ± [foo@bar] ~/.oh-my-bash (master ✓)\n# →\n#\n# The arrow on the second line is showing the exit status of the last command:\n# * Green: 0 exit status\n# * Red: non-zero exit status\n#\n# The exit code functionality currently doesn't work if you are using the 'fasd' plugin,\n# since 'fasd' is messing with the $PROMPT_COMMAND\n\nRANDOM_COLOR_FILE=$HOME/.nwinkler_random_colors\n\nfunction randomize_nwinkler {\n  declare -a AVAILABLE_COLORS\n\n  AVAILABLE_COLORS=(\n    \"$_omb_prompt_black\"\n    \"$_omb_prompt_brown\"\n    \"$_omb_prompt_green\"\n    \"$_omb_prompt_olive\"\n    \"$_omb_prompt_navy\"\n    \"$_omb_prompt_purple\"\n    \"$_omb_prompt_teal\"\n    \"$_omb_prompt_white\"\n    \"$_omb_prompt_red\"\n    \"$_omb_prompt_bold_black\"\n    \"$_omb_prompt_bold_brown\"\n    \"$_omb_prompt_bold_green\"\n    \"$_omb_prompt_bold_olive\"\n    \"$_omb_prompt_bold_navy\"\n    \"$_omb_prompt_bold_purple\"\n    \"$_omb_prompt_bold_teal\"\n    \"$_omb_prompt_bold_white\"\n    \"$_omb_prompt_bold_red\"\n\n    # # Uncomment these to allow underlines:\n    # \"$_omb_prompt_underline_black\"\n    # \"$_omb_prompt_underline_brown\"\n    # \"$_omb_prompt_underline_green\"\n    # \"$_omb_prompt_underline_olive\"\n    # \"$_omb_prompt_underline_navy\"\n    # \"$_omb_prompt_underline_purple\"\n    # \"$_omb_prompt_underline_teal\"\n    # \"$_omb_prompt_underline_white\"\n    # \"$_omb_prompt_underline_red\"\n  )\n\n  USERNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]}\n  HOSTNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]}\n  TIME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]}\n  THEME_CLOCK_COLOR=$TIME_COLOR\n  PATH_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]} ]}\n\n  _omb_util_print \"$USERNAME_COLOR,$HOSTNAME_COLOR,$TIME_COLOR,$PATH_COLOR,\" > $RANDOM_COLOR_FILE\n}\n\nif [ -f $RANDOM_COLOR_FILE ];\nthen\n  # read the colors already stored in the file\n  IFS=',' read -ra COLORS < $RANDOM_COLOR_FILE\n  USERNAME_COLOR=${COLORS[0]}\n  HOSTNAME_COLOR=${COLORS[1]}\n  TIME_COLOR=${COLORS[2]}\n  THEME_CLOCK_COLOR=$TIME_COLOR\n  PATH_COLOR=${COLORS[3]}\nelse\n  # No colors stored yet. Generate them!\n  randomize_nwinkler\n\n  _omb_util_print\n  _omb_util_print \"Looks like you are using the nwinkler_random_color bashit theme for the first time.\"\n  _omb_util_print \"Random colors have been generated to be used in your prompt.\"\n  _omb_util_print \"If you don't like them, run the command:\"\n  _omb_util_print \"  randomize_nwinkler\"\n  _omb_util_print \"until you get a combination that you like.\"\n  _omb_util_print\nfi\n\nPROMPT_END_CLEAN=\"${_omb_prompt_green}→${_omb_prompt_reset_color}\"\nPROMPT_END_DIRTY=\"${_omb_prompt_brown}→${_omb_prompt_reset_color}\"\n\nfunction prompt_end() {\n  echo -e \"$PROMPT_END\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local exit_status=$?\n  if [[ $exit_status -eq 0 ]]; then PROMPT_END=$PROMPT_END_CLEAN\n    else PROMPT_END=$PROMPT_END_DIRTY\n  fi\n  # Save history\n  history -a\n  history -c\n  history -r\n  PS1=\"($(clock_prompt)${_omb_prompt_reset_color}) $(scm_char) [${USERNAME_COLOR}\\u${_omb_prompt_reset_color}@${HOSTNAME_COLOR}\\H${_omb_prompt_reset_color}] ${PATH_COLOR}\\w${_omb_prompt_reset_color}$(scm_prompt_info) ${_omb_prompt_reset_color}\\n$(prompt_end) \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/pete/pete.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction _omb_theme_PROMPT_COMMAND {\n  # Save history\n  history -a\n  history -c\n  history -r\n  PS1=\"($(clock_prompt)) $(scm_char) [$_omb_prompt_navy\\u$_omb_prompt_reset_color@$_omb_prompt_green\\H$_omb_prompt_reset_color] $_omb_prompt_olive\\w${_omb_prompt_reset_color}$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_reset_color \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nSCM_THEME_PROMPT_DIRTY=\" ✗\"\nSCM_THEME_PROMPT_CLEAN=\" ✓\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/powerbash10k/README.md",
    "content": "# powerbash10k theme\n\nSimple colorful terminal prompt theme (inspired by powerlevel10k zsh theme, based on Brainy theme).\n\n## Prerequisites\n\n- **Nerd Fonts** ... This theme uses symbols from Nerd Fonts.  You need to\n  install a Nerd Font and then configure your terminal to use the Nerd Font.\n\n## Features\n\n### Prompt Segments\n\n- Username & Hostname\n- Current Directory\n- SCM Information\n- Battery Charge\n- Clock\n- Command duration\n- [Todo.txt](https://github.com/ginatrapani/todo.txt-cli) status\n- Ruby Environment\n- Python Environment\n- Exit Code\n\n### Others\n\n- Indicator for cached `sudo` credential\n- Indicator for ssh login\n- `pb10k` command for showing/hiding various prompt segments on-the-fly\n\n## Configuration\n\nVarious prompt segments can be shown/hidden or modified according to your choice. There are two ways for doing that:\n\n1. On-the-fly using `pb10k` command\n2. Theme Environment Variables\n\n### On-the-fly using `pb10k` command\n\nThis theme provides a command for showing/hiding prompt segments.\n\n`pb10k show <segment>`\n\n`pb10k hide <segment>`\n\nTab-completion for this command is enabled by default.\n\nConfiguration specified by this command will only be applied to current and subsequent child shells.\n\n### Theme Environment Variables\n\nThis is used for permanent settings that apply to all terminal sessions. You have to define the value of specific theme variables in your `bashrc` (or equivalent) file.\n\nThe name of the variables are listed below along with their default values.\n\n#### User Information\n\nIndicator for cached `sudo` credential (see `sudo` manpage for more information):\n\n`THEME_SHOW_SUDO=true`\n\nHide user info for local user (show only in SSH sessions):\n`__PB10K_PROMPT_LOCAL_USER_INFO=false`\n\n#### SCM Information\n\nInformation about SCM repository status:\n\n`THEME_SHOW_SCM=true`\n\n#### Ruby Environment\n\nRuby environment version information:\n\n`THEME_SHOW_RUBY=false`\n\n#### Python Environment\n\nPython environment version information:\n\n`THEME_SHOW_PYTHON=false`\n\n#### ToDo.txt status\n\n[Todo.txt](https://github.com/ginatrapani/todo.txt-cli) status:\n\n`THEME_SHOW_TODO=false`\n\n#### Clock\n\n`THEME_SHOW_CLOCK=true`\n\n`THEME_CLOCK_COLOR=$bold_cyan`\n\nFormat of the clock (see `date` manpage for more information):\n\n`THEME_CLOCK_FORMAT=\"%H:%M:%S\"`\n\n#### Battery Charge\n\nBattery charge percentage:\n\n`THEME_SHOW_BATTERY=false`\n\n#### Exit Code\n\nExit code of the last command:\n\n`THEME_SHOW_EXITCODE=true`\n\n## Prompt Segments Order\n\nCurrently available prompt segments are:\n\n- battery\n- char\n- clock\n- cmd_duration\n- dir\n- exitcode\n- python\n- ruby\n- scm\n- todo\n- user_info\n\nThree environment variables can be defined to rearrange the segments order. The default values are:\n\n`__PB10K_TOP_LEFT=\"dir scm\"`\n\n`__PB10K_TOP_RIGHT=\"exitcode cmd_duration user_info python ruby todo clock battery\"`\n\n`__PB10K_BOTTOM=\"char\"`\n"
  },
  {
    "path": "themes/powerbash10k/powerbash10k.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# powerbash10k theme for oh-my-bash, inspired by powerlevel10k zsh theme\n# made by awerebea, based on brainy theme by MunifTanjim\n\n# Helpers\nfunction __pb10k_remove_empty_elements {\n  local origin_array new_array element trimmed\n  _omb_util_split origin_array \"$1\" '|'\n  new_array=()\n  for element in \"${origin_array[@]}\"; do\n    trimmed=${element#\"${element%%[![:space:]]*}\"}\n    trimmed=${trimmed%\"${trimmed##*[![:space:]]}\"}\n    [[ $trimmed ]] && new_array+=(\"$element\")\n  done\n  _omb_util_print \"${new_array[*]}\"\n}\n\nfunction __pb10k_format_duration {\n  local duration=$1\n  local seconds=$((duration % 60))\n  local minutes=$((duration / 60 % 60))\n  local hours=$((duration / 3600))\n\n  if ((hours > 0)); then\n    _omb_util_print \"${hours}h ${minutes}m ${seconds}s\"\n  elif ((minutes > 0)); then\n    _omb_util_print \"${minutes}m ${seconds}s\"\n  else\n    _omb_util_print \"${seconds}s\"\n  fi\n}\n\n# Last command duration\nfunction __pb10k_timer_start {\n  __pb10k_timer=${__pb10k_timer:-$SECONDS}\n}\n\nfunction __pb10k_timer_stop {\n  __pb10k_timer_show=$((SECONDS - __pb10k_timer))\n  unset -v __pb10k_timer\n}\n\ntrap '__pb10k_timer_start' DEBUG\n\n# Parsers\nfunction __pb10k_top_left_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  if [[ ${args[3]} ]]; then\n    __TOP_LEFT+=${args[2]}${args[3]}\n  fi\n  __TOP_LEFT+=${args[0]}${args[1]}\n  if [[ ${args[4]} ]]; then\n    __TOP_LEFT+=${args[2]}${args[4]}\n  fi\n  __TOP_LEFT+=\" \"\n}\n\nfunction __pb10k_top_right_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  __TOP_RIGHT+=\" \"\n  if [[ ${args[3]} ]]; then\n    __TOP_RIGHT+=${args[2]}${args[3]}\n  fi\n  __TOP_RIGHT+=${args[0]}${args[1]}\n  if [[ ${args[4]} ]]; then\n    __TOP_RIGHT+=${args[2]}${args[4]}\n  fi\n  __TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN + ${#args[1]} + ${#args[3]} + ${#args[4]} + 1))\n  ((__SEG_AT_RIGHT += 1))\n}\n\nfunction __pb10k_bottom_parse {\n  local args\n  _omb_util_split args \"$1\" '|'\n  __BOTTOM+=${args[0]}${args[1]}\n  ((${#args[1]} > 0)) && __BOTTOM+=\" \"\n}\n\nfunction __pb10k_top {\n  local __TOP_LEFT=\"\"\n  local __TOP_RIGHT=\"\"\n  local __TOP_RIGHT_LEN=0\n  local __SEG_AT_RIGHT=0\n\n  local segments\n  _omb_util_split segments \"$__PB10K_TOP_LEFT\"\n  local seg info\n  for seg in \"${segments[@]}\"; do\n    info=$(__pb10k_prompt_\"$seg\")\n    [[ $info ]] && __pb10k_top_left_parse \"$info\"\n  done\n\n  local terminal_width=$(tput cols)\n  local filler_character=\"·\"\n  __TOP_LEFT+=$_omb_prompt_black\n  __TOP_LEFT+=\"$(for ((i = 0; i < terminal_width; i++)); do printf \"%s\" \"$filler_character\"; done)\"\n  __TOP_LEFT+=\"\\033[${terminal_width}G\\033[1K\\033[1A\"\n\n  _omb_util_split segments \"$__PB10K_TOP_RIGHT\"\n  for seg in \"${segments[@]}\"; do\n    info=$(__pb10k_prompt_\"$seg\")\n    [[ $info ]] && __pb10k_top_right_parse \"$info\"\n  done\n\n  ((__TOP_RIGHT_LEN > 0)) && ((__TOP_RIGHT_LEN--))\n  local cursor_adjust=\"\\033[${__TOP_RIGHT_LEN}D\"\n  __TOP_LEFT+=$cursor_adjust\n\n  printf \"%s%s\" \"$__TOP_LEFT\" \"$__TOP_RIGHT\"\n}\n\nfunction __pb10k_bottom {\n  local seg segments info\n  local __BOTTOM=\"\"\n  _omb_util_split segments \"$__PB10K_BOTTOM\"\n  for seg in \"${segments[@]}\"; do\n    info=$(__pb10k_prompt_\"$seg\")\n    [[ $info ]] && __pb10k_bottom_parse \"$info\"\n  done\n  printf \"\\n%s\" \"$__BOTTOM\"\n}\n\n# Segments\nfunction __pb10k_prompt_user_info {\n  local color=$_omb_prompt_bold_olive\n  if [[ $THEME_SHOW_SUDO == true ]]; then\n    if [[ $(sudo -n id -u 2>&1) == 0 ]]; then\n      color=$_omb_prompt_bold_brown\n    fi\n  fi\n  local box=\"\"\n  local info=$USER@$(hostname | cut -d'.' -f1)\n  if [[ $SSH_CLIENT ]]; then\n    printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n  elif [[ $__PB10K_PROMPT_LOCAL_USER_INFO == true ]]; then\n    printf \"%s|%s\" \"$color\" \"$info\"\n  fi\n}\n\nfunction __pb10k_prompt_dir {\n  local color=$_omb_prompt_bold_navy\n  local box=\"\"\n  local info=\"  \\w\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\nfunction __pb10k_prompt_scm {\n  [[ $THEME_SHOW_SCM != true ]] && return 0\n  local color=$_omb_prompt_bold_green\n  scm\n  local box=\"\"\n  local info=\"$(if [ \"$SCM\" == \"git\" ]; then _omb_util_print \"  \"; fi)\"\n  info+=\"$(if [ \"$SCM\" != \"NONE\" ]; then _omb_util_print \" $(scm_prompt_info)\"; fi)\"\n  [[ $info ]] || return 0\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_green\" \"$box\"\n}\n\nfunction __pb10k_prompt_python {\n  [[ $THEME_SHOW_PYTHON != true ]] && return 0\n  local color=$_omb_prompt_bold_olive\n  local box=\"\"\n  local response_array\n  _omb_util_split response_array \"$(_omb_prompt_get_python_env; __pb10k_remove_empty_elements \"$python_env\")\"\n  local info=${response_array[${#response_array[@]}-1]}\n  if ((${#response_array[@]} > 1)); then\n    # Print all elements except the last one, separated by commas\n    local venvs=$(printf \"%s,\" \"${response_array[@]:0:${#response_array[@]}-1}\")\n    # Remove the trailing comma\n    venvs=${venvs%,}\n    info=\"$info ($venvs)\"\n  fi\n  info=\"${info/#py-/ }\"\n  ((${#response_array[@]} < 2)) && return 0\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_navy\" \"$box\"\n}\n\nfunction __pb10k_prompt_ruby {\n  [[ $THEME_SHOW_RUBY != true ]] && return 0\n  local color=$_omb_prompt_bold_white\n  local box=\"[|]\"\n  local info=rb-$(_omb_prompt_print_ruby_env)\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_brown\" \"$box\"\n}\n\nfunction __pb10k_prompt_todo {\n  [[ $THEME_SHOW_TODO != true ]] && return 0\n  _omb_util_binary_exists todo.sh || return 0\n  local color=$_omb_prompt_bold_white\n  local box=\"[|]\"\n  local info=t:$(todo.sh ls | command grep -E \"TODO: [0-9]+ of ([0-9]+)\" | awk '{ print $4 }' )\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_green\" \"$box\"\n}\n\nfunction __pb10k_prompt_clock {\n  [[ $THEME_SHOW_CLOCK != true ]] && return 0\n  local color=$THEME_CLOCK_COLOR\n  local box=\"\"\n  local info=\" $(date +\"$THEME_CLOCK_FORMAT\")\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_purple\" \"$box\"\n}\n\nfunction __pb10k_prompt_battery {\n  [[ -e $OSH/plugins/battery/battery.plugin.sh ]] || return 0\n  [[ $THEME_SHOW_BATTERY != true ]] && return 0\n  local info=$(battery_percentage)\n  local color=$_omb_prompt_bold_green\n  if ((info < 50)); then\n    color=$_omb_prompt_bold_olive\n  elif ((info < 25)); then\n    color=$_omb_prompt_bold_brown\n  fi\n  local box=\"[|]\"\n  ac_adapter_connected && info+=\"+\"\n  [[ $info == 100+ ]] && info=\"AC\"\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\nfunction __pb10k_prompt_exitcode {\n  [[ $THEME_SHOW_EXITCODE != true ]] && return 0\n  local color=$_omb_prompt_bold_red\n  ((exitcode != 0)) && printf \"%s|%s\" \"$color\" \"✘ $exitcode\"\n}\n\nfunction __pb10k_prompt_char {\n  local color=$(\n    if ((exitcode != 0)); then\n      _omb_util_print \"$_omb_prompt_bold_red\"\n    else\n      _omb_util_print \"$_omb_prompt_bold_green\"\n    fi\n  )\n  printf \"%s|%s\" \"$color\" \"$__PB10K_PROMPT_CHAR_PS1\"\n}\n\nfunction __pb10k_prompt_cmd_duration {\n  local color=$_omb_prompt_bold_navy\n  local box=\"\"\n  local info=$(\n    if ((__pb10k_timer_show > 0)); then\n        printf \" %s\" \"$(__pb10k_format_duration \"$__pb10k_timer_show\")\"\n    fi\n  )\n  [[ $info ]] || return 0\n  printf \"%s|%s|%s|%s\" \"$color\" \"$info\" \"$_omb_prompt_bold_white\" \"$box\"\n}\n\n# cli\nfunction __pb10k_show {\n  local seg=${1:-}\n  export \"THEME_SHOW_$seg=true\"\n}\n\nfunction __pb10k_hide {\n  local seg=${1:-}\n  export \"THEME_SHOW_$seg=false\"\n}\n\nfunction __pb10k_completion {\n  COMPREPLY=()\n  local cur=${COMP_WORDS[COMP_CWORD]}\n  local action=${COMP_WORDS[1]}\n  local actions='show hide'\n  local segments='battery clock exitcode python ruby scm sudo todo'\n  case $action in\n  show | hide )\n    _omb_util_split COMPREPLY \"$(compgen -W \"$segments\" -- \"$cur\")\" $'\\n' ;;\n  *)\n    _omb_util_split COMPREPLY \"$(compgen -W \"$actions\" -- \"$cur\")\" $'\\n' ;;\n  esac\n  return 0\n}\n\nfunction pb10k {\n  local action=${1:-}\n  shift\n  local segments IFS=$' \\t\\n'\n  _omb_util_split segments \"${*:-}\"\n\n  local func=\n  case $action in\n  show)\n    func=__pb10k_show;;\n  hide)\n    func=__pb10k_hide;;\n  *)\n    printf 'pb10k: %s: unrecognized action\\n' \"$action\" >&2\n    return 1\n  esac\n\n  local seg\n  for seg in \"${segments[@]}\"; do\n    seg=$(printf \"%s\" \"$seg\" | tr '[:lower:]' '[:upper:]')\n    \"$func\" \"$seg\"\n  done\n}\n\ncomplete -F __pb10k_completion pb10k\n\n# Variables\nexport SCM_THEME_PROMPT_PREFIX=\"\"\nexport SCM_THEME_PROMPT_SUFFIX=\"\"\n\nexport RBENV_THEME_PROMPT_PREFIX=\"\"\nexport RBENV_THEME_PROMPT_SUFFIX=\"\"\nexport RBFU_THEME_PROMPT_PREFIX=\"\"\nexport RBFU_THEME_PROMPT_SUFFIX=\"\"\nexport RVM_THEME_PROMPT_PREFIX=\"\"\nexport RVM_THEME_PROMPT_SUFFIX=\"\"\n\nexport SCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nexport SCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\n\nTHEME_SHOW_SUDO=${THEME_SHOW_SUDO:-\"true\"}\nTHEME_SHOW_SCM=${THEME_SHOW_SCM:-\"true\"}\nTHEME_SHOW_RUBY=${THEME_SHOW_RUBY:-\"false\"}\nTHEME_SHOW_PYTHON=${THEME_SHOW_PYTHON:-\"false\"}\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_SHOW_TODO=${THEME_SHOW_TODO:-\"false\"}\nTHEME_SHOW_BATTERY=${THEME_SHOW_BATTERY:-\"false\"}\nTHEME_SHOW_EXITCODE=${THEME_SHOW_EXITCODE:-\"true\"}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_bold_white\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H:%M:%S\"}\n\n__PB10K_PROMPT_CHAR_PS1=${THEME_PROMPT_CHAR_PS1:-\"❯\"}\n__PB10K_PROMPT_CHAR_PS2=${THEME_PROMPT_CHAR_PS2:-\"\\\\\"}\n\n__PB10K_TOP_LEFT=${__PB10K_TOP_LEFT:-\"dir scm\"}\n__PB10K_TOP_RIGHT=${__PB10K_TOP_RIGHT:-\"exitcode cmd_duration user_info python ruby todo clock battery\"}\n__PB10K_BOTTOM=${__PB10K_BOTTOM:-\"char\"}\n__PB10K_PROMPT_LOCAL_USER_INFO=${__PB10K_PROMPT_LOCAL_USER_INFO:-\"true\"}\n\n# Prompt\nfunction __pb10k_ps1 {\n  printf \"%s%s%s\" \"$(__pb10k_top)\" \"$(__pb10k_bottom)\" \"$_omb_prompt_normal\"\n}\n\nfunction __pb10k_ps2 {\n  local color\n  color=$_omb_prompt_bold_white\n  printf \"%s%s%s\" \"$color\" \"$__PB10K_PROMPT_CHAR_PS2  \" \"$_omb_prompt_normal\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local exitcode=$?\n  PS1=$(__pb10k_ps1)\n  PS2=$(__pb10k_ps2)\n}\n\n_omb_util_add_prompt_command __pb10k_timer_stop\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline/README.md",
    "content": "# Powerline Theme\n\nA colorful theme, where shows a lot information about your shell session.\n\n**IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.\n\n**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where `sudo` usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your `~/.bashrc` or `~/.bash_profile` to disable the Powerline theme's `sudo` check. This will apply to all `powerline*` themes.\n\n## Provided Information\n\n* Current path\n* Current username and hostname\n* Current time\n* An indicator when connected by SSH\n* An indicator when `sudo` has the credentials cached (see the `sudo` manpage for more info about this)\n* An indicator when the current shell is inside the Vim editor\n* Battery charging status (depends on the [../../plugins/battery/battery.plugin.sh](battery plugin))\n* SCM Repository status (e.g. Git, SVN)\n* The current Python environment (Virtualenv, venv, and Conda are supported) in use\n* The current Ruby environment (rvm and rbenv are supported) in use\n* Last command exit code (only shown when the exit code is greater than 0)\n\n## Configuration\n\nThis theme is pretty configurable, all the configuration is done by setting environment variables.\n\n### User Information\n\nBy default, the username and hostname are shown, but you can change this behavior by setting the value of the following variable:\n\n    POWERLINE_PROMPT_USER_INFO_MODE=\"sudo\"\n\nFor now, the only supported value is `sudo`, which hides the username and hostname, and shows an indicator when `sudo` has the credentials cached. Other values have no effect at this time.\n\n### Clock Format\n\nYou can change the format using the following variable:\n\n    THEME_CLOCK_FORMAT=\"%H:%M:%S\"\n\nThe time/date is printed by the `date` command, so refer to its man page to change the format.\n\n### Segment Order\n\nThe contents of the prompt can be \"reordered\", all the \"segments\" (every piece of information) can take any place. The currently available segments are:\n\n* battery\n* clock\n* cwd\n* in_vim\n* python_venv\n* ruby\n* scm\n* user_info\n\nA variables can be defined to set the order of the prompt segments:\n\n    POWERLINE_PROMPT=\"user_info scm python_venv ruby cwd\"\n\nThe example values above are the current default values, but if you want to remove anything from the prompt, simply remove the \"string\" that represents the segment from the variable.\n"
  },
  {
    "path": "themes/powerline/powerline.base.sh",
    "content": "#! bash oh-my-bash.module\n\n# Define this here so it can be used by all of the Powerline themes\nTHEME_CHECK_SUDO=${THEME_CHECK_SUDO:=false}\n\nfunction _omb_theme_powerline_hex_to_rgb {\n    local hex_color=\"$1\"\n    local r g b\n\n    r=$((16#${hex_color:1:2}))\n    g=$((16#${hex_color:3:2}))\n    b=$((16#${hex_color:5:2}))\n\n    REPLY=\"${r};${g};${b}\"\n}\n\nfunction set_color {\n  local fg=\"\" bg=\"\"\n\n  if [[ \"${1}\" != \"-\" ]]; then\n    if [[ ${1} =~ ^[0-9]+$ ]]; then\n      fg=\"38;5;${1}\"  # ANSI 256-color code\n    elif [[ ${1} =~ ^[0-9]{1,3}(\\;[0-9]{1,3}){2}$ ]]; then\n      fg=\"38;2;${1}\"  # RGB color code\n    elif [[ ${1} =~ ^#[0-9A-Fa-f]{6}$ ]]; then\n      local REPLY\n      _omb_theme_powerline_hex_to_rgb \"${1}\"\n      fg=\"38;2;${REPLY}\"  # Hex color code converted to RGB\n    fi\n  fi\n\n  if [[ \"${2}\" != \"-\" ]]; then\n    if [[ ${2} =~ ^[0-9]+$ ]]; then\n      bg=\"48;5;${2}\"  # ANSI 256-color code\n    elif [[ ${2} =~ ^[0-9]{1,3}(\\;[0-9]{1,3}){2}$ ]]; then\n      bg=\"48;2;${2}\"  # RGB color code\n    elif [[ ${2} =~ ^#[0-9A-Fa-f]{6}$ ]]; then\n      local REPLY\n      _omb_theme_powerline_hex_to_rgb \"${2}\"\n      bg=\"48;2;${REPLY}\"  # Hex color code converted to RGB\n    fi\n  fi\n\n  echo -e \"\\[\\033[${fg}${fg:+${bg:+;}}${bg}m\\]\"\n}\n\nfunction __powerline_user_info_prompt {\n  local user_info=\"\"\n  local color=${USER_INFO_THEME_PROMPT_COLOR}\n  local secondary_color=\"${USER_INFO_THEME_PROMPT_SECONDARY_COLOR}\"\n\n  if [[ \"${THEME_CHECK_SUDO}\" = true ]]; then\n    # check whether sudo is active for no-password executions\n    if sudo -n cat <<< c3bcc5c 2>&1 | grep -q c3bcc5c; then\n      color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}\n    fi\n  fi\n  case \"${POWERLINE_PROMPT_USER_INFO_MODE}\" in\n    \"sudo\")\n      if [[ \"${color}\" == \"${USER_INFO_THEME_PROMPT_COLOR_SUDO}\" ]]; then\n        user_info=\"!\"\n      fi\n      ;;\n    *)\n      if [[ -n \"${SSH_CLIENT}\" ]]; then\n        user_info=\"${USER_INFO_SSH_CHAR}${USER}@${HOSTNAME}\"\n      else\n        user_info=\"${USER}\"\n      fi\n      ;;\n  esac\n  [[ -n \"${user_info}\" ]] && _omb_util_print \"${user_info}|${color}|${secondary_color}\"\n}\n\nfunction __powerline_ruby_prompt {\n  local ruby_version=\"\"\n\n  if _omb_util_command_exists 'rvm'; then\n    ruby_version=\"$(rvm_version_prompt)\"\n  elif _omb_util_command_exists 'rbenv'; then\n    ruby_version=$(rbenv_version_prompt)\n  fi\n\n  [[ -n \"${ruby_version}\" ]] && _omb_util_print \"${RUBY_CHAR}${ruby_version}|${RUBY_THEME_PROMPT_COLOR}\"\n}\n\nfunction __powerline_python_venv_prompt {\n  local python_venv=\"\"\n\n  if [[ -n \"${CONDA_DEFAULT_ENV}\" ]]; then\n    python_venv=\"${CONDA_DEFAULT_ENV}\"\n    PYTHON_VENV_CHAR=${CONDA_PYTHON_VENV_CHAR}\n  elif [[ -n \"${VIRTUAL_ENV}\" ]]; then\n    python_venv=$(basename \"${VIRTUAL_ENV}\")\n  fi\n\n  [[ -n \"${python_venv}\" ]] && _omb_util_print \"${PYTHON_VENV_CHAR}${python_venv}|${PYTHON_VENV_THEME_PROMPT_COLOR}\"\n}\n\nfunction __powerline_scm_prompt {\n  local color=\"\"\n  local scm_prompt=\"\"\n\n  scm_prompt_vars\n\n  if [[ \"${SCM_NONE_CHAR}\" != \"${SCM_CHAR}\" ]]; then\n    if [[ \"${SCM_DIRTY}\" -eq 3 ]]; then\n      color=${SCM_THEME_PROMPT_STAGED_COLOR}\n    elif [[ \"${SCM_DIRTY}\" -eq 2 ]]; then\n      color=${SCM_THEME_PROMPT_UNSTAGED_COLOR}\n    elif [[ \"${SCM_DIRTY}\" -eq 1 ]]; then\n      color=${SCM_THEME_PROMPT_DIRTY_COLOR}\n    else\n      color=${SCM_THEME_PROMPT_CLEAN_COLOR}\n    fi\n    if [[ \"${SCM_GIT_CHAR}\" == \"${SCM_CHAR}\" ]]; then\n      scm_prompt+=\"${SCM_CHAR}${SCM_BRANCH}${SCM_STATE}\"\n    fi\n    _omb_util_print \"${scm_prompt}${scm}|${color}\"\n  fi\n}\n\nfunction __powerline_cwd_prompt {\n  _omb_util_print \"$(pwd | sed \"s|^${HOME}|~|\")|${CWD_THEME_PROMPT_COLOR}\"\n}\n\nfunction __powerline_clock_prompt {\n  _omb_util_print \"$(date +\"${THEME_CLOCK_FORMAT}\")|${CLOCK_THEME_PROMPT_COLOR}\"\n}\n\nfunction __powerline_battery_prompt {\n  local color=\"\"\n  local battery_status=\"$(battery_percentage 2> /dev/null)\"\n\n  if [[ -z \"${battery_status}\" ]] || [[ \"${battery_status}\" = \"-1\" ]] || [[ \"${battery_status}\" = \"no\" ]]; then\n    true\n  else\n    if [[ \"$((10#${battery_status}))\" -le 5 ]]; then\n      color=\"${BATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR}\"\n    elif [[ \"$((10#${battery_status}))\" -le 25 ]]; then\n      color=\"${BATTERY_STATUS_THEME_PROMPT_LOW_COLOR}\"\n    else\n      color=\"${BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR}\"\n    fi\n    ac_adapter_connected && battery_status=\"${BATTERY_AC_CHAR}${battery_status}\"\n    _omb_util_print \"${battery_status}%|${color}\"\n  fi\n}\n\nfunction __powerline_in_vim_prompt {\n  if [ -n \"$VIMRUNTIME\" ]; then\n    _omb_util_print \"${IN_VIM_THEME_PROMPT_TEXT}|${IN_VIM_THEME_PROMPT_COLOR}\"\n  fi\n}\n\nfunction __powerline_left_segment {\n  local OLD_IFS=\"${IFS}\"; IFS=\"|\"\n  local params=( $1 )\n  IFS=\"${OLD_IFS}\"\n  local separator_char=\"${POWERLINE_LEFT_SEPARATOR}\"\n  local separator=\"\"\n  local text_color=${params[2]:-\"-\"}\n\n  if [[ \"${SEGMENTS_AT_LEFT}\" -gt 0 ]]; then\n    separator=\"$(set_color ${LAST_SEGMENT_COLOR} ${params[1]})${separator_char}${_omb_prompt_normal}\"\n  fi\n\n  LEFT_PROMPT+=\"${separator}$(set_color ${text_color} ${params[1]}) ${params[0]} ${_omb_prompt_normal}\"\n  LAST_SEGMENT_COLOR=${params[1]}\n  (( SEGMENTS_AT_LEFT += 1 ))\n}\n\nfunction __powerline_last_status_prompt {\n  [[ \"$1\" -ne 0 ]] && _omb_util_print \"${1}|${LAST_STATUS_THEME_PROMPT_COLOR}\"\n}\n\nfunction __powerline_prompt_command {\n  local last_status=\"$?\" ## always the first\n  local separator_char=\"${POWERLINE_PROMPT_CHAR}\"\n\n  LEFT_PROMPT=\"\"\n  SEGMENTS_AT_LEFT=0\n  LAST_SEGMENT_COLOR=\"\"\n\n  # The IFS (internal field seperator) may have been changed outside to not contain\n  # the space character ' ' whence we need to make sure that the space separated list\n  # stored in POWERLINE_PROMPT is converted into an array correctly.\n  IFS=' ' read -r -a POWERLINE_PROMPT_ARRAY <<< \"${POWERLINE_PROMPT}\"\n\n  ## left prompt ##\n  for segment in ${POWERLINE_PROMPT_ARRAY[@]}; do\n    local info=\"$(__powerline_${segment}_prompt)\"\n    [[ -n \"${info}\" ]] && __powerline_left_segment \"${info}\"\n  done\n\n  ## info status prompt ##\n  local info=\"$(__powerline_last_status_prompt ${last_status})\"\n  [[ -n \"${info}\" ]] && __powerline_left_segment \"${info}\"\n\n  [[ -n \"${LEFT_PROMPT}\" ]] && LEFT_PROMPT+=\"$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${_omb_prompt_normal}\"\n\n  PS1=\"${LEFT_PROMPT} \"\n\n  ## cleanup ##\n  unset LAST_SEGMENT_COLOR \\\n        LEFT_PROMPT \\\n        SEGMENTS_AT_LEFT\n}\n"
  },
  {
    "path": "themes/powerline/powerline.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=32\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=25\nSCM_THEME_PROMPT_DIRTY_COLOR=88\nSCM_THEME_PROMPT_STAGED_COLOR=30\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=240\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-icon/README.md",
    "content": "# Powerline Icon Theme\n\nA theme derived from Powerline with emoji icons.\n\nThis is based on the Powerline theme. Please see also [the documentation of the\npowerline theme](../powerline/README.md).\n\n![Screenshot](./powerline-icon-dark.png?raw=true)\n\n## Segments\n\nThe `powerline-icon` theme modifies the segments `user_info` and `cwd` of the\noriginal Powerline theme so that they include icons.  This theme also inserts a\ndate string in `user_info`.\n\n## Configuration\n\nIcons can be configured by setting values to the following shell variables.\n\n```\nOMB_THEME_POWERLINE_ICON_USER\nOMB_THEME_POWERLINE_ICON_HOME\nOMB_THEME_POWERLINE_ICON_EXIT_FAILURE\nOMB_THEME_POWERLINE_ICON_EXIT_SUCCESS\n```\n\nThe time format shown in the `user_info` segment can be configured by the\nfollowing shell variable:\n\n```\nOMB_THEME_POWERLINE_ICON_CLOCK\n```\n\nThe default value is `%X %D`.\n"
  },
  {
    "path": "themes/powerline-icon/powerline-icon.base.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\n: \"${OMB_THEME_POWERLINE_ICON_USER=🐧}\"\n: \"${OMB_THEME_POWERLINE_ICON_HOME=🏠}\"\n: \"${OMB_THEME_POWERLINE_ICON_EXIT_FAILURE=❌}\"\n: \"${OMB_THEME_POWERLINE_ICON_EXIT_SUCCESS=✅}\"\n\nfunction __powerline_user_info_prompt {\n  local user_info=\"\"\n  local color=$USER_INFO_THEME_PROMPT_COLOR\n  local secondary_color=$USER_INFO_THEME_PROMPT_SECONDARY_COLOR\n\n  if [[ $THEME_CHECK_SUDO == true ]]; then\n    # check whether sudo is active for no-password executions\n    if sudo -n cat <<< c3bcc5c 2>&1 | grep -q c3bcc5c; then\n      color=${USER_INFO_THEME_PROMPT_COLOR_SUDO}\n    fi\n  fi\n  case $POWERLINE_PROMPT_USER_INFO_MODE in\n  \"sudo\")\n    if [[ $color == \"$USER_INFO_THEME_PROMPT_COLOR_SUDO\" ]]; then\n      user_info=\"!\"\n    fi\n    ;;\n  *)\n    if [[ $SSH_CLIENT ]]; then\n      user_info=$USER_INFO_SSH_CHAR$USER@$HOSTNAME\n    else\n      user_info=$USER\n    fi\n    ;;\n  esac\n  if [[ $user_info ]]; then\n    local clock=$(date +\"${OMB_THEME_POWERLINE_ICON_CLOCK-%X %D}\")\n    _omb_util_print \"$OMB_THEME_POWERLINE_ICON_USER $user_info${clock:+ $clock}|$color|$secondary_color\"\n  fi\n}\n\nfunction __powerline_cwd_prompt {\n  _omb_util_print \"$(pwd | sed \"s|^$HOME|$OMB_THEME_POWERLINE_ICON_HOME|\")|$CWD_THEME_PROMPT_COLOR\"\n}\n\nfunction __powerline_last_status_prompt {\n  if (($1 != 0)); then\n    _omb_util_print \"$OMB_THEME_POWERLINE_ICON_EXIT_FAILURE${1}|${LAST_STATUS_THEME_PROMPT_COLOR}\"\n  else\n    _omb_util_print \"$OMB_THEME_POWERLINE_ICON_EXIT_SUCCESS|${LAST_STATUS_THEME_PROMPT_COLOR_SUCCESS}\"\n  fi\n}\n"
  },
  {
    "path": "themes/powerline-icon/powerline-icon.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline-icon/powerline-icon.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=0\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲🐍❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=25\nSCM_THEME_PROMPT_DIRTY_COLOR=88\nSCM_THEME_PROMPT_STAGED_COLOR=30\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=30\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\nLAST_STATUS_THEME_PROMPT_COLOR_SUCCESS=42\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nOMB_THEME_POWERLINE_ICON_USER='🐧'\nOMB_THEME_POWERLINE_ICON_HOME='🏠'\nOMB_THEME_POWERLINE_ICON_EXIT_FAILURE='❌'\nOMB_THEME_POWERLINE_ICON_EXIT_SUCCESS='✅'\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-light/README.md",
    "content": "# Powerline Light Theme\n\nA Powerline-derived theme for light backgrounds aiming to balance bling and utility. Created by [Imran Chaudhry](https://imranchaudhry.com/) / April 2023.\n\nThe colours were set using some experimentation and consulting an xterm 256 colour chart like [this](https://github.com/gawin/bash-colors-256)\n\nThis is based on the Powerline theme. Please see also [the documentation of the\npowerline theme](../powerline/README.md).\n\n![Screenshot](./powerline-light.png?raw=true)\n"
  },
  {
    "path": "themes/powerline-light/powerline-light.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=45\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=1\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=40\nSCM_THEME_PROMPT_DIRTY_COLOR=208\nSCM_THEME_PROMPT_STAGED_COLOR=14\nSCM_THEME_PROMPT_UNSTAGED_COLOR=220\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=7\n\nLAST_STATUS_THEME_PROMPT_COLOR=6\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-multiline/README.md",
    "content": "# Powerline Multiline Theme\n\nA colorful multiline theme, where the first line shows information about your shell session (divided into two parts, left and right), and the second one is where the shell commands are introduced.\n\n**IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.\n\n## Provided Information\n\n* Current path\n* Current username and hostname\n* Current time\n* An indicator when connected by SSH\n* An indicator when `sudo` has the credentials cached (see the `sudo` manpage for more info about this)\n* An indicator when the current shell is inside the Vim editor\n* Battery charging status (depends on the [../../plugins/battery/battery.plugin.sh](battery plugin))\n* SCM Repository status (e.g. Git, SVN)\n* The current Python environment (Virtualenv, venv, and Conda are supported) in use\n* The current Ruby environment (rvm and rbenv are supported) in use\n* Last command exit code (only shown when the exit code is greater than 0)\n\n## Configuration\n\nThis theme is pretty configurable, all the configuration is done by setting environment variables.\n\n### User Information\n\nBy default, the username and hostname are shown on the right hand side, but you can change this behavior by setting the value of the following variable:\n\n    POWERLINE_PROMPT_USER_INFO_MODE=\"sudo\"\n\nFor now, the only supported value is `sudo`, which hides the username and hostname, and shows an indicator when `sudo` has the credentials cached. Other values have no effect at this time.\n\n### Clock Format\n\nBy default, the current time is shown on the right hand side, you can change the format using the following variable:\n\n    THEME_CLOCK_FORMAT=\"%H:%M:%S\"\n\nThe time/date is printed by the `date` command, so refer to its man page to change the format.\n\n### Segment Order\n\nThe contents of both prompt sides can be \"reordered\", all the \"segments\" (every piece of information) can take any place. The currently available segments are:\n\n* battery\n* clock\n* cwd\n* in_vim\n* python_venv\n* ruby\n* scm\n* user_info\n\nTwo variables can be defined to set the order of the prompt segments:\n\n    POWERLINE_LEFT_PROMPT=\"scm python_venv ruby cwd\"\n    POWERLINE_RIGHT_PROMPT=\"in_vim clock battery user_info\"\n\nThe example values above are the current default values, but if you want to remove anything from the prompt, simply remove the \"string\" that represents the segment from the corresponding variable.\n"
  },
  {
    "path": "themes/powerline-multiline/powerline-multiline.base.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\nfunction __powerline_last_status_prompt {\n  (($1 != 0)) && _omb_util_print \"$(set_color $LAST_STATUS_THEME_PROMPT_COLOR -) $1 $_omb_prompt_normal\"\n}\n\nfunction __powerline_right_segment {\n  local OLD_IFS=$IFS; IFS='|'\n  local params=( $1 )\n  IFS=$OLD_IFS\n  local separator_char=$POWERLINE_RIGHT_SEPARATOR\n  local padding=2\n  local separator_color=\"\"\n  local text_color=${params[2]:-'-'}\n\n  if ((SEGMENTS_AT_RIGHT == 0)); then\n    separator_color=$(set_color ${params[1]} -)\n  else\n    separator_color=$(set_color ${params[1]} $LAST_SEGMENT_COLOR)\n    ((padding += 1))\n  fi\n  RIGHT_PROMPT+=\"$separator_color$separator_char$_omb_prompt_normal$(set_color $text_color ${params[1]}) ${params[0]} $_omb_prompt_normal$(set_color - $COLOR)$_omb_prompt_normal\"\n  RIGHT_PROMPT_LENGTH=$((${#params[0]} + RIGHT_PROMPT_LENGTH + padding))\n  LAST_SEGMENT_COLOR=${params[1]}\n  ((SEGMENTS_AT_RIGHT += 1))\n}\n\nfunction __powerline_prompt_command {\n  local last_status=$? ## always the first\n  local separator_char=$POWERLINE_LEFT_SEPARATOR\n  local move_cursor_rightmost='\\033[500C'\n\n  local LEFT_PROMPT=\"\"\n  local RIGHT_PROMPT=\"\"\n  local RIGHT_PROMPT_LENGTH=0\n  local SEGMENTS_AT_LEFT=0\n  local SEGMENTS_AT_RIGHT=0\n  local LAST_SEGMENT_COLOR=\"\"\n\n  ## left prompt ##\n  for segment in $POWERLINE_LEFT_PROMPT; do\n    local info=$(__powerline_\"$segment\"_prompt)\n    [[ $info ]] && __powerline_left_segment \"$info\"\n  done\n  [[ $LEFT_PROMPT ]] && LEFT_PROMPT+=$(set_color ${LAST_SEGMENT_COLOR} -)${separator_char}${_omb_prompt_normal}\n\n  ## right prompt ##\n  if [[ $POWERLINE_RIGHT_PROMPT ]]; then\n    LEFT_PROMPT+=$move_cursor_rightmost\n    for segment in $POWERLINE_RIGHT_PROMPT; do\n      local info=$(__powerline_\"$segment\"_prompt)\n      [[ $info ]] && __powerline_right_segment \"$info\"\n    done\n    LEFT_PROMPT+=\"\\033[${RIGHT_PROMPT_LENGTH}D\"\n  fi\n\n  PS1=\"$LEFT_PROMPT$RIGHT_PROMPT\\n$(__powerline_last_status_prompt $last_status)$PROMPT_CHAR \"\n}\n"
  },
  {
    "path": "themes/powerline-multiline/powerline-multiline.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline-multiline/powerline-multiline.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"❯\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\nPOWERLINE_RIGHT_SEPARATOR=${POWERLINE_RIGHT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=32\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=25\nSCM_THEME_PROMPT_DIRTY_COLOR=88\nSCM_THEME_PROMPT_STAGED_COLOR=30\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=240\n\nLAST_STATUS_THEME_PROMPT_COLOR=196\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_LEFT_PROMPT=${POWERLINE_LEFT_PROMPT:=\"scm python_venv ruby cwd\"}\nPOWERLINE_RIGHT_PROMPT=${POWERLINE_RIGHT_PROMPT:=\"in_vim clock battery user_info\"}\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-naked/README.md",
    "content": "# Powerline Naked Theme\n\nA simple theme derived from the Powerline theme.\n\nThis is based on the Powerline theme. Please see also [the documentation of the\npowerline theme](../powerline/README.md).\n\n![Screenshot](./powerline-naked-dark.png?raw=true)\n"
  },
  {
    "path": "themes/powerline-naked/powerline-naked.base.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\nfunction __powerline_left_segment {\n  local OLD_IFS=$IFS; IFS='|'\n  local params=( $1 )\n  IFS=$OLD_IFS\n  local separator_char=\"\"\n  local separator=\"\"\n  local background_color=${params[2]:-'-'}\n\n  if ((SEGMENTS_AT_LEFT > 0)); then\n    separator=$separator_char\n  fi\n  LEFT_PROMPT+=\"${separator}$(set_color ${params[1]} ${background_color}) ${params[0]} ${_omb_prompt_normal}\"\n  ((SEGMENTS_AT_LEFT += 1))\n}\n"
  },
  {
    "path": "themes/powerline-naked/powerline-naked.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline-naked/powerline-naked.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=240\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_COLOR=238\nSCM_THEME_PROMPT_CLEAN_COLOR=25\nSCM_THEME_PROMPT_DIRTY_COLOR=88\nSCM_THEME_PROMPT_STAGED_COLOR=30\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=254\n\nLAST_STATUS_THEME_PROMPT_COLOR=124\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-plain/README.md",
    "content": "# Powerline Plain Theme\n\nA simplified version of the Powerline theme.\n\nThis is based on the Powerline theme. Please see also [the documentation of the\npowerline theme](../powerline/README.md). This theme does not require a font\nwith the Powerline symbols as required in the original Powerline theme.\n\n![Screenshot](./powerline-plain-dark.png?raw=true)\n"
  },
  {
    "path": "themes/powerline-plain/powerline-plain.base.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline/powerline.base.sh\"\n\nfunction __powerline_left_segment {\n  local OLD_IFS=$IFS; IFS='|'\n  local params=( $1 )\n  IFS=$OLD_IFS\n  local text_color=${params[2]:-'-'}\n\n  LEFT_PROMPT+=\"$separator$(set_color $text_color ${params[1]}) ${params[0]} $_omb_prompt_normal\"\n  LAST_SEGMENT_COLOR=${params[1]}\n}\n\nfunction __powerline_prompt_command {\n  local last_status=$? ## always the first\n\n  local LEFT_PROMPT=\"\"\n\n  ## left prompt ##\n  for segment in $POWERLINE_PROMPT; do\n    local info=$(__powerline_\"$segment\"_prompt)\n    [[ $info ]] && __powerline_left_segment \"$info\"\n  done\n  ((last_status != 0)) && __powerline_left_segment $(__powerline_last_status_prompt $last_status)\n  [[ $LEFT_PROMPT ]] && LEFT_PROMPT+=\"$(set_color $LAST_SEGMENT_COLOR -) $_omb_prompt_normal\"\n\n  PS1=\"$LEFT_PROMPT \"\n}\n"
  },
  {
    "path": "themes/powerline-plain/powerline-plain.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline-plain/powerline-plain.base.sh\"\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\"⌁ \"}\nUSER_INFO_THEME_PROMPT_COLOR=32\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"ⓔ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"ⓔ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\"⎇  \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=25\nSCM_THEME_PROMPT_DIRTY_COLOR=88\nSCM_THEME_PROMPT_STAGED_COLOR=30\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"ⓔ \"}\n\nCWD_THEME_PROMPT_COLOR=240\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"+ \"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/powerline-wizard/README.md",
    "content": "# 🧙 Powerline-Wizard 🔮\n\n### Powerline-Wizard is a modified version of Powerline-Icon theme for Oh My Bash 🧑‍💻\n\n## 📸 Screenshots\n![Screenshot](./powerline-wizard-dark.png?raw=true)\n"
  },
  {
    "path": "themes/powerline-wizard/powerline-wizard.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nsource \"$OSH/themes/powerline-icon/powerline-icon.base.sh\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=0\nUSER_INFO_THEME_PROMPT_SECONDARY_COLOR=\"-\"\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=202\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲🐍❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=237\nSCM_THEME_PROMPT_DIRTY_COLOR=142\nSCM_THEME_PROMPT_STAGED_COLOR=237\nSCM_THEME_PROMPT_UNSTAGED_COLOR=92\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_PROMPT_COLOR=236\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\nLAST_STATUS_THEME_PROMPT_COLOR_SUCCESS=238\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby cwd\"}\n\nOMB_THEME_POWERLINE_ICON_USER='🧙'\nOMB_THEME_POWERLINE_ICON_HOME='🔮'\nOMB_THEME_POWERLINE_ICON_EXIT_FAILURE='🔥'\nOMB_THEME_POWERLINE_ICON_EXIT_SUCCESS='🌀'\n\nfunction _omb_theme_PROMPT_COMMAND { __powerline_prompt_command \"$@\"; }\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/primer/primer.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# based of the candy theme, but minimized by odbol\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"$(clock_prompt) ${_omb_prompt_reset_color}${_omb_prompt_white}\\w${_omb_prompt_reset_color}$(scm_prompt_info)${_omb_prompt_navy} →${_omb_prompt_bold_navy} ${_omb_prompt_reset_color} \";\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_navy\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%I:%M:%S\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/pro/pro.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${_omb_prompt_navy}scm:( \"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_navy} )\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_green}git:( \"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green} )\"\n\nfunction git_prompt_info {\n  git_prompt_vars\n  echo -e \"$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_SUFFIX\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1=\"\\h: \\W $(scm_prompt_info)${_omb_prompt_reset_color} $ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/pure/pure.theme.sh",
    "content": "#! bash oh-my-bash.module\n# scm theming\nSCM_THEME_PROMPT_PREFIX=\"|\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\n### TODO: openSUSE has already colors enabled, check if those differs from stock\n# LS colors, made with http://geoff.greer.fm/lscolors/\n# export LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\n# export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'\n\nfunction scm_prompt {\n    CHAR=$(scm_char)\n    if [ $CHAR = $SCM_NONE_CHAR ]\n        then\n            return\n        else\n            _omb_util_print \"[$(scm_char)$(scm_prompt_info)]\"\n    fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n    ps_host=\"${_omb_prompt_bold_navy}\\h${_omb_prompt_normal}\";\n    ps_user=\"${_omb_prompt_green}\\u${_omb_prompt_normal}\";\n    ps_user_mark=\"${_omb_prompt_green} $ ${_omb_prompt_normal}\";\n    ps_root=\"${_omb_prompt_brown}\\u${_omb_prompt_brown}\";\n    ps_root_mark=\"${_omb_prompt_brown} # ${_omb_prompt_normal}\"\n    ps_path=\"${_omb_prompt_olive}\\w${_omb_prompt_normal}\";\n\n    # make it work\n    case $(id -u) in\n        0) PS1=\"$ps_root@$ps_host$(scm_prompt):$ps_path$ps_root_mark\"\n            ;;\n        *) PS1=\"$ps_user@$ps_host$(scm_prompt):$ps_path$ps_user_mark\"\n            ;;\n    esac\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/purity/purity.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}⊘${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_PREFIX=\"${_omb_prompt_reset_color}( \"\nSCM_THEME_PROMPT_SUFFIX=\" ${_omb_prompt_reset_color})\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}⊘${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_reset_color}( \"\nGIT_THEME_PROMPT_SUFFIX=\" ${_omb_prompt_reset_color})\"\n\nOMB_THEME_PURITY_STATUS_BAD=\"${_omb_prompt_bold_brown}❯${_omb_prompt_reset_color}${_omb_prompt_normal} \"\nOMB_THEME_PURITY_STATUS_OK=\"${_omb_prompt_bold_green}❯${_omb_prompt_reset_color}${_omb_prompt_normal} \"\n_omb_deprecate_declare 20000 STATUS_THEME_PROMPT_BAD OMB_THEME_PURITY_STATUS_BAD sync\n_omb_deprecate_declare 20000 STATUS_THEME_PROMPT_OK  OMB_THEME_PURITY_STATUS_OK  sync\n\nfunction _omb_theme_PROMPT_COMMAND {\n  if (($? == 0)); then\n    local ret_status=${STATUS_THEME_PROMPT_OK:-${OMB_THEME_PURITY_STATUS_OK-}}\n  else\n    local ret_status=${STATUS_THEME_PROMPT_BAD:-${OMB_THEME_PURITY_STATUS_BAD-}}\n  fi\n  PS1=\"\\n${_omb_prompt_navy}\\w $(scm_prompt_info)\\n${ret_status} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/pzq/pzq.theme.sh",
    "content": "#!/usr/bin/env bash\n\n# Theme inspired by:\n#  - ys theme - https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/ys.zsh-theme\n#  - rana theme - https://github.com/ohmybash/oh-my-bash/blob/master/themes/rana/rana.theme.sh\n#\n# by Ziqiang Pei<ziqiangpei@foxmail.com>\n\nOMB_PROMPT_CONDAENV_FORMAT='(%s)'\nOMB_PROMPT_VIRTUALENV_FORMAT='(%s)'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\n# ----------------------------------------------------------------- COLOR CONF\nD_DEFAULT_COLOR=\"$_omb_prompt_white\"\nD_INTERMEDIATE_COLOR=\"$_omb_prompt_bold_white\"\nD_NUMBER_COLOR=\"$_omb_prompt_bold_navy\"\nD_USER_COLOR=\"$_omb_prompt_teal\"\nD_SUPERUSER_COLOR=\"$_omb_prompt_brown\"\nD_MACHINE_COLOR=\"$_omb_prompt_green\"\nD_DIR_COLOR=\"$_omb_prompt_bold_olive\"\nD_GIT_DEFAULT_COLOR=\"$_omb_prompt_white\"\nD_GIT_BRANCH_COLOR=\"$_omb_prompt_teal\"\nD_GIT_PROMPT_COLOR=\"$_omb_prompt_brown\"\nD_SCM_COLOR=\"$_omb_prompt_bold_olive\"\nD_BRANCH_COLOR=\"$_omb_prompt_teal\"\nD_CHANGES_COLOR=\"$_omb_prompt_white\"\nD_TIME_COLOR=\"$_omb_prompt_white\"\nD_DOLLOR_COLOR=\"$_omb_prompt_bold_brown\"\nD_CMDFAIL_COLOR=\"$_omb_prompt_brown\"\nD_VIMSHELL_COLOR=\"$_omb_prompt_teal\"\n\n# ------------------------------------------------------------------ FUNCTIONS\ncase $TERM in\n  xterm*)\n    TITLEBAR='\\[\\e]0;\\w\\e\\\\\\]'\n    ;;\n  *)\n    TITLEBAR=\"\"\n    ;;\nesac\n\nfunction is_vim_shell {\n  if [[ ${VIMRUNTIME-} ]]; then\n    _omb_util_print \"${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}vim shell${D_DEFAULT_COLOR} \"\n  fi\n}\n\nfunction mitsuhikos_lastcommandfailed {\n  local status=$?\n  if ((status != 0)); then\n    _omb_util_print \" ${D_DEFAULT_COLOR}C:${D_CMDFAIL_COLOR}$status ${D_DEFAULT_COLOR}\"\n  fi\n}\n\n# vcprompt for scm instead of oh-my-bash default\nfunction demula_vcprompt {\n  if [[ ${VCPROMPT_EXECUTABLE-} ]]; then\n    local D_VCPROMPT_FORMAT=\"on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}\"\n    $VCPROMPT_EXECUTABLE -f \"$D_VCPROMPT_FORMAT\"\n  fi\n}\n\n# checks if the plugin is installed before calling battery_charge\nfunction safe_battery_charge {\n  if _omb_util_function_exists battery_charge; then\n    battery_charge\n  fi\n}\n\nfunction prompt_git {\n  local branchName=''\n\n  # Check if the current directory is in a Git repository.\n  if _omb_prompt_git rev-parse --is-inside-work-tree &>/dev/null; then\n    # Get the short symbolic ref.\n    # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit\n    # Otherwise, just give up.\n    branchName=$(\n      _omb_prompt_git symbolic-ref --quiet --short HEAD 2> /dev/null ||\n        _omb_prompt_git rev-parse --short HEAD 2> /dev/null ||\n        _omb_util_print '(unknown)');\n\n    _omb_util_print \"${D_GIT_DEFAULT_COLOR}on ${D_GIT_BRANCH_COLOR}${branchName} \"\n  else\n    return\n  fi\n}\n\nfunction limited_pwd {\n  # Max length of PWD to display\n  local MAX_PWD_LENGTH=20\n\n  # Replace $HOME with ~ if possible\n  local RELATIVE_PWD=${PWD/#$HOME/\\~}\n\n  local offset=$((${#RELATIVE_PWD}-MAX_PWD_LENGTH))\n\n  if ((offset > 0)); then\n    local truncated_symbol='...'\n    local TRUNCATED_PWD=${RELATIVE_PWD:offset:MAX_PWD_LENGTH}\n    _omb_util_put \"${truncated_symbol}/${TRUNCATED_PWD#*/}\"\n  else\n    _omb_util_put \"${RELATIVE_PWD}\"\n  fi\n}\n\n# -------------------------------------------------------------- PROMPT OUTPUT\nfunction _omb_theme_PROMPT_COMMAND {\n  local LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)\n  local SAVE_CURSOR='\\[\\e7'\n  local RESTORE_CURSOR='\\e8\\]'\n  local MOVE_CURSOR_RIGHTMOST='\\e['${COLUMNS:-9999}'C'\n  local MOVE_CURSOR_5_LEFT='\\e[5D'\n  local THEME_CLOCK_FORMAT=\"%H:%M:%S %y-%m-%d\"\n  # Replace $HOME with ~ if possible\n  local RELATIVE_PWD=${PWD/#$HOME/\\~}\n\n  local python_venv\n  _omb_prompt_get_python_venv\n\n  PS1=${TITLEBAR}$python_venv$'\\n'\n  if [[ $OSTYPE == linux-gnu ]]; then\n    PS1+=\"${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\"\n    PS1+=\"$(safe_battery_charge)${RESTORE_CURSOR}\"\n    PS1+=\"${D_NUMBER_COLOR}# ${D_USER_COLOR}\\u ${D_DEFAULT_COLOR}\"\n  else\n    PS1+=\"${D_NUMBER_COLOR}# ${D_USER_COLOR}\\u ${D_DEFAULT_COLOR}\"\n  fi\n  PS1+=\"@ ${D_MACHINE_COLOR}\\h ${D_DEFAULT_COLOR}\"\n  PS1+=\"in ${D_DIR_COLOR}${RELATIVE_PWD} ${D_INTERMEDIATE_COLOR}\"\n  PS1+=$(prompt_git)\n  PS1+=${D_TIME_COLOR}[$(clock_prompt)]\n  PS1+=${LAST_COMMAND_FAILED}\n  PS1+=$(demula_vcprompt)\n  PS1+=$(is_vim_shell)\n  if [[ $OSTYPE != linux-gnu ]]; then\n    PS1+=$(safe_battery_charge)\n  fi\n  PS1+=$'\\n'\"${D_DOLLOR_COLOR}$ ${D_DEFAULT_COLOR}\"\n\n  PS2=\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/rainbowbrite/rainbowbrite.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# based off of n0qorg\n# looks like, if you're in a git repo:\n# ± ~/path/to (branch ✓) $\n# in glorious red / blue / yellow color scheme\n\nfunction _omb_theme_PROMPT_COMMAND {\n  # Save history\n  history -a\n  history -c\n  history -r\n  # displays user@server in purple\n  # PS1=\"$_omb_prompt_brown$(scm_char) $_omb_prompt_purple\\u@\\h$_omb_prompt_reset_color:$_omb_prompt_navy\\w$_omb_prompt_olive$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_gray\\$$_omb_prompt_reset_color \"\n  # no user@server\n  PS1=\"$_omb_prompt_brown$(scm_char) $_omb_prompt_navy\\w$_omb_prompt_olive$(scm_prompt_info)$(_omb_prompt_print_ruby_env) $_omb_prompt_gray\\$$_omb_prompt_reset_color \"\n  PS2='> '\n  PS4='+ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nSCM_NONE_CHAR='·'\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_olive})\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/rana/rana.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# Theme inspired on:\n#  - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n#  - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n#  - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n#  - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n#  - Bash_it modern theme\n#\n# by Rana Amrit Parth <ramrit9@gmaiil.com>\n\n# For the real Monokai colors you should add these to your .XDefaults or\n# terminal configuration:\n#! ----------------------------------------------------------- TERMINAL COLORS\n#! monokai - http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/\n#*background: #272822\n#*foreground: #E2DA6E\n#*color0: black\n#! mild red\n#*color1: #CD0000\n#! light green\n#*color2: #A5E02D\n#! orange (yellow)\n#*color3: #FB951F\n#! \"dark\" blue\n#*color4: #076BCC\n#! hot pink\n#*color5: #F6266C\n#! cyan\n#*color6: #64D9ED\n#! gray\n#*color7: #E5E5E5\n\n# ----------------------------------------------------------------- DEF COLOR\n\n_omb_deprecate_const 20000 RCol \"$_omb_prompt_normal\"      \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_normal}\"\n_omb_deprecate_const 20000 Bla  \"$_omb_prompt_black\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_black}\"\n_omb_deprecate_const 20000 Red  \"$_omb_prompt_brown\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_brown}\"\n_omb_deprecate_const 20000 Gre  \"$_omb_prompt_green\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_green}\"\n_omb_deprecate_const 20000 Yel  \"$_omb_prompt_olive\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_olive}\"\n_omb_deprecate_const 20000 Blu  \"$_omb_prompt_navy\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_navy}\"\n_omb_deprecate_const 20000 Pur  \"$_omb_prompt_purple\"      \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_purple}\"\n_omb_deprecate_const 20000 Cya  \"$_omb_prompt_teal\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_teal}\"\n_omb_deprecate_const 20000 Whi  \"$_omb_prompt_silver\"      \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_silver}\"\n_omb_deprecate_const 20000 BBla \"$_omb_prompt_bold_black\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_black}\"\n_omb_deprecate_const 20000 BRed \"$_omb_prompt_bold_brown\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_brown}\"\n_omb_deprecate_const 20000 BGre \"$_omb_prompt_bold_green\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_green}\"\n_omb_deprecate_const 20000 BYel \"$_omb_prompt_bold_olive\"  \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_olive}\"\n_omb_deprecate_const 20000 BBlu \"$_omb_prompt_bold_navy\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_navy}\"\n_omb_deprecate_const 20000 BPur \"$_omb_prompt_bold_purple\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_purple}\"\n_omb_deprecate_const 20000 BCya \"$_omb_prompt_bold_teal\"   \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_teal}\"\n_omb_deprecate_const 20000 BWhi \"$_omb_prompt_bold_silver\" \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_bold_silver}\"\n_omb_deprecate_const 20000 IBla \"$_omb_prompt_gray\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_gray}\"\n_omb_deprecate_const 20000 IRed \"$_omb_prompt_red\"         \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_red}\"\n_omb_deprecate_const 20000 IGre \"$_omb_prompt_lime\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_lime}\"\n_omb_deprecate_const 20000 IYel \"$_omb_prompt_yellow\"      \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_yellow}\"\n_omb_deprecate_const 20000 IBlu \"$_omb_prompt_blue\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_blue}\"\n_omb_deprecate_const 20000 IPur \"$_omb_prompt_magenta\"     \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_magenta}\"\n_omb_deprecate_const 20000 ICya \"$_omb_prompt_cyan\"        \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_cyan}\"\n_omb_deprecate_const 20000 IWhi \"$_omb_prompt_white\"       \"${_omb_deprecate_msg_please_use/'%s'/_omb_prompt_white}\"\n\n# ----------------------------------------------------------------- COLOR CONF\nD_DEFAULT_COLOR=\"$_omb_prompt_silver\"\nD_INTERMEDIATE_COLOR=\"$_omb_prompt_bold_silver\"\nD_USER_COLOR=\"$_omb_prompt_olive\"\nD_SUPERUSER_COLOR=\"$_omb_prompt_brown\"\nD_MACHINE_COLOR=\"$_omb_prompt_yellow\"\nD_DIR_COLOR=\"$_omb_prompt_green\"\nD_GIT_COLOR=\"$_omb_prompt_bold_navy\"\nD_SCM_COLOR=\"$_omb_prompt_bold_olive\"\nD_BRANCH_COLOR=\"$_omb_prompt_bold_olive\"\nD_CHANGES_COLOR=\"$_omb_prompt_silver\"\nD_CMDFAIL_COLOR=\"$_omb_prompt_brown\"\nD_VIMSHELL_COLOR=\"$_omb_prompt_teal\"\n\n# ------------------------------------------------------------------ FUNCTIONS\ncase $TERM in\n  xterm*)\n    TITLEBAR='\\[\\e]0;\\w\\e\\\\\\]'\n    ;;\n  *)\n    TITLEBAR=\"\"\n    ;;\nesac\n\nfunction is_vim_shell {\n  if [[ ${VIMRUNTIME-} ]]; then\n    _omb_util_print \"${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}vim shell${D_DEFAULT_COLOR} \"\n  fi\n}\n\nfunction mitsuhikos_lastcommandfailed {\n  local status=$?\n  if ((status != 0)); then\n    _omb_util_print \"${D_INTERMEDIATE_COLOR}exited ${D_CMDFAIL_COLOR}$status ${D_DEFAULT_COLOR}\"\n  fi\n}\n\n# vcprompt for scm instead of oh-my-bash default\nfunction demula_vcprompt {\n  if [[ ${VCPROMPT_EXECUTABLE-} ]]; then\n    local D_VCPROMPT_FORMAT=\"on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}\"\n    $VCPROMPT_EXECUTABLE -f \"$D_VCPROMPT_FORMAT\"\n  fi\n}\n\n# checks if the plugin is installed before calling battery_charge\nfunction safe_battery_charge {\n  if _omb_util_function_exists battery_charge; then\n    battery_charge\n  fi\n}\n\nfunction prompt_git {\n  local s=''\n  local branchName=''\n\n  # Check if the current directory is in a Git repository.\n  if _omb_prompt_git rev-parse --is-inside-work-tree &>/dev/null; then\n\n    # check if the current directory is in .git before running git checks\n    if [[ $(_omb_prompt_git rev-parse --is-inside-git-dir 2> /dev/null) == false ]]; then\n\n      # Ensure the index is up to date.\n      _omb_prompt_git update-index --really-refresh -q &>/dev/null\n\n      # Check for uncommitted changes in the index.\n      if ! _omb_prompt_git diff --quiet --ignore-submodules --cached; then\n        s+='+'\n      fi\n\n      # Check for unstaged changes.\n      if ! _omb_prompt_git diff-files --quiet --ignore-submodules --; then\n        s+='!'\n      fi\n\n      # Check for untracked files.\n      if [[ $(_omb_prompt_git ls-files --others --exclude-standard) ]]; then\n        s+='?'\n      fi\n\n      # Check for stashed files.\n      if _omb_prompt_git rev-parse --verify refs/stash &>/dev/null; then\n        s+='$'\n      fi\n\n    fi\n\n    # Get the short symbolic ref.\n    # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit\n    # Otherwise, just give up.\n    branchName=$(\n      _omb_prompt_git symbolic-ref --quiet --short HEAD 2> /dev/null ||\n        _omb_prompt_git rev-parse --short HEAD 2> /dev/null ||\n        _omb_util_print '(unknown)')\n\n    [[ $s ]] && s=\" [$s]\"\n\n    echo -e \"${1}${branchName}${_omb_prompt_teal}$s\"\n  else\n    return\n  fi\n}\n\n# -------------------------------------------------------------- PROMPT OUTPUT\nfunction _omb_theme_PROMPT_COMMAND {\n  local LAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)\n  local SAVE_CURSOR='\\[\\e7'\n  local RESTORE_CURSOR='\\e8\\]'\n  local MOVE_CURSOR_RIGHTMOST='\\e['${COLUMNS:-9999}'C'\n  local MOVE_CURSOR_5_LEFT='\\e[5D'\n\n  PS1=${TITLEBAR}$'\\n'\n  if [[ $OSTYPE == linux* ]]; then\n    PS1+=${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\n    PS1+=$(safe_battery_charge)${RESTORE_CURSOR}\n  fi\n  PS1+=\"${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\"\n  PS1+=\"at ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\"\n  PS1+=\"in ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\"\n  PS1+=$(prompt_git \"$D_INTERMEDIATE_COLOR on $D_GIT_COLOR\")\n  PS1+=${LAST_COMMAND_FAILED}\n  PS1+=$(demula_vcprompt)\n  PS1+=$(is_vim_shell)\n  if [[ $OSTYPE != linux* ]]; then\n    PS1+=$(safe_battery_charge)\n  fi\n  PS1+=$'\\n'\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n\n  PS2=\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n}\n\n# Runs prompt (this bypasses oh-my-bash $PROMPT setting)\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/random/README.md",
    "content": "# Random\n\nThis is a special Oh-My-Bash theme value.  When `random` is specified to\n`OSH_THEME`, Oh My Bash randomly selects and loads an existing theme.\n\n## Variables\n\nThe list of theme names from which the theme is selected can be specified to\nthe array `OMB_THEME_RANDOM_CANDIDATES` in `~/.bashrc`.  When the candidate\nlist is not supplied, a theme is selected from all available themes in\n`$OSH_CUSTOM` and `$OSH`.\n\nThe theme names that the `random` theme should not select can be sorted in the\narray `OMB_THEME_RANDOM_IGNORED` in `~/.bashrc`.\n\nAfter initialization, the currently selected theme name is stored in the\nvariable `OMB_THEME_RANDOM_SELECTED`:\n\n```console\n[oh-my-bash] Random theme 'font' loaded...\n$ echo \"$OMB_THEME_RANDOM_SELECTED\"\nfont\n```\n"
  },
  {
    "path": "themes/random/random.theme.bash",
    "content": "#! bash oh-my-bash.module\n\n# This theme loads another randomly-chosen theme.\n\n## @var[out] _omb_init_themes\nfunction _omb_theme_random__list_available_themes {\n  # When OMB_THEME_RANDOM_CANDIDATES is set, we use it as the theme list\n  # available for the random theme.\n  if [[ ${OMB_THEME_RANDOM_CANDIDATES[@]+set} ]]; then\n    _omb_init_themes=(\"${OMB_THEME_RANDOM_CANDIDATES[@]}\")\n    return 0\n  fi\n\n  _omb_init_themes=()\n\n  local theme_files\n  _omb_util_glob_expand theme_files '{\"$OSH_CUSTOM\"{,/themes},\"$OSH\"/themes}/*/*.theme.{bash,sh}'\n  ((${#theme_files[@]})) || return 1\n\n  local -a exclude_themes=(random)\n  if ((${#OMB_THEME_RANDOM_IGNORED[@]})); then\n    exclude_themes+=(\"${OMB_THEME_RANDOM_IGNORED[@]}\")\n  fi\n\n  local -a themes=() index theme\n  for index in \"${!theme_files[@]}\"; do\n    theme=${theme_files[index]##*/}\n    theme=${theme%.theme.sh}\n\n    # Check the filename format\n    [[ ${theme_files[index]} == */\"$theme\"/\"$theme\".theme.sh ]] ||\n      [[ ${theme_files[index]} == */\"$theme\"/\"$theme\".theme.bash ]] ||\n      continue\n\n    # Exclude ignored themes from the list\n    _omb_util_array_contains exclude_themes \"$theme\" && continue\n\n    # Remove duplicates\n    _omb_util_array_contains themes \"$theme\" && continue\n\n    themes+=(\"$theme\")\n  done\n  ((${#themes[@]})) || return 1\n\n  _omb_init_themes=(\"${themes[@]}\")\n}\n_omb_theme_random__list_available_themes\n\nif ((${#_omb_init_themes[@]})); then\n  OMB_THEME_RANDOM_SELECTED=${_omb_init_themes[RANDOM%${#_omb_init_themes[@]}]}\n  _omb_module_require_theme \"$OMB_THEME_RANDOM_SELECTED\" &&\n    printf '%s\\n' \"[oh-my-bash] Random theme '$OMB_THEME_RANDOM_SELECTED' loaded...\"\nfi\nunset -v _omb_init_themes\n"
  },
  {
    "path": "themes/rjorgenson/rjorgenson.theme.sh",
    "content": "#! bash oh-my-bash.module\n# port of zork theme\n\n# set colors for use throughout the prompt\n# i like things consistent\nOMB_THEME_BRACKET_COLOR=\"${OMB_THEME_BRACKET_COLOR-${_omb_prompt_navy}}\"\nOMB_THEME_STRING_COLOR=\"${OMB_THEME_STRING_COLOR-${_omb_prompt_green}}\"\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${OMB_THEME_STRING_COLOR}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\nPROMPT_CHAR=\"${OMB_THEME_BRACKET_COLOR}➞ ${_omb_prompt_normal}\"\nif [[ $OSTYPE == *darwin* ]]; then\n  PROMPT_CHAR=\"${OMB_THEME_BRACKET_COLOR}➞  ${_omb_prompt_normal}\"\nfi\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\nTITLEBAR=\"\"\ncase $TERM in\nxterm*) TITLEBAR=\"\\[\\033]0;\\w\\007\\]\" ;;\nesac\n\n\nfunction __my_rvm_ruby_version {\n  local gemset=$(awk -F'@' '{print $2}' <<< \"${GEM_HOME}\")\n  local version=$(awk -F'-' '{print $2}' <<< \"${MY_RUBY_HOME}\")\n  [[ $gemset ]] && gemset=@$gemset\n  local full=$version$gemset\n  [[ $full ]] && _omb_util_print \"${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}${full}${OMB_THEME_BRACKET_COLOR}]${_omb_prompt_normal}\"\n}\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}vim shell${OMB_THEME_BRACKET_COLOR}]${_omb_prompt_normal}\"\n  fi\n}\n\nfunction is_integer { # helper function to make sure input is an integer\n  [ \"$1\" -eq \"$1\" ] &> /dev/null\n  return \"$?\"\n}\n\n# XXX do we need/want to integrate with todo.sh? We don't provide it and I\n# can't find a version online that accepts ls as an input\nfunction todo_txt_count {\n  if _omb_util_command_exists todo.sh; then # is todo.sh installed\n    local count=$(todo.sh ls \\\n                    | awk '/TODO: [0-9]+ of ([0-9]+) tasks shown/ { print $4 }')\n    if is_integer \"${count}\"; then # did we get a sane answer back\n      _omb_util_print \"${OMB_THEME_BRACKET_COLOR}[${OMB_THEME_STRING_COLOR}T:$count${OMB_THEME_BRACKET_COLOR}]$_omb_prompt_normal\"\n    fi\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR != \"$SCM_NONE_CHAR\" ]]; then\n    local char=$OMB_THEME_BRACKET_COLOR[$CHAR$OMB_THEME_BRACKET_COLOR]\n    local info=[$OMB_THEME_STRING_COLOR$(scm_prompt_info)$OMB_THEME_BRACKET_COLOR]\n    _omb_util_print \"$char$info$_omb_prompt_normal\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local my_host=$OMB_THEME_STRING_COLOR'\\h'$_omb_prompt_normal\n  local my_user=$OMB_THEME_STRING_COLOR'\\u'$_omb_prompt_normal\n  local my_path=$OMB_THEME_STRING_COLOR'\\w'$_omb_prompt_normal\n  local bracket_c=$OMB_THEME_BRACKET_COLOR\n\n  local line2=$bracket_c'└─'$(todo_txt_count)$PROMPT_CHAR\n  # nice prompt\n  case $(id -u) in\n  (0)\n    my_user=$_omb_prompt_bold_brown'\\u'$_omb_prompt_normal\n    line2=$bracket_c'└─'$PROMPT_CHAR\n    ;;\n  esac\n\n  PS1=$TITLEBAR\n  PS1=$PS1$bracket_c'┌─'[$my_user$bracket_c][$my_host$bracket_c]\n  PS1=$PS1$(modern_scm_prompt)\n  PS1=$PS1$(__my_rvm_ruby_version)\n  PS1=$PS1$bracket_c[$my_path$bracket_c]$(is_vim_shell)\n  PS1=$PS1'\\n'$line2\n}\n\nPS2='└─'$PROMPT_CHAR\nPS3='>> '\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/robbyrussell/robbyrussell.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# This theme attempts to replicate the default \"robbyrussell\" theme from ohmyzsh:\n#  https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme\n\n# Example outside git repo:\n# ➜  ~\n# Example inside clean git repo:\n# ➜  config-files git:(main)\n# Example inside dirty git repo:\n# ➜  config-files git:(main ?:1) ✗\n# Example with virtual environment:\n# ➜  (env1) ~\n# Example with virtual environment and inside git repo:\n# ➜  (env1) config-files git:(main)\n# python_venv setup\nOMB_PROMPT_VIRTUALENV_FORMAT='(%s) '\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    if [[ \"$?\" == 0 ]]; then\n        local arrow_color=\"${_omb_prompt_bold_green}\"\n    else\n        local arrow_color=\"${_omb_prompt_bold_brown}\"\n    fi\n    # set the python_venv format\n    local python_venv; _omb_prompt_get_python_venv\n    python_venv=\"$_omb_prompt_olive$python_venv\"\n    local base_directory=\"${_omb_prompt_bold_teal}\\W${_omb_prompt_reset_color}\"\n    local GIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_navy}git:(${_omb_prompt_bold_brown}\"\n    local SVN_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_navy}svn:(${_omb_prompt_bold_brown}\"\n    local HG_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_navy}hg:(${_omb_prompt_bold_brown}\"\n    local SCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_reset_color}\"\n    local SCM_THEME_PROMPT_CLEAN=\"${_omb_prompt_bold_navy})${_omb_prompt_reset_color}\"\n    local SCM_THEME_PROMPT_DIRTY=\"${_omb_prompt_bold_navy}) ${_omb_prompt_olive}✗${_omb_prompt_reset_color}\"\n    local arrow=\"${arrow_color}➜${_omb_prompt_reset_color}\"\n\n    PS1=\"${arrow}  ${python_venv}${base_directory} \"\n\n    local scm_info=$(scm_prompt_info)\n\n    PS1+=${scm_info:+$scm_info }\n    PS1+=${_omb_prompt_normal}\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/roderik/roderik.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nGIT_PS1_SHOWDIRTYSTATE=true\nGIT_PS1_SHOWUNTRACKEDFILES=true\nGIT_PS1_SHOWSTASHSTATE=true\n\nexport PROMPT_DIRTRIM=${PROMPT_DIRTRIM:-3}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local color=$_omb_prompt_teal\n  if ((EUID == 0)); then\n    color=$_omb_prompt_brown\n  fi\n\n  PS1=\"[$(clock_prompt)]\"\n  PS1+=\"${_omb_prompt_olive}[${color}\\u@\\h ${_omb_prompt_green}\\w${_omb_prompt_olive}]\"\n  PS1+=\"${_omb_prompt_brown}$(__git_ps1 \"(%s)\")${_omb_prompt_normal}\\\\$ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/rr/rr.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# rr is a simple one-liner prompt inspired by robbyrussell from ohmyzsh themes.\n#\n# Looks:\n#\n# ➜  anish ~ cd .bash-it/themes/dulcie\n# ➜  anish custom-dulcie git:(master ✓) # with git\n#\n# Configuration. Change these by adding them in your .bash_profile\n\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\nOMB_PROMPT_VIRTUALENV_FORMAT=\"${_omb_prompt_bold_purple}vitualenv:(${_omb_prompt_reset_color}%s${_omb_prompt_bold_purple}) ${_omb_prompt_reset_color}\"\nOMB_PROMPT_CONDAENV_FORMAT=\"${_omb_prompt_bold_purple}condaenv:(${_omb_prompt_reset_color}%s${_omb_prompt_bold_purple}) ${_omb_prompt_reset_color}\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local arrow=\"${_omb_prompt_bold_purple}➜${_omb_prompt_reset_color}\"\n  local user_name=\"${_omb_prompt_white}\\u${_omb_prompt_reset_color}\"\n  local base_directory=\"${_omb_prompt_bold_blue}\\W${_omb_prompt_reset_color}\"\n  local GIT_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_purple}git:(${_omb_prompt_reset_color}\"\n  local SVN_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_purple}svn:(${_omb_prompt_reset_color}\"\n  local HG_THEME_PROMPT_PREFIX=\"${_omb_prompt_bold_purple}hg:(${_omb_prompt_reset_color}\"\n  local SCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_bold_purple})${_omb_prompt_reset_color}\"\n  local SCM_THEME_PROMPT_CLEAN=\"${_omb_prompt_bold_green} ✓${_omb_prompt_reset_color}\"\n  local SCM_THEME_PROMPT_DIRTY=\"${_omb_prompt_bold_red} ✗${_omb_prompt_reset_color}\"\n\n  PS1=\"${arrow}  ${user_name} ${base_directory} \"\n\n  local python_venv\n  _omb_prompt_get_python_venv\n  PS1+=$python_venv\n\n  local scm_info=$(scm_prompt_info)\n  PS1+=${scm_info:+$scm_info }\n  PS1+=$_omb_prompt_normal\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/sexy/sexy.theme.sh",
    "content": "#! bash oh-my-bash.module\n# Sexy Bash Prompt, inspired by \"Extravagant Zsh Prompt\"\n# Screenshot: http://cloud.gf3.ca/M5rG\n# A big thanks to \\amethyst on Freenode\n\nif [[ $COLORTERM == gnome-* && $TERM == xterm ]] && infocmp gnome-256color &>/dev/null; then\n  export TERM=gnome-256color\nelif [[ $TERM != dumb ]] && infocmp xterm-256color &>/dev/null; then\n  export TERM=xterm-256color\nfi\n\nMAGENTA=$_omb_prompt_bold_red\nWHITE=$_omb_prompt_bold_silver\nORANGE=$_omb_prompt_bold_olive\nGREEN=$_omb_prompt_bold_green\nPURPLE=$_omb_prompt_bold_purple\nRESET=$_omb_prompt_normal\nif ((_omb_term_colors >= 256)); then\n  ORANGE=$_omb_prompt_bold'\\['$(tput setaf 172)'\\]'\n  GREEN=$_omb_prompt_bold'\\['$(tput setaf 190)'\\]'\n  PURPLE=$_omb_prompt_bold'\\['$(tput setaf 141)'\\]'\nfi\n\nOMB_PROMPT_VIRTUALENV_FORMAT=$WHITE'<%s> '\nOMB_PROMPT_CONDAENV_FORMAT=$WHITE'<%s> '\nOMB_PROMPT_CONDAENV_USE_BASENAME=true\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\n\nfunction parse_git_dirty {\n  [[ $(_omb_prompt_git status 2> /dev/null | tail -n1 | cut -c 1-17) != \"nothing to commit\" ]] && _omb_util_print \"*\"\n}\nfunction parse_git_branch {\n  _omb_prompt_git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e \"s/* \\(.*\\)/\\1$(parse_git_dirty)/\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  local python_venv\n  _omb_prompt_get_python_venv\n  local git_prefix=\n  [[ $(_omb_prompt_git branch 2> /dev/null) ]] && git_prefix=' on '\n  PS1=$python_venv$MAGENTA'\\u '$WHITE'at '$ORANGE'\\h'\n  PS1+=' '$WHITE'in '$GREEN'\\w'$WHITE\n  PS1+=$git_prefix$PURPLE'$(parse_git_branch)'$WHITE'\\n\\$ '$RESET\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/simple/simple.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n# prompt themeing\n\n#added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t;;\n\t*)\n\tTITLEBAR=\"\"\n\t;;\nesac\n\nfunction _omb_theme_PROMPT_COMMAND() {\n\tPS1=\"${TITLEBAR}${_omb_prompt_red}${_omb_prompt_reset_color}${_omb_prompt_green}\\w${_omb_prompt_bold_navy}\\[\\$(scm_prompt_info)\\]${_omb_prompt_normal} \"\n}\n\n# scm themeing\nSCM_THEME_PROMPT_DIRTY=\" ✗\"\nSCM_THEME_PROMPT_CLEAN=\" ✓\"\nSCM_THEME_PROMPT_PREFIX=\"(\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/sirup/sirup.theme.sh",
    "content": "#! bash oh-my-bash.module\n# For unstaged(*) and staged(+) values next to branch name in __git_ps1\nGIT_PS1_SHOWDIRTYSTATE=\"enabled\"\nOMB_PROMPT_VIRTUALENV_FORMAT=' [%s]'\nOMB_PROMPT_CONDAENV_FORMAT=' [%s]'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=false}\n\nfunction _omb_theme_sirup_rubygem {\n  local gemset=$(command awk -F'@' '{print $2}' <<< \"$GEM_HOME\")\n  [[ $gemset ]] && gemset=\"@$gemset\"\n\n  local version=$(command awk -F'-' '{print $2}' <<< \"$MY_RUBY_HOME\")\n  [[ $version == 1.9.2 ]] && version=\n\n  local full=$version$gemset\n  [[ $full ]] && _omb_util_print \"$full\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  # Check http://github.com/Sirupsen/dotfiles for screenshot\n  local python_venv\n  _omb_prompt_get_python_venv\n  PS1=\"$_omb_prompt_navy\\W/$_omb_prompt_bold_navy$(_omb_theme_sirup_rubygem)$_omb_prompt_bold_purple$python_venv$_omb_prompt_bold_green$(__git_ps1 \" (%s)\") ${_omb_prompt_normal}$ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/slick/slick.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_teal}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_green}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\nxterm*)\n  TITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n  ;;\n*)\n  TITLEBAR=\"\"\n  ;;\nesac\n\nPS3=\">> \"\n\nfunction __my_rvm_ruby_version {\n  local gemset=$(awk -F'@' '{print $2}' <<< \"$GEM_HOME\")\n  [[ $gemset ]] && gemset=@$gemset\n  local version=$(awk -F'-' '{print $2}' <<< \"$MY_RUBY_HOME\")\n  local full=$version$gemset\n  [[ $full ]] && _omb_util_print \"[$full]\"\n}\n\nfunction __my_venv_prompt {\n  if [[ $VIRTUAL_ENV ]]; then\n    _omb_util_print \"[${_omb_prompt_navy}@${_omb_prompt_normal}${VIRTUAL_ENV##*/}]\"\n  fi\n}\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  else\n    _omb_util_print \"[$(scm_char)][$(scm_prompt_info)]\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local my_ps_host\n  case $HOSTNAME in\n  \"clappy\"* ) my_ps_host=\"${_omb_prompt_green}\\h${_omb_prompt_normal}\";\n              ;;\n  \"icekernel\") my_ps_host=\"${_omb_prompt_brown}\\h${_omb_prompt_normal}\";\n               ;;\n  * ) my_ps_host=\"${_omb_prompt_green}\\h${_omb_prompt_normal}\";\n      ;;\n  esac\n\n  local my_ps_user=\"\\[\\033[01;32m\\]\\u\\[\\033[00m\\]\";\n  local my_ps_root=\"\\[\\033[01;31m\\]\\u\\[\\033[00m\\]\";\n  local my_ps_path=\"\\[\\033[01;36m\\]\\w\\[\\033[00m\\]\";\n\n  # nice prompt\n  case $(id -u) in\n  0) PS1=\"${TITLEBAR}[$my_ps_root][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_teal}\\w${_omb_prompt_normal}]$(is_vim_shell)\n$ \"\n     ;;\n  *) PS1=\"${TITLEBAR}[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)$(__my_venv_prompt)[${_omb_prompt_teal}\\w${_omb_prompt_normal}]$(is_vim_shell)\n$ \"\n     ;;\n  esac\n}\n\nPS2=\"> \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/standard/standard.theme.sh",
    "content": "#! bash oh-my-bash.module\n# scm themeing\nSCM_THEME_PROMPT_DIRTY=\"×\"\nSCM_THEME_PROMPT_CLEAN=\"✓\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# TODO: need a check for OS before adding this to the prompt\n# ${debian_chroot:+($debian_chroot)}\n\n#added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\tTITLEBAR='\\[\\033]0;\\w\\007\\]'\n\t;;\n\t*)\n\tTITLEBAR=\"\"\n\t;;\nesac\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    PROMPT='${_omb_prompt_green}\\u${_omb_prompt_normal}@${_omb_prompt_green}\\h${_omb_prompt_normal}:${_omb_prompt_navy}\\w${_omb_prompt_normal}${_omb_prompt_brown}$(prompt_char)$(git_prompt_info)${_omb_prompt_normal}\\$ '\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/tonka/tonka.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nfunction __tonka_time {\n  THEME_CLOCK_FORMAT=\"%H%M\"\n  clock_prompt\n}\n\nfunction __tonka_date {\n  THEME_CLOCK_FORMAT=\"%a,%d %b %y\"\n  clock_prompt\n}\n\nfunction __tonka_clock {\n  local LIGHT_BLUE=\"\\[\\033[1;34m\\]\"\n  if [[ \"${THEME_SHOW_CLOCK}\" = \"true\" ]]; then\n    _omb_util_print \"$(__tonka_time)${LIGHT_BLUE}:$(__tonka_date)${LIGHT_BLUE}:\"\n  fi\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n\n#   Named \"Tonka\" because of the colour scheme\nlocal WHITE=\"\\[\\033[1;37m\\]\"\nlocal LIGHT_BLUE=\"\\[\\033[1;34m\\]\"\nlocal YELLOW=\"\\[\\033[1;33m\\]\"\nlocal NO_COLOUR=\"\\[\\033[0m\\]\"\n\ncase $TERM in\n    xterm*|rxvt*)\n        TITLEBAR='\\[\\033]0;\\u@\\h:\\w\\007\\]'\n        ;;\n    *)\n        TITLEBAR=\"\"\n        ;;\nesac\n\nPS1=\"$TITLEBAR\\\n$YELLOW-$LIGHT_BLUE-(\\\n$YELLOW\\u$LIGHT_BLUE@$YELLOW\\h\\\n$LIGHT_BLUE)-(\\\n$YELLOW\\$PWD\\\n$LIGHT_BLUE)-$YELLOW-\\\n\\n\\\n$YELLOW-$LIGHT_BLUE-(\\\n$(__tonka_clock)\\\n$WHITE\\$ $LIGHT_BLUE)-$YELLOW-$NO_COLOUR \"\n\nPS2=\"$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR \"\n\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"\\[\\033[1;33m\\]\"}\n\nexport PS3=\">> \"\n\nLS_COLORS='no=00:fi=00:di=00;33:ln=01;36:pi=40;34:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:';\n\nexport LS_COLORS\n"
  },
  {
    "path": "themes/tonotdo/tonotdo.theme.sh",
    "content": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_PREFIX=\" ${_omb_prompt_purple}\"\nSCM_THEME_PROMPT_SUFFIX=\" ${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\nSCM_GIT_SHOW_DETAILS=\"false\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n  PS1=\"${_omb_prompt_olive}\\u${_omb_prompt_normal}${_omb_prompt_teal}@\\h${_omb_prompt_normal}${_omb_prompt_purple} ${_omb_prompt_normal}${_omb_prompt_green}\\w${_omb_prompt_normal}$(scm_prompt_info)> \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/tylenol/tylenol.theme.sh",
    "content": "#! bash oh-my-bash.module\n#\n# Based on 'bobby' theme with the addition of python_venv\n#\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${_omb_prompt_olive}|${_omb_prompt_reset_color}\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_olive}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\nOMB_PROMPT_VIRTUALENV_FORMAT='|%s|'\nOMB_PROMPT_SHOW_PYTHON_VENV=${OMB_PROMPT_SHOW_PYTHON_VENV:=true}\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    PS1=\"\\n${_omb_prompt_green}$(_omb_prompt_print_python_venv)${_omb_prompt_brown}$(_omb_prompt_print_ruby_env) ${_omb_prompt_reset_color}\\h ${_omb_prompt_red}in ${_omb_prompt_reset_color}\\w\\n${_omb_prompt_olive}$(scm_char)$(scm_prompt_info) ${_omb_prompt_olive}→${_omb_prompt_white} \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/vscode/vscode.theme.sh",
    "content": "#! bash oh-my-bash.module\n\n#-------------------------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.\n#-------------------------------------------------------------------------------------------------------------\n#\n# This theme [1] is based on the code generated by vscode-dev-container [2].\n# Specifically, the code is based on the template found in Ref. [3].  The\n# original code of [2] is licensed by Microsoft Corporation under the MIT\n# license.\n#\n# [1] https://github.com/ohmybash/oh-my-bash/pull/331\n# [2] https://github.com/microsoft/vscode-dev-containers\n# [3] https://github.com/microsoft/vscode-dev-containers/blob/172a918f40e31bd24da8e64135026ec9f26c91b0/containers/javascript-node/.devcontainer/library-scripts/common-debian.sh#L303-L320\n#\n\nfunction _omb_theme_vscode_initialize {\n    local userpart='`export XIT=$? \\\n        && [ ! -z \"${GITHUB_USER}\" ] && echo -n \"\\[\\033[0;32m\\]@${GITHUB_USER} \" || echo -n \"\\[\\033[0;32m\\]\\u \" \\\n        && [ \"$XIT\" -ne \"0\" ] && echo -n \"\\[\\033[1;31m\\]➜\" || echo -n \"\\[\\033[0m\\]➜\"`'\n    local gitbranch='`\\\n        if [ \"$(_omb_prompt_git config --get codespaces-theme.hide-status 2>/dev/null)\" != 1 ]; then \\\n            export BRANCH=$(_omb_prompt_git symbolic-ref --short HEAD 2>/dev/null || _omb_prompt_git rev-parse --short HEAD 2>/dev/null); \\\n            if [ \"${BRANCH}\" != \"\" ]; then \\\n                echo -n \"\\[\\033[0;36m\\](\\[\\033[1;31m\\]${BRANCH}\" \\\n                && if _omb_prompt_git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard \":/*\" > /dev/null 2>&1; then \\\n                        echo -n \" \\[\\033[1;33m\\]✗\"; \\\n                fi \\\n                && echo -n \"\\[\\033[0;36m\\]) \"; \\\n            fi; \\\n        fi`'\n    local lightblue='\\[\\033[1;34m\\]'\n    local removecolor='\\[\\033[0m\\]'\n    PS1=\"${userpart} ${lightblue}\\w ${gitbranch}${removecolor}\\$ \"\n    unset -f _omb_theme_vscode_initialize\n}\n_omb_theme_vscode_initialize\n\nfunction _omb_theme_PROMPT_COMMAND { true; }\nPROMPT_DIRTRIM=${PROMPT_DIRTRIM:-4}\n"
  },
  {
    "path": "themes/wanelo/wanelo.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${_omb_prompt_green}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${_omb_prompt_green}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction _omb_theme_PROMPT_COMMAND {\n  if (($? == 0)); then\n    local status=❤️\n  else\n    local status=💔\n  fi\n  PS1=\"\\n${_omb_prompt_olive}$(_omb_prompt_print_ruby_env) \"\n  PS1+=\"${_omb_prompt_purple}\\h ${_omb_prompt_reset_color}in ${_omb_prompt_green}\\w $status \\n\"\n  PS1+=\"${_omb_prompt_bold_teal} ${_omb_prompt_navy}|$(clock_prompt)|\"\n  PS1+=\"${_omb_prompt_green}$(scm_prompt_info) \"\n  PS1+=\"${_omb_prompt_green}→${_omb_prompt_reset_color} \"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"$_omb_prompt_navy\"}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/zitron/zitron.theme.sh",
    "content": "#! bash oh-my-bash.module\n# zitron theme by Florian Baumann <flo@noqqe.de>\n\n## git-theme\n# feel free to change git chars.\nGIT_THEME_PROMPT_DIRTY=\"${_omb_prompt_bold_olive}*${_omb_prompt_normal}\"\nGIT_THEME_PROMPT_CLEAN=\"\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n## ls colors\n# thanks a lot to http://geoff.greer.fm/lscolors/\nexport LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\nexport LS_COLORS=\"no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;34:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:\"\n\nfunction _omb_theme_PROMPT_COMMAND() {\n    ## look-a-like\n    # user:host:pwd git-branch(*)$\n    # for example:\n    # noqqe:deathstar:themes master*$\n    PS1=\"${no_color}\\u:$(hostname)${_omb_prompt_normal}:${_omb_prompt_bold_olive}\\W/${_omb_prompt_normal} $(git_prompt_info)${_omb_prompt_reset_color}$ \"\n}\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "themes/zork/zork.theme.sh",
    "content": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_bold_brown}✗${_omb_prompt_normal}\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_green}✓${_omb_prompt_normal}\"\nSCM_GIT_CHAR=\"${_omb_prompt_bold_green}±${_omb_prompt_normal}\"\nSCM_SVN_CHAR=\"${_omb_prompt_bold_teal}⑆${_omb_prompt_normal}\"\nSCM_HG_CHAR=\"${_omb_prompt_bold_brown}☿${_omb_prompt_normal}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\nxterm*)\n  TITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n  ;;\n*)\n  TITLEBAR=\"\"\n  ;;\nesac\n\nPS3=\">> \"\n\nfunction __my_rvm_ruby_version {\n  local gemset=$(awk -F'@' '{print $2}' <<< \"$GEM_HOME\")\n  [[ $gemset ]] && gemset=@$gemset\n  local version=$(awk -F'-' '{print $2}' <<< \"$MY_RUBY_HOME\")\n  local full=$version$gemset\n  [[ $full ]] && _omb_util_print \"[$full]\"\n}\n\nfunction is_vim_shell {\n  if [[ $VIMRUNTIME ]]; then\n    _omb_util_print \"[${_omb_prompt_teal}vim shell${_omb_prompt_normal}]\"\n  fi\n}\n\nfunction modern_scm_prompt {\n  local CHAR=$(scm_char)\n  if [[ $CHAR == \"$SCM_NONE_CHAR\" ]]; then\n    return\n  else\n    _omb_util_print \"[$(scm_char)][$(scm_prompt_info)]\"\n  fi\n}\n\n# show chroot if exist\nfunction chroot {\n  if [[ $debian_chroot ]]; then\n    local my_ps_chroot=$_omb_prompt_bold_teal$debian_chroot$_omb_prompt_normal\n    _omb_util_print \"($my_ps_chroot)\"\n  fi\n}\n\n# show virtualenvwrapper\nfunction my_ve {\n  if [[ $VIRTUAL_ENV ]]; then\n    local ve=$(basename \"$VIRTUAL_ENV\")\n    local my_ps_ve=$_omb_prompt_bold_purple$ve$_omb_prompt_normal\n    _omb_util_print \"($my_ps_ve)\"\n  fi\n  _omb_util_print \"\"\n}\n\nfunction _omb_theme_PROMPT_COMMAND {\n  local my_ps_host=\"${_omb_prompt_green}\\h${_omb_prompt_normal}\"\n  # yes, these are the the same for now ...\n  local my_ps_host_root=\"${_omb_prompt_green}\\h${_omb_prompt_normal}\"\n\n  local my_ps_user=\"${_omb_prompt_bold_green}\\u${_omb_prompt_normal}\"\n  local my_ps_root=\"${_omb_prompt_bold_brown}\\u${_omb_prompt_normal}\"\n\n  # nice prompt\n  case $(id -u) in\n  0) PS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_teal}\\w${_omb_prompt_normal}]$(is_vim_shell)\n└─▪ \"\n     ;;\n  *) PS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_teal}\\w${_omb_prompt_normal}]$(is_vim_shell)\n└─▪ \"\n     ;;\n  esac\n}\n\nPS2=\"└─▪ \"\n\n_omb_util_add_prompt_command _omb_theme_PROMPT_COMMAND\n"
  },
  {
    "path": "tools/autossh.sh",
    "content": "#!/usr/bin/env bash\n# ------------------------------------------------------------------------------\n# FILE: autossh\n# DESCRIPTION: This is an SSH-D proxy with auto-reconnect on disconnect\n# AUTHOR: Toan Nguyen (nntoan at protonmail dot com)\n# VERSION: 1.0.0\n# USAGE: autossh your_user@your_server_ip\n# shellcheck disable=SC2034,SC2182,SC2162,SC2236,SC2120,SC2009,SC2119,SC2086,SC2059,SC2006\n# ------------------------------------------------------------------------------\nVERSION=\"1.0.0\"\nGITHUB=\"https://github.com/nntoan/autossh\"\nAUTHOR=\"Toan Nguyen\"\nSCRIPT=${0##*/}\nIFS=$'\\n'\nALIVE=0\nHISTFILE=\"$HOME/.autossh.history\"\n\n# Use colors, but only if connected to a terminal, and that terminal supports them.\nif type -P tput >/dev/null 2>&1; then\n  ncolors=$(tput colors)\nfi\nif [ -t 1 ] && [ -n \"$ncolors\" ] && [ \"$ncolors\" -ge 8 ]; then\n  RED=\"$(tput setaf 1)\"\n  GREEN=\"$(tput setaf 2)\"\n  YELLOW=\"$(tput setaf 3)\"\n  BLUE=\"$(tput setaf 4)\"\n  BOLD=\"$(tput bold)\"\n  NORMAL=\"$(tput sgr0)\"\nelse\n  RED=\"\"\n  GREEN=\"\"\n  YELLOW=\"\"\n  BLUE=\"\"\n  BOLD=\"\"\n  NORMAL=\"\"\nfi\n\n# Progress or something\nstart_progress()\n{\n  while true\n  do\n    echo -ne \"#\"\n    sleep 1\n  done\n}\n\nquick_progress()\n{\n  while true\n  do\n    echo -ne \"#\"\n    sleep .033\n  done\n}\n\nlong_progress()\n{\n  while true\n  do\n    echo -ne \"#\"\n    sleep 3\n  done\n}\n\ndot_progress()\n{\n  for i in {1..100}; do\n    printf \".\" $i -1 $i\n    sleep .033\n  done\n  echo_c green \" 100%{$NORMAL}\"\n  sleep 1\n}\n\nstop_progress()\n{\n  kill $1\n  wait $1 2>/dev/null\n  echo -en \"\\n\"\n}\n\n# Case-insensitive for regex matching\nshopt -s nocasematch\n\n# Prepare history mode\nset -i\nhistory -c\nhistory -r\n\n# Input method\nget_input()\n{\n  read -e -p \"${BLUE}$1${NORMAL}\" \"$2\"\n  history -s \"${!2}\"\n}\n\n# Echo in bold\necho_b()\n{\n  if [ \"$1\" = \"-e\" ]; then\n    echo -e \"${BOLD}$2${NORMAL}\"\n  else\n    echo \"${BOLD}$1${NORMAL}\"\n  fi\n}\n\n# Echo in colour\necho_c()\n{\n  case \"$1\" in\n    red | r | -red | -r | --red | --r ) echo \"${RED}$2${NORMAL}\" ;;\n    green | g | -green | -g | --green | --g ) echo \"${GREEN}$2${NORMAL}\" ;;\n    blue | b | -blue | -b | --blue | --b ) echo \"${BLUE}$2${NORMAL}\" ;;\n    yellow | y | -yellow | -y | --yellow | --y ) echo \"${YELLOW}$2${NORMAL}\" ;;\n    * ) echo \"$(BOLD)$2$(RESET)\" ;;\n  esac\n}\n\n# Get data from parameters\nif [[ ! -n \"$remote_param\" && -n \"$1\" ]]; then\n    remote_param=\"$1\"\n    remote_user=\"${remote_param%%@*}\"\n    remote_ip=\"${remote_param##*@}\"\nfi\n\n# Get input data and save to history\nsave_input()\n{\n  if [[ ! -n \"$remote_user\" && ! -n \"$1\" ]]; then\n    while get_input \"SSH Username > \" remote_user; do\n      case ${remote_user%% *} in\n        * )\n            if [ -n \"$remote_user\" ]; then\n              break\n            else\n              continue\n            fi\n        ;;\n      esac\n    done\n  fi\n  if [[ ! -n \"$remote_ip\" && ! -n \"$1\" ]]; then\n    while get_input \"SSH Alias/IP-address > \" remote_ip; do\n      case ${remote_ip%% *} in\n        * )\n            if [ -n \"$remote_ip\" ]; then\n              break\n            else\n              continue\n            fi\n        ;;\n      esac\n    done\n  fi\n}\n\n# Infinitie loop to keep connecting\nauto_connect()\n{\n  while true; do\n    exist=`ps aux | grep $remote_user@$remote_ip | grep 22`\n    if test -n \"$exist\"\n    then\n      if test $ALIVE -eq 0\n      then\n        echo_c yellow \"I'm alive since $(date)\"\n      fi\n      ALIVE=1\n    else\n      ALIVE=0\n      echo_c red \"I'm dead... God is bringing me back...\"\n      clear\n      printf \"${GREEN}Connecting: \"\n      for i in {1..100}; do\n        printf \".\" \"$i\" -1 \"$i\"\n        sleep .033\n      done\n      echo_c green \" 100%${NORMAL}\"\n      sleep 1\n      clear\n      ssh $remote_user@$remote_ip\n    fi\n    sleep 1\n  done\n}\n\nmain()\n{\n  save_input\n  auto_connect\n}\n\nmain\n"
  },
  {
    "path": "tools/bash-preexec.sh",
    "content": "# bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions.\n# https://github.com/rcaloras/bash-preexec\n#\n#\n# 'preexec' functions are executed before each interactive command is\n# executed, with the interactive command as its argument. The 'precmd'\n# function is executed before each prompt is displayed.\n#\n# Author: Ryan Caloras (ryan@bashhub.com)\n# Forked from Original Author: Glyph Lefkowitz\n#\n# V0.5.0\n#\n\n# General Usage:\n#\n#  1. Source this file at the end of your bash profile so as not to interfere\n#     with anything else that's using PROMPT_COMMAND.\n#\n#  2. Add any precmd or preexec functions by appending them to their arrays:\n#       e.g.\n#       precmd_functions+=(my_precmd_function)\n#       precmd_functions+=(some_other_precmd_function)\n#\n#       preexec_functions+=(my_preexec_function)\n#\n#  3. Consider changing anything using the DEBUG trap or PROMPT_COMMAND\n#     to use preexec and precmd instead. Preexisting usages will be\n#     preserved, but doing so manually may be less surprising.\n#\n#  Note: This module requires two Bash features which you must not otherwise be\n#  using: the \"DEBUG\" trap, and the \"PROMPT_COMMAND\" variable. If you override\n#  either of these after bash-preexec has been installed it will most likely break.\n\n# Tell shellcheck what kind of file this is.\n# shellcheck shell=bash\n\n# Make sure this is bash that's running and return otherwise.\n# Use POSIX syntax for this line:\nif [ -z \"${BASH_VERSION-}\" ]; then\n    return 1;\nfi\n\n# We only support Bash 3.1+.\n# Note: BASH_VERSINFO is first available in Bash-2.0.\nif [[ -z \"${BASH_VERSINFO-}\" || BASH_VERSINFO[0] -lt 3 || BASH_VERSINFO[0] -eq 3 && BASH_VERSINFO[1] -lt 1 ]]; then\n    return 1\nfi\n\n# Avoid duplicate inclusion\nif [[ -n \"${bash_preexec_imported:-}\" ]]; then\n    return 0\nfi\nbash_preexec_imported=\"defined\"\n\n# WARNING: This variable is no longer used and should not be relied upon.\n# Use ${bash_preexec_imported} instead.\n# shellcheck disable=SC2034\n__bp_imported=\"${bash_preexec_imported}\"\n\n# Should be available to each precmd and preexec\n# functions, should they want it. $? and $_ are available as $? and $_, but\n# $PIPESTATUS is available only in a copy, $BP_PIPESTATUS.\n# TODO: Figure out how to restore PIPESTATUS before each precmd or preexec\n# function.\n__bp_last_ret_value=\"$?\"\nBP_PIPESTATUS=(\"${PIPESTATUS[@]}\")\n__bp_last_argument_prev_command=\"$_\"\n\n__bp_inside_precmd=0\n__bp_inside_preexec=0\n\n# Initial PROMPT_COMMAND string that is removed from PROMPT_COMMAND post __bp_install\n__bp_install_string=$'__bp_trap_string=\"$(trap -p DEBUG)\"\\ntrap - DEBUG\\n__bp_install'\n\n# Fails if any of the given variables are readonly\n# Reference https://stackoverflow.com/a/4441178\nfunction __bp_require_not_readonly {\n  local var\n  for var; do\n    if ! ( unset \"$var\" 2> /dev/null ); then\n      echo \"bash-preexec requires write access to ${var}\" >&2\n      return 1\n    fi\n  done\n}\n\n# Remove ignorespace and or replace ignoreboth from HISTCONTROL\n# so we can accurately invoke preexec with a command from our\n# history even if it starts with a space.\nfunction __bp_adjust_histcontrol {\n    local histcontrol\n    histcontrol=\"${HISTCONTROL:-}\"\n    histcontrol=\"${histcontrol//ignorespace}\"\n    # Replace ignoreboth with ignoredups\n    if [[ \"$histcontrol\" == *\"ignoreboth\"* ]]; then\n        histcontrol=\"ignoredups:${histcontrol//ignoreboth}\"\n    fi;\n    export HISTCONTROL=\"$histcontrol\"\n}\n\n# This variable describes whether we are currently in \"interactive mode\";\n# i.e. whether this shell has just executed a prompt and is waiting for user\n# input.  It documents whether the current command invoked by the trace hook is\n# run interactively by the user; it's set immediately after the prompt hook,\n# and unset as soon as the trace hook is run.\n__bp_preexec_interactive_mode=\"\"\n\n# These arrays are used to add functions to be run before, or after, prompts.\ndeclare -a precmd_functions\ndeclare -a preexec_functions\n\n# Trims leading and trailing whitespace from $2 and writes it to the variable\n# name passed as $1\nfunction __bp_trim_whitespace {\n    local var=${1:?} text=${2:-}\n    text=\"${text#\"${text%%[![:space:]]*}\"}\"   # remove leading whitespace characters\n    text=\"${text%\"${text##*[![:space:]]}\"}\"   # remove trailing whitespace characters\n    printf -v \"$var\" '%s' \"$text\"\n}\n\n\n# Trims whitespace and removes any leading or trailing semicolons from $2 and\n# writes the resulting string to the variable name passed as $1. Used for\n# manipulating substrings in PROMPT_COMMAND\nfunction __bp_sanitize_string {\n    local var=${1:?} text=${2:-} sanitized\n    __bp_trim_whitespace sanitized \"$text\"\n    sanitized=${sanitized%;}\n    sanitized=${sanitized#;}\n    __bp_trim_whitespace sanitized \"$sanitized\"\n    printf -v \"$var\" '%s' \"$sanitized\"\n}\n\n# This function is installed as part of the PROMPT_COMMAND;\n# It sets a variable to indicate that the prompt was just displayed,\n# to allow the DEBUG trap to know that the next command is likely interactive.\nfunction __bp_interactive_mode {\n    __bp_preexec_interactive_mode=\"on\";\n}\n\n\n# This function is installed as part of the PROMPT_COMMAND.\n# It will invoke any functions defined in the precmd_functions array.\nfunction __bp_precmd_invoke_cmd {\n    # Save the returned value from our last command, and from each process in\n    # its pipeline. Note: this MUST be the first thing done in this function.\n    # BP_PIPESTATUS may be unused, ignore\n    # shellcheck disable=SC2034\n\n    __bp_last_ret_value=\"$?\" BP_PIPESTATUS=(\"${PIPESTATUS[@]}\")\n\n    # Don't invoke precmds if we are inside an execution of an \"original\n    # prompt command\" by another precmd execution loop. This avoids infinite\n    # recursion.\n    if (( __bp_inside_precmd > 0 )); then\n      return\n    fi\n    local __bp_inside_precmd=1\n\n    # Invoke every function defined in our function array.\n    local precmd_function\n    for precmd_function in \"${precmd_functions[@]}\"; do\n\n        # Only execute this function if it actually exists.\n        # Test existence of functions with: declare -[Ff]\n        if type -t \"$precmd_function\" 1>/dev/null; then\n            __bp_set_ret_value \"$__bp_last_ret_value\" \"$__bp_last_argument_prev_command\"\n            # Quote our function invocation to prevent issues with IFS\n            \"$precmd_function\"\n        fi\n    done\n\n    __bp_set_ret_value \"$__bp_last_ret_value\"\n}\n\n# Sets a return value in $?. We may want to get access to the $? variable in our\n# precmd functions. This is available for instance in zsh. We can simulate it in bash\n# by setting the value here.\nfunction __bp_set_ret_value {\n    return ${1:+\"$1\"}\n}\n\nfunction __bp_in_prompt_command {\n\n    local prompt_command_array\n    IFS=$'\\n;' read -rd '' -a prompt_command_array <<< \"${PROMPT_COMMAND:-}\"\n\n    local trimmed_arg\n    __bp_trim_whitespace trimmed_arg \"${1:-}\"\n\n    local command trimmed_command\n    for command in \"${prompt_command_array[@]:-}\"; do\n        __bp_trim_whitespace trimmed_command \"$command\"\n        if [[ \"$trimmed_command\" == \"$trimmed_arg\" ]]; then\n            return 0\n        fi\n    done\n\n    return 1\n}\n\n# This function is installed as the DEBUG trap.  It is invoked before each\n# interactive prompt display.  Its purpose is to inspect the current\n# environment to attempt to detect if the current command is being invoked\n# interactively, and invoke 'preexec' if so.\nfunction __bp_preexec_invoke_exec {\n\n    # Save the contents of $_ so that it can be restored later on.\n    # https://stackoverflow.com/questions/40944532/bash-preserve-in-a-debug-trap#40944702\n    __bp_last_argument_prev_command=\"${1:-}\"\n    # Don't invoke preexecs if we are inside of another preexec.\n    if (( __bp_inside_preexec > 0 )); then\n      return\n    fi\n    local __bp_inside_preexec=1\n\n    # Checks if the file descriptor is not standard out (i.e. '1')\n    # __bp_delay_install checks if we're in test. Needed for bats to run.\n    # Prevents preexec from being invoked for functions in PS1\n    if [[ ! -t 1 && -z \"${__bp_delay_install:-}\" ]]; then\n        return\n    fi\n\n    if [[ -n \"${COMP_LINE:-}\" ]]; then\n        # We're in the middle of a completer. This obviously can't be\n        # an interactively issued command.\n        return\n    fi\n    if [[ -z \"${__bp_preexec_interactive_mode:-}\" ]]; then\n        # We're doing something related to displaying the prompt.  Let the\n        # prompt set the title instead of me.\n        return\n    else\n        # If we're in a subshell, then the prompt won't be re-displayed to put\n        # us back into interactive mode, so let's not set the variable back.\n        # In other words, if you have a subshell like\n        #   (sleep 1; sleep 2)\n        # You want to see the 'sleep 2' as a set_command_title as well.\n        if [[ 0 -eq \"${BASH_SUBSHELL:-}\" ]]; then\n            __bp_preexec_interactive_mode=\"\"\n        fi\n    fi\n\n    if  __bp_in_prompt_command \"${BASH_COMMAND:-}\"; then\n        # If we're executing something inside our prompt_command then we don't\n        # want to call preexec. Bash prior to 3.1 can't detect this at all :/\n        __bp_preexec_interactive_mode=\"\"\n        return\n    fi\n\n    local this_command\n    this_command=$(\n        export LC_ALL=C\n        HISTTIMEFORMAT='' builtin history 1 | sed '1 s/^ *[0-9][0-9]*[* ] //'\n    )\n\n    # Sanity check to make sure we have something to invoke our function with.\n    if [[ -z \"$this_command\" ]]; then\n        return\n    fi\n\n    # Invoke every function defined in our function array.\n    local preexec_function\n    local preexec_function_ret_value\n    local preexec_ret_value=0\n    for preexec_function in \"${preexec_functions[@]:-}\"; do\n\n        # Only execute each function if it actually exists.\n        # Test existence of function with: declare -[fF]\n        if type -t \"$preexec_function\" 1>/dev/null; then\n            __bp_set_ret_value \"${__bp_last_ret_value:-}\"\n            # Quote our function invocation to prevent issues with IFS\n            \"$preexec_function\" \"$this_command\"\n            preexec_function_ret_value=\"$?\"\n            if [[ \"$preexec_function_ret_value\" != 0 ]]; then\n                preexec_ret_value=\"$preexec_function_ret_value\"\n            fi\n        fi\n    done\n\n    # Restore the last argument of the last executed command, and set the return\n    # value of the DEBUG trap to be the return code of the last preexec function\n    # to return an error.\n    # If `extdebug` is enabled a non-zero return value from any preexec function\n    # will cause the user's command not to execute.\n    # Run `shopt -s extdebug` to enable\n    __bp_set_ret_value \"$preexec_ret_value\" \"$__bp_last_argument_prev_command\"\n}\n\nfunction __bp_install {\n    # Exit if we already have this installed.\n    if [[ \"${PROMPT_COMMAND:-}\" == *\"__bp_precmd_invoke_cmd\"* ]]; then\n        return 1;\n    fi\n\n    trap '__bp_preexec_invoke_exec \"$_\"' DEBUG\n\n    # Preserve any prior DEBUG trap as a preexec function\n    local prior_trap\n    # we can't easily do this with variable expansion. Leaving as sed command.\n    # shellcheck disable=SC2001\n    prior_trap=$(sed \"s/[^']*'\\(.*\\)'[^']*/\\1/\" <<<\"${__bp_trap_string:-}\")\n    unset __bp_trap_string\n    if [[ -n \"$prior_trap\" ]]; then\n        eval '__bp_original_debug_trap() {\n          '\"$prior_trap\"'\n        }'\n        preexec_functions+=(__bp_original_debug_trap)\n    fi\n\n    # Adjust our HISTCONTROL Variable if needed.\n    __bp_adjust_histcontrol\n\n    # Issue #25. Setting debug trap for subshells causes sessions to exit for\n    # backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash.\n    #\n    # Disabling this by default. It can be enabled by setting this variable.\n    if [[ -n \"${__bp_enable_subshells:-}\" ]]; then\n\n        # Set so debug trap will work be invoked in subshells.\n        set -o functrace > /dev/null 2>&1\n        shopt -s extdebug > /dev/null 2>&1\n    fi;\n\n    local existing_prompt_command\n    # Remove setting our trap install string and sanitize the existing prompt command string\n    existing_prompt_command=\"${PROMPT_COMMAND:-}\"\n    existing_prompt_command=\"${existing_prompt_command//${__bp_install_string}[;$'\\n']}\" # Edge case of appending to PROMPT_COMMAND\n    existing_prompt_command=\"${existing_prompt_command//$__bp_install_string}\"\n    __bp_sanitize_string existing_prompt_command \"$existing_prompt_command\"\n\n    # Install our hooks in PROMPT_COMMAND to allow our trap to know when we've\n    # actually entered something.\n    PROMPT_COMMAND=$'__bp_precmd_invoke_cmd\\n'\n    if [[ -n \"$existing_prompt_command\" ]]; then\n        PROMPT_COMMAND+=${existing_prompt_command}$'\\n'\n    fi;\n    PROMPT_COMMAND+='__bp_interactive_mode'\n\n    # Add two functions to our arrays for convenience\n    # of definition.\n    precmd_functions+=(precmd)\n    preexec_functions+=(preexec)\n\n    # Invoke our two functions manually that were added to $PROMPT_COMMAND\n    __bp_precmd_invoke_cmd\n    __bp_interactive_mode\n}\n\n# Sets an installation string as part of our PROMPT_COMMAND to install\n# after our session has started. This allows bash-preexec to be included\n# at any point in our bash profile.\nfunction __bp_install_after_session_init {\n    # bash-preexec needs to modify these variables in order to work correctly\n    # if it can't, just stop the installation\n    __bp_require_not_readonly PROMPT_COMMAND HISTCONTROL HISTTIMEFORMAT || return\n\n    local sanitized_prompt_command\n    __bp_sanitize_string sanitized_prompt_command \"${PROMPT_COMMAND:-}\"\n    if [[ -n \"$sanitized_prompt_command\" ]]; then\n        PROMPT_COMMAND=${sanitized_prompt_command}$'\\n'\n    fi;\n    PROMPT_COMMAND+=${__bp_install_string}\n}\n\n# Run our install so long as we're not delaying it.\nif [[ -z \"${__bp_delay_install:-}\" ]]; then\n    __bp_install_after_session_init\nfi;\n"
  },
  {
    "path": "tools/check_for_upgrade.sh",
    "content": "#!/usr/bin/env bash\n\nif [[ $_omb_upgrade_reload_bashrc ]]; then\n  # We skip the upgrade check if it is attempted while reloading .bashrc after\n  # upgrading OMB.\n  return 0\nfi\n\nfunction _omb_upgrade_current_epoch {\n  local sec=${EPOCHSECONDS-}\n  [[ $sec ]] || printf -v sec '%(%s)T' -1 2>/dev/null || sec=$(command date +%s)\n  echo $((sec / 60 / 60 / 24))\n}\n\nfunction _omb_upgrade_update_timestamp {\n  echo \"LAST_EPOCH=$(_omb_upgrade_current_epoch)\" >| ~/.osh-update\n}\n\nfunction _omb_upgrade_check {\n  if [[ ! -f ~/.osh-update ]]; then\n    # create ~/.osh-update\n    _omb_upgrade_update_timestamp\n    return 0\n  fi\n\n  local LAST_EPOCH\n  # shellcheck disable=SC1090\n  . ~/.osh-update\n  if [[ ! $LAST_EPOCH ]]; then\n    _omb_upgrade_update_timestamp\n    return 0\n  fi\n\n  # Default to the old behavior\n  local epoch_expires=${UPDATE_OSH_DAYS:-13}\n  local epoch_elapsed=$(($(_omb_upgrade_current_epoch) - LAST_EPOCH))\n  if ((epoch_elapsed <= epoch_expires)); then\n    return 0\n  fi\n\n  # update ~/.osh-update\n  _omb_upgrade_update_timestamp\n  if [[ $DISABLE_UPDATE_PROMPT == true ]] ||\n       { read -rp '[Oh My Bash] Would you like to check for updates? [Y/n]: ' line &&\n           [[ $line == Y* || $line == y* || ! $line ]]; }\n  then\n    source \"$OSH\"/tools/upgrade.sh\n  fi\n}\n\n# Cancel upgrade if the current user doesn't have write permissions for the\n# oh-my-bash directory.\n[[ -w $OSH ]] || return 0\n\n# Cancel upgrade if git is unavailable on the system\ntype -P git &>/dev/null || return 0\n\nif command mkdir \"$OSH/log/update.lock\" 2>/dev/null; then\n  _omb_upgrade_check\n  command rmdir \"$OSH\"/log/update.lock\nelse\n  printf '%s\\n' \\\n    'oh-my-bash/check_for_upgrade: Failed to get a lock.  Please make sure that no' \\\n    'other process is trying to update Oh My Bash and remove' \\\n    '\"'\"$OSH\"'/log/update.lock\"' >&2\nfi\n"
  },
  {
    "path": "tools/git-completion.bash",
    "content": "# bash/zsh completion support for core Git.\n#\n# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>\n# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).\n# Distributed under the GNU General Public License, version 2.0.\n#\n# The contained completion routines provide support for completing:\n#\n#    *) local and remote branch names\n#    *) local and remote tag names\n#    *) .git/remotes file names\n#    *) git 'subcommands'\n#    *) git email aliases for git-send-email\n#    *) tree paths within 'ref:path/to/file' expressions\n#    *) file paths within current working directory and index\n#    *) common --long-options\n#\n# To use these routines:\n#\n#    1) Copy this file to somewhere (e.g. ~/.git-completion.bash).\n#    2) Add the following line to your .bashrc/.zshrc:\n#        source ~/.git-completion.bash\n#    3) Consider changing your PS1 to also show the current branch,\n#       see git-prompt.sh for details.\n#\n# If you use complex aliases of form '!f() { ... }; f', you can use the null\n# command ':' as the first command in the function body to declare the desired\n# completion style.  For example '!f() { : git commit ; ... }; f' will\n# tell the completion to use commit completion.  This also works with aliases\n# of form \"!sh -c '...'\".  For example, \"!sh -c ': git commit ; ... '\".\n#\n# If you have a command that is not part of git, but you would still\n# like completion, you can use __git_complete:\n#\n#   __git_complete gl git_log\n#\n# Or if it's a main command (i.e. git or gitk):\n#\n#   __git_complete gk gitk\n#\n# Compatible with bash 3.2.57.\n#\n# You can set the following environment variables to influence the behavior of\n# the completion routines:\n#\n#   GIT_COMPLETION_CHECKOUT_NO_GUESS\n#\n#     When set to \"1\", do not include \"DWIM\" suggestions in git-checkout\n#     and git-switch completion (e.g., completing \"foo\" when \"origin/foo\"\n#     exists).\n#\n#   GIT_COMPLETION_SHOW_ALL\n#\n#     When set to \"1\" suggest all options, including options which are\n#     typically hidden (e.g. '--allow-empty' for 'git commit').\n\ncase \"$COMP_WORDBREAKS\" in\n*:*) : great ;;\n*)   COMP_WORDBREAKS=\"$COMP_WORDBREAKS:\"\nesac\n\n# Discovers the path to the git repository taking any '--git-dir=<path>' and\n# '-C <path>' options into account and stores it in the $__git_repo_path\n# variable.\n__git_find_repo_path ()\n{\n\tif [ -n \"${__git_repo_path-}\" ]; then\n\t\t# we already know where it is\n\t\treturn\n\tfi\n\n\tif [ -n \"${__git_C_args-}\" ]; then\n\t\t__git_repo_path=\"$(git \"${__git_C_args[@]}\" \\\n\t\t\t${__git_dir:+--git-dir=\"$__git_dir\"} \\\n\t\t\trev-parse --absolute-git-dir 2>/dev/null)\"\n\telif [ -n \"${__git_dir-}\" ]; then\n\t\ttest -d \"$__git_dir\" &&\n\t\t__git_repo_path=\"$__git_dir\"\n\telif [ -n \"${GIT_DIR-}\" ]; then\n\t\ttest -d \"$GIT_DIR\" &&\n\t\t__git_repo_path=\"$GIT_DIR\"\n\telif [ -d .git ]; then\n\t\t__git_repo_path=.git\n\telse\n\t\t__git_repo_path=\"$(git rev-parse --git-dir 2>/dev/null)\"\n\tfi\n}\n\n# Deprecated: use __git_find_repo_path() and $__git_repo_path instead\n# __gitdir accepts 0 or 1 arguments (i.e., location)\n# returns location of .git repo\n__gitdir ()\n{\n\tif [ -z \"${1-}\" ]; then\n\t\t__git_find_repo_path || return 1\n\t\techo \"$__git_repo_path\"\n\telif [ -d \"$1/.git\" ]; then\n\t\techo \"$1/.git\"\n\telse\n\t\techo \"$1\"\n\tfi\n}\n\n# Runs git with all the options given as argument, respecting any\n# '--git-dir=<path>' and '-C <path>' options present on the command line\n__git ()\n{\n\tgit ${__git_C_args:+\"${__git_C_args[@]}\"} \\\n\t\t${__git_dir:+--git-dir=\"$__git_dir\"} \"$@\" 2>/dev/null\n}\n\n# Removes backslash escaping, single quotes and double quotes from a word,\n# stores the result in the variable $dequoted_word.\n# 1: The word to dequote.\n__git_dequote ()\n{\n\tlocal rest=\"$1\" len ch\n\n\tdequoted_word=\"\"\n\n\twhile test -n \"$rest\"; do\n\t\tlen=${#dequoted_word}\n\t\tdequoted_word=\"$dequoted_word${rest%%[\\\\\\'\\\"]*}\"\n\t\trest=\"${rest:$((${#dequoted_word}-$len))}\"\n\n\t\tcase \"${rest:0:1}\" in\n\t\t\\\\)\n\t\t\tch=\"${rest:1:1}\"\n\t\t\tcase \"$ch\" in\n\t\t\t$'\\n')\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tdequoted_word=\"$dequoted_word$ch\"\n\t\t\t\t;;\n\t\t\tesac\n\t\t\trest=\"${rest:2}\"\n\t\t\t;;\n\t\t\\')\n\t\t\trest=\"${rest:1}\"\n\t\t\tlen=${#dequoted_word}\n\t\t\tdequoted_word=\"$dequoted_word${rest%%\\'*}\"\n\t\t\trest=\"${rest:$((${#dequoted_word}-$len+1))}\"\n\t\t\t;;\n\t\t\\\")\n\t\t\trest=\"${rest:1}\"\n\t\t\twhile test -n \"$rest\" ; do\n\t\t\t\tlen=${#dequoted_word}\n\t\t\t\tdequoted_word=\"$dequoted_word${rest%%[\\\\\\\"]*}\"\n\t\t\t\trest=\"${rest:$((${#dequoted_word}-$len))}\"\n\t\t\t\tcase \"${rest:0:1}\" in\n\t\t\t\t\\\\)\n\t\t\t\t\tch=\"${rest:1:1}\"\n\t\t\t\t\tcase \"$ch\" in\n\t\t\t\t\t\\\"|\\\\|\\$|\\`)\n\t\t\t\t\t\tdequoted_word=\"$dequoted_word$ch\"\n\t\t\t\t\t\t;;\n\t\t\t\t\t$'\\n')\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\tdequoted_word=\"$dequoted_word\\\\$ch\"\n\t\t\t\t\t\t;;\n\t\t\t\t\tesac\n\t\t\t\t\trest=\"${rest:2}\"\n\t\t\t\t\t;;\n\t\t\t\t\\\")\n\t\t\t\t\trest=\"${rest:1}\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t\t;;\n\t\tesac\n\tdone\n}\n\n# The following function is based on code from:\n#\n#   bash_completion - programmable completion functions for bash 3.2+\n#\n#   Copyright © 2006-2008, Ian Macdonald <ian@caliban.org>\n#             © 2009-2010, Bash Completion Maintainers\n#                     <bash-completion-devel@lists.alioth.debian.org>\n#\n#   This program is free software; you can redistribute it and/or modify\n#   it under the terms of the GNU General Public License as published by\n#   the Free Software Foundation; either version 2, or (at your option)\n#   any later version.\n#\n#   This program is distributed in the hope that it will be useful,\n#   but WITHOUT ANY WARRANTY; without even the implied warranty of\n#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#   GNU General Public License for more details.\n#\n#   You should have received a copy of the GNU General Public License\n#   along with this program; if not, see <http://www.gnu.org/licenses/>.\n#\n#   The latest version of this software can be obtained here:\n#\n#   http://bash-completion.alioth.debian.org/\n#\n#   RELEASE: 2.x\n\n# This function can be used to access a tokenized list of words\n# on the command line:\n#\n#\t__git_reassemble_comp_words_by_ref '=:'\n#\tif test \"${words_[cword_-1]}\" = -w\n#\tthen\n#\t\t...\n#\tfi\n#\n# The argument should be a collection of characters from the list of\n# word completion separators (COMP_WORDBREAKS) to treat as ordinary\n# characters.\n#\n# This is roughly equivalent to going back in time and setting\n# COMP_WORDBREAKS to exclude those characters.  The intent is to\n# make option types like --date=<type> and <rev>:<path> easy to\n# recognize by treating each shell word as a single token.\n#\n# It is best not to set COMP_WORDBREAKS directly because the value is\n# shared with other completion scripts.  By the time the completion\n# function gets called, COMP_WORDS has already been populated so local\n# changes to COMP_WORDBREAKS have no effect.\n#\n# Output: words_, cword_, cur_.\n\n__git_reassemble_comp_words_by_ref()\n{\n\tlocal exclude i j first\n\t# Which word separators to exclude?\n\texclude=\"${1//[^$COMP_WORDBREAKS]}\"\n\tcword_=$COMP_CWORD\n\tif [ -z \"$exclude\" ]; then\n\t\twords_=(\"${COMP_WORDS[@]}\")\n\t\treturn\n\tfi\n\t# List of word completion separators has shrunk;\n\t# re-assemble words to complete.\n\tfor ((i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)); do\n\t\t# Append each nonempty word consisting of just\n\t\t# word separator characters to the current word.\n\t\tfirst=t\n\t\twhile\n\t\t\t[ $i -gt 0 ] &&\n\t\t\t[ -n \"${COMP_WORDS[$i]}\" ] &&\n\t\t\t# word consists of excluded word separators\n\t\t\t[ \"${COMP_WORDS[$i]//[^$exclude]}\" = \"${COMP_WORDS[$i]}\" ]\n\t\tdo\n\t\t\t# Attach to the previous token,\n\t\t\t# unless the previous token is the command name.\n\t\t\tif [ $j -ge 2 ] && [ -n \"$first\" ]; then\n\t\t\t\t((j--))\n\t\t\tfi\n\t\t\tfirst=\n\t\t\twords_[$j]=${words_[j]}${COMP_WORDS[i]}\n\t\t\tif [ $i = $COMP_CWORD ]; then\n\t\t\t\tcword_=$j\n\t\t\tfi\n\t\t\tif (($i < ${#COMP_WORDS[@]} - 1)); then\n\t\t\t\t((i++))\n\t\t\telse\n\t\t\t\t# Done.\n\t\t\t\treturn\n\t\t\tfi\n\t\tdone\n\t\twords_[$j]=${words_[j]}${COMP_WORDS[i]}\n\t\tif [ $i = $COMP_CWORD ]; then\n\t\t\tcword_=$j\n\t\tfi\n\tdone\n}\n\nif ! type _get_comp_words_by_ref >/dev/null 2>&1; then\n_get_comp_words_by_ref ()\n{\n\tlocal exclude cur_ words_ cword_\n\tif [ \"$1\" = \"-n\" ]; then\n\t\texclude=$2\n\t\tshift 2\n\tfi\n\t__git_reassemble_comp_words_by_ref \"$exclude\"\n\tcur_=${words_[cword_]}\n\twhile [ $# -gt 0 ]; do\n\t\tcase \"$1\" in\n\t\tcur)\n\t\t\tcur=$cur_\n\t\t\t;;\n\t\tprev)\n\t\t\tprev=${words_[$cword_-1]}\n\t\t\t;;\n\t\twords)\n\t\t\twords=(\"${words_[@]}\")\n\t\t\t;;\n\t\tcword)\n\t\t\tcword=$cword_\n\t\t\t;;\n\t\tesac\n\t\tshift\n\tdone\n}\nfi\n\n# Fills the COMPREPLY array with prefiltered words without any additional\n# processing.\n# Callers must take care of providing only words that match the current word\n# to be completed and adding any prefix and/or suffix (trailing space!), if\n# necessary.\n# 1: List of newline-separated matching completion words, complete with\n#    prefix and suffix.\n__gitcomp_direct ()\n{\n\tlocal IFS=$'\\n'\n\n\tCOMPREPLY=($1)\n}\n\n# Similar to __gitcomp_direct, but appends to COMPREPLY instead.\n# Callers must take care of providing only words that match the current word\n# to be completed and adding any prefix and/or suffix (trailing space!), if\n# necessary.\n# 1: List of newline-separated matching completion words, complete with\n#    prefix and suffix.\n__gitcomp_direct_append ()\n{\n\tlocal IFS=$'\\n'\n\n\tCOMPREPLY+=($1)\n}\n\n__gitcompappend ()\n{\n\tlocal x i=${#COMPREPLY[@]}\n\tfor x in $1; do\n\t\tif [[ \"$x\" == \"$3\"* ]]; then\n\t\t\tCOMPREPLY[i++]=\"$2$x$4\"\n\t\tfi\n\tdone\n}\n\n__gitcompadd ()\n{\n\tCOMPREPLY=()\n\t__gitcompappend \"$@\"\n}\n\n# Generates completion reply, appending a space to possible completion words,\n# if necessary.\n# It accepts 1 to 4 arguments:\n# 1: List of possible completion words.\n# 2: A prefix to be added to each possible completion word (optional).\n# 3: Generate possible completion matches for this word (optional).\n# 4: A suffix to be appended to each possible completion word (optional).\n__gitcomp ()\n{\n\tlocal cur_=\"${3-$cur}\"\n\n\tcase \"$cur_\" in\n\t*=)\n\t\t;;\n\t--no-*)\n\t\tlocal c i=0 IFS=$' \\t\\n'\n\t\tfor c in $1; do\n\t\t\tif [[ $c == \"--\" ]]; then\n\t\t\t\tcontinue\n\t\t\tfi\n\t\t\tc=\"$c${4-}\"\n\t\t\tif [[ $c == \"$cur_\"* ]]; then\n\t\t\t\tcase $c in\n\t\t\t\t--*=|*.) ;;\n\t\t\t\t*) c=\"$c \" ;;\n\t\t\t\tesac\n\t\t\t\tCOMPREPLY[i++]=\"${2-}$c\"\n\t\t\tfi\n\t\tdone\n\t\t;;\n\t*)\n\t\tlocal c i=0 IFS=$' \\t\\n'\n\t\tfor c in $1; do\n\t\t\tif [[ $c == \"--\" ]]; then\n\t\t\t\tc=\"--no-...${4-}\"\n\t\t\t\tif [[ $c == \"$cur_\"* ]]; then\n\t\t\t\t\tCOMPREPLY[i++]=\"${2-}$c \"\n\t\t\t\tfi\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\tc=\"$c${4-}\"\n\t\t\tif [[ $c == \"$cur_\"* ]]; then\n\t\t\t\tcase $c in\n\t\t\t\t*=|*.) ;;\n\t\t\t\t*) c=\"$c \" ;;\n\t\t\t\tesac\n\t\t\t\tCOMPREPLY[i++]=\"${2-}$c\"\n\t\t\tfi\n\t\tdone\n\t\t;;\n\tesac\n}\n\n# Clear the variables caching builtins' options when (re-)sourcing\n# the completion script.\nif [[ -n ${ZSH_VERSION-} ]]; then\n\tunset ${(M)${(k)parameters[@]}:#__gitcomp_builtin_*} 2>/dev/null\nelse\n\tunset $(compgen -v __gitcomp_builtin_)\nfi\n\n# This function is equivalent to\n#\n#    __gitcomp \"$(git xxx --git-completion-helper) ...\"\n#\n# except that the output is cached. Accept 1-3 arguments:\n# 1: the git command to execute, this is also the cache key\n# 2: extra options to be added on top (e.g. negative forms)\n# 3: options to be excluded\n__gitcomp_builtin ()\n{\n\t# spaces must be replaced with underscore for multi-word\n\t# commands, e.g. \"git remote add\" becomes remote_add.\n\tlocal cmd=\"$1\"\n\tlocal incl=\"${2-}\"\n\tlocal excl=\"${3-}\"\n\n\tlocal var=__gitcomp_builtin_\"${cmd//-/_}\"\n\tlocal options\n\teval \"options=\\${$var-}\"\n\n\tif [ -z \"$options\" ]; then\n\t\tlocal completion_helper\n\t\tif [ \"${GIT_COMPLETION_SHOW_ALL-}\" = \"1\" ]; then\n\t\t\tcompletion_helper=\"--git-completion-helper-all\"\n\t\telse\n\t\t\tcompletion_helper=\"--git-completion-helper\"\n\t\tfi\n\t\t# leading and trailing spaces are significant to make\n\t\t# option removal work correctly.\n\t\toptions=\" $incl $(__git ${cmd/_/ } $completion_helper) \" || return\n\n\t\tfor i in $excl; do\n\t\t\toptions=\"${options/ $i / }\"\n\t\tdone\n\t\teval \"$var=\\\"$options\\\"\"\n\tfi\n\n\t__gitcomp \"$options\"\n}\n\n# Variation of __gitcomp_nl () that appends to the existing list of\n# completion candidates, COMPREPLY.\n__gitcomp_nl_append ()\n{\n\tlocal IFS=$'\\n'\n\t__gitcompappend \"$1\" \"${2-}\" \"${3-$cur}\" \"${4- }\"\n}\n\n# Generates completion reply from newline-separated possible completion words\n# by appending a space to all of them.\n# It accepts 1 to 4 arguments:\n# 1: List of possible completion words, separated by a single newline.\n# 2: A prefix to be added to each possible completion word (optional).\n# 3: Generate possible completion matches for this word (optional).\n# 4: A suffix to be appended to each possible completion word instead of\n#    the default space (optional).  If specified but empty, nothing is\n#    appended.\n__gitcomp_nl ()\n{\n\tCOMPREPLY=()\n\t__gitcomp_nl_append \"$@\"\n}\n\n# Fills the COMPREPLY array with prefiltered paths without any additional\n# processing.\n# Callers must take care of providing only paths that match the current path\n# to be completed and adding any prefix path components, if necessary.\n# 1: List of newline-separated matching paths, complete with all prefix\n#    path components.\n__gitcomp_file_direct ()\n{\n\tlocal IFS=$'\\n'\n\n\tCOMPREPLY=($1)\n\n\t# use a hack to enable file mode in bash < 4\n\tcompopt -o filenames +o nospace 2>/dev/null ||\n\tcompgen -f /non-existing-dir/ >/dev/null ||\n\ttrue\n}\n\n# Generates completion reply with compgen from newline-separated possible\n# completion filenames.\n# It accepts 1 to 3 arguments:\n# 1: List of possible completion filenames, separated by a single newline.\n# 2: A directory prefix to be added to each possible completion filename\n#    (optional).\n# 3: Generate possible completion matches for this word (optional).\n__gitcomp_file ()\n{\n\tlocal IFS=$'\\n'\n\n\t# XXX does not work when the directory prefix contains a tilde,\n\t# since tilde expansion is not applied.\n\t# This means that COMPREPLY will be empty and Bash default\n\t# completion will be used.\n\t__gitcompadd \"$1\" \"${2-}\" \"${3-$cur}\" \"\"\n\n\t# use a hack to enable file mode in bash < 4\n\tcompopt -o filenames +o nospace 2>/dev/null ||\n\tcompgen -f /non-existing-dir/ >/dev/null ||\n\ttrue\n}\n\n# Execute 'git ls-files', unless the --committable option is specified, in\n# which case it runs 'git diff-index' to find out the files that can be\n# committed.  It return paths relative to the directory specified in the first\n# argument, and using the options specified in the second argument.\n__git_ls_files_helper ()\n{\n\tif [ \"$2\" = \"--committable\" ]; then\n\t\t__git -C \"$1\" -c core.quotePath=false diff-index \\\n\t\t\t--name-only --relative HEAD -- \"${3//\\\\/\\\\\\\\}*\"\n\telse\n\t\t# NOTE: $2 is not quoted in order to support multiple options\n\t\t__git -C \"$1\" -c core.quotePath=false ls-files \\\n\t\t\t--exclude-standard $2 -- \"${3//\\\\/\\\\\\\\}*\"\n\tfi\n}\n\n\n# __git_index_files accepts 1 or 2 arguments:\n# 1: Options to pass to ls-files (required).\n# 2: A directory path (optional).\n#    If provided, only files within the specified directory are listed.\n#    Sub directories are never recursed.  Path must have a trailing\n#    slash.\n# 3: List only paths matching this path component (optional).\n__git_index_files ()\n{\n\tlocal root=\"$2\" match=\"$3\"\n\n\t__git_ls_files_helper \"$root\" \"$1\" \"${match:-?}\" |\n\tawk -F / -v pfx=\"${2//\\\\/\\\\\\\\}\" '{\n\t\tpaths[$1] = 1\n\t}\n\tEND {\n\t\tfor (p in paths) {\n\t\t\tif (substr(p, 1, 1) != \"\\\"\") {\n\t\t\t\t# No special characters, easy!\n\t\t\t\tprint pfx p\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t# The path is quoted.\n\t\t\tp = dequote(p)\n\t\t\tif (p == \"\")\n\t\t\t\tcontinue\n\n\t\t\t# Even when a directory name itself does not contain\n\t\t\t# any special characters, it will still be quoted if\n\t\t\t# any of its (stripped) trailing path components do.\n\t\t\t# Because of this we may have seen the same directory\n\t\t\t# both quoted and unquoted.\n\t\t\tif (p in paths)\n\t\t\t\t# We have seen the same directory unquoted,\n\t\t\t\t# skip it.\n\t\t\t\tcontinue\n\t\t\telse\n\t\t\t\tprint pfx p\n\t\t}\n\t}\n\tfunction dequote(p,    bs_idx, out, esc, esc_idx, dec) {\n\t\t# Skip opening double quote.\n\t\tp = substr(p, 2)\n\n\t\t# Interpret backslash escape sequences.\n\t\twhile ((bs_idx = index(p, \"\\\\\")) != 0) {\n\t\t\tout = out substr(p, 1, bs_idx - 1)\n\t\t\tesc = substr(p, bs_idx + 1, 1)\n\t\t\tp = substr(p, bs_idx + 2)\n\n\t\t\tif ((esc_idx = index(\"abtvfr\\\"\\\\\", esc)) != 0) {\n\t\t\t\t# C-style one-character escape sequence.\n\t\t\t\tout = out substr(\"\\a\\b\\t\\v\\f\\r\\\"\\\\\",\n\t\t\t\t\t\t esc_idx, 1)\n\t\t\t} else if (esc == \"n\") {\n\t\t\t\t# Uh-oh, a newline character.\n\t\t\t\t# We cannot reliably put a pathname\n\t\t\t\t# containing a newline into COMPREPLY,\n\t\t\t\t# and the newline would create a mess.\n\t\t\t\t# Skip this path.\n\t\t\t\treturn \"\"\n\t\t\t} else {\n\t\t\t\t# Must be a \\nnn octal value, then.\n\t\t\t\tdec = esc             * 64 + \\\n\t\t\t\t      substr(p, 1, 1) * 8  + \\\n\t\t\t\t      substr(p, 2, 1)\n\t\t\t\tout = out sprintf(\"%c\", dec)\n\t\t\t\tp = substr(p, 3)\n\t\t\t}\n\t\t}\n\t\t# Drop closing double quote, if there is one.\n\t\t# (There is not any if this is a directory, as it was\n\t\t# already stripped with the trailing path components.)\n\t\tif (substr(p, length(p), 1) == \"\\\"\")\n\t\t\tout = out substr(p, 1, length(p) - 1)\n\t\telse\n\t\t\tout = out p\n\n\t\treturn out\n\t}'\n}\n\n# __git_complete_index_file requires 1 argument:\n# 1: the options to pass to ls-file\n#\n# The exception is --committable, which finds the files appropriate commit.\n__git_complete_index_file ()\n{\n\tlocal dequoted_word pfx=\"\" cur_\n\n\t__git_dequote \"$cur\"\n\n\tcase \"$dequoted_word\" in\n\t?*/*)\n\t\tpfx=\"${dequoted_word%/*}/\"\n\t\tcur_=\"${dequoted_word##*/}\"\n\t\t;;\n\t*)\n\t\tcur_=\"$dequoted_word\"\n\tesac\n\n\t__gitcomp_file_direct \"$(__git_index_files \"$1\" \"$pfx\" \"$cur_\")\"\n}\n\n# Lists branches from the local repository.\n# 1: A prefix to be added to each listed branch (optional).\n# 2: List only branches matching this word (optional; list all branches if\n#    unset or empty).\n# 3: A suffix to be appended to each listed branch (optional).\n__git_heads ()\n{\n\tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n\n\t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n\t\t\t\"refs/heads/$cur_*\" \"refs/heads/$cur_*/**\"\n}\n\n# Lists branches from remote repositories.\n# 1: A prefix to be added to each listed branch (optional).\n# 2: List only branches matching this word (optional; list all branches if\n#    unset or empty).\n# 3: A suffix to be appended to each listed branch (optional).\n__git_remote_heads ()\n{\n\tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n\n\t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n\t\t\t\"refs/remotes/$cur_*\" \"refs/remotes/$cur_*/**\"\n}\n\n# Lists tags from the local repository.\n# Accepts the same positional parameters as __git_heads() above.\n__git_tags ()\n{\n\tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n\n\t__git for-each-ref --format=\"${pfx//\\%/%%}%(refname:strip=2)$sfx\" \\\n\t\t\t\"refs/tags/$cur_*\" \"refs/tags/$cur_*/**\"\n}\n\n# List unique branches from refs/remotes used for 'git checkout' and 'git\n# switch' tracking DWIMery.\n# 1: A prefix to be added to each listed branch (optional)\n# 2: List only branches matching this word (optional; list all branches if\n#    unset or empty).\n# 3: A suffix to be appended to each listed branch (optional).\n__git_dwim_remote_heads ()\n{\n\tlocal pfx=\"${1-}\" cur_=\"${2-}\" sfx=\"${3-}\"\n\tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n\n\t# employ the heuristic used by git checkout and git switch\n\t# Try to find a remote branch that cur_es the completion word\n\t# but only output if the branch name is unique\n\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n\t\t--sort=\"refname:strip=3\" \\\n\t\t\"refs/remotes/*/$cur_*\" \"refs/remotes/*/$cur_*/**\" | \\\n\tuniq -u\n}\n\n# Lists refs from the local (by default) or from a remote repository.\n# It accepts 0, 1 or 2 arguments:\n# 1: The remote to list refs from (optional; ignored, if set but empty).\n#    Can be the name of a configured remote, a path, or a URL.\n# 2: In addition to local refs, list unique branches from refs/remotes/ for\n#    'git checkout's tracking DWIMery (optional; ignored, if set but empty).\n# 3: A prefix to be added to each listed ref (optional).\n# 4: List only refs matching this word (optional; list all refs if unset or\n#    empty).\n# 5: A suffix to be appended to each listed ref (optional; ignored, if set\n#    but empty).\n#\n# Use __git_complete_refs() instead.\n__git_refs ()\n{\n\tlocal i hash dir track=\"${2-}\"\n\tlocal list_refs_from=path remote=\"${1-}\"\n\tlocal format refs\n\tlocal pfx=\"${3-}\" cur_=\"${4-$cur}\" sfx=\"${5-}\"\n\tlocal match=\"${4-}\"\n\tlocal fer_pfx=\"${pfx//\\%/%%}\" # \"escape\" for-each-ref format specifiers\n\n\t__git_find_repo_path\n\tdir=\"$__git_repo_path\"\n\n\tif [ -z \"$remote\" ]; then\n\t\tif [ -z \"$dir\" ]; then\n\t\t\treturn\n\t\tfi\n\telse\n\t\tif __git_is_configured_remote \"$remote\"; then\n\t\t\t# configured remote takes precedence over a\n\t\t\t# local directory with the same name\n\t\t\tlist_refs_from=remote\n\t\telif [ -d \"$remote/.git\" ]; then\n\t\t\tdir=\"$remote/.git\"\n\t\telif [ -d \"$remote\" ]; then\n\t\t\tdir=\"$remote\"\n\t\telse\n\t\t\tlist_refs_from=url\n\t\tfi\n\tfi\n\n\tif [ \"$list_refs_from\" = path ]; then\n\t\tif [[ \"$cur_\" == ^* ]]; then\n\t\t\tpfx=\"$pfx^\"\n\t\t\tfer_pfx=\"$fer_pfx^\"\n\t\t\tcur_=${cur_#^}\n\t\t\tmatch=${match#^}\n\t\tfi\n\t\tcase \"$cur_\" in\n\t\trefs|refs/*)\n\t\t\tformat=\"refname\"\n\t\t\trefs=(\"$match*\" \"$match*/**\")\n\t\t\ttrack=\"\"\n\t\t\t;;\n\t\t*)\n\t\t\tfor i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD REBASE_HEAD CHERRY_PICK_HEAD; do\n\t\t\t\tcase \"$i\" in\n\t\t\t\t$match*)\n\t\t\t\t\tif [ -e \"$dir/$i\" ]; then\n\t\t\t\t\t\techo \"$pfx$i$sfx\"\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t\tformat=\"refname:strip=2\"\n\t\t\trefs=(\"refs/tags/$match*\" \"refs/tags/$match*/**\"\n\t\t\t\t\"refs/heads/$match*\" \"refs/heads/$match*/**\"\n\t\t\t\t\"refs/remotes/$match*\" \"refs/remotes/$match*/**\")\n\t\t\t;;\n\t\tesac\n\t\t__git_dir=\"$dir\" __git for-each-ref --format=\"$fer_pfx%($format)$sfx\" \\\n\t\t\t\"${refs[@]}\"\n\t\tif [ -n \"$track\" ]; then\n\t\t\t__git_dwim_remote_heads \"$pfx\" \"$match\" \"$sfx\"\n\t\tfi\n\t\treturn\n\tfi\n\tcase \"$cur_\" in\n\trefs|refs/*)\n\t\t__git ls-remote \"$remote\" \"$match*\" | \\\n\t\twhile read -r hash i; do\n\t\t\tcase \"$i\" in\n\t\t\t*^{}) ;;\n\t\t\t*) echo \"$pfx$i$sfx\" ;;\n\t\t\tesac\n\t\tdone\n\t\t;;\n\t*)\n\t\tif [ \"$list_refs_from\" = remote ]; then\n\t\t\tcase \"HEAD\" in\n\t\t\t$match*)\techo \"${pfx}HEAD$sfx\" ;;\n\t\t\tesac\n\t\t\t__git for-each-ref --format=\"$fer_pfx%(refname:strip=3)$sfx\" \\\n\t\t\t\t\"refs/remotes/$remote/$match*\" \\\n\t\t\t\t\"refs/remotes/$remote/$match*/**\"\n\t\telse\n\t\t\tlocal query_symref\n\t\t\tcase \"HEAD\" in\n\t\t\t$match*)\tquery_symref=\"HEAD\" ;;\n\t\t\tesac\n\t\t\t__git ls-remote \"$remote\" $query_symref \\\n\t\t\t\t\"refs/tags/$match*\" \"refs/heads/$match*\" \\\n\t\t\t\t\"refs/remotes/$match*\" |\n\t\t\twhile read -r hash i; do\n\t\t\t\tcase \"$i\" in\n\t\t\t\t*^{})\t;;\n\t\t\t\trefs/*)\techo \"$pfx${i#refs/*/}$sfx\" ;;\n\t\t\t\t*)\techo \"$pfx$i$sfx\" ;;  # symbolic refs\n\t\t\t\tesac\n\t\t\tdone\n\t\tfi\n\t\t;;\n\tesac\n}\n\n# Completes refs, short and long, local and remote, symbolic and pseudo.\n#\n# Usage: __git_complete_refs [<option>]...\n# --remote=<remote>: The remote to list refs from, can be the name of a\n#                    configured remote, a path, or a URL.\n# --dwim: List unique remote branches for 'git switch's tracking DWIMery.\n# --pfx=<prefix>: A prefix to be added to each ref.\n# --cur=<word>: The current ref to be completed.  Defaults to the current\n#               word to be completed.\n# --sfx=<suffix>: A suffix to be appended to each ref instead of the default\n#                 space.\n# --mode=<mode>: What set of refs to complete, one of 'refs' (the default) to\n#                complete all refs, 'heads' to complete only branches, or\n#                'remote-heads' to complete only remote branches. Note that\n#                --remote is only compatible with --mode=refs.\n__git_complete_refs ()\n{\n\tlocal remote= dwim= pfx= cur_=\"$cur\" sfx=\" \" mode=\"refs\"\n\n\twhile test $# != 0; do\n\t\tcase \"$1\" in\n\t\t--remote=*)\tremote=\"${1##--remote=}\" ;;\n\t\t--dwim)\t\tdwim=\"yes\" ;;\n\t\t# --track is an old spelling of --dwim\n\t\t--track)\tdwim=\"yes\" ;;\n\t\t--pfx=*)\tpfx=\"${1##--pfx=}\" ;;\n\t\t--cur=*)\tcur_=\"${1##--cur=}\" ;;\n\t\t--sfx=*)\tsfx=\"${1##--sfx=}\" ;;\n\t\t--mode=*)\tmode=\"${1##--mode=}\" ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\n\t# complete references based on the specified mode\n\tcase \"$mode\" in\n\t\trefs)\n\t\t\t__gitcomp_direct \"$(__git_refs \"$remote\" \"\" \"$pfx\" \"$cur_\" \"$sfx\")\" ;;\n\t\theads)\n\t\t\t__gitcomp_direct \"$(__git_heads \"$pfx\" \"$cur_\" \"$sfx\")\" ;;\n\t\tremote-heads)\n\t\t\t__gitcomp_direct \"$(__git_remote_heads \"$pfx\" \"$cur_\" \"$sfx\")\" ;;\n\t\t*)\n\t\t\treturn 1 ;;\n\tesac\n\n\t# Append DWIM remote branch names if requested\n\tif [ \"$dwim\" = \"yes\" ]; then\n\t\t__gitcomp_direct_append \"$(__git_dwim_remote_heads \"$pfx\" \"$cur_\" \"$sfx\")\"\n\tfi\n}\n\n# __git_refs2 requires 1 argument (to pass to __git_refs)\n# Deprecated: use __git_complete_fetch_refspecs() instead.\n__git_refs2 ()\n{\n\tlocal i\n\tfor i in $(__git_refs \"$1\"); do\n\t\techo \"$i:$i\"\n\tdone\n}\n\n# Completes refspecs for fetching from a remote repository.\n# 1: The remote repository.\n# 2: A prefix to be added to each listed refspec (optional).\n# 3: The ref to be completed as a refspec instead of the current word to be\n#    completed (optional)\n# 4: A suffix to be appended to each listed refspec instead of the default\n#    space (optional).\n__git_complete_fetch_refspecs ()\n{\n\tlocal i remote=\"$1\" pfx=\"${2-}\" cur_=\"${3-$cur}\" sfx=\"${4- }\"\n\n\t__gitcomp_direct \"$(\n\t\tfor i in $(__git_refs \"$remote\" \"\" \"\" \"$cur_\") ; do\n\t\t\techo \"$pfx$i:$i$sfx\"\n\t\tdone\n\t\t)\"\n}\n\n# __git_refs_remotes requires 1 argument (to pass to ls-remote)\n__git_refs_remotes ()\n{\n\tlocal i hash\n\t__git ls-remote \"$1\" 'refs/heads/*' | \\\n\twhile read -r hash i; do\n\t\techo \"$i:refs/remotes/$1/${i#refs/heads/}\"\n\tdone\n}\n\n__git_remotes ()\n{\n\t__git_find_repo_path\n\ttest -d \"$__git_repo_path/remotes\" && ls -1 \"$__git_repo_path/remotes\"\n\t__git remote\n}\n\n# Returns true if $1 matches the name of a configured remote, false otherwise.\n__git_is_configured_remote ()\n{\n\tlocal remote\n\tfor remote in $(__git_remotes); do\n\t\tif [ \"$remote\" = \"$1\" ]; then\n\t\t\treturn 0\n\t\tfi\n\tdone\n\treturn 1\n}\n\n__git_list_merge_strategies ()\n{\n\tLANG=C LC_ALL=C git merge -s help 2>&1 |\n\tsed -n -e '/[Aa]vailable strategies are: /,/^$/{\n\t\ts/\\.$//\n\t\ts/.*://\n\t\ts/^[ \t]*//\n\t\ts/[ \t]*$//\n\t\tp\n\t}'\n}\n\n__git_merge_strategies=\n# 'git merge -s help' (and thus detection of the merge strategy\n# list) fails, unfortunately, if run outside of any git working\n# tree.  __git_merge_strategies is set to the empty string in\n# that case, and the detection will be repeated the next time it\n# is needed.\n__git_compute_merge_strategies ()\n{\n\ttest -n \"$__git_merge_strategies\" ||\n\t__git_merge_strategies=$(__git_list_merge_strategies)\n}\n\n__git_merge_strategy_options=\"ours theirs subtree subtree= patience\n\thistogram diff-algorithm= ignore-space-change ignore-all-space\n\tignore-space-at-eol renormalize no-renormalize no-renames\n\tfind-renames find-renames= rename-threshold=\"\n\n__git_complete_revlist_file ()\n{\n\tlocal dequoted_word pfx ls ref cur_=\"$cur\"\n\tcase \"$cur_\" in\n\t*..?*:*)\n\t\treturn\n\t\t;;\n\t?*:*)\n\t\tref=\"${cur_%%:*}\"\n\t\tcur_=\"${cur_#*:}\"\n\n\t\t__git_dequote \"$cur_\"\n\n\t\tcase \"$dequoted_word\" in\n\t\t?*/*)\n\t\t\tpfx=\"${dequoted_word%/*}\"\n\t\t\tcur_=\"${dequoted_word##*/}\"\n\t\t\tls=\"$ref:$pfx\"\n\t\t\tpfx=\"$pfx/\"\n\t\t\t;;\n\t\t*)\n\t\t\tcur_=\"$dequoted_word\"\n\t\t\tls=\"$ref\"\n\t\t\t;;\n\t\tesac\n\n\t\tcase \"$COMP_WORDBREAKS\" in\n\t\t*:*) : great ;;\n\t\t*)   pfx=\"$ref:$pfx\" ;;\n\t\tesac\n\n\t\t__gitcomp_file \"$(__git ls-tree \"$ls\" \\\n\t\t\t\t| sed 's/^.*\t//\n\t\t\t\t       s/$//')\" \\\n\t\t\t\"$pfx\" \"$cur_\"\n\t\t;;\n\t*...*)\n\t\tpfx=\"${cur_%...*}...\"\n\t\tcur_=\"${cur_#*...}\"\n\t\t__git_complete_refs --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\t;;\n\t*..*)\n\t\tpfx=\"${cur_%..*}..\"\n\t\tcur_=\"${cur_#*..}\"\n\t\t__git_complete_refs --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\t;;\n\t*)\n\t\t__git_complete_refs\n\t\t;;\n\tesac\n}\n\n__git_complete_file ()\n{\n\t__git_complete_revlist_file\n}\n\n__git_complete_revlist ()\n{\n\t__git_complete_revlist_file\n}\n\n__git_complete_remote_or_refspec ()\n{\n\tlocal cur_=\"$cur\" cmd=\"${words[__git_cmd_idx]}\"\n\tlocal i c=$((__git_cmd_idx+1)) remote=\"\" pfx=\"\" lhs=1 no_complete_refspec=0\n\tif [ \"$cmd\" = \"remote\" ]; then\n\t\t((c++))\n\tfi\n\twhile [ $c -lt $cword ]; do\n\t\ti=\"${words[c]}\"\n\t\tcase \"$i\" in\n\t\t--mirror) [ \"$cmd\" = \"push\" ] && no_complete_refspec=1 ;;\n\t\t-d|--delete) [ \"$cmd\" = \"push\" ] && lhs=0 ;;\n\t\t--all)\n\t\t\tcase \"$cmd\" in\n\t\t\tpush) no_complete_refspec=1 ;;\n\t\t\tfetch)\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\t*) ;;\n\t\t\tesac\n\t\t\t;;\n\t\t--multiple) no_complete_refspec=1; break ;;\n\t\t-*) ;;\n\t\t*) remote=\"$i\"; break ;;\n\t\tesac\n\t\t((c++))\n\tdone\n\tif [ -z \"$remote\" ]; then\n\t\t__gitcomp_nl \"$(__git_remotes)\"\n\t\treturn\n\tfi\n\tif [ $no_complete_refspec = 1 ]; then\n\t\treturn\n\tfi\n\t[ \"$remote\" = \".\" ] && remote=\n\tcase \"$cur_\" in\n\t*:*)\n\t\tcase \"$COMP_WORDBREAKS\" in\n\t\t*:*) : great ;;\n\t\t*)   pfx=\"${cur_%%:*}:\" ;;\n\t\tesac\n\t\tcur_=\"${cur_#*:}\"\n\t\tlhs=0\n\t\t;;\n\t+*)\n\t\tpfx=\"+\"\n\t\tcur_=\"${cur_#+}\"\n\t\t;;\n\tesac\n\tcase \"$cmd\" in\n\tfetch)\n\t\tif [ $lhs = 1 ]; then\n\t\t\t__git_complete_fetch_refspecs \"$remote\" \"$pfx\" \"$cur_\"\n\t\telse\n\t\t\t__git_complete_refs --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\tfi\n\t\t;;\n\tpull|remote)\n\t\tif [ $lhs = 1 ]; then\n\t\t\t__git_complete_refs --remote=\"$remote\" --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\telse\n\t\t\t__git_complete_refs --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\tfi\n\t\t;;\n\tpush)\n\t\tif [ $lhs = 1 ]; then\n\t\t\t__git_complete_refs --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\telse\n\t\t\t__git_complete_refs --remote=\"$remote\" --pfx=\"$pfx\" --cur=\"$cur_\"\n\t\tfi\n\t\t;;\n\tesac\n}\n\n__git_complete_strategy ()\n{\n\t__git_compute_merge_strategies\n\tcase \"$prev\" in\n\t-s|--strategy)\n\t\t__gitcomp \"$__git_merge_strategies\"\n\t\treturn 0\n\t\t;;\n\t-X)\n\t\t__gitcomp \"$__git_merge_strategy_options\"\n\t\treturn 0\n\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t--strategy=*)\n\t\t__gitcomp \"$__git_merge_strategies\" \"\" \"${cur##--strategy=}\"\n\t\treturn 0\n\t\t;;\n\t--strategy-option=*)\n\t\t__gitcomp \"$__git_merge_strategy_options\" \"\" \"${cur##--strategy-option=}\"\n\t\treturn 0\n\t\t;;\n\tesac\n\treturn 1\n}\n\n__git_all_commands=\n__git_compute_all_commands ()\n{\n\ttest -n \"$__git_all_commands\" ||\n\t__git_all_commands=$(__git --list-cmds=main,others,alias,nohelpers)\n}\n\n# Lists all set config variables starting with the given section prefix,\n# with the prefix removed.\n__git_get_config_variables ()\n{\n\tlocal section=\"$1\" i IFS=$'\\n'\n\tfor i in $(__git config --name-only --get-regexp \"^$section\\..*\"); do\n\t\techo \"${i#$section.}\"\n\tdone\n}\n\n__git_pretty_aliases ()\n{\n\t__git_get_config_variables \"pretty\"\n}\n\n# __git_aliased_command requires 1 argument\n__git_aliased_command ()\n{\n\tlocal cur=$1 last list= word cmdline\n\n\twhile [[ -n \"$cur\" ]]; do\n\t\tif [[ \"$list\" == *\" $cur \"* ]]; then\n\t\t\t# loop detected\n\t\t\treturn\n\t\tfi\n\n\t\tcmdline=$(__git config --get \"alias.$cur\")\n\t\tlist=\" $cur $list\"\n\t\tlast=$cur\n\t\tcur=\n\n\t\tfor word in $cmdline; do\n\t\t\tcase \"$word\" in\n\t\t\t\\!gitk|gitk)\n\t\t\t\tcur=\"gitk\"\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\t\t\\!*)\t: shell command alias ;;\n\t\t\t-*)\t: option ;;\n\t\t\t*=*)\t: setting env ;;\n\t\t\tgit)\t: git itself ;;\n\t\t\t\\(\\))   : skip parens of shell function definition ;;\n\t\t\t{)\t: skip start of shell helper function ;;\n\t\t\t:)\t: skip null command ;;\n\t\t\t\\'*)\t: skip opening quote after sh -c ;;\n\t\t\t*)\n\t\t\t\tcur=\"$word\"\n\t\t\t\tbreak\n\t\t\tesac\n\t\tdone\n\tdone\n\n\tcur=$last\n\tif [[ \"$cur\" != \"$1\" ]]; then\n\t\techo \"$cur\"\n\tfi\n}\n\n# Check whether one of the given words is present on the command line,\n# and print the first word found.\n#\n# Usage: __git_find_on_cmdline [<option>]... \"<wordlist>\"\n# --show-idx: Optionally show the index of the found word in the $words array.\n__git_find_on_cmdline ()\n{\n\tlocal word c=\"$__git_cmd_idx\" show_idx\n\n\twhile test $# -gt 1; do\n\t\tcase \"$1\" in\n\t\t--show-idx)\tshow_idx=y ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\tlocal wordlist=\"$1\"\n\n\twhile [ $c -lt $cword ]; do\n\t\tfor word in $wordlist; do\n\t\t\tif [ \"$word\" = \"${words[c]}\" ]; then\n\t\t\t\tif [ -n \"${show_idx-}\" ]; then\n\t\t\t\t\techo \"$c $word\"\n\t\t\t\telse\n\t\t\t\t\techo \"$word\"\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\t\tdone\n\t\t((c++))\n\tdone\n}\n\n# Similar to __git_find_on_cmdline, except that it loops backwards and thus\n# prints the *last* word found. Useful for finding which of two options that\n# supersede each other came last, such as \"--guess\" and \"--no-guess\".\n#\n# Usage: __git_find_last_on_cmdline [<option>]... \"<wordlist>\"\n# --show-idx: Optionally show the index of the found word in the $words array.\n__git_find_last_on_cmdline ()\n{\n\tlocal word c=$cword show_idx\n\n\twhile test $# -gt 1; do\n\t\tcase \"$1\" in\n\t\t--show-idx)\tshow_idx=y ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\tlocal wordlist=\"$1\"\n\n\twhile [ $c -gt \"$__git_cmd_idx\" ]; do\n\t\t((c--))\n\t\tfor word in $wordlist; do\n\t\t\tif [ \"$word\" = \"${words[c]}\" ]; then\n\t\t\t\tif [ -n \"$show_idx\" ]; then\n\t\t\t\t\techo \"$c $word\"\n\t\t\t\telse\n\t\t\t\t\techo \"$word\"\n\t\t\t\tfi\n\t\t\t\treturn\n\t\t\tfi\n\t\tdone\n\tdone\n}\n\n# Echo the value of an option set on the command line or config\n#\n# $1: short option name\n# $2: long option name including =\n# $3: list of possible values\n# $4: config string (optional)\n#\n# example:\n# result=\"$(__git_get_option_value \"-d\" \"--do-something=\" \\\n#     \"yes no\" \"core.doSomething\")\"\n#\n# result is then either empty (no option set) or \"yes\" or \"no\"\n#\n# __git_get_option_value requires 3 arguments\n__git_get_option_value ()\n{\n\tlocal c short_opt long_opt val\n\tlocal result= values config_key word\n\n\tshort_opt=\"$1\"\n\tlong_opt=\"$2\"\n\tvalues=\"$3\"\n\tconfig_key=\"$4\"\n\n\t((c = $cword - 1))\n\twhile [ $c -ge 0 ]; do\n\t\tword=\"${words[c]}\"\n\t\tfor val in $values; do\n\t\t\tif [ \"$short_opt$val\" = \"$word\" ] ||\n\t\t\t   [ \"$long_opt$val\"  = \"$word\" ]; then\n\t\t\t\tresult=\"$val\"\n\t\t\t\tbreak 2\n\t\t\tfi\n\t\tdone\n\t\t((c--))\n\tdone\n\n\tif [ -n \"$config_key\" ] && [ -z \"$result\" ]; then\n\t\tresult=\"$(__git config \"$config_key\")\"\n\tfi\n\n\techo \"$result\"\n}\n\n__git_has_doubledash ()\n{\n\tlocal c=1\n\twhile [ $c -lt $cword ]; do\n\t\tif [ \"--\" = \"${words[c]}\" ]; then\n\t\t\treturn 0\n\t\tfi\n\t\t((c++))\n\tdone\n\treturn 1\n}\n\n# Try to count non option arguments passed on the command line for the\n# specified git command.\n# When options are used, it is necessary to use the special -- option to\n# tell the implementation were non option arguments begin.\n# XXX this can not be improved, since options can appear everywhere, as\n# an example:\n#\tgit mv x -n y\n#\n# __git_count_arguments requires 1 argument: the git command executed.\n__git_count_arguments ()\n{\n\tlocal word i c=0\n\n\t# Skip \"git\" (first argument)\n\tfor ((i=$__git_cmd_idx; i < ${#words[@]}; i++)); do\n\t\tword=\"${words[i]}\"\n\n\t\tcase \"$word\" in\n\t\t\t--)\n\t\t\t\t# Good; we can assume that the following are only non\n\t\t\t\t# option arguments.\n\t\t\t\t((c = 0))\n\t\t\t\t;;\n\t\t\t\"$1\")\n\t\t\t\t# Skip the specified git command and discard git\n\t\t\t\t# main options\n\t\t\t\t((c = 0))\n\t\t\t\t;;\n\t\t\t?*)\n\t\t\t\t((c++))\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tprintf \"%d\" $c\n}\n\n__git_whitespacelist=\"nowarn warn error error-all fix\"\n__git_patchformat=\"mbox stgit stgit-series hg mboxrd\"\n__git_showcurrentpatch=\"diff raw\"\n__git_am_inprogress_options=\"--skip --continue --resolved --abort --quit --show-current-patch\"\n__git_quoted_cr=\"nowarn warn strip\"\n\n_git_am ()\n{\n\t__git_find_repo_path\n\tif [ -d \"$__git_repo_path\"/rebase-apply ]; then\n\t\t__gitcomp \"$__git_am_inprogress_options\"\n\t\treturn\n\tfi\n\tcase \"$cur\" in\n\t--whitespace=*)\n\t\t__gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n\t\treturn\n\t\t;;\n\t--patch-format=*)\n\t\t__gitcomp \"$__git_patchformat\" \"\" \"${cur##--patch-format=}\"\n\t\treturn\n\t\t;;\n\t--show-current-patch=*)\n\t\t__gitcomp \"$__git_showcurrentpatch\" \"\" \"${cur##--show-current-patch=}\"\n\t\treturn\n\t\t;;\n\t--quoted-cr=*)\n\t\t__gitcomp \"$__git_quoted_cr\" \"\" \"${cur##--quoted-cr=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin am \"\" \\\n\t\t\t\"$__git_am_inprogress_options\"\n\t\treturn\n\tesac\n}\n\n_git_apply ()\n{\n\tcase \"$cur\" in\n\t--whitespace=*)\n\t\t__gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin apply\n\t\treturn\n\tesac\n}\n\n_git_add ()\n{\n\tcase \"$cur\" in\n\t--chmod=*)\n\t\t__gitcomp \"+x -x\" \"\" \"${cur##--chmod=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin add\n\t\treturn\n\tesac\n\n\tlocal complete_opt=\"--others --modified --directory --no-empty-directory\"\n\tif test -n \"$(__git_find_on_cmdline \"-u --update\")\"\n\tthen\n\t\tcomplete_opt=\"--modified\"\n\tfi\n\t__git_complete_index_file \"$complete_opt\"\n}\n\n_git_archive ()\n{\n\tcase \"$cur\" in\n\t--format=*)\n\t\t__gitcomp \"$(git archive --list)\" \"\" \"${cur##--format=}\"\n\t\treturn\n\t\t;;\n\t--remote=*)\n\t\t__gitcomp_nl \"$(__git_remotes)\" \"\" \"${cur##--remote=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin archive \"--format= --list --verbose --prefix= --worktree-attributes\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_file\n}\n\n_git_bisect ()\n{\n\t__git_has_doubledash && return\n\n\tlocal subcommands=\"start bad good skip reset visualize replay log run\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__git_find_repo_path\n\t\tif [ -f \"$__git_repo_path\"/BISECT_START ]; then\n\t\t\t__gitcomp \"$subcommands\"\n\t\telse\n\t\t\t__gitcomp \"replay start\"\n\t\tfi\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\tbad|good|reset|skip|start)\n\t\t__git_complete_refs\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n}\n\n__git_ref_fieldlist=\"refname objecttype objectsize objectname upstream push HEAD symref\"\n\n_git_branch ()\n{\n\tlocal i c=\"$__git_cmd_idx\" only_local_ref=\"n\" has_r=\"n\"\n\n\twhile [ $c -lt $cword ]; do\n\t\ti=\"${words[c]}\"\n\t\tcase \"$i\" in\n\t\t-d|-D|--delete|-m|-M|--move|-c|-C|--copy)\n\t\t\tonly_local_ref=\"y\" ;;\n\t\t-r|--remotes)\n\t\t\thas_r=\"y\" ;;\n\t\tesac\n\t\t((c++))\n\tdone\n\n\tcase \"$cur\" in\n\t--set-upstream-to=*)\n\t\t__git_complete_refs --cur=\"${cur##--set-upstream-to=}\"\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin branch\n\t\t;;\n\t*)\n\t\tif [ $only_local_ref = \"y\" -a $has_r = \"n\" ]; then\n\t\t\t__gitcomp_direct \"$(__git_heads \"\" \"$cur\" \" \")\"\n\t\telse\n\t\t\t__git_complete_refs\n\t\tfi\n\t\t;;\n\tesac\n}\n\n_git_bundle ()\n{\n\tlocal cmd=\"${words[__git_cmd_idx+1]}\"\n\tcase \"$cword\" in\n\t$((__git_cmd_idx+1)))\n\t\t__gitcomp \"create list-heads verify unbundle\"\n\t\t;;\n\t$((__git_cmd_idx+2)))\n\t\t# looking for a file\n\t\t;;\n\t*)\n\t\tcase \"$cmd\" in\n\t\t\tcreate)\n\t\t\t\t__git_complete_revlist\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tesac\n}\n\n# Helper function to decide whether or not we should enable DWIM logic for\n# git-switch and git-checkout.\n#\n# To decide between the following rules in decreasing priority order:\n# - the last provided of \"--guess\" or \"--no-guess\" explicitly enable or\n#   disable completion of DWIM logic respectively.\n# - If checkout.guess is false, disable completion of DWIM logic.\n# - If the --no-track option is provided, take this as a hint to disable the\n#   DWIM completion logic\n# - If GIT_COMPLETION_CHECKOUT_NO_GUESS is set, disable the DWIM completion\n#   logic, as requested by the user.\n# - Enable DWIM logic otherwise.\n#\n__git_checkout_default_dwim_mode ()\n{\n\tlocal last_option dwim_opt=\"--dwim\"\n\n\tif [ \"${GIT_COMPLETION_CHECKOUT_NO_GUESS-}\" = \"1\" ]; then\n\t\tdwim_opt=\"\"\n\tfi\n\n\t# --no-track disables DWIM, but with lower priority than\n\t# --guess/--no-guess/checkout.guess\n\tif [ -n \"$(__git_find_on_cmdline \"--no-track\")\" ]; then\n\t\tdwim_opt=\"\"\n\tfi\n\n\t# checkout.guess = false disables DWIM, but with lower priority than\n\t# --guess/--no-guess\n\tif [ \"$(__git config --type=bool checkout.guess)\" = \"false\" ]; then\n\t\tdwim_opt=\"\"\n\tfi\n\n\t# Find the last provided --guess or --no-guess\n\tlast_option=\"$(__git_find_last_on_cmdline \"--guess --no-guess\")\"\n\tcase \"$last_option\" in\n\t\t--guess)\n\t\t\tdwim_opt=\"--dwim\"\n\t\t\t;;\n\t\t--no-guess)\n\t\t\tdwim_opt=\"\"\n\t\t\t;;\n\tesac\n\n\techo \"$dwim_opt\"\n}\n\n_git_checkout ()\n{\n\t__git_has_doubledash && return\n\n\tlocal dwim_opt=\"$(__git_checkout_default_dwim_mode)\"\n\n\tcase \"$prev\" in\n\t-b|-B|--orphan)\n\t\t# Complete local branches (and DWIM branch\n\t\t# remote branch names) for an option argument\n\t\t# specifying a new branch name. This is for\n\t\t# convenience, assuming new branches are\n\t\t# possibly based on pre-existing branch names.\n\t\t__git_complete_refs $dwim_opt --mode=\"heads\"\n\t\treturn\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--conflict=*)\n\t\t__gitcomp \"diff3 merge\" \"\" \"${cur##--conflict=}\"\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin checkout\n\t\t;;\n\t*)\n\t\t# At this point, we've already handled special completion for\n\t\t# the arguments to -b/-B, and --orphan. There are 3 main\n\t\t# things left we can possibly complete:\n\t\t# 1) a start-point for -b/-B, -d/--detach, or --orphan\n\t\t# 2) a remote head, for --track\n\t\t# 3) an arbitrary reference, possibly including DWIM names\n\t\t#\n\n\t\tif [ -n \"$(__git_find_on_cmdline \"-b -B -d --detach --orphan\")\" ]; then\n\t\t\t__git_complete_refs --mode=\"refs\"\n\t\telif [ -n \"$(__git_find_on_cmdline \"--track\")\" ]; then\n\t\t\t__git_complete_refs --mode=\"remote-heads\"\n\t\telse\n\t\t\t__git_complete_refs $dwim_opt --mode=\"refs\"\n\t\tfi\n\t\t;;\n\tesac\n}\n\n__git_sequencer_inprogress_options=\"--continue --quit --abort --skip\"\n\n__git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options\n\n_git_cherry_pick ()\n{\n\t__git_find_repo_path\n\tif [ -f \"$__git_repo_path\"/CHERRY_PICK_HEAD ]; then\n\t\t__gitcomp \"$__git_cherry_pick_inprogress_options\"\n\t\treturn\n\tfi\n\n\t__git_complete_strategy && return\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin cherry-pick \"\" \\\n\t\t\t\"$__git_cherry_pick_inprogress_options\"\n\t\t;;\n\t*)\n\t\t__git_complete_refs\n\t\t;;\n\tesac\n}\n\n_git_clean ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin clean\n\t\treturn\n\t\t;;\n\tesac\n\n\t# XXX should we check for -x option ?\n\t__git_complete_index_file \"--others --directory\"\n}\n\n_git_clone ()\n{\n\tcase \"$prev\" in\n\t-c|--config)\n\t\t__git_complete_config_variable_name_and_value\n\t\treturn\n\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t--config=*)\n\t\t__git_complete_config_variable_name_and_value \\\n\t\t\t--cur=\"${cur##--config=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin clone\n\t\treturn\n\t\t;;\n\tesac\n}\n\n__git_untracked_file_modes=\"all no normal\"\n\n_git_commit ()\n{\n\tcase \"$prev\" in\n\t-c|-C)\n\t\t__git_complete_refs\n\t\treturn\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--cleanup=*)\n\t\t__gitcomp \"default scissors strip verbatim whitespace\n\t\t\t\" \"\" \"${cur##--cleanup=}\"\n\t\treturn\n\t\t;;\n\t--reuse-message=*|--reedit-message=*|\\\n\t--fixup=*|--squash=*)\n\t\t__git_complete_refs --cur=\"${cur#*=}\"\n\t\treturn\n\t\t;;\n\t--untracked-files=*)\n\t\t__gitcomp \"$__git_untracked_file_modes\" \"\" \"${cur##--untracked-files=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin commit\n\t\treturn\n\tesac\n\n\tif __git rev-parse --verify --quiet HEAD >/dev/null; then\n\t\t__git_complete_index_file \"--committable\"\n\telse\n\t\t# This is the first commit\n\t\t__git_complete_index_file \"--cached\"\n\tfi\n}\n\n_git_describe ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin describe\n\t\treturn\n\tesac\n\t__git_complete_refs\n}\n\n__git_diff_algorithms=\"myers minimal patience histogram\"\n\n__git_diff_submodule_formats=\"diff log short\"\n\n__git_color_moved_opts=\"no default plain blocks zebra dimmed-zebra\"\n\n__git_color_moved_ws_opts=\"no ignore-space-at-eol ignore-space-change\n\t\t\tignore-all-space allow-indentation-change\"\n\n__git_diff_common_options=\"--stat --numstat --shortstat --summary\n\t\t\t--patch-with-stat --name-only --name-status --color\n\t\t\t--no-color --color-words --no-renames --check\n\t\t\t--color-moved --color-moved= --no-color-moved\n\t\t\t--color-moved-ws= --no-color-moved-ws\n\t\t\t--full-index --binary --abbrev --diff-filter=\n\t\t\t--find-copies-harder --ignore-cr-at-eol\n\t\t\t--text --ignore-space-at-eol --ignore-space-change\n\t\t\t--ignore-all-space --ignore-blank-lines --exit-code\n\t\t\t--quiet --ext-diff --no-ext-diff\n\t\t\t--no-prefix --src-prefix= --dst-prefix=\n\t\t\t--inter-hunk-context=\n\t\t\t--patience --histogram --minimal\n\t\t\t--raw --word-diff --word-diff-regex=\n\t\t\t--dirstat --dirstat= --dirstat-by-file\n\t\t\t--dirstat-by-file= --cumulative\n\t\t\t--diff-algorithm=\n\t\t\t--submodule --submodule= --ignore-submodules\n\t\t\t--indent-heuristic --no-indent-heuristic\n\t\t\t--textconv --no-textconv\n\t\t\t--patch --no-patch\n\t\t\t--anchored=\n\"\n\n__git_diff_difftool_options=\"--cached --staged --pickaxe-all --pickaxe-regex\n\t\t\t--base --ours --theirs --no-index --relative --merge-base\n\t\t\t$__git_diff_common_options\"\n\n_git_diff ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--diff-algorithm=*)\n\t\t__gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n\t\treturn\n\t\t;;\n\t--submodule=*)\n\t\t__gitcomp \"$__git_diff_submodule_formats\" \"\" \"${cur##--submodule=}\"\n\t\treturn\n\t\t;;\n\t--color-moved=*)\n\t\t__gitcomp \"$__git_color_moved_opts\" \"\" \"${cur##--color-moved=}\"\n\t\treturn\n\t\t;;\n\t--color-moved-ws=*)\n\t\t__gitcomp \"$__git_color_moved_ws_opts\" \"\" \"${cur##--color-moved-ws=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp \"$__git_diff_difftool_options\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist_file\n}\n\n__git_mergetools_common=\"diffuse diffmerge ecmerge emerge kdiff3 meld opendiff\n\t\t\ttkdiff vimdiff nvimdiff gvimdiff xxdiff araxis p4merge\n\t\t\tbc codecompare smerge\n\"\n\n_git_difftool ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--tool=*)\n\t\t__gitcomp \"$__git_mergetools_common kompare\" \"\" \"${cur##--tool=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin difftool \"$__git_diff_difftool_options\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist_file\n}\n\n__git_fetch_recurse_submodules=\"yes on-demand no\"\n\n_git_fetch ()\n{\n\tcase \"$cur\" in\n\t--recurse-submodules=*)\n\t\t__gitcomp \"$__git_fetch_recurse_submodules\" \"\" \"${cur##--recurse-submodules=}\"\n\t\treturn\n\t\t;;\n\t--filter=*)\n\t\t__gitcomp \"blob:none blob:limit= sparse:oid=\" \"\" \"${cur##--filter=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin fetch\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_remote_or_refspec\n}\n\n__git_format_patch_extra_options=\"\n\t--full-index --not --all --no-prefix --src-prefix=\n\t--dst-prefix= --notes\n\"\n\n_git_format_patch ()\n{\n\tcase \"$cur\" in\n\t--thread=*)\n\t\t__gitcomp \"\n\t\t\tdeep shallow\n\t\t\t\" \"\" \"${cur##--thread=}\"\n\t\treturn\n\t\t;;\n\t--base=*|--interdiff=*|--range-diff=*)\n\t\t__git_complete_refs --cur=\"${cur#--*=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin format-patch \"$__git_format_patch_extra_options\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n_git_fsck ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin fsck\n\t\treturn\n\t\t;;\n\tesac\n}\n\n_git_gitk ()\n{\n\t__gitk_main\n}\n\n# Lists matching symbol names from a tag (as in ctags) file.\n# 1: List symbol names matching this word.\n# 2: The tag file to list symbol names from.\n# 3: A prefix to be added to each listed symbol name (optional).\n# 4: A suffix to be appended to each listed symbol name (optional).\nfunction __git_match_ctag {\n\tawk -v pfx=\"${3-}\" -v sfx=\"${4-}\" \"\n\t\t/^${1//\\//\\\\/}/ { print pfx \\$1 sfx }\n\t\t\" \"$2\"\n}\n\n# Complete symbol names from a tag file.\n# Usage: __git_complete_symbol [<option>]...\n# --tags=<file>: The tag file to list symbol names from instead of the\n#                default \"tags\".\n# --pfx=<prefix>: A prefix to be added to each symbol name.\n# --cur=<word>: The current symbol name to be completed.  Defaults to\n#               the current word to be completed.\n# --sfx=<suffix>: A suffix to be appended to each symbol name instead\n#                 of the default space.\nfunction __git_complete_symbol {\n\tlocal tags=tags pfx=\"\" cur_=\"${cur-}\" sfx=\" \"\n\n\twhile test $# != 0; do\n\t\tcase \"$1\" in\n\t\t--tags=*)\ttags=\"${1##--tags=}\" ;;\n\t\t--pfx=*)\tpfx=\"${1##--pfx=}\" ;;\n\t\t--cur=*)\tcur_=\"${1##--cur=}\" ;;\n\t\t--sfx=*)\tsfx=\"${1##--sfx=}\" ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\n\tif test -r \"$tags\"; then\n\t\t__gitcomp_direct \"$(__git_match_ctag \"$cur_\" \"$tags\" \"$pfx\" \"$sfx\")\"\n\tfi\n}\n\n_git_grep ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin grep\n\t\treturn\n\t\t;;\n\tesac\n\n\tcase \"$cword,$prev\" in\n\t$((__git_cmd_idx+1)),*|*,-*)\n\t\t__git_complete_symbol && return\n\t\t;;\n\tesac\n\n\t__git_complete_refs\n}\n\n_git_help ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin help\n\t\treturn\n\t\t;;\n\tesac\n\tif test -n \"${GIT_TESTING_ALL_COMMAND_LIST-}\"\n\tthen\n\t\t__gitcomp \"$GIT_TESTING_ALL_COMMAND_LIST $(__git --list-cmds=alias,list-guide) gitk\"\n\telse\n\t\t__gitcomp \"$(__git --list-cmds=main,nohelpers,alias,list-guide) gitk\"\n\tfi\n}\n\n_git_init ()\n{\n\tcase \"$cur\" in\n\t--shared=*)\n\t\t__gitcomp \"\n\t\t\tfalse true umask group all world everybody\n\t\t\t\" \"\" \"${cur##--shared=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin init\n\t\treturn\n\t\t;;\n\tesac\n}\n\n_git_ls_files ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin ls-files\n\t\treturn\n\t\t;;\n\tesac\n\n\t# XXX ignore options like --modified and always suggest all cached\n\t# files.\n\t__git_complete_index_file \"--cached\"\n}\n\n_git_ls_remote ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin ls-remote\n\t\treturn\n\t\t;;\n\tesac\n\t__gitcomp_nl \"$(__git_remotes)\"\n}\n\n_git_ls_tree ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin ls-tree\n\t\treturn\n\t\t;;\n\tesac\n\n\t__git_complete_file\n}\n\n# Options that go well for log, shortlog and gitk\n__git_log_common_options=\"\n\t--not --all\n\t--branches --tags --remotes\n\t--first-parent --merges --no-merges\n\t--max-count=\n\t--max-age= --since= --after=\n\t--min-age= --until= --before=\n\t--min-parents= --max-parents=\n\t--no-min-parents --no-max-parents\n\"\n# Options that go well for log and gitk (not shortlog)\n__git_log_gitk_options=\"\n\t--dense --sparse --full-history\n\t--simplify-merges --simplify-by-decoration\n\t--left-right --notes --no-notes\n\"\n# Options that go well for log and shortlog (not gitk)\n__git_log_shortlog_options=\"\n\t--author= --committer= --grep=\n\t--all-match --invert-grep\n\"\n\n__git_log_pretty_formats=\"oneline short medium full fuller reference email raw format: tformat: mboxrd\"\n__git_log_date_formats=\"relative iso8601 iso8601-strict rfc2822 short local default raw unix format:\"\n\n_git_log ()\n{\n\t__git_has_doubledash && return\n\t__git_find_repo_path\n\n\tlocal merge=\"\"\n\tif [ -f \"$__git_repo_path/MERGE_HEAD\" ]; then\n\t\tmerge=\"--merge\"\n\tfi\n\tcase \"$prev,$cur\" in\n\t-L,:*:*)\n\t\treturn\t# fall back to Bash filename completion\n\t\t;;\n\t-L,:*)\n\t\t__git_complete_symbol --cur=\"${cur#:}\" --sfx=\":\"\n\t\treturn\n\t\t;;\n\t-G,*|-S,*)\n\t\t__git_complete_symbol\n\t\treturn\n\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t--pretty=*|--format=*)\n\t\t__gitcomp \"$__git_log_pretty_formats $(__git_pretty_aliases)\n\t\t\t\" \"\" \"${cur#*=}\"\n\t\treturn\n\t\t;;\n\t--date=*)\n\t\t__gitcomp \"$__git_log_date_formats\" \"\" \"${cur##--date=}\"\n\t\treturn\n\t\t;;\n\t--decorate=*)\n\t\t__gitcomp \"full short no\" \"\" \"${cur##--decorate=}\"\n\t\treturn\n\t\t;;\n\t--diff-algorithm=*)\n\t\t__gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n\t\treturn\n\t\t;;\n\t--submodule=*)\n\t\t__gitcomp \"$__git_diff_submodule_formats\" \"\" \"${cur##--submodule=}\"\n\t\treturn\n\t\t;;\n\t--no-walk=*)\n\t\t__gitcomp \"sorted unsorted\" \"\" \"${cur##--no-walk=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp \"\n\t\t\t$__git_log_common_options\n\t\t\t$__git_log_shortlog_options\n\t\t\t$__git_log_gitk_options\n\t\t\t--root --topo-order --date-order --reverse\n\t\t\t--follow --full-diff\n\t\t\t--abbrev-commit --no-abbrev-commit --abbrev=\n\t\t\t--relative-date --date=\n\t\t\t--pretty= --format= --oneline\n\t\t\t--show-signature\n\t\t\t--cherry-mark\n\t\t\t--cherry-pick\n\t\t\t--graph\n\t\t\t--decorate --decorate= --no-decorate\n\t\t\t--walk-reflogs\n\t\t\t--no-walk --no-walk= --do-walk\n\t\t\t--parents --children\n\t\t\t--expand-tabs --expand-tabs= --no-expand-tabs\n\t\t\t$merge\n\t\t\t$__git_diff_common_options\n\t\t\t--pickaxe-all --pickaxe-regex\n\t\t\t\"\n\t\treturn\n\t\t;;\n\t-L:*:*)\n\t\treturn\t# fall back to Bash filename completion\n\t\t;;\n\t-L:*)\n\t\t__git_complete_symbol --cur=\"${cur#-L:}\" --sfx=\":\"\n\t\treturn\n\t\t;;\n\t-G*)\n\t\t__git_complete_symbol --pfx=\"-G\" --cur=\"${cur#-G}\"\n\t\treturn\n\t\t;;\n\t-S*)\n\t\t__git_complete_symbol --pfx=\"-S\" --cur=\"${cur#-S}\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n_git_merge ()\n{\n\t__git_complete_strategy && return\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin merge\n\t\treturn\n\tesac\n\t__git_complete_refs\n}\n\n_git_mergetool ()\n{\n\tcase \"$cur\" in\n\t--tool=*)\n\t\t__gitcomp \"$__git_mergetools_common tortoisemerge\" \"\" \"${cur##--tool=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp \"--tool= --prompt --no-prompt --gui --no-gui\"\n\t\treturn\n\t\t;;\n\tesac\n}\n\n_git_merge_base ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin merge-base\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_refs\n}\n\n_git_mv ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin mv\n\t\treturn\n\t\t;;\n\tesac\n\n\tif [ $(__git_count_arguments \"mv\") -gt 0 ]; then\n\t\t# We need to show both cached and untracked files (including\n\t\t# empty directories) since this may not be the last argument.\n\t\t__git_complete_index_file \"--cached --others --directory\"\n\telse\n\t\t__git_complete_index_file \"--cached\"\n\tfi\n}\n\n_git_notes ()\n{\n\tlocal subcommands='add append copy edit get-ref list merge prune remove show'\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n\tcase \"$subcommand,$cur\" in\n\t,--*)\n\t\t__gitcomp_builtin notes\n\t\t;;\n\t,*)\n\t\tcase \"$prev\" in\n\t\t--ref)\n\t\t\t__git_complete_refs\n\t\t\t;;\n\t\t*)\n\t\t\t__gitcomp \"$subcommands --ref\"\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t*,--reuse-message=*|*,--reedit-message=*)\n\t\t__git_complete_refs --cur=\"${cur#*=}\"\n\t\t;;\n\t*,--*)\n\t\t__gitcomp_builtin notes_$subcommand\n\t\t;;\n\tprune,*|get-ref,*)\n\t\t# this command does not take a ref, do not complete it\n\t\t;;\n\t*)\n\t\tcase \"$prev\" in\n\t\t-m|-F)\n\t\t\t;;\n\t\t*)\n\t\t\t__git_complete_refs\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tesac\n}\n\n_git_pull ()\n{\n\t__git_complete_strategy && return\n\n\tcase \"$cur\" in\n\t--recurse-submodules=*)\n\t\t__gitcomp \"$__git_fetch_recurse_submodules\" \"\" \"${cur##--recurse-submodules=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin pull\n\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_remote_or_refspec\n}\n\n__git_push_recurse_submodules=\"check on-demand only\"\n\n__git_complete_force_with_lease ()\n{\n\tlocal cur_=$1\n\n\tcase \"$cur_\" in\n\t--*=)\n\t\t;;\n\t*:*)\n\t\t__git_complete_refs --cur=\"${cur_#*:}\"\n\t\t;;\n\t*)\n\t\t__git_complete_refs --cur=\"$cur_\"\n\t\t;;\n\tesac\n}\n\n_git_push ()\n{\n\tcase \"$prev\" in\n\t--repo)\n\t\t__gitcomp_nl \"$(__git_remotes)\"\n\t\treturn\n\t\t;;\n\t--recurse-submodules)\n\t\t__gitcomp \"$__git_push_recurse_submodules\"\n\t\treturn\n\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t--repo=*)\n\t\t__gitcomp_nl \"$(__git_remotes)\" \"\" \"${cur##--repo=}\"\n\t\treturn\n\t\t;;\n\t--recurse-submodules=*)\n\t\t__gitcomp \"$__git_push_recurse_submodules\" \"\" \"${cur##--recurse-submodules=}\"\n\t\treturn\n\t\t;;\n\t--force-with-lease=*)\n\t\t__git_complete_force_with_lease \"${cur##--force-with-lease=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin push\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_remote_or_refspec\n}\n\n_git_range_diff ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp \"\n\t\t\t--creation-factor= --no-dual-color\n\t\t\t$__git_diff_common_options\n\t\t\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n__git_rebase_inprogress_options=\"--continue --skip --abort --quit --show-current-patch\"\n__git_rebase_interactive_inprogress_options=\"$__git_rebase_inprogress_options --edit-todo\"\n\n_git_rebase ()\n{\n\t__git_find_repo_path\n\tif [ -f \"$__git_repo_path\"/rebase-merge/interactive ]; then\n\t\t__gitcomp \"$__git_rebase_interactive_inprogress_options\"\n\t\treturn\n\telif [ -d \"$__git_repo_path\"/rebase-apply ] || \\\n\t     [ -d \"$__git_repo_path\"/rebase-merge ]; then\n\t\t__gitcomp \"$__git_rebase_inprogress_options\"\n\t\treturn\n\tfi\n\t__git_complete_strategy && return\n\tcase \"$cur\" in\n\t--whitespace=*)\n\t\t__gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n\t\treturn\n\t\t;;\n\t--onto=*)\n\t\t__git_complete_refs --cur=\"${cur##--onto=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin rebase \"\" \\\n\t\t\t\"$__git_rebase_interactive_inprogress_options\"\n\n\t\treturn\n\tesac\n\t__git_complete_refs\n}\n\n_git_reflog ()\n{\n\tlocal subcommands=\"show delete expire\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\telse\n\t\t__git_complete_refs\n\tfi\n}\n\n__git_send_email_confirm_options=\"always never auto cc compose\"\n__git_send_email_suppresscc_options=\"author self cc bodycc sob cccmd body all\"\n\n_git_send_email ()\n{\n\tcase \"$prev\" in\n\t--to|--cc|--bcc|--from)\n\t\t__gitcomp \"$(__git send-email --dump-aliases)\"\n\t\treturn\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--confirm=*)\n\t\t__gitcomp \"\n\t\t\t$__git_send_email_confirm_options\n\t\t\t\" \"\" \"${cur##--confirm=}\"\n\t\treturn\n\t\t;;\n\t--suppress-cc=*)\n\t\t__gitcomp \"\n\t\t\t$__git_send_email_suppresscc_options\n\t\t\t\" \"\" \"${cur##--suppress-cc=}\"\n\n\t\treturn\n\t\t;;\n\t--smtp-encryption=*)\n\t\t__gitcomp \"ssl tls\" \"\" \"${cur##--smtp-encryption=}\"\n\t\treturn\n\t\t;;\n\t--thread=*)\n\t\t__gitcomp \"\n\t\t\tdeep shallow\n\t\t\t\" \"\" \"${cur##--thread=}\"\n\t\treturn\n\t\t;;\n\t--to=*|--cc=*|--bcc=*|--from=*)\n\t\t__gitcomp \"$(__git send-email --dump-aliases)\" \"\" \"${cur#--*=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin send-email \"--annotate --bcc --cc --cc-cmd --chain-reply-to\n\t\t\t--compose --confirm= --dry-run --envelope-sender\n\t\t\t--from --identity\n\t\t\t--in-reply-to --no-chain-reply-to --no-signed-off-by-cc\n\t\t\t--no-suppress-from --no-thread --quiet --reply-to\n\t\t\t--signed-off-by-cc --smtp-pass --smtp-server\n\t\t\t--smtp-server-port --smtp-encryption= --smtp-user\n\t\t\t--subject --suppress-cc= --suppress-from --thread --to\n\t\t\t--validate --no-validate\n\t\t\t$__git_format_patch_extra_options\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n_git_stage ()\n{\n\t_git_add\n}\n\n_git_status ()\n{\n\tlocal complete_opt\n\tlocal untracked_state\n\n\tcase \"$cur\" in\n\t--ignore-submodules=*)\n\t\t__gitcomp \"none untracked dirty all\" \"\" \"${cur##--ignore-submodules=}\"\n\t\treturn\n\t\t;;\n\t--untracked-files=*)\n\t\t__gitcomp \"$__git_untracked_file_modes\" \"\" \"${cur##--untracked-files=}\"\n\t\treturn\n\t\t;;\n\t--column=*)\n\t\t__gitcomp \"\n\t\t\talways never auto column row plain dense nodense\n\t\t\t\" \"\" \"${cur##--column=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin status\n\t\treturn\n\t\t;;\n\tesac\n\n\tuntracked_state=\"$(__git_get_option_value \"-u\" \"--untracked-files=\" \\\n\t\t\"$__git_untracked_file_modes\" \"status.showUntrackedFiles\")\"\n\n\tcase \"$untracked_state\" in\n\tno)\n\t\t# --ignored option does not matter\n\t\tcomplete_opt=\n\t\t;;\n\tall|normal|*)\n\t\tcomplete_opt=\"--cached --directory --no-empty-directory --others\"\n\n\t\tif [ -n \"$(__git_find_on_cmdline \"--ignored\")\" ]; then\n\t\t\tcomplete_opt=\"$complete_opt --ignored --exclude=*\"\n\t\tfi\n\t\t;;\n\tesac\n\n\t__git_complete_index_file \"$complete_opt\"\n}\n\n_git_switch ()\n{\n\tlocal dwim_opt=\"$(__git_checkout_default_dwim_mode)\"\n\n\tcase \"$prev\" in\n\t-c|-C|--orphan)\n\t\t# Complete local branches (and DWIM branch\n\t\t# remote branch names) for an option argument\n\t\t# specifying a new branch name. This is for\n\t\t# convenience, assuming new branches are\n\t\t# possibly based on pre-existing branch names.\n\t\t__git_complete_refs $dwim_opt --mode=\"heads\"\n\t\treturn\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--conflict=*)\n\t\t__gitcomp \"diff3 merge\" \"\" \"${cur##--conflict=}\"\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin switch\n\t\t;;\n\t*)\n\t\t# Unlike in git checkout, git switch --orphan does not take\n\t\t# a start point. Thus we really have nothing to complete after\n\t\t# the branch name.\n\t\tif [ -n \"$(__git_find_on_cmdline \"--orphan\")\" ]; then\n\t\t\treturn\n\t\tfi\n\n\t\t# At this point, we've already handled special completion for\n\t\t# -c/-C, and --orphan. There are 3 main things left to\n\t\t# complete:\n\t\t# 1) a start-point for -c/-C or -d/--detach\n\t\t# 2) a remote head, for --track\n\t\t# 3) a branch name, possibly including DWIM remote branches\n\n\t\tif [ -n \"$(__git_find_on_cmdline \"-c -C -d --detach\")\" ]; then\n\t\t\t__git_complete_refs --mode=\"refs\"\n\t\telif [ -n \"$(__git_find_on_cmdline \"--track\")\" ]; then\n\t\t\t__git_complete_refs --mode=\"remote-heads\"\n\t\telse\n\t\t\t__git_complete_refs $dwim_opt --mode=\"heads\"\n\t\tfi\n\t\t;;\n\tesac\n}\n\n__git_config_get_set_variables ()\n{\n\tlocal prevword word config_file= c=$cword\n\twhile [ $c -gt \"$__git_cmd_idx\" ]; do\n\t\tword=\"${words[c]}\"\n\t\tcase \"$word\" in\n\t\t--system|--global|--local|--file=*)\n\t\t\tconfig_file=\"$word\"\n\t\t\tbreak\n\t\t\t;;\n\t\t-f|--file)\n\t\t\tconfig_file=\"$word $prevword\"\n\t\t\tbreak\n\t\t\t;;\n\t\tesac\n\t\tprevword=$word\n\t\tc=$((--c))\n\tdone\n\n\t__git config $config_file --name-only --list\n}\n\n__git_config_vars=\n__git_compute_config_vars ()\n{\n\ttest -n \"$__git_config_vars\" ||\n\t__git_config_vars=\"$(git help --config-for-completion)\"\n}\n\n__git_config_sections=\n__git_compute_config_sections ()\n{\n\ttest -n \"$__git_config_sections\" ||\n\t__git_config_sections=\"$(git help --config-sections-for-completion)\"\n}\n\n# Completes possible values of various configuration variables.\n#\n# Usage: __git_complete_config_variable_value [<option>]...\n# --varname=<word>: The name of the configuration variable whose value is\n#                   to be completed.  Defaults to the previous word on the\n#                   command line.\n# --cur=<word>: The current value to be completed.  Defaults to the current\n#               word to be completed.\n__git_complete_config_variable_value ()\n{\n\tlocal varname=\"$prev\" cur_=\"$cur\"\n\n\twhile test $# != 0; do\n\t\tcase \"$1\" in\n\t\t--varname=*)\tvarname=\"${1##--varname=}\" ;;\n\t\t--cur=*)\tcur_=\"${1##--cur=}\" ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\n\tif [ \"${BASH_VERSINFO[0]:-0}\" -ge 4 ]; then\n\t\tvarname=\"${varname,,}\"\n\telse\n\t\tvarname=\"$(echo \"$varname\" |tr A-Z a-z)\"\n\tfi\n\n\tcase \"$varname\" in\n\tbranch.*.remote|branch.*.pushremote)\n\t\t__gitcomp_nl \"$(__git_remotes)\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tbranch.*.merge)\n\t\t__git_complete_refs --cur=\"$cur_\"\n\t\treturn\n\t\t;;\n\tbranch.*.rebase)\n\t\t__gitcomp \"false true merges interactive\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tremote.pushdefault)\n\t\t__gitcomp_nl \"$(__git_remotes)\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tremote.*.fetch)\n\t\tlocal remote=\"${varname#remote.}\"\n\t\tremote=\"${remote%.fetch}\"\n\t\tif [ -z \"$cur_\" ]; then\n\t\t\t__gitcomp_nl \"refs/heads/\" \"\" \"\" \"\"\n\t\t\treturn\n\t\tfi\n\t\t__gitcomp_nl \"$(__git_refs_remotes \"$remote\")\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tremote.*.push)\n\t\tlocal remote=\"${varname#remote.}\"\n\t\tremote=\"${remote%.push}\"\n\t\t__gitcomp_nl \"$(__git for-each-ref \\\n\t\t\t--format='%(refname):%(refname)' refs/heads)\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tpull.twohead|pull.octopus)\n\t\t__git_compute_merge_strategies\n\t\t__gitcomp \"$__git_merge_strategies\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tcolor.pager)\n\t\t__gitcomp \"false true\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tcolor.*.*)\n\t\t__gitcomp \"\n\t\t\tnormal black red green yellow blue magenta cyan white\n\t\t\tbold dim ul blink reverse\n\t\t\t\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tcolor.*)\n\t\t__gitcomp \"false true always never auto\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tdiff.submodule)\n\t\t__gitcomp \"$__git_diff_submodule_formats\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\thelp.format)\n\t\t__gitcomp \"man info web html\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tlog.date)\n\t\t__gitcomp \"$__git_log_date_formats\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tsendemail.aliasfiletype)\n\t\t__gitcomp \"mutt mailrc pine elm gnus\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tsendemail.confirm)\n\t\t__gitcomp \"$__git_send_email_confirm_options\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tsendemail.suppresscc)\n\t\t__gitcomp \"$__git_send_email_suppresscc_options\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\tsendemail.transferencoding)\n\t\t__gitcomp \"7bit 8bit quoted-printable base64\" \"\" \"$cur_\"\n\t\treturn\n\t\t;;\n\t*.*)\n\t\treturn\n\t\t;;\n\tesac\n}\n\n# Completes configuration sections, subsections, variable names.\n#\n# Usage: __git_complete_config_variable_name [<option>]...\n# --cur=<word>: The current configuration section/variable name to be\n#               completed.  Defaults to the current word to be completed.\n# --sfx=<suffix>: A suffix to be appended to each fully completed\n#                 configuration variable name (but not to sections or\n#                 subsections) instead of the default space.\n__git_complete_config_variable_name ()\n{\n\tlocal cur_=\"$cur\" sfx\n\n\twhile test $# != 0; do\n\t\tcase \"$1\" in\n\t\t--cur=*)\tcur_=\"${1##--cur=}\" ;;\n\t\t--sfx=*)\tsfx=\"${1##--sfx=}\" ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\n\tcase \"$cur_\" in\n\tbranch.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"remote pushRemote merge mergeOptions rebase\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tbranch.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_#*.}\"\n\t\t__gitcomp_direct \"$(__git_heads \"$pfx\" \"$cur_\" \".\")\"\n\t\t__gitcomp_nl_append $'autoSetupMerge\\nautoSetupRebase\\n' \"$pfx\" \"$cur_\" \"${sfx- }\"\n\t\treturn\n\t\t;;\n\tguitool.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"\n\t\t\targPrompt cmd confirm needsFile noConsole noRescan\n\t\t\tprompt revPrompt revUnmerged title\n\t\t\t\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tdifftool.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"cmd path\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tman.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"cmd path\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tmergetool.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"cmd path trustExitCode\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tpager.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_#*.}\"\n\t\t__git_compute_all_commands\n\t\t__gitcomp_nl \"$__git_all_commands\" \"$pfx\" \"$cur_\" \"${sfx- }\"\n\t\treturn\n\t\t;;\n\tremote.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"\n\t\t\turl proxy fetch push mirror skipDefaultUpdate\n\t\t\treceivepack uploadpack tagOpt pushurl\n\t\t\t\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\tremote.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_#*.}\"\n\t\t__gitcomp_nl \"$(__git_remotes)\" \"$pfx\" \"$cur_\" \".\"\n\t\t__gitcomp_nl_append \"pushDefault\" \"$pfx\" \"$cur_\" \"${sfx- }\"\n\t\treturn\n\t\t;;\n\turl.*.*)\n\t\tlocal pfx=\"${cur_%.*}.\"\n\t\tcur_=\"${cur_##*.}\"\n\t\t__gitcomp \"insteadOf pushInsteadOf\" \"$pfx\" \"$cur_\" \"$sfx\"\n\t\treturn\n\t\t;;\n\t*.*)\n\t\t__git_compute_config_vars\n\t\t__gitcomp \"$__git_config_vars\" \"\" \"$cur_\" \"$sfx\"\n\t\t;;\n\t*)\n\t\t__git_compute_config_sections\n\t\t__gitcomp \"$__git_config_sections\" \"\" \"$cur_\" \".\"\n\t\t;;\n\tesac\n}\n\n# Completes '='-separated configuration sections/variable names and values\n# for 'git -c section.name=value'.\n#\n# Usage: __git_complete_config_variable_name_and_value [<option>]...\n# --cur=<word>: The current configuration section/variable name/value to be\n#               completed. Defaults to the current word to be completed.\n__git_complete_config_variable_name_and_value ()\n{\n\tlocal cur_=\"$cur\"\n\n\twhile test $# != 0; do\n\t\tcase \"$1\" in\n\t\t--cur=*)\tcur_=\"${1##--cur=}\" ;;\n\t\t*)\t\treturn 1 ;;\n\t\tesac\n\t\tshift\n\tdone\n\n\tcase \"$cur_\" in\n\t*=*)\n\t\t__git_complete_config_variable_value \\\n\t\t\t--varname=\"${cur_%%=*}\" --cur=\"${cur_#*=}\"\n\t\t;;\n\t*)\n\t\t__git_complete_config_variable_name --cur=\"$cur_\" --sfx='='\n\t\t;;\n\tesac\n}\n\n_git_config ()\n{\n\tcase \"$prev\" in\n\t--get|--get-all|--unset|--unset-all)\n\t\t__gitcomp_nl \"$(__git_config_get_set_variables)\"\n\t\treturn\n\t\t;;\n\t*.*)\n\t\t__git_complete_config_variable_value\n\t\treturn\n\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin config\n\t\t;;\n\t*)\n\t\t__git_complete_config_variable_name\n\t\t;;\n\tesac\n}\n\n_git_remote ()\n{\n\tlocal subcommands=\"\n\t\tadd rename remove set-head set-branches\n\t\tget-url set-url show prune update\n\t\t\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\tcase \"$cur\" in\n\t\t--*)\n\t\t\t__gitcomp_builtin remote\n\t\t\t;;\n\t\t*)\n\t\t\t__gitcomp \"$subcommands\"\n\t\t\t;;\n\t\tesac\n\t\treturn\n\tfi\n\n\tcase \"$subcommand,$cur\" in\n\tadd,--*)\n\t\t__gitcomp_builtin remote_add\n\t\t;;\n\tadd,*)\n\t\t;;\n\tset-head,--*)\n\t\t__gitcomp_builtin remote_set-head\n\t\t;;\n\tset-branches,--*)\n\t\t__gitcomp_builtin remote_set-branches\n\t\t;;\n\tset-head,*|set-branches,*)\n\t\t__git_complete_remote_or_refspec\n\t\t;;\n\tupdate,--*)\n\t\t__gitcomp_builtin remote_update\n\t\t;;\n\tupdate,*)\n\t\t__gitcomp \"$(__git_remotes) $(__git_get_config_variables \"remotes\")\"\n\t\t;;\n\tset-url,--*)\n\t\t__gitcomp_builtin remote_set-url\n\t\t;;\n\tget-url,--*)\n\t\t__gitcomp_builtin remote_get-url\n\t\t;;\n\tprune,--*)\n\t\t__gitcomp_builtin remote_prune\n\t\t;;\n\t*)\n\t\t__gitcomp_nl \"$(__git_remotes)\"\n\t\t;;\n\tesac\n}\n\n_git_replace ()\n{\n\tcase \"$cur\" in\n\t--format=*)\n\t\t__gitcomp \"short medium long\" \"\" \"${cur##--format=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin replace\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_refs\n}\n\n_git_rerere ()\n{\n\tlocal subcommands=\"clear forget diff remaining status gc\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif test -z \"$subcommand\"\n\tthen\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n}\n\n_git_reset ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin reset\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_refs\n}\n\n_git_restore ()\n{\n\tcase \"$prev\" in\n\t-s)\n\t\t__git_complete_refs\n\t\treturn\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--conflict=*)\n\t\t__gitcomp \"diff3 merge\" \"\" \"${cur##--conflict=}\"\n\t\t;;\n\t--source=*)\n\t\t__git_complete_refs --cur=\"${cur##--source=}\"\n\t\t;;\n\t--*)\n\t\t__gitcomp_builtin restore\n\t\t;;\n\tesac\n}\n\n__git_revert_inprogress_options=$__git_sequencer_inprogress_options\n\n_git_revert ()\n{\n\t__git_find_repo_path\n\tif [ -f \"$__git_repo_path\"/REVERT_HEAD ]; then\n\t\t__gitcomp \"$__git_revert_inprogress_options\"\n\t\treturn\n\tfi\n\t__git_complete_strategy && return\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin revert \"\" \\\n\t\t\t\"$__git_revert_inprogress_options\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_refs\n}\n\n_git_rm ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin rm\n\t\treturn\n\t\t;;\n\tesac\n\n\t__git_complete_index_file \"--cached\"\n}\n\n_git_shortlog ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp \"\n\t\t\t$__git_log_common_options\n\t\t\t$__git_log_shortlog_options\n\t\t\t--numbered --summary --email\n\t\t\t\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n_git_show ()\n{\n\t__git_has_doubledash && return\n\n\tcase \"$cur\" in\n\t--pretty=*|--format=*)\n\t\t__gitcomp \"$__git_log_pretty_formats $(__git_pretty_aliases)\n\t\t\t\" \"\" \"${cur#*=}\"\n\t\treturn\n\t\t;;\n\t--diff-algorithm=*)\n\t\t__gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n\t\treturn\n\t\t;;\n\t--submodule=*)\n\t\t__gitcomp \"$__git_diff_submodule_formats\" \"\" \"${cur##--submodule=}\"\n\t\treturn\n\t\t;;\n\t--color-moved=*)\n\t\t__gitcomp \"$__git_color_moved_opts\" \"\" \"${cur##--color-moved=}\"\n\t\treturn\n\t\t;;\n\t--color-moved-ws=*)\n\t\t__gitcomp \"$__git_color_moved_ws_opts\" \"\" \"${cur##--color-moved-ws=}\"\n\t\treturn\n\t\t;;\n\t--*)\n\t\t__gitcomp \"--pretty= --format= --abbrev-commit --no-abbrev-commit\n\t\t\t--oneline --show-signature\n\t\t\t--expand-tabs --expand-tabs= --no-expand-tabs\n\t\t\t$__git_diff_common_options\n\t\t\t\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist_file\n}\n\n_git_show_branch ()\n{\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin show-branch\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\n_git_sparse_checkout ()\n{\n\tlocal subcommands=\"list init set disable\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand,$cur\" in\n\tinit,--*)\n\t\t__gitcomp \"--cone\"\n\t\t;;\n\tset,--*)\n\t\t__gitcomp \"--stdin\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n}\n\n_git_stash ()\n{\n\tlocal subcommands='push list show apply clear drop pop create branch'\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands save\")\"\n\n\tif [ -z \"$subcommand\" ]; then\n\t\tcase \"$((cword - __git_cmd_idx)),$cur\" in\n\t\t*,--*)\n\t\t\t__gitcomp_builtin stash_push\n\t\t\t;;\n\t\t1,sa*)\n\t\t\t__gitcomp \"save\"\n\t\t\t;;\n\t\t1,*)\n\t\t\t__gitcomp \"$subcommands\"\n\t\t\t;;\n\t\tesac\n\t\treturn\n\tfi\n\n\tcase \"$subcommand,$cur\" in\n\tlist,--*)\n\t\t# NEEDSWORK: can we somehow unify this with the options in _git_log() and _git_show()\n\t\t__gitcomp_builtin stash_list \"$__git_log_common_options $__git_diff_common_options\"\n\t\t;;\n\tshow,--*)\n\t\t__gitcomp_builtin stash_show \"$__git_diff_common_options\"\n\t\t;;\n\t*,--*)\n\t\t__gitcomp_builtin \"stash_$subcommand\"\n\t\t;;\n\tbranch,*)\n\t\tif [ $cword -eq $((__git_cmd_idx+2)) ]; then\n\t\t\t__git_complete_refs\n\t\telse\n\t\t\t__gitcomp_nl \"$(__git stash list \\\n\t\t\t\t\t| sed -n -e 's/:.*//p')\"\n\t\tfi\n\t\t;;\n\tshow,*|apply,*|drop,*|pop,*)\n\t\t__gitcomp_nl \"$(__git stash list \\\n\t\t\t\t| sed -n -e 's/:.*//p')\"\n\t\t;;\n\tesac\n}\n\n_git_submodule ()\n{\n\t__git_has_doubledash && return\n\n\tlocal subcommands=\"add status init deinit update set-branch set-url summary foreach sync absorbgitdirs\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\tcase \"$cur\" in\n\t\t--*)\n\t\t\t__gitcomp \"--quiet\"\n\t\t\t;;\n\t\t*)\n\t\t\t__gitcomp \"$subcommands\"\n\t\t\t;;\n\t\tesac\n\t\treturn\n\tfi\n\n\tcase \"$subcommand,$cur\" in\n\tadd,--*)\n\t\t__gitcomp \"--branch --force --name --reference --depth\"\n\t\t;;\n\tstatus,--*)\n\t\t__gitcomp \"--cached --recursive\"\n\t\t;;\n\tdeinit,--*)\n\t\t__gitcomp \"--force --all\"\n\t\t;;\n\tupdate,--*)\n\t\t__gitcomp \"\n\t\t\t--init --remote --no-fetch\n\t\t\t--recommend-shallow --no-recommend-shallow\n\t\t\t--force --rebase --merge --reference --depth --recursive --jobs\n\t\t\"\n\t\t;;\n\tset-branch,--*)\n\t\t__gitcomp \"--default --branch\"\n\t\t;;\n\tsummary,--*)\n\t\t__gitcomp \"--cached --files --summary-limit\"\n\t\t;;\n\tforeach,--*|sync,--*)\n\t\t__gitcomp \"--recursive\"\n\t\t;;\n\t*)\n\t\t;;\n\tesac\n}\n\n_git_svn ()\n{\n\tlocal subcommands=\"\n\t\tinit fetch clone rebase dcommit log find-rev\n\t\tset-tree commit-diff info create-ignore propget\n\t\tproplist show-ignore show-externals branch tag blame\n\t\tmigrate mkdirs reset gc\n\t\t\"\n\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\telse\n\t\tlocal remote_opts=\"--username= --config-dir= --no-auth-cache\"\n\t\tlocal fc_opts=\"\n\t\t\t--follow-parent --authors-file= --repack=\n\t\t\t--no-metadata --use-svm-props --use-svnsync-props\n\t\t\t--log-window-size= --no-checkout --quiet\n\t\t\t--repack-flags --use-log-author --localtime\n\t\t\t--add-author-from\n\t\t\t--recursive\n\t\t\t--ignore-paths= --include-paths= $remote_opts\n\t\t\t\"\n\t\tlocal init_opts=\"\n\t\t\t--template= --shared= --trunk= --tags=\n\t\t\t--branches= --stdlayout --minimize-url\n\t\t\t--no-metadata --use-svm-props --use-svnsync-props\n\t\t\t--rewrite-root= --prefix= $remote_opts\n\t\t\t\"\n\t\tlocal cmt_opts=\"\n\t\t\t--edit --rmdir --find-copies-harder --copy-similarity=\n\t\t\t\"\n\n\t\tcase \"$subcommand,$cur\" in\n\t\tfetch,--*)\n\t\t\t__gitcomp \"--revision= --fetch-all $fc_opts\"\n\t\t\t;;\n\t\tclone,--*)\n\t\t\t__gitcomp \"--revision= $fc_opts $init_opts\"\n\t\t\t;;\n\t\tinit,--*)\n\t\t\t__gitcomp \"$init_opts\"\n\t\t\t;;\n\t\tdcommit,--*)\n\t\t\t__gitcomp \"\n\t\t\t\t--merge --strategy= --verbose --dry-run\n\t\t\t\t--fetch-all --no-rebase --commit-url\n\t\t\t\t--revision --interactive $cmt_opts $fc_opts\n\t\t\t\t\"\n\t\t\t;;\n\t\tset-tree,--*)\n\t\t\t__gitcomp \"--stdin $cmt_opts $fc_opts\"\n\t\t\t;;\n\t\tcreate-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\\\n\t\tshow-externals,--*|mkdirs,--*)\n\t\t\t__gitcomp \"--revision=\"\n\t\t\t;;\n\t\tlog,--*)\n\t\t\t__gitcomp \"\n\t\t\t\t--limit= --revision= --verbose --incremental\n\t\t\t\t--oneline --show-commit --non-recursive\n\t\t\t\t--authors-file= --color\n\t\t\t\t\"\n\t\t\t;;\n\t\trebase,--*)\n\t\t\t__gitcomp \"\n\t\t\t\t--merge --verbose --strategy= --local\n\t\t\t\t--fetch-all --dry-run $fc_opts\n\t\t\t\t\"\n\t\t\t;;\n\t\tcommit-diff,--*)\n\t\t\t__gitcomp \"--message= --file= --revision= $cmt_opts\"\n\t\t\t;;\n\t\tinfo,--*)\n\t\t\t__gitcomp \"--url\"\n\t\t\t;;\n\t\tbranch,--*)\n\t\t\t__gitcomp \"--dry-run --message --tag\"\n\t\t\t;;\n\t\ttag,--*)\n\t\t\t__gitcomp \"--dry-run --message\"\n\t\t\t;;\n\t\tblame,--*)\n\t\t\t__gitcomp \"--git-format\"\n\t\t\t;;\n\t\tmigrate,--*)\n\t\t\t__gitcomp \"\n\t\t\t\t--config-dir= --ignore-paths= --minimize\n\t\t\t\t--no-auth-cache --username=\n\t\t\t\t\"\n\t\t\t;;\n\t\treset,--*)\n\t\t\t__gitcomp \"--revision= --parent\"\n\t\t\t;;\n\t\t*)\n\t\t\t;;\n\t\tesac\n\tfi\n}\n\n_git_tag ()\n{\n\tlocal i c=\"$__git_cmd_idx\" f=0\n\twhile [ $c -lt $cword ]; do\n\t\ti=\"${words[c]}\"\n\t\tcase \"$i\" in\n\t\t-d|--delete|-v|--verify)\n\t\t\t__gitcomp_direct \"$(__git_tags \"\" \"$cur\" \" \")\"\n\t\t\treturn\n\t\t\t;;\n\t\t-f)\n\t\t\tf=1\n\t\t\t;;\n\t\tesac\n\t\t((c++))\n\tdone\n\n\tcase \"$prev\" in\n\t-m|-F)\n\t\t;;\n\t-*|tag)\n\t\tif [ $f = 1 ]; then\n\t\t\t__gitcomp_direct \"$(__git_tags \"\" \"$cur\" \" \")\"\n\t\tfi\n\t\t;;\n\t*)\n\t\t__git_complete_refs\n\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin tag\n\t\t;;\n\tesac\n}\n\n_git_whatchanged ()\n{\n\t_git_log\n}\n\n__git_complete_worktree_paths ()\n{\n\tlocal IFS=$'\\n'\n\t# Generate completion reply from worktree list skipping the first\n\t# entry: it's the path of the main worktree, which can't be moved,\n\t# removed, locked, etc.\n\t__gitcomp_nl \"$(git worktree list --porcelain |\n\t\tsed -n -e '2,$ s/^worktree //p')\"\n}\n\n_git_worktree ()\n{\n\tlocal subcommands=\"add list lock move prune remove unlock\"\n\tlocal subcommand subcommand_idx\n\n\tsubcommand=\"$(__git_find_on_cmdline --show-idx \"$subcommands\")\"\n\tsubcommand_idx=\"${subcommand% *}\"\n\tsubcommand=\"${subcommand#* }\"\n\n\tcase \"$subcommand,$cur\" in\n\t,*)\n\t\t__gitcomp \"$subcommands\"\n\t\t;;\n\t*,--*)\n\t\t__gitcomp_builtin worktree_$subcommand\n\t\t;;\n\tadd,*)\t# usage: git worktree add [<options>] <path> [<commit-ish>]\n\t\t# Here we are not completing an --option, it's either the\n\t\t# path or a ref.\n\t\tcase \"$prev\" in\n\t\t-b|-B)\t# Complete refs for branch to be created/reseted.\n\t\t\t__git_complete_refs\n\t\t\t;;\n\t\t-*)\t# The previous word is an -o|--option without an\n\t\t\t# unstuck argument: have to complete the path for\n\t\t\t# the new worktree, so don't list anything, but let\n\t\t\t# Bash fall back to filename completion.\n\t\t\t;;\n\t\t*)\t# The previous word is not an --option, so it must\n\t\t\t# be either the 'add' subcommand, the unstuck\n\t\t\t# argument of an option (e.g. branch for -b|-B), or\n\t\t\t# the path for the new worktree.\n\t\t\tif [ $cword -eq $((subcommand_idx+1)) ]; then\n\t\t\t\t# Right after the 'add' subcommand: have to\n\t\t\t\t# complete the path, so fall back to Bash\n\t\t\t\t# filename completion.\n\t\t\t\t:\n\t\t\telse\n\t\t\t\tcase \"${words[cword-2]}\" in\n\t\t\t\t-b|-B)\t# After '-b <branch>': have to\n\t\t\t\t\t# complete the path, so fall back\n\t\t\t\t\t# to Bash filename completion.\n\t\t\t\t\t;;\n\t\t\t\t*)\t# After the path: have to complete\n\t\t\t\t\t# the ref to be checked out.\n\t\t\t\t\t__git_complete_refs\n\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tfi\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tlock,*|remove,*|unlock,*)\n\t\t__git_complete_worktree_paths\n\t\t;;\n\tmove,*)\n\t\tif [ $cword -eq $((subcommand_idx+1)) ]; then\n\t\t\t# The first parameter must be an existing working\n\t\t\t# tree to be moved.\n\t\t\t__git_complete_worktree_paths\n\t\telse\n\t\t\t# The second parameter is the destination: it could\n\t\t\t# be any path, so don't list anything, but let Bash\n\t\t\t# fall back to filename completion.\n\t\t\t:\n\t\tfi\n\t\t;;\n\tesac\n}\n\nfunction __git_complete_common {\n\tlocal command=\"$1\"\n\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp_builtin \"$command\"\n\t\t;;\n\tesac\n}\n\n__git_cmds_with_parseopt_helper=\nfunction __git_support_parseopt_helper {\n\ttest -n \"$__git_cmds_with_parseopt_helper\" ||\n\t\t__git_cmds_with_parseopt_helper=\"$(__git --list-cmds=parseopt)\"\n\n\tcase \" $__git_cmds_with_parseopt_helper \" in\n\t*\" $1 \"*)\n\t\treturn 0\n\t\t;;\n\t*)\n\t\treturn 1\n\t\t;;\n\tesac\n}\n\nfunction __git_have_func {\n\tdeclare -f -- \"$1\" >/dev/null 2>&1\n}\n\nfunction __git_complete_command {\n\tlocal command=\"$1\"\n\tlocal completion_func=\"_git_${command//-/_}\"\n\tif ! __git_have_func $completion_func &&\n\t\t__git_have_func _completion_loader\n\tthen\n\t\t_completion_loader \"git-$command\"\n\tfi\n\tif __git_have_func $completion_func\n\tthen\n\t\t$completion_func\n\t\treturn 0\n\telif __git_support_parseopt_helper \"$command\"\n\tthen\n\t\t__git_complete_common \"$command\"\n\t\treturn 0\n\telse\n\t\treturn 1\n\tfi\n}\n\n__git_main ()\n{\n\tlocal i c=1 command __git_dir __git_repo_path\n\tlocal __git_C_args C_args_count=0\n\tlocal __git_cmd_idx\n\n\twhile [ $c -lt $cword ]; do\n\t\ti=\"${words[c]}\"\n\t\tcase \"$i\" in\n\t\t--git-dir=*)\n\t\t\t__git_dir=\"${i#--git-dir=}\"\n\t\t\t;;\n\t\t--git-dir)\n\t\t\t((c++))\n\t\t\t__git_dir=\"${words[c]}\"\n\t\t\t;;\n\t\t--bare)\n\t\t\t__git_dir=\".\"\n\t\t\t;;\n\t\t--help)\n\t\t\tcommand=\"help\"\n\t\t\tbreak\n\t\t\t;;\n\t\t-c|--work-tree|--namespace)\n\t\t\t((c++))\n\t\t\t;;\n\t\t-C)\n\t\t\t__git_C_args[C_args_count++]=-C\n\t\t\t((c++))\n\t\t\t__git_C_args[C_args_count++]=\"${words[c]}\"\n\t\t\t;;\n\t\t-*)\n\t\t\t;;\n\t\t*)\n\t\t\tcommand=\"$i\"\n\t\t\t__git_cmd_idx=\"$c\"\n\t\t\tbreak\n\t\t\t;;\n\t\tesac\n\t\t((c++))\n\tdone\n\n\tif [ -z \"${command-}\" ]; then\n\t\tcase \"$prev\" in\n\t\t--git-dir|-C|--work-tree)\n\t\t\t# these need a path argument, let's fall back to\n\t\t\t# Bash filename completion\n\t\t\treturn\n\t\t\t;;\n\t\t-c)\n\t\t\t__git_complete_config_variable_name_and_value\n\t\t\treturn\n\t\t\t;;\n\t\t--namespace)\n\t\t\t# we don't support completing these options' arguments\n\t\t\treturn\n\t\t\t;;\n\t\tesac\n\t\tcase \"$cur\" in\n\t\t--*)\n\t\t\t__gitcomp \"\n\t\t\t--paginate\n\t\t\t--no-pager\n\t\t\t--git-dir=\n\t\t\t--bare\n\t\t\t--version\n\t\t\t--exec-path\n\t\t\t--exec-path=\n\t\t\t--html-path\n\t\t\t--man-path\n\t\t\t--info-path\n\t\t\t--work-tree=\n\t\t\t--namespace=\n\t\t\t--no-replace-objects\n\t\t\t--help\n\t\t\t\"\n\t\t\t;;\n\t\t*)\n\t\t\tif test -n \"${GIT_TESTING_PORCELAIN_COMMAND_LIST-}\"\n\t\t\tthen\n\t\t\t\t__gitcomp \"$GIT_TESTING_PORCELAIN_COMMAND_LIST\"\n\t\t\telse\n\t\t\t\t__gitcomp \"$(__git --list-cmds=list-mainporcelain,others,nohelpers,alias,list-complete,config)\"\n\t\t\tfi\n\t\t\t;;\n\t\tesac\n\t\treturn\n\tfi\n\n\t__git_complete_command \"$command\" && return\n\n\tlocal expansion=$(__git_aliased_command \"$command\")\n\tif [ -n \"$expansion\" ]; then\n\t\twords[1]=$expansion\n\t\t__git_complete_command \"$expansion\"\n\tfi\n}\n\n__gitk_main ()\n{\n\t__git_has_doubledash && return\n\n\tlocal __git_repo_path\n\t__git_find_repo_path\n\n\tlocal merge=\"\"\n\tif [ -f \"$__git_repo_path/MERGE_HEAD\" ]; then\n\t\tmerge=\"--merge\"\n\tfi\n\tcase \"$cur\" in\n\t--*)\n\t\t__gitcomp \"\n\t\t\t$__git_log_common_options\n\t\t\t$__git_log_gitk_options\n\t\t\t$merge\n\t\t\t\"\n\t\treturn\n\t\t;;\n\tesac\n\t__git_complete_revlist\n}\n\nif [[ -n ${ZSH_VERSION-} && -z ${GIT_SOURCING_ZSH_COMPLETION-} ]]; then\n\techo \"ERROR: this script is obsolete, please see git-completion.zsh\" 1>&2\n\treturn\nfi\n\n__git_func_wrap ()\n{\n\tlocal cur words cword prev\n\tlocal __git_cmd_idx=0\n\t_get_comp_words_by_ref -n =: cur words cword prev\n\t$1\n}\n\n___git_complete ()\n{\n\tlocal wrapper=\"__git_wrap${2}\"\n\teval \"$wrapper () { __git_func_wrap $2 ; }\"\n\tcomplete -o bashdefault -o default -o nospace -F $wrapper $1 2>/dev/null \\\n\t\t|| complete -o default -o nospace -F $wrapper $1\n}\n\n# Setup the completion for git commands\n# 1: command or alias\n# 2: function to call (e.g. `git`, `gitk`, `git_fetch`)\n__git_complete ()\n{\n\tlocal func\n\n\tif __git_have_func $2; then\n\t\tfunc=$2\n\telif __git_have_func __$2_main; then\n\t\tfunc=__$2_main\n\telif __git_have_func _$2; then\n\t\tfunc=_$2\n\telse\n\t\techo \"ERROR: could not find function '$2'\" 1>&2\n\t\treturn 1\n\tfi\n\t___git_complete $1 $func\n}\n\n___git_complete git __git_main\n___git_complete gitk __gitk_main\n\n# The following are necessary only for Cygwin, and only are needed\n# when the user has tab-completed the executable name and consequently\n# included the '.exe' suffix.\n#\nif [ \"$OSTYPE\" = cygwin ]; then\n\t___git_complete git.exe __git_main\nfi\n"
  },
  {
    "path": "tools/git-prompt.sh",
    "content": "# bash/zsh git prompt support\n#\n# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>\n# Distributed under the GNU General Public License, version 2.0.\n#\n# This script allows you to see repository status in your prompt.\n#\n# To enable:\n#\n#    1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).\n#    2) Add the following line to your .bashrc/.zshrc:\n#        source ~/.git-prompt.sh\n#    3a) Change your PS1 to call __git_ps1 as\n#        command-substitution:\n#        Bash: PS1='[\\u@\\h \\W$(__git_ps1 \" (%s)\")]\\$ '\n#        ZSH:  setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 \" (%s)\")]\\$ '\n#        the optional argument will be used as format string.\n#    3b) Alternatively, for a slightly faster prompt, __git_ps1 can\n#        be used for PROMPT_COMMAND in Bash or for precmd() in Zsh\n#        with two parameters, <pre> and <post>, which are strings\n#        you would put in $PS1 before and after the status string\n#        generated by the git-prompt machinery.  e.g.\n#        Bash: PROMPT_COMMAND='__git_ps1 \"\\u@\\h:\\w\" \"\\\\\\$ \"'\n#          will show username, at-sign, host, colon, cwd, then\n#          various status string, followed by dollar and SP, as\n#          your prompt.\n#        ZSH:  precmd () { __git_ps1 \"%n\" \":%~$ \" \"|%s\" }\n#          will show username, pipe, then various status string,\n#          followed by colon, cwd, dollar and SP, as your prompt.\n#        Optionally, you can supply a third argument with a printf\n#        format string to finetune the output of the branch status\n#\n# The repository status will be displayed only if you are currently in a\n# git repository. The %s token is the placeholder for the shown status.\n#\n# The prompt status always includes the current branch name.\n#\n# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,\n# unstaged (*) and staged (+) changes will be shown next to the branch\n# name.  You can configure this per-repository with the\n# bash.showDirtyState variable, which defaults to true once\n# GIT_PS1_SHOWDIRTYSTATE is enabled.\n#\n# You can also see if currently something is stashed, by setting\n# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,\n# then a '$' will be shown next to the branch name.\n#\n# If you would like to see if there're untracked files, then you can set\n# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked\n# files, then a '%' will be shown next to the branch name.  You can\n# configure this per-repository with the bash.showUntrackedFiles\n# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is\n# enabled.\n#\n# If you would like to see the difference between HEAD and its upstream,\n# set GIT_PS1_SHOWUPSTREAM=\"auto\".  A \"<\" indicates you are behind, \">\"\n# indicates you are ahead, \"<>\" indicates you have diverged and \"=\"\n# indicates that there is no difference. You can further control\n# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list\n# of values:\n#\n#     verbose       show number of commits ahead/behind (+/-) upstream\n#     name          if verbose, then also show the upstream abbrev name\n#     legacy        don't use the '--count' option available in recent\n#                   versions of git-rev-list\n#     git           always compare HEAD to @{upstream}\n#     svn           always compare HEAD to your SVN upstream\n#\n# You can change the separator between the branch name and the above\n# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator\n# is SP.\n#\n# By default, __git_ps1 will compare HEAD to your SVN upstream if it can\n# find one, or @{upstream} otherwise.  Once you have set\n# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by\n# setting the bash.showUpstream config variable.\n#\n# If you would like to see more information about the identity of\n# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE\n# to one of these values:\n#\n#     contains      relative to newer annotated tag (v1.6.3.2~35)\n#     branch        relative to newer tag or branch (master~4)\n#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)\n#     tag           relative to any older tag (v1.6.3.1-13-gdd42c2f)\n#     default       exactly matching tag\n#\n# If you would like a colored hint about the current dirty state, set\n# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on\n# the colored output of \"git status -sb\" and are available only when\n# using __git_ps1 for PROMPT_COMMAND or precmd.\n#\n# If you would like __git_ps1 to do nothing in the case when the current\n# directory is set up to be ignored by git, then set\n# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the\n# repository level by setting bash.hideIfPwdIgnored to \"false\".\n\n# check whether printf supports -v\n__git_printf_supports_v=\nprintf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1\n\n# stores the divergence from upstream in $p\n# used by GIT_PS1_SHOWUPSTREAM\n__git_ps1_show_upstream ()\n{\n\tlocal key value\n\tlocal svn_remote svn_url_pattern count n\n\tlocal upstream=git legacy=\"\" verbose=\"\" name=\"\"\n\n\tsvn_remote=()\n\t# get some config options from git-config\n\tlocal output=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n\twhile read -r key value; do\n\t\tcase \"$key\" in\n\t\tbash.showupstream)\n\t\t\tGIT_PS1_SHOWUPSTREAM=\"$value\"\n\t\t\tif [[ -z \"${GIT_PS1_SHOWUPSTREAM}\" ]]; then\n\t\t\t\tp=\"\"\n\t\t\t\treturn\n\t\t\tfi\n\t\t\t;;\n\t\tsvn-remote.*.url)\n\t\t\tsvn_remote[$((${#svn_remote[@]} + 1))]=\"$value\"\n\t\t\tsvn_url_pattern=\"$svn_url_pattern\\\\|$value\"\n\t\t\tupstream=svn+git # default upstream is SVN if available, else git\n\t\t\t;;\n\t\tesac\n\tdone <<< \"$output\"\n\n\t# parse configuration values\n\tfor option in ${GIT_PS1_SHOWUPSTREAM}; do\n\t\tcase \"$option\" in\n\t\tgit|svn) upstream=\"$option\" ;;\n\t\tverbose) verbose=1 ;;\n\t\tlegacy)  legacy=1  ;;\n\t\tname)    name=1 ;;\n\t\tesac\n\tdone\n\n\t# Find our upstream\n\tcase \"$upstream\" in\n\tgit)    upstream=\"@{upstream}\" ;;\n\tsvn*)\n\t\t# get the upstream from the \"git-svn-id: ...\" in a commit message\n\t\t# (git-svn uses essentially the same procedure internally)\n\t\tlocal -a svn_upstream\n\t\tsvn_upstream=($(git log --first-parent -1 \\\n\t\t\t\t\t--grep=\"^git-svn-id: \\(${svn_url_pattern#??}\\)\" 2>/dev/null))\n\t\tif [[ 0 -ne ${#svn_upstream[@]} ]]; then\n\t\t\tsvn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}\n\t\t\tsvn_upstream=${svn_upstream%@*}\n\t\t\tlocal n_stop=\"${#svn_remote[@]}\"\n\t\t\tfor ((n=1; n <= n_stop; n++)); do\n\t\t\t\tsvn_upstream=${svn_upstream#${svn_remote[$n]}}\n\t\t\tdone\n\n\t\t\tif [[ -z \"$svn_upstream\" ]]; then\n\t\t\t\t# default branch name for checkouts with no layout:\n\t\t\t\tupstream=${GIT_SVN_ID:-git-svn}\n\t\t\telse\n\t\t\t\tupstream=${svn_upstream#/}\n\t\t\tfi\n\t\telif [[ \"svn+git\" = \"$upstream\" ]]; then\n\t\t\tupstream=\"@{upstream}\"\n\t\tfi\n\t\t;;\n\tesac\n\n\t# Find how many commits we are ahead/behind our upstream\n\tif [[ -z \"$legacy\" ]]; then\n\t\tcount=\"$(git rev-list --count --left-right \\\n\t\t\t\t\"$upstream\"...HEAD 2>/dev/null)\"\n\telse\n\t\t# produce equivalent output to --count for older versions of git\n\t\tlocal commits\n\t\tif commits=\"$(git rev-list --left-right \"$upstream\"...HEAD 2>/dev/null)\"\n\t\tthen\n\t\t\tlocal commit behind=0 ahead=0\n\t\t\tfor commit in $commits\n\t\t\tdo\n\t\t\t\tcase \"$commit\" in\n\t\t\t\t\"<\"*) ((behind++)) ;;\n\t\t\t\t*)    ((ahead++))  ;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t\tcount=\"$behind\t$ahead\"\n\t\telse\n\t\t\tcount=\"\"\n\t\tfi\n\tfi\n\n\t# calculate the result\n\tif [[ -z \"$verbose\" ]]; then\n\t\tcase \"$count\" in\n\t\t\"\") # no upstream\n\t\t\tp=\"\" ;;\n\t\t\"0\t0\") # equal to upstream\n\t\t\tp=\"=\" ;;\n\t\t\"0\t\"*) # ahead of upstream\n\t\t\tp=\">\" ;;\n\t\t*\"\t0\") # behind upstream\n\t\t\tp=\"<\" ;;\n\t\t*)\t    # diverged from upstream\n\t\t\tp=\"<>\" ;;\n\t\tesac\n\telse\n\t\tcase \"$count\" in\n\t\t\"\") # no upstream\n\t\t\tp=\"\" ;;\n\t\t\"0\t0\") # equal to upstream\n\t\t\tp=\" u=\" ;;\n\t\t\"0\t\"*) # ahead of upstream\n\t\t\tp=\" u+${count#0\t}\" ;;\n\t\t*\"\t0\") # behind upstream\n\t\t\tp=\" u-${count%\t0}\" ;;\n\t\t*)\t    # diverged from upstream\n\t\t\tp=\" u+${count#*\t}-${count%\t*}\" ;;\n\t\tesac\n\t\tif [[ -n \"$count\" && -n \"$name\" ]]; then\n\t\t\t__git_ps1_upstream_name=$(git rev-parse \\\n\t\t\t\t--abbrev-ref \"$upstream\" 2>/dev/null)\n\t\t\tif [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then\n\t\t\t\tp=\"$p \\${__git_ps1_upstream_name}\"\n\t\t\telse\n\t\t\t\tp=\"$p ${__git_ps1_upstream_name}\"\n\t\t\t\t# not needed anymore; keep user's\n\t\t\t\t# environment clean\n\t\t\t\tunset __git_ps1_upstream_name\n\t\t\tfi\n\t\tfi\n\tfi\n\n}\n\n# Helper function that is meant to be called from __git_ps1.  It\n# injects color codes into the appropriate gitstring variables used\n# to build a gitstring.\n__git_ps1_colorize_gitstring ()\n{\n\tif [[ -n ${ZSH_VERSION-} ]]; then\n\t\tlocal c_red='%F{red}'\n\t\tlocal c_green='%F{green}'\n\t\tlocal c_lblue='%F{blue}'\n\t\tlocal c_clear='%f'\n\telse\n\t\t# Using \\[ and \\] around colors is necessary to prevent\n\t\t# issues with command line editing/browsing/completion!\n\t\tlocal c_red='\\[\\e[31m\\]'\n\t\tlocal c_green='\\[\\e[32m\\]'\n\t\tlocal c_lblue='\\[\\e[1;34m\\]'\n\t\tlocal c_clear='\\[\\e[0m\\]'\n\tfi\n\tlocal bad_color=$c_red\n\tlocal ok_color=$c_green\n\tlocal flags_color=\"$c_lblue\"\n\n\tlocal branch_color=\"\"\n\tif [ $detached = no ]; then\n\t\tbranch_color=\"$ok_color\"\n\telse\n\t\tbranch_color=\"$bad_color\"\n\tfi\n\tc=\"$branch_color$c\"\n\n\tz=\"$c_clear$z\"\n\tif [ \"$w\" = \"*\" ]; then\n\t\tw=\"$bad_color$w\"\n\tfi\n\tif [ -n \"$i\" ]; then\n\t\ti=\"$ok_color$i\"\n\tfi\n\tif [ -n \"$s\" ]; then\n\t\ts=\"$flags_color$s\"\n\tfi\n\tif [ -n \"$u\" ]; then\n\t\tu=\"$bad_color$u\"\n\tfi\n\tr=\"$c_clear$r\"\n}\n\n__git_eread ()\n{\n\tlocal f=\"$1\"\n\tshift\n\ttest -r \"$f\" && read \"$@\" <\"$f\"\n}\n\n# __git_ps1 accepts 0 or 1 arguments (i.e., format string)\n# when called from PS1 using command substitution\n# in this mode it prints text to add to bash PS1 prompt (includes branch name)\n#\n# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)\n# in that case it _sets_ PS1. The arguments are parts of a PS1 string.\n# when two arguments are given, the first is prepended and the second appended\n# to the state string when assigned to PS1.\n# The optional third parameter will be used as printf format string to further\n# customize the output of the git-status string.\n# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true\n__git_ps1 ()\n{\n\t# preserve exit status\n\tlocal exit=$?\n\tlocal pcmode=no\n\tlocal detached=no\n\tlocal ps1pc_start='\\u@\\h:\\w '\n\tlocal ps1pc_end='\\$ '\n\tlocal printf_format=' (%s)'\n\n\tcase \"$#\" in\n\t\t2|3)\tpcmode=yes\n\t\t\tps1pc_start=\"$1\"\n\t\t\tps1pc_end=\"$2\"\n\t\t\tprintf_format=\"${3:-$printf_format}\"\n\t\t\t# set PS1 to a plain prompt so that we can\n\t\t\t# simply return early if the prompt should not\n\t\t\t# be decorated\n\t\t\tPS1=\"$ps1pc_start$ps1pc_end\"\n\t\t;;\n\t\t0|1)\tprintf_format=\"${1:-$printf_format}\"\n\t\t;;\n\t\t*)\treturn $exit\n\t\t;;\n\tesac\n\n\t# ps1_expanded:  This variable is set to 'yes' if the shell\n\t# subjects the value of PS1 to parameter expansion:\n\t#\n\t#   * bash does unless the promptvars option is disabled\n\t#   * zsh does not unless the PROMPT_SUBST option is set\n\t#   * POSIX shells always do\n\t#\n\t# If the shell would expand the contents of PS1 when drawing\n\t# the prompt, a raw ref name must not be included in PS1.\n\t# This protects the user from arbitrary code execution via\n\t# specially crafted ref names.  For example, a ref named\n\t# 'refs/heads/$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' might cause the\n\t# shell to execute 'sudo rm -rf /' when the prompt is drawn.\n\t#\n\t# Instead, the ref name should be placed in a separate global\n\t# variable (in the __git_ps1_* namespace to avoid colliding\n\t# with the user's environment) and that variable should be\n\t# referenced from PS1.  For example:\n\t#\n\t#     __git_ps1_foo=$(do_something_to_get_ref_name)\n\t#     PS1=\"...stuff...\\${__git_ps1_foo}...stuff...\"\n\t#\n\t# If the shell does not expand the contents of PS1, the raw\n\t# ref name must be included in PS1.\n\t#\n\t# The value of this variable is only relevant when in pcmode.\n\t#\n\t# Assume that the shell follows the POSIX specification and\n\t# expands PS1 unless determined otherwise.  (This is more\n\t# likely to be correct if the user has a non-bash, non-zsh\n\t# shell and safer than the alternative if the assumption is\n\t# incorrect.)\n\t#\n\tlocal ps1_expanded=yes\n\t[ -z \"${ZSH_VERSION-}\" ] || [[ -o PROMPT_SUBST ]] || ps1_expanded=no\n\t[ -z \"${BASH_VERSION-}\" ] || shopt -q promptvars || ps1_expanded=no\n\n\tlocal repo_info rev_parse_exit_code\n\trepo_info=\"$(git rev-parse --git-dir --is-inside-git-dir \\\n\t\t--is-bare-repository --is-inside-work-tree \\\n\t\t--short HEAD 2>/dev/null)\"\n\trev_parse_exit_code=\"$?\"\n\n\tif [ -z \"$repo_info\" ]; then\n\t\treturn $exit\n\tfi\n\n\tlocal short_sha=\"\"\n\tif [ \"$rev_parse_exit_code\" = \"0\" ]; then\n\t\tshort_sha=\"${repo_info##*$'\\n'}\"\n\t\trepo_info=\"${repo_info%$'\\n'*}\"\n\tfi\n\tlocal inside_worktree=\"${repo_info##*$'\\n'}\"\n\trepo_info=\"${repo_info%$'\\n'*}\"\n\tlocal bare_repo=\"${repo_info##*$'\\n'}\"\n\trepo_info=\"${repo_info%$'\\n'*}\"\n\tlocal inside_gitdir=\"${repo_info##*$'\\n'}\"\n\tlocal g=\"${repo_info%$'\\n'*}\"\n\n\tif [ \"true\" = \"$inside_worktree\" ] &&\n\t   [ -n \"${GIT_PS1_HIDE_IF_PWD_IGNORED-}\" ] &&\n\t   [ \"$(git config --bool bash.hideIfPwdIgnored)\" != \"false\" ] &&\n\t   git check-ignore -q .\n\tthen\n\t\treturn $exit\n\tfi\n\n\tlocal r=\"\"\n\tlocal b=\"\"\n\tlocal step=\"\"\n\tlocal total=\"\"\n\tif [ -d \"$g/rebase-merge\" ]; then\n\t\t__git_eread \"$g/rebase-merge/head-name\" b\n\t\t__git_eread \"$g/rebase-merge/msgnum\" step\n\t\t__git_eread \"$g/rebase-merge/end\" total\n\t\tif [ -f \"$g/rebase-merge/interactive\" ]; then\n\t\t\tr=\"|REBASE-i\"\n\t\telse\n\t\t\tr=\"|REBASE-m\"\n\t\tfi\n\telse\n\t\tif [ -d \"$g/rebase-apply\" ]; then\n\t\t\t__git_eread \"$g/rebase-apply/next\" step\n\t\t\t__git_eread \"$g/rebase-apply/last\" total\n\t\t\tif [ -f \"$g/rebase-apply/rebasing\" ]; then\n\t\t\t\t__git_eread \"$g/rebase-apply/head-name\" b\n\t\t\t\tr=\"|REBASE\"\n\t\t\telif [ -f \"$g/rebase-apply/applying\" ]; then\n\t\t\t\tr=\"|AM\"\n\t\t\telse\n\t\t\t\tr=\"|AM/REBASE\"\n\t\t\tfi\n\t\telif [ -f \"$g/MERGE_HEAD\" ]; then\n\t\t\tr=\"|MERGING\"\n\t\telif [ -f \"$g/CHERRY_PICK_HEAD\" ]; then\n\t\t\tr=\"|CHERRY-PICKING\"\n\t\telif [ -f \"$g/REVERT_HEAD\" ]; then\n\t\t\tr=\"|REVERTING\"\n\t\telif [ -f \"$g/BISECT_LOG\" ]; then\n\t\t\tr=\"|BISECTING\"\n\t\tfi\n\n\t\tif [ -n \"$b\" ]; then\n\t\t\t:\n\t\telif [ -h \"$g/HEAD\" ]; then\n\t\t\t# symlink symbolic ref\n\t\t\tb=\"$(git symbolic-ref HEAD 2>/dev/null)\"\n\t\telse\n\t\t\tlocal head=\"\"\n\t\t\tif ! __git_eread \"$g/HEAD\" head; then\n\t\t\t\treturn $exit\n\t\t\tfi\n\t\t\t# is it a symbolic ref?\n\t\t\tb=\"${head#ref: }\"\n\t\t\tif [ \"$head\" = \"$b\" ]; then\n\t\t\t\tdetached=yes\n\t\t\t\tb=\"$(\n\t\t\t\tcase \"${GIT_PS1_DESCRIBE_STYLE-}\" in\n\t\t\t\t(contains)\n\t\t\t\t\tgit describe --contains HEAD ;;\n\t\t\t\t(branch)\n\t\t\t\t\tgit describe --contains --all HEAD ;;\n\t\t\t\t(tag)\n\t\t\t\t\tgit describe --tags HEAD ;;\n\t\t\t\t(describe)\n\t\t\t\t\tgit describe HEAD ;;\n\t\t\t\t(* | default)\n\t\t\t\t\tgit describe --tags --exact-match HEAD ;;\n\t\t\t\tesac 2>/dev/null)\" ||\n\n\t\t\t\tb=\"$short_sha...\"\n\t\t\t\tb=\"($b)\"\n\t\t\tfi\n\t\tfi\n\tfi\n\n\tif [ -n \"$step\" ] && [ -n \"$total\" ]; then\n\t\tr=\"$r $step/$total\"\n\tfi\n\n\tlocal w=\"\"\n\tlocal i=\"\"\n\tlocal s=\"\"\n\tlocal u=\"\"\n\tlocal c=\"\"\n\tlocal p=\"\"\n\n\tif [ \"true\" = \"$inside_gitdir\" ]; then\n\t\tif [ \"true\" = \"$bare_repo\" ]; then\n\t\t\tc=\"BARE:\"\n\t\telse\n\t\t\tb=\"GIT_DIR!\"\n\t\tfi\n\telif [ \"true\" = \"$inside_worktree\" ]; then\n\t\tif [ -n \"${GIT_PS1_SHOWDIRTYSTATE-}\" ] &&\n\t\t   [ \"$(git config --bool bash.showDirtyState)\" != \"false\" ]\n\t\tthen\n\t\t\tgit diff --no-ext-diff --quiet || w=\"*\"\n\t\t\tgit diff --no-ext-diff --cached --quiet || i=\"+\"\n\t\t\tif [ -z \"$short_sha\" ] && [ -z \"$i\" ]; then\n\t\t\t\ti=\"#\"\n\t\t\tfi\n\t\tfi\n\t\tif [ -n \"${GIT_PS1_SHOWSTASHSTATE-}\" ] &&\n\t\t   git rev-parse --verify --quiet refs/stash >/dev/null\n\t\tthen\n\t\t\ts=\"$\"\n\t\tfi\n\n\t\tif [ -n \"${GIT_PS1_SHOWUNTRACKEDFILES-}\" ] &&\n\t\t   [ \"$(git config --bool bash.showUntrackedFiles)\" != \"false\" ] &&\n\t\t   git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null\n\t\tthen\n\t\t\tu=\"%${ZSH_VERSION+%}\"\n\t\tfi\n\n\t\tif [ -n \"${GIT_PS1_SHOWUPSTREAM-}\" ]; then\n\t\t\t__git_ps1_show_upstream\n\t\tfi\n\tfi\n\n\tlocal z=\"${GIT_PS1_STATESEPARATOR-\" \"}\"\n\n\t# NO color option unless in PROMPT_COMMAND mode\n\tif [ $pcmode = yes ] && [ -n \"${GIT_PS1_SHOWCOLORHINTS-}\" ]; then\n\t\t__git_ps1_colorize_gitstring\n\tfi\n\n\tb=${b##refs/heads/}\n\tif [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then\n\t\t__git_ps1_branch_name=$b\n\t\tb=\"\\${__git_ps1_branch_name}\"\n\tfi\n\n\tlocal f=\"$w$i$s$u\"\n\tlocal gitstring=\"$c$b${f:+$z$f}$r$p\"\n\n\tif [ $pcmode = yes ]; then\n\t\tif [ \"${__git_printf_supports_v-}\" != yes ]; then\n\t\t\tgitstring=$(printf -- \"$printf_format\" \"$gitstring\")\n\t\telse\n\t\t\tprintf -v gitstring -- \"$printf_format\" \"$gitstring\"\n\t\tfi\n\t\tPS1=\"$ps1pc_start$gitstring$ps1pc_end\"\n\telse\n\t\tprintf -- \"$printf_format\" \"$gitstring\"\n\tfi\n\n\treturn $exit\n}\n"
  },
  {
    "path": "tools/install.sh",
    "content": "#!/usr/bin/env bash\n\n# Checks the minium version of bash (v3.2) installed,\n# stops the installation if check fails\nif [ -z \"${BASH_VERSION-}\" ]; then\n  printf \"Error: Bash 3.2 or higher is required for Oh My Bash.\\n\"\n  printf \"Error: Install Bash and try running this installation script with Bash.\\n\"\n  if command -v bash >/dev/null 2>&1; then\n    # shellcheck disable=SC2016\n    printf 'Example: \\033[31;1mbash\\033[0;34m -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)\"\\n'\n  fi\n  # shellcheck disable=SC2317\n  return 1 >/dev/null 2>&1 || exit 1\nfi\n\nif [[ ! ${BASH_VERSINFO[0]-} ]] || ((BASH_VERSINFO[0] < 3 || BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 2)); then\n  printf \"Error: Bash 3.2 required for Oh My Bash.\\n\" >&2\n  printf \"Error: Upgrade Bash and try again.\\n\" >&2\n  # shellcheck disable=SC2317\n  return 2 &>/dev/null || exit 2\nelif ((BASH_VERSINFO[0] < 4)); then\n  printf \"Warning: Bash >=4 is no longer required for Oh My Bash but is cool to have ;)\\n\" >&2\n  printf \"Warning: Why don't you upgrade your Bash to 4 or higher?\\n\" >&2\nfi\n\nfunction _omb_install_print_version {\n  local OMB_VERSINFO\n  OMB_VERSINFO=(1 0 0 0 master noarch)\n  printf '%s\\n' 'Install script for Oh-My-Bash (https://github.com/ohmybash/oh-my-bash)'\n  printf 'oh-my-bash, version %s.%s.%s(%s)-%s (%s)\\n' \"${OMB_VERSINFO[@]}\"\n}\n\nfunction _omb_install_print_usage {\n  # shellcheck disable=SC2016\n  printf '%s\\n' \\\n    'usage: ./install.sh [--unattended | --dry-run | --help | --usage | --version]' \\\n    'usage: bash -c \"$(< install.sh)\" [--unattended | --dry-run | --help | --usage |' \\\n    '           --version]'\n}\n\nfunction _omb_install_print_help {\n  _omb_install_print_version\n  _omb_install_print_usage\n  printf '%s\\n' \\\n    '' \\\n    'OPTIONS' \\\n    '  --help            show this help' \\\n    '  --version         show version' \\\n    '  --usage           show usage' \\\n    '  --dry-run         do not perform the actual installation' \\\n    '  --unattended      do not fall in to the new Bash session after the install' \\\n    '  --prefix=PATH     install oh-my-bash into \"PATH/share/oh-my-bash\"' \\\n    ''\n}\n\n## @fn _omb_install_readargs [options...]\n##   @var[out] install_opts\n##   @var[out] install_prefix\nfunction _omb_install_readargs {\n  install_opts=\n  install_prefix=\n  while (($#)); do\n    local arg=$1; shift\n    if [[ :$install_opts: != *:literal:* ]]; then\n      case $arg in\n      --prefix=*)\n        arg=${arg#*=}\n        if [[ $arg ]]; then\n          install_prefix=$arg\n        else\n          install_opts+=:error\n          printf 'install (oh-my-bash): %s\\n' \"$RED$BOLD[Error]$NORMAL ${RED}the option argument for '--prefix' is empty.$NORMAL\" >&2\n        fi\n        continue ;;\n      --prefix)\n        if (($#)); then\n          install_prefix=$1; shift\n        else\n          install_opts+=:error\n          printf 'install (oh-my-bash): %s\\n' \"$RED$BOLD[Error]$NORMAL ${RED}an option argument for '$arg' is missing.$NORMAL\" >&2\n        fi\n        continue ;;\n      --help | --usage | --unattended | --dry-run)\n        install_opts+=:${arg#--}\n        continue ;;\n      --version | -v)\n        install_opts+=:version\n        continue ;;\n      --)\n        install_opts+=:literal\n        continue ;;\n      -*)\n        install_opts+=:error\n        if [[ $arg == -[!-]?* ]]; then\n          printf 'install (oh-my-bash): %s\\n' \"$RED$BOLD[Error]$NORMAL ${RED}unrecognized options '$arg'.$NORMAL\" >&2\n        else\n          printf 'install (oh-my-bash): %s\\n' \"$RED$BOLD[Error]$NORMAL ${RED}unrecognized option '$arg'.$NORMAL\" >&2\n        fi\n        continue ;;\n      esac\n    fi\n\n    install_opts+=:error\n    printf 'install (oh-my-bash): %s\\n' \"$RED$BOLD[Error]$NORMAL unrecognized argument '$arg'.\" >&2\n  done\n}\n\nfunction _omb_install_run {\n  if [[ :$install_opts: == *:dry-run:* ]]; then\n    printf '%s\\n' \"$BOLD$GREEN[dryrun]$NORMAL $BOLD$*$NORMAL\" >&5\n  else\n    printf '%s\\n' \"$BOLD\\$ $*$NORMAL\" >&5\n    command \"$@\"\n  fi\n}\n\nfunction _omb_install_banner {\n  # MOTD message :)\n  printf '%s' \"$GREEN\"\n  # shellcheck disable=SC1003,SC2016\n  printf '%s\\n' \\\n    '         __                          __               __  ' \\\n    '  ____  / /_     ____ ___  __  __   / /_  ____ ______/ /_ ' \\\n    ' / __ \\/ __ \\   / __ `__ \\/ / / /  / __ \\/ __ `/ ___/ __ \\' \\\n    '/ /_/ / / / /  / / / / / / /_/ /  / /_/ / /_/ (__  ) / / /' \\\n    '\\____/_/ /_/  /_/ /_/ /_/\\__, /  /_.___/\\__,_/____/_/ /_/ ' \\\n    '                        /____/                            .... is now installed!'\n  printf '%s' \"$NORMAL\"\n}\n\nfunction _omb_install_has_proper_bash_profile {\n  if [[ -s ~/.bash_profile ]]; then\n    if command grep -qE '(source|\\.)[[:space:]].*/\\.bashrc' ~/.bash_profile 2>/dev/null; then\n      return 0\n    fi\n  fi\n\n  if [[ -s ~/.profile ]]; then\n    if command grep -qE '(source|\\.)[[:space:]].*/\\.bashrc' ~/.profile 2>/dev/null; then\n      return 0\n    fi\n  fi\n\n  return 1\n}\n\n## @fn _omb_install_user_bashrc\n##   @var[in] install_opts\n##   @var[in] OSH\nfunction _omb_install_user_bashrc {\n  printf '%s\\n' \"${BLUE}Looking for an existing bash config...${NORMAL}\"\n  if [[ -f ~/.bashrc || -h ~/.bashrc ]]; then\n    # shellcheck disable=SC2155\n    local bashrc_backup=~/.bashrc.omb-backup-$(date +%Y%m%d%H%M%S)\n    printf '%s\\n' \"${YELLOW}Found ~/.bashrc.${NORMAL} ${GREEN}Backing up to $bashrc_backup${NORMAL}\"\n    _omb_install_run mv ~/.bashrc \"$bashrc_backup\"\n  fi\n\n  printf '%s\\n' \"${BLUE}Copying the Oh-My-Bash template file to ~/.bashrc${NORMAL}\"\n  sed \"/^export OSH=/ c\\\\\nexport OSH='${OSH//\\'/\\'\\\\\\'\\'}'\n  \" \"$OSH\"/templates/bashrc.osh-template >| ~/.bashrc.omb-temp &&\n    _omb_install_run mv -f ~/.bashrc.omb-temp ~/.bashrc\n\n  # If \"source ~/.bashrc\" is not found in ~/.bash_profile or ~/.profile, we try\n  # to create a new ~/.bash_profile with the default content or show messages\n  # for user to add \"source ~/.bashrc\" in the existing ~/.bash_profile.\n  if ! _omb_install_has_proper_bash_profile; then\n    if [[ ! -e ~/.bash_profile ]]; then\n      if [[ -h ~/.bash_profile ]]; then\n        _omb_install_run rm -f ~/.bash_profile\n      fi\n      _omb_install_run cp -f \"$OSH\"/templates/bash_profile.osh-template ~/.bash_profile\n    else\n      printf '%s\\n' \"${GREEN}Please make sure that ~/.bash_profile contains \\\"source ~/.bashrc\\\"${NORMAL}\"\n    fi\n  fi\n\n  set +e\n  _omb_install_banner\n  printf '%s\\n' \"${GREEN}Please look over the ~/.bashrc file to select a theme, plugins, completions, aliases, and options${NORMAL}\"\n  printf '%s\\n' \"${BLUE}${BOLD}To keep up on the latest news and updates, follow us on GitHub: https://github.com/ohmybash/oh-my-bash${NORMAL}\"\n\n  if [[ :$install_opts: == *:dry-run:* ]]; then\n    printf '%s\\n' \"$GREEN$BOLD[dryrun]$NORMAL Sample bashrc is created at '$BOLD$HOME/.bashrc-ombtemp$NORMAL'.\"\n  elif [[ :$install_opts: != *:unattended:* ]]; then\n    if [[ $- == *i* ]]; then\n      # In case install.sh is sourced from the interactive Bash\n      # shellcheck disable=SC1090\n      source ~/.bashrc\n    else\n      exec bash\n    fi\n  fi\n}\n\nfunction _omb_install_system_bashrc {\n  printf '%s\\n' \"${BLUE}Creating a bashrc template at '$OSH/bashrc'...${NORMAL}\"\n  local q=\\' Q=\"'\\''\"\n  local osh=\"'${OSH//$q/$Q}'\"\n  osh=${osh//$'\\n'/$'\\\\\\n'}\n  local sed_script='/^export OSH=.*/c \\\n'\"export OSH=$osh\"\n  _omb_install_run sed \"$sed_script\" \"$OSH\"/templates/bashrc.osh-template >| \"$OSH\"/bashrc\n\n  _omb_install_banner\n  printf '%s\\n' \"${GREEN}To enable Oh My Bash, please copy '${BOLD}$OSH/bashrc${NORMAL}${GREEN}' to '${BOLD}~/.bashrc${NORMAL}${GREEN}'.${NORMAL}\"\n  printf '%s\\n' \"${GREEN}Please look over the ~/.bashrc file to select a theme, plugins, completions, aliases, and options${NORMAL}\"\n  printf '%s\\n' \"${BLUE}${BOLD}To keep up on the latest news and updates, follow us on GitHub: https://github.com/ohmybash/oh-my-bash${NORMAL}\"\n}\n\nfunction _omb_install_main {\n  # Use colors, but only if connected to a terminal, and that terminal\n  # supports them.\n  local ncolors=\n  if type -P tput &>/dev/null; then\n    ncolors=$(tput colors 2>/dev/null || tput Co 2>/dev/null || echo -1)\n  fi\n\n  local RED GREEN YELLOW BLUE BOLD NORMAL\n  if [[ -t 1 && $ncolors && $ncolors -ge 8 ]]; then\n    RED=$(tput setaf 1 2>/dev/null || tput AF 1 2>/dev/null)\n    GREEN=$(tput setaf 2 2>/dev/null || tput AF 2 2>/dev/null)\n    YELLOW=$(tput setaf 3 2>/dev/null || tput AF 3 2>/dev/null)\n    BLUE=$(tput setaf 4 2>/dev/null || tput AF 4 2>/dev/null)\n    BOLD=$(tput bold 2>/dev/null || tput md 2>/dev/null)\n    NORMAL=$(tput sgr0 2>/dev/null || tput me 2>/dev/null)\n  else\n    RED=\"\"\n    GREEN=\"\"\n    YELLOW=\"\"\n    BLUE=\"\"\n    BOLD=\"\"\n    NORMAL=\"\"\n  fi\n\n  local install_opts install_prefix\n  _omb_install_readargs \"$@\"\n\n  if [[ :$install_opts: == *:error:* ]]; then\n    printf '\\n'\n    install_opts+=:usage\n  fi\n  if [[ :$install_opts: == *:help:* ]]; then\n    _omb_install_print_help\n    install_opts+=:exit\n  else\n    if [[ :$install_opts: == *:version:* ]]; then\n      _omb_install_print_version\n      install_opts+=:exit\n    fi\n    if [[ :$install_opts: == *:usage:* ]]; then\n      _omb_install_print_usage\n      install_opts+=:exit\n    fi\n  fi\n  if [[ :$install_opts: == *:error:* ]]; then\n    return 2\n  elif [[ :$install_opts: == *:exit:* ]]; then\n    return 0\n  fi\n\n  if [[ $install_prefix ]]; then\n    [[ $install_prefix == /* ]] ||\n      install_prefix=$PWD/$install_prefix\n    local OSH=$install_prefix/share/oh-my-bash\n  elif [[ ! $OSH ]]; then\n    OSH=~/.oh-my-bash\n  fi\n\n  if [[ ! $OSH_REPOSITORY ]]; then\n    OSH_REPOSITORY=https://github.com/ohmybash/oh-my-bash.git\n  fi\n\n  # Only enable exit-on-error after the non-critical colorization stuff,\n  # which may fail on systems lacking tput or terminfo\n\n  set -e\n\n  if [[ -d $OSH ]]; then\n    printf '%s\\n' \"${YELLOW}You already have Oh My Bash installed.${NORMAL}\" >&2\n    printf '%s\\n' \"You'll need to remove '$OSH' if you want to re-install it.\" >&2\n    return 1\n  fi\n\n  # Prevent the cloned repository from having insecure permissions. Failing to do\n  # so causes compinit() calls to fail with \"command not found: compdef\" errors\n  # for users with insecure umasks (e.g., \"002\", allowing group writability). Note\n  # that this will be ignored under Cygwin by default, as Windows ACLs take\n  # precedence over umasks except for filesystems mounted with option \"noacl\".\n  umask g-w,o-w\n\n  printf '%s\\n' \"${BLUE}Cloning Oh My Bash...${NORMAL}\"\n  type -P git &>/dev/null || {\n    echo \"Error: git is not installed\"\n    return 1\n  }\n  # The Windows (MSYS) Git is not compatible with normal use on cygwin\n  if [[ $OSTYPE == cygwin ]]; then\n    if command git --version | command grep msysgit > /dev/null; then\n      echo \"Error: Windows/MSYS Git is not supported on Cygwin\"\n      echo \"Error: Make sure the Cygwin git package is installed and is first on the path\"\n      return 1\n    fi\n  fi\n  _omb_install_run git clone --depth=1 \"$OSH_REPOSITORY\" \"$OSH\" || {\n    printf \"Error: git clone of oh-my-bash repo failed\\n\"\n    return 1\n  }\n\n  if [[ $install_prefix ]]; then\n    _omb_install_system_bashrc\n  else\n    _omb_install_user_bashrc\n  fi\n}\n\n[[ ${BASH_EXECUTION_STRING-} && $0 == -* ]] &&\n  set -- \"$0\" \"$@\"\n\n_omb_install_main \"$@\" 5>&2\n"
  },
  {
    "path": "tools/uninstall.sh",
    "content": "#!/bin/sh\n\n# Note: this file is intentionally written in POSIX sh so that oh-my-bash can\n# be uninstalled without bash.\n\n_omb_uninstall_confirmation() {\n  if [ \"${BASH_VERSION-}\" ]; then\n    read -r -p \"$1 \" _omb_uninstall_confirmation\n  else\n    printf '%s ' \"$1\"\n    read -r _omb_uninstall_confirmation\n  fi\n}\n\n_omb_uninstall_contains_omb() {\n  command grep -qE '(source|\\.)[[:space:]]+.*[/[:space:]]oh-my-bash\\.sh' \"$1\" 2>/dev/null\n}\n\n# Find the latest bashrc that do not source oh-my-bash.sh\n_omb_uninstall_find_bashrc_original() {\n  _omb_uninstall_bashrc_original=\n  printf '%s\\n' \"Looking for original bash config...\"\n  _omb_uninstall_old_ifs_set=${IFS+set}\n  _omb_uninstall_old_ifs=${IFS-}\n  IFS='\n'\n  for _omb_uninstall_file in $(printf '%s\\n' ~/.bashrc.omb-backup-?????????????? | sort -r) ~/.bashrc.pre-oh-my-bash; do\n    [ -f \"$_omb_uninstall_file\" ] || [ -h \"$_omb_uninstall_file\" ] || continue\n    _omb_uninstall_contains_omb \"$_omb_uninstall_file\" && continue\n    _omb_uninstall_bashrc_original=$_omb_uninstall_file\n    break\n  done\n  if [ \"$_omb_uninstall_old_ifs_set\" = set ]; then\n    IFS=$_omb_uninstall_old_ifs\n  else\n    unset -v IFS\n  fi\n  unset -v _omb_uninstall_file _omb_uninstall_old_ifs_set _omb_uninstall_old_ifs\n\n  if [ -n \"$_omb_uninstall_bashrc_original\" ]; then\n    printf '%s\\n' \"-> Found at '$_omb_uninstall_bashrc_original'.\"\n  else\n    printf '%s\\n' \"-> Not found.\"\n  fi\n}\n\n_omb_uninstall_base_directory=${OSH:-$HOME/.oh-my-bash}\nif [ ! -d \"$_omb_uninstall_base_directory\" ]; then\n  printf '%s\\n' \"Uninstall target '$_omb_uninstall_base_directory' not found.\"\n  unset -v _omb_uninstall_base_directory\n  # shellcheck disable=SC2317\n  return 0 2>/dev/null || exit 0\nfi\n\n_omb_uninstall_confirmation \"Are you sure you want to remove Oh My Bash ($_omb_uninstall_base_directory)? [y/N]\"\nif [ \"$_omb_uninstall_confirmation\" != y ] && [ \"$_omb_uninstall_confirmation\" != Y ]; then\n  printf '%s\\n' \"Uninstall cancelled\"\n  unset -v _omb_uninstall_confirmation\n  # shellcheck disable=SC2317\n  return 0 2>/dev/null || exit 0\nfi\nunset -v _omb_uninstall_confirmation\n\nprintf 'Removing %s\\n' \"$_omb_uninstall_base_directory\"\ncommand rm -rf \"$_omb_uninstall_base_directory\"\nunset -v _omb_uninstall_base_directory\n\n_omb_uninstall_bashrc_original=\n_omb_uninstall_find_bashrc_original\n\nif ! _omb_uninstall_contains_omb ~/.bashrc; then\n  printf '%s\\n' \"uninstall: Oh-my-bash does not seem to be installed in .bashrc.\" >&2\n  if [ -n \"$_omb_uninstall_bashrc_original\" ]; then\n    printf '%s\\n' \"uninstall: The original config was found at '$_omb_uninstall_bashrc_original'.\" >&2\n  fi\n  printf '%s\\n' \"uninstall: Canceled.\" >&2\n  unset -v _omb_uninstall_bashrc_original\n  # shellcheck disable=SC2317\n  return 1 2>/dev/null || exit 1\nfi\n\n_omb_uninstall_bashrc_uninstalled=\nif [ -e ~/.bashrc ] || [ -h ~/.bashrc ]; then\n  _omb_uninstall_bashrc_uninstalled=\".bashrc.omb-uninstalled-$(date +%Y%m%d%H%M%S)\";\n  printf '%s\\n' \"Found ~/.bashrc -- Renaming to ~/${_omb_uninstall_bashrc_uninstalled}\";\n  command mv ~/.bashrc ~/\"${_omb_uninstall_bashrc_uninstalled}\";\nfi\n\nif [ -n \"$_omb_uninstall_bashrc_original\" ]; then\n  printf '%s\\n' \"Found $_omb_uninstall_bashrc_original -- Restoring to ~/.bashrc\";\n  command mv \"$_omb_uninstall_bashrc_original\" ~/.bashrc;\n  printf '%s\\n' \"Your original bash config was restored. Please restart your session.\"\nelse\n  command sed '/oh-my-bash\\.sh/s/^/: #/' ~/\"${_omb_uninstall_bashrc_uninstalled:-.bashrc}\" >| ~/.bashrc.omb-temp && \\\n    command mv ~/.bashrc.omb-temp ~/.bashrc\nfi\n\nunset -v _omb_uninstall_bashrc_original\nunset -v _omb_uninstall_bashrc_uninstalled\n\necho \"Thanks for trying out Oh My Bash. It has been uninstalled.\"\ncase $- in\n*i*)\n  # shellcheck disable=SC3044,SC3046,SC1090\n  if [ -n \"${BASH_VERSION-}\" ]; then\n    declare -f _omb_util_unload >/dev/null 2>&1 && _omb_util_unload\n    source ~/.bashrc\n  fi ;;\nesac\n"
  },
  {
    "path": "tools/update-wiki-themes.sh",
    "content": "#!/usr/bin/env bash\n\n# this script aims to simplify the process of updating the theme examples page\n# in the GitHub Wiki.\n#\n# it is built with the assumption that the relevant wiki is cloned with Git\n# alongside this repo, but with the understanding that this may not always be\n# true.\n#\n# it also assumes the associated `Themes.md` file contains the relevant \"start\"\n# and \"end\" markers for a safe space to re-render the theme examples.\n#\n# Another assumption is that the OMB working tree contains the subdirectory\n# \"themes\", which contain the directories of themes.\n\nfunction print_usage {\n  printf '%s\\n' \\\n         'usage: tools/update-wiki-themes.sh [[-f|--themes-file] FILE |' \\\n         '            [-s|--start-marker] START | [-e|--end-marker] END]' \\\n         ''\n}\n\nfunction print_help {\n  print_usage\n  printf '%s\\n' \\\n         'OPTIONS' \\\n         '' \\\n         '    When both the CLI argument and the environment variable are specified, the' \\\n         '    CLI argument overrides the envrionment variable.' \\\n         '' \\\n         '    -p, --omb-working-tree DIRECTORY' \\\n         '        Set the path to the OMB working tree.  This can also be specified' \\\n         '        through the environment variable \"OMB_WORKING_TREE\".  The default is' \\\n         '        determined based on the path of this script.' \\\n         '' \\\n         '    -f, --themes-file FILE' \\\n         '        Set OMB Wiki \"themes\" page path.  This can also be specified through' \\\n         '        the environment variable \"OMB_WIKI_THEMES_FILE\".  The default is' \\\n         '        \"./wiki/Themes.md\"' \\\n         '' \\\n         '    -s | --start-marker START' \\\n         '        Set OMB Wiki \"themes\" page \"start\" marker.  This can also be specified' \\\n         '        through the environment variable \"OMB_WIKI_THEMES_START_MARKER\".  The' \\\n         '        default is \"<!-- OMB_WIKI_THEMES_START_MARKER -->\"' \\\n         '' \\\n         '    -e | --end-marker END' \\\n         '        Set OMB Wiki \"themes\" page \"end\" marker.  This can also be specified' \\\n         '        through the environment variable \"OMB_WIKI_THEMES_END_MARKER\".  The' \\\n         '        default is \"<!-- OMB_WIKI_THEMES_END_MARKER -->\"' \\\n         '' \\\n         '    --help' \\\n         '        Print this help.' \\\n         ''\n}\n\n# first process current env vars, with some sensible default fallback values...\n\nif [[ ! ${OMB_WORKING_TREE:-} ]]; then\n  # Determine the default location of the working tree of Oh My Bash based on\n  # ${BASH_SOURCE[0]}.\n  path=${BASH_SOURCE[0]-}\n  if [[ $path != */tools/* ]]; then\n    resolved_path=$(realpath \"$path\" 2>/dev/null || readlink -f \"$path\" 2>/dev/null) &&\n      [[ -e $resolved_path ]] &&\n      path=$resolved_path\n  fi\n  if [[ $path == */tools/* ]]; then\n    path=${path%/tools/*}\n  elif [[ $path == */* ]]; then\n    path=${path%/*}/..\n  else\n    path=..\n  fi\n  [[ -d $path ]] || path=.\n  OMB_WORKING_TREE=$path\nfi\n\nOMB_WIKI_THEMES_FILE=${OMB_WIKI_THEMES_FILE:-../oh-my-bash.wiki/Themes.md}\nOMB_WIKI_THEMES_START_MARKER=${OMB_WIKI_THEMES_START_MARKER:-'<!-- OMB_WIKI_THEMES_START_MARKER -->'}\nOMB_WIKI_THEMES_END_MARKER=${OMB_WIKI_THEMES_END_MARKER:-'<!-- OMB_WIKI_THEMES_END_MARKER -->'}\nOMB_WIKI_FLAG_HELP=\n\ndeclare -A OMB_THEME_SUBTITLE=(\n  [font]='(default theme)'\n)\n\n# then process any cli args, if provided...\n\nif ! VALID_ARGS=$(getopt -o p:f:s:e: --long help,omb-working-tree:themes-file:,start-marker:,end-marker: -- \"$@\"); then\n  exit 2\nfi\n\neval \"set -- $VALID_ARGS\"\nwhile (($#)); do\n  case $1 in\n  --help)\n    OMB_WIKI_FLAG_HELP=set\n    shift\n    ;;\n  -p | --omb-working-tree)\n    OMB_WORKING_TREE=$2\n    shift 2\n    ;;\n  -f | --themes-file)\n    # echo \"Processing 'themes-file' option. Input argument is '$2'\"\n    OMB_WIKI_THEMES_FILE=$2\n    shift 2\n    ;;\n  -s | --start-marker)\n    # echo \"Processing 'start-marker' option. Input argument is '$2'\"\n    OMB_WIKI_THEMES_START_MARKER=$2\n    shift 2\n    ;;\n  -e | --end-marker)\n    # echo \"Processing 'end-marker' option. Input argument is '$2'\"\n    OMB_WIKI_THEMES_END_MARKER=$2\n    shift 2\n    ;;\n  --)\n    shift\n    break\n    ;;\n  *)\n    break\n    ;;\n  esac\ndone\n\nif (($#)); then\n  printf '%s\\n' 'unrecognized arguments are specified.' >&2\n  print_usage >&2\n  exit 2\nfi\n\nif [[ $OMB_WIKI_FLAG_HELP ]]; then\n  print_help\n  exit 0\nfi\n\n# debug: this will either be adapted for the final script, or removed entirely..\nprintf '%s\\n' \"current OMB_WORKING_TREE: $OMB_WORKING_TREE\"\nprintf '%s\\n' \"current OMB_WIKI_THEMES_FILE: $OMB_WIKI_THEMES_FILE\"\nprintf '%s\\n' \"current OMB_WIKI_THEMES_START_MARKER: $OMB_WIKI_THEMES_START_MARKER\"\nprintf '%s\\n' \"current OMB_WIKI_THEMES_END_MARKER: $OMB_WIKI_THEMES_END_MARKER\"\n\n# verify the existence of the OMB working tree (which contains \"themes\"\n# subdirectory).\nif [[ ! -d $OMB_WORKING_TREE ]]; then\n  printf '%s\\n' \"ERROR: The OMB working tree '$OMB_WORKING_TREE' is not found.\"\n  exit 1\nfi\n\n# verify that the themes file exists...\nif [[ ! -f $OMB_WIKI_THEMES_FILE ]]; then\n  printf '%s\\n' \"ERROR: The themes file called '$OMB_WIKI_THEMES_FILE' does not exist.\"\n  exit 1\nfi\n\n# verify that the OMB Wiki contains the expected start and end markers...\nif ! grep -q \"$OMB_WIKI_THEMES_START_MARKER\" \"$OMB_WIKI_THEMES_FILE\"; then\n  printf '%s\\n' \"ERROR: Wiki themes file does not contain start marker '$OMB_WIKI_THEMES_START_MARKER'.\"\n  exit 1\nfi\nif ! grep -q \"$OMB_WIKI_THEMES_END_MARKER\" \"$OMB_WIKI_THEMES_FILE\"; then\n  printf '%s\\n' \"ERROR: Wiki themes file does not contain end marker '$OMB_WIKI_THEMES_END_MARKER'.\"\n  exit 1\nfi\n\n# now we get onto the fun stuff, lets get a list of all current themes...\n\n# find all themes in the current themes directory...\ntheme_list=$(find \"$OMB_WORKING_TREE/themes\" -mindepth 1 -maxdepth 1 -type d -print | sort | xargs -n1 basename)\n\n# prepare a variable to hold generated content, starting with with the \"start\" marker for next run...\nmarkdown_text=\"$OMB_WIKI_THEMES_START_MARKER\\n\\n\"\nmarkdown_text=\"$markdown_text<!-- DO NOT EDIT THIS SECTION MANUALLY!\\n     This section will be automatically overwritten. -->\\n\\n\"\n\n# now we can loop through the list and find all images in each theme directory...\nfor theme in $theme_list; do\n  theme_dir=$OMB_WORKING_TREE/themes/$theme\n\n  # Note: We skip the theme directories that do not have the actual theme file.\n  # The directory of renamed/removed themes may remain in the working tree when\n  # there are untracked files.\n  [[ -s $theme_dir/$theme.theme.sh || -s $theme_dir/$theme.theme.bash ]] || continue\n\n  image_list=$(find \"$theme_dir\" -type f -name \"*.png\" -o -name \"*.jpg\")\n\n  # start preparing a theme example markdown block...\n  title=\"\\`$theme\\`${OMB_THEME_SUBTITLE[$theme]:+ ${OMB_THEME_SUBTITLE[$theme]}}\"\n  markdown_text=\"$markdown_text## $title\\n\\n\"\n\n  # loop through the image list and add each image to the theme example entry...\n  if [[ ! -z $image_list ]]; then\n    for image in $image_list; do\n      # Extract filename and construct image URL\n      image_filename=$(basename \"$image\")\n      image_url=https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/themes/$theme/$image_filename\n\n      # append image to theme example markdown block...\n      markdown_text=\"$markdown_text![$theme]($image_url)\\n\"\n    done\n  else\n    markdown_text=\"${markdown_text}WARNING: theme contains no example images.\\n\"\n    printf '\\e[1;31m%s\\e[m\\n' \"WARNING: theme '$theme' contains no example images.\" >&2\n  fi\n\n  # add one more newline before moving on...\n  markdown_text=\"$markdown_text\\n\"\ndone\n\n# inject the \"end\" marker for next run...\nmarkdown_text=$markdown_text$OMB_WIKI_THEMES_END_MARKER\n\n# now we can update the OMB Wiki \"Themes\" page directly...\nsed \"/$OMB_WIKI_THEMES_START_MARKER/,/$OMB_WIKI_THEMES_END_MARKER/c\\\\\n$markdown_text\" \"$OMB_WIKI_THEMES_FILE\" > \"$OMB_WIKI_THEMES_FILE.part\" &&\n  mv -f \"$OMB_WIKI_THEMES_FILE.part\" \"$OMB_WIKI_THEMES_FILE\"\n"
  },
  {
    "path": "tools/upgrade.sh",
    "content": "#!/usr/bin/env bash\n\nfunction _omb_upgrade {\n  # Use colors, but only if connected to a terminal, and that terminal\n  # supports them.\n  local ncolors=\n  if type -P tput &>/dev/null; then\n    ncolors=$(tput colors)\n  fi\n\n  local RED GREEN BLUE BOLD NORMAL\n  if [[ -t 1 && $ncolors && $ncolors -ge 8 ]]; then\n    RED=$(tput setaf 1 2>/dev/null || tput AF 1 2>/dev/null)\n    GREEN=$(tput setaf 2 2>/dev/null || tput AF 2 2>/dev/null)\n    BLUE=$(tput setaf 4 2>/dev/null || tput AF 4 2>/dev/null)\n    BOLD=$(tput bold 2>/dev/null || tput md 2>/dev/null)\n    NORMAL=$(tput sgr0 2>/dev/null || tput me 2>/dev/null)\n  else\n\t  RED=\"\"\n\t  GREEN=\"\"\n\t  BLUE=\"\"\n\t  BOLD=\"\"\n\t  NORMAL=\"\"\n  fi\n\n  printf '%s\\n' \"${BLUE}Updating Oh My Bash${NORMAL}\"\n\n  # Note: The git option \"-C PATH\" is only supported from git-1.8.5\n  # (https://github.com/git/git/commit/44e1e4d6 2013-09).  On the other hand,\n  # the synonym \"--git-dir=PATH/.git --work-tree=PATH\" is supported from\n  # git-1.5.3 (https://github.com/git/git/commit/892c41b9 2007-06).\n  if ! command git --git-dir=\"$OSH/.git\" --work-tree=\"$OSH\" pull --rebase --stat origin master; then\n    # In case it enters the rebasing mode\n    printf '%s\\n' \"oh-my-bash: running 'git rebase --abort'...\"\n    command git --git-dir=\"$OSH/.git\" --work-tree=\"$OSH\" rebase --abort\n    printf \"${RED}%s${NORMAL}\\n\" \\\n           'There was an error updating.' \\\n           \"If you have uncommited changes in '$BOLD$OSH$NORMAL$RED', please commit, stash or discard them and retry updating.\" \\\n           \"If you have your own local commits in '$BOLD$OSH$NORMAL$RED' that conflict with the upstream changes, please resolve conflicts and merge the upstream manually.\"\n    return 1\n  fi\n\n  printf '%s' \"$GREEN\"\n  # shellcheck disable=SC1003,SC2016\n  printf '%s\\n' \\\n    '         __                          __               __  ' \\\n    '  ____  / /_     ____ ___  __  __   / /_  ____ ______/ /_ ' \\\n    ' / __ \\/ __ \\   / __ `__ \\/ / / /  / __ \\/ __ `/ ___/ __ \\' \\\n    '/ /_/ / / / /  / / / / / / /_/ /  / /_/ / /_/ (__  ) / / /' \\\n    '\\____/_/ /_/  /_/ /_/ /_/\\__, /  /_.___/\\__,_/____/_/ /_/ ' \\\n    '                        /____/                            '\n  printf \"${BLUE}%s\\n\" \"Hooray! Oh My Bash has been updated and/or is at the current version.\"\n  printf \"${BLUE}${BOLD}%s${NORMAL}\\n\" \"To keep up on the latest news and updates, follow us on GitHub: https://github.com/ohmybash/oh-my-bash\"\n  if [[ $- == *i* ]]; then\n    local _omb_upgrade_reload_bashrc=1\n    declare -f _omb_util_unload &>/dev/null && _omb_util_unload\n    # shellcheck disable=SC1090\n    source ~/.bashrc\n  fi\n}\n_omb_upgrade\n"
  }
]