Full Code of ohmybash/oh-my-bash for AI

master 05e6d038524c cached
304 files
1.0 MB
315.3k tokens
1 requests
Download .txt
Showing preview only (1,109K chars total). Download the full file or copy to clipboard to get everything.
Repository: ohmybash/oh-my-bash
Branch: master
Commit: 05e6d038524c
Files: 304
Total size: 1.0 MB

Directory structure:
gitextract_1l1cb4dc/

├── .editorconfig
├── .git-blame-ignore-revs
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── format.yml
│       ├── test.sh
│       └── test.yml
├── .gitignore
├── .shellcheckrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── aliases/
│   ├── README.md
│   ├── cargo.aliases.md
│   ├── cargo.aliases.sh
│   ├── chmod.aliases.sh
│   ├── debian.aliases.bash
│   ├── debian.aliases.md
│   ├── docker.aliases.md
│   ├── docker.aliases.sh
│   ├── general.aliases.md
│   ├── general.aliases.sh
│   ├── ls.aliases.sh
│   ├── misc.aliases.sh
│   ├── package-manager.aliases.bash
│   ├── package-manager.aliases.md
│   ├── terraform.aliases.md
│   └── terraform.aliases.sh
├── cache/
│   └── .gitkeep
├── completions/
│   ├── apm.completion.sh
│   ├── asdf.completion.sh
│   ├── awscli.completion.sh
│   ├── brew.completion.sh
│   ├── bundler.completion.sh
│   ├── capistrano.completion.sh
│   ├── chezmoi.completion.sh
│   ├── composer.completion.sh
│   ├── conda.completion.sh
│   ├── crc.completion.sh
│   ├── defaults.completion.sh
│   ├── dirs.completion.sh
│   ├── django.completion.sh
│   ├── docker-compose.completion.sh
│   ├── docker-machine.completion.sh
│   ├── docker.completion.sh
│   ├── drush.completion.sh
│   ├── fabric-completion.sh
│   ├── fallback/
│   │   ├── docker-compose.bash
│   │   └── docker.bash
│   ├── gem.completion.sh
│   ├── gh.completion.sh
│   ├── git.completion.bash
│   ├── git_flow.completion.sh
│   ├── git_flow_avh.completion.sh
│   ├── go.completion.sh
│   ├── gradle.completion.sh
│   ├── grunt.completion.sh
│   ├── gulp.completion.sh
│   ├── helm.completion.sh
│   ├── homesick.completion.sh
│   ├── hub.completion.sh
│   ├── jboss7.completion.sh
│   ├── jump.completion.sh
│   ├── jungle.completion.sh
│   ├── kontena.completion.sh
│   ├── kubectl.completion.sh
│   ├── makefile.completion.sh
│   ├── maven.completion.sh
│   ├── minikube.completion.sh
│   ├── npm.completion.sh
│   ├── nvm.completion.sh
│   ├── oc.completion.sh
│   ├── packer.completion.sh
│   ├── pip.completion.sh
│   ├── pip3.completion.sh
│   ├── projects.completion.sh
│   ├── rake.completion.sh
│   ├── salt.completion.sh
│   ├── sdkman.completion.sh
│   ├── ssh.completion.sh
│   ├── svn.completion.sh
│   ├── system.completion.sh
│   ├── terraform.completion.sh
│   ├── test_kitchen.completion.sh
│   ├── tkn.completion.sh
│   ├── tmux.completion.sh
│   ├── todo.completion.sh
│   ├── uv.completion.sh
│   ├── vagrant.completion.sh
│   ├── vault.completion.sh
│   └── virtualbox.completion.sh
├── lib/
│   ├── base.sh
│   ├── bourne-shell.sh
│   ├── cli.bash
│   ├── directories.sh
│   ├── functions.sh
│   ├── git.sh
│   ├── grep.sh
│   ├── history.sh
│   ├── misc.sh
│   ├── mo.sh
│   ├── nvm.sh
│   ├── omb-completion.sh
│   ├── omb-deprecate.sh
│   ├── omb-prompt-base.sh
│   ├── omb-prompt-colors.sh
│   ├── omb-util.sh
│   ├── readlink.sh
│   ├── shopt.sh
│   ├── spectrum.sh
│   ├── spinner.sh
│   ├── theme-and-appearance.sh
│   └── utils.sh
├── log/
│   └── .gitkeep
├── oh-my-bash.sh
├── plugins/
│   ├── README.md
│   ├── ansible/
│   │   ├── README.md
│   │   └── ansible.plugin.sh
│   ├── asdf/
│   │   ├── README.md
│   │   └── asdf.plugin.sh
│   ├── aws/
│   │   └── aws.plugin.sh
│   ├── bash-preexec/
│   │   ├── README.md
│   │   └── bash-preexec.plugin.sh
│   ├── bashmarks/
│   │   ├── README.md
│   │   └── bashmarks.plugin.sh
│   ├── battery/
│   │   ├── README.md
│   │   └── battery.plugin.sh
│   ├── brew/
│   │   ├── README.md
│   │   └── brew.plugin.sh
│   ├── bu/
│   │   └── bu.plugin.sh
│   ├── cargo/
│   │   ├── README.md
│   │   └── cargo.plugin.sh
│   ├── chezmoi/
│   │   ├── README.md
│   │   └── chezmoi.plugin.sh
│   ├── colored-man-pages/
│   │   ├── README.md
│   │   └── colored-man-pages.plugin.sh
│   ├── dotnet/
│   │   ├── README.md
│   │   └── dotnet.plugin.sh
│   ├── fasd/
│   │   └── fasd.plugin.sh
│   ├── fzf/
│   │   ├── README.md
│   │   └── fzf.plugin.sh
│   ├── gcloud/
│   │   ├── README.md
│   │   └── gcloud.plugin.sh
│   ├── git/
│   │   ├── README.md
│   │   └── git.plugin.sh
│   ├── goenv/
│   │   ├── README.md
│   │   └── goenv.plugin.sh
│   ├── golang/
│   │   ├── README.md
│   │   └── golang.plugin.sh
│   ├── jump/
│   │   ├── README.md
│   │   └── jump.plugin.sh
│   ├── kubectl/
│   │   ├── README.md
│   │   └── kubectl.plugin.sh
│   ├── npm/
│   │   ├── README.md
│   │   └── npm.plugin.sh
│   ├── nvm/
│   │   ├── README.md
│   │   └── nvm.plugin.sh
│   ├── progress/
│   │   ├── README.md
│   │   └── progress.plugin.sh
│   ├── pyenv/
│   │   ├── README.md
│   │   └── pyenv.plugin.sh
│   ├── rbenv/
│   │   ├── README.md
│   │   └── rbenv.plugin.sh
│   ├── sdkman/
│   │   ├── README.md
│   │   └── sdkman.plugin.sh
│   ├── starship/
│   │   ├── README.md
│   │   └── starship.plugin.sh
│   ├── sudo/
│   │   ├── README.md
│   │   └── sudo.plugin.sh
│   ├── tmux/
│   │   ├── README.md
│   │   └── tmux.plugin.bash
│   ├── tmux-autoattach/
│   │   ├── README.md
│   │   └── tmux-autoattach.plugin.sh
│   ├── vagrant/
│   │   ├── README.md
│   │   └── vagrant.plugin.sh
│   ├── virtualenvwrapper/
│   │   ├── README.md
│   │   └── virtualenvwrapper.plugin.sh
│   ├── xterm/
│   │   ├── README.md
│   │   └── xterm.plugin.bash
│   ├── zellij-autoattach/
│   │   ├── README.md
│   │   └── zellij-autoattach.plugin.sh
│   └── zoxide/
│       ├── README.md
│       └── zoxide.plugin.sh
├── templates/
│   ├── bash_profile.osh-template
│   └── bashrc.osh-template
├── themes/
│   ├── 90210/
│   │   ├── 90210.theme.sh
│   │   └── README.md
│   ├── THEMES.md
│   ├── absimple/
│   │   ├── README.md
│   │   └── absimple.theme.sh
│   ├── agnoster/
│   │   ├── README.md
│   │   └── agnoster.theme.sh
│   ├── axin/
│   │   ├── README.md
│   │   └── axin.theme.sh
│   ├── bakke/
│   │   ├── README.md
│   │   └── bakke.theme.sh
│   ├── binaryanomaly/
│   │   ├── README.md
│   │   └── binaryanomaly.theme.sh
│   ├── bobby/
│   │   ├── README.md
│   │   └── bobby.theme.sh
│   ├── bobby-python/
│   │   └── bobby-python.theme.sh
│   ├── brainy/
│   │   ├── README.md
│   │   └── brainy.theme.sh
│   ├── brunton/
│   │   └── brunton.theme.sh
│   ├── candy/
│   │   └── candy.theme.sh
│   ├── clean/
│   │   └── clean.theme.sh
│   ├── cooperkid/
│   │   └── cooperkid.theme.sh
│   ├── copied-duru/
│   │   ├── README.md
│   │   └── copied-duru.theme.sh
│   ├── cupcake/
│   │   └── cupcake.theme.sh
│   ├── demula/
│   │   └── demula.theme.sh
│   ├── developer/
│   │   └── developer.theme.sh
│   ├── dos/
│   │   └── dos.theme.sh
│   ├── doubletime/
│   │   └── doubletime.theme.sh
│   ├── doubletime_multiline/
│   │   └── doubletime_multiline.theme.sh
│   ├── doubletime_multiline_pyonly/
│   │   └── doubletime_multiline_pyonly.theme.sh
│   ├── dulcie/
│   │   └── dulcie.theme.sh
│   ├── duru/
│   │   └── duru.theme.sh
│   ├── edsonarios/
│   │   └── edsonarios.theme.sh
│   ├── emperor/
│   │   └── emperor.theme.sh
│   ├── envy/
│   │   └── envy.theme.sh
│   ├── font/
│   │   └── font.theme.sh
│   ├── gallifrey/
│   │   └── gallifrey.theme.sh
│   ├── garo/
│   │   └── garo.theme.sh
│   ├── half-life/
│   │   └── half-life.theme.sh
│   ├── hawaii50/
│   │   └── hawaii50.theme.sh
│   ├── ht/
│   │   └── ht.theme.sh
│   ├── iterate/
│   │   └── iterate.theme.sh
│   ├── kitsune/
│   │   └── kitsune.theme.sh
│   ├── lambda/
│   │   └── lambda.theme.sh
│   ├── luan/
│   │   └── luan.theme.sh
│   ├── lucky/
│   │   └── lucky.theme.sh
│   ├── mairan/
│   │   └── mairan.theme.sh
│   ├── mbriggs/
│   │   └── mbriggs.theme.sh
│   ├── minimal/
│   │   └── minimal.theme.sh
│   ├── minimal-gh/
│   │   └── minimal-gh.theme.sh
│   ├── modern/
│   │   └── modern.theme.sh
│   ├── modern-t/
│   │   └── modern-t.theme.sh
│   ├── morris/
│   │   └── morris.theme.sh
│   ├── n0qorg/
│   │   └── n0qorg.theme.sh
│   ├── nekolight/
│   │   ├── README.md
│   │   └── nekolight.theme.sh
│   ├── nekonight/
│   │   ├── nekonight.base.sh
│   │   └── nekonight.theme.sh
│   ├── nekonight_moon/
│   │   └── nekonight_moon.theme.sh
│   ├── nwinkler/
│   │   └── nwinkler.theme.sh
│   ├── nwinkler_random_colors/
│   │   ├── README.md
│   │   └── nwinkler_random_colors.theme.sh
│   ├── pete/
│   │   └── pete.theme.sh
│   ├── powerbash10k/
│   │   ├── README.md
│   │   └── powerbash10k.theme.sh
│   ├── powerline/
│   │   ├── README.md
│   │   ├── powerline.base.sh
│   │   └── powerline.theme.sh
│   ├── powerline-icon/
│   │   ├── README.md
│   │   ├── powerline-icon.base.sh
│   │   └── powerline-icon.theme.sh
│   ├── powerline-light/
│   │   ├── README.md
│   │   └── powerline-light.theme.sh
│   ├── powerline-multiline/
│   │   ├── README.md
│   │   ├── powerline-multiline.base.sh
│   │   └── powerline-multiline.theme.sh
│   ├── powerline-naked/
│   │   ├── README.md
│   │   ├── powerline-naked.base.sh
│   │   └── powerline-naked.theme.sh
│   ├── powerline-plain/
│   │   ├── README.md
│   │   ├── powerline-plain.base.sh
│   │   └── powerline-plain.theme.sh
│   ├── powerline-wizard/
│   │   ├── README.md
│   │   └── powerline-wizard.theme.sh
│   ├── primer/
│   │   └── primer.theme.sh
│   ├── pro/
│   │   └── pro.theme.sh
│   ├── pure/
│   │   └── pure.theme.sh
│   ├── purity/
│   │   └── purity.theme.sh
│   ├── pzq/
│   │   └── pzq.theme.sh
│   ├── rainbowbrite/
│   │   └── rainbowbrite.theme.sh
│   ├── rana/
│   │   └── rana.theme.sh
│   ├── random/
│   │   ├── README.md
│   │   └── random.theme.bash
│   ├── rjorgenson/
│   │   └── rjorgenson.theme.sh
│   ├── robbyrussell/
│   │   └── robbyrussell.theme.sh
│   ├── roderik/
│   │   └── roderik.theme.sh
│   ├── rr/
│   │   └── rr.theme.sh
│   ├── sexy/
│   │   └── sexy.theme.sh
│   ├── simple/
│   │   └── simple.theme.sh
│   ├── sirup/
│   │   └── sirup.theme.sh
│   ├── slick/
│   │   └── slick.theme.sh
│   ├── standard/
│   │   └── standard.theme.sh
│   ├── tonka/
│   │   └── tonka.theme.sh
│   ├── tonotdo/
│   │   └── tonotdo.theme.sh
│   ├── tylenol/
│   │   └── tylenol.theme.sh
│   ├── vscode/
│   │   └── vscode.theme.sh
│   ├── wanelo/
│   │   └── wanelo.theme.sh
│   ├── zitron/
│   │   └── zitron.theme.sh
│   └── zork/
│       └── zork.theme.sh
└── tools/
    ├── autossh.sh
    ├── bash-preexec.sh
    ├── check_for_upgrade.sh
    ├── git-completion.bash
    ├── git-prompt.sh
    ├── install.sh
    ├── uninstall.sh
    ├── update-wiki-themes.sh
    └── upgrade.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Matches multiple files with brace expansion notation
[*.{sh,py,yml}]
indent_style = space
indent_size = 2


================================================
FILE: .git-blame-ignore-revs
================================================
# style: Remove trailing whitespace and add missing final newlines
5cd1f0eb1668f06bf20378d6d4308fd4a1890581


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: nntoan
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.buymeacoffee.com/nntoan']# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/workflows/format.yml
================================================
name: "Check EditorConfig Format"
on:
  push:
    branches:
      - "*"
  pull_request:
    branches:
      - "*"
jobs:
  lint:
    runs-on: "ubuntu-22.04"
    steps:
      - name: "Get Changed Files"
        id: "files"
        uses: "masesgroup/retrieve-changed-files@v2"
        with:
          format: "json"
      - name: Check out code.
        uses: actions/checkout@v2
      - uses: 'actions/setup-go@v4'
        with:
          go-version: '1.20'
      - name: "Check EditorConfig Lint"
        env:
          EDITORCONFIG_FLAGS: '-disable-indent-size -disable-indentation'
        run: |
          sudo apt install -y jq
          go install 'github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@latest'
          readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
          ~/go/bin/editorconfig-checker ${{ env.EDITORCONFIG_FLAGS }} ${changed_files[@]}


================================================
FILE: .github/workflows/test.sh
================================================
#!/usr/bin/env bash

set -e

tmpdir=$(mktemp -d)

export OSH="$tmpdir/path with space"
export HOME="$tmpdir/home with space"
mkdir -p "$HOME"

OSH_REPOSITORY="$PWD" ./tools/install.sh

source "$HOME/.bashrc"

set | grep -aE "^OSH"

if [[ "$OSH_THEME" == "font" ]]; then
  echo "Installation succeeded"
else
  echo "Installation failed, \$OSH_THEME is not set to 'font'"
  exit 1
fi


================================================
FILE: .github/workflows/test.yml
================================================
name: Test

on:
  push:
    branches:
      - '*'
  pull_request:
    branches:
      - '*'

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        # ubuntu-20.04 available: https://github.com/actions/virtual-environments/issues/1816
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
          submodules: false
      - name: Upgrade bash on Mac
        if: runner.os == 'macOs'
        run: brew install bash
      - name: Install oh-my-bash
        shell: bash
        run: bash --noprofile --norc -i "$PWD/.github/workflows/test.sh"


================================================
FILE: .gitignore
================================================
# custom files
!/custom/aliases/example.aliases.sh
!/custom/completions/example.completion.sh
!/custom/plugins/example/
!/custom/themes/example/
!/custom/example.sh
/custom/

# temp files directories
/cache/
/log/
!/cache/.gitkeep
!/log/.gitkeep

# disabled files
*.swp
*.disabled
.idea/
*.tmp


================================================
FILE: .shellcheckrc
================================================
disable=SC1087 # Use braces when expanding arrays -- needed for Zsh, not Bash


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In 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.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project 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.

Project 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.

## Scope

This 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.

## Enforcement

Instances 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.

Project 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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
# CONTRIBUTING GUIDELINES

Oh-My-Bash is a community-driven project. Contribution is welcome, encouraged and appreciated.
It is also essential for the development of the project.

These guidelines are an attempt at better addressing the huge amount of pending
issues and pull requests. Please read them closely.

Foremost, be so kind as to [search](#use-the-search-luke). This ensures any contribution
you would make is not already covered.

* [Issues](#reporting-issues)
  * [You have a problem](#you-have-a-problem)
  * [You have a suggestion](#you-have-a-suggestion)
* [Pull Requests](#pull-requests)
  * [Getting started](#getting-started)
  * [You have a solution](#you-have-a-solution)
  * [New Theme](#new-theme)
  * [New Plugin](#new-plugin)
  * [Copyright and responsibility](#copyright-and-responsibility)
  * [Improving PR](#improving-pr)
* [Information sources (_aka_ search)](#use-the-search-luke)

**BONUS:** [Volunteering](#you-have-spare-time-to-volunteer)

## Reporting Issues

### You have a problem

Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
your problem.

If you find one, comment on it so we can know there are more people experiencing it.

If not, look at the [Troubleshooting](https://github.com/ohmybash/oh-my-bash/wiki/Troubleshooting)
page for instructions on how to gather data to better debug your problem.

Then, you can go ahead and create an issue with as much detail as you can provide.
It should include the data gathered as indicated above, along with:

1. How to reproduce the problem
2. What the correct behavior should be
3. What the actual behavior is

Please copy to anyone relevant (e.g. plugin maintainers) by mentioning their GitHub handle
(starting with `@`) in your message.

We will do our very best to help you.

### You have a suggestion

Please be so kind as to [search](#use-the-search-luke) for any open issue already covering
your suggestion.

If you find one, comment on it so we can know there are more people supporting it.

If not, you can go ahead and create an issue. Please copy to anyone relevant (_eg_ plugin
maintainers) by mentioning their GitHub handle (starting with `@`) in your message.

## Pull Requests

The code should work with Bash 3.2.  Make all the changes to be
POSIX-compatible for external tools unless it is related to a plugin that
clearly targets specific tools or environment such as "GNU make" or "macOS".

### Getting started

Before starting to work on it, please be so kind as to
[search](#use-the-search-luke) for any open issues, and any
pending/merged/rejected PRs covering or related to what you are going to
change.

- If you try to solve a [problem](#you-have-a-problem) and a solution to the
  problem is already reported, try it out and +1 the pull request if the
  solution works OK. On the other hand, if you think your solution is better,
  post it with a reference to the other one so we can have both solutions to
  compare.
- If you find an existing PR that is related, try it out and work with the
  author on a common solution.
- If not, then go ahead and submit a PR. Please copy to anyone relevant
  (e.g. plugin maintainers) by mentioning their GitHub handle (starting with
  `@`) in your message.

You should be familiar with the basics of
[contributing on GitHub](https://help.github.com/articles/using-pull-requests) and have a fork
[properly set up](https://github.com/ohmybash/oh-my-bash/wiki/Contribution-Technical-Practices).

You MUST always create a PR with _a dedicated branch_ (i.e., a branch that is
NOT `master`) based on the latest upstream tree.

The commit message typically has the following form (with the first word in the
verbal phrase being in the infinitive and capitalized):

```
<section>: <Verb phrase to describe the change>

<detailed description if any>
```

The conventional commits are also accepted:

```
<type>(<section>): <verb phrase to describe the change>

<detailed description if any>
```

When you open a new PR, please make sure you do it right. Also, reference in
the PR description body any issues that would be solved by the PR, [for
instance](https://help.github.com/articles/closing-issues-via-commit-messages/)
_"Fixes #XXXX"_ for issue number XXXX.

### You have a solution

If you try to fix a problem or solve an issue in a specific
plugin/theme/aliases, please also check the other modules if they have a
similar issue or can be improved in a similar way.

### New Theme

A new theme is often created by modifying an existing theme.  In that case,
please clarify from which theme the new theme is derived from.  If possible, it
is recommended to source the original theme file
`"$OSH"/themes/<original>/<original>.base.sh` or
`"$OSH"/themes/<original>/<original>.theme.sh` in the new theme file
`"$OSH"/themes/<new>/<new>.theme.sh` and include only the new parts in the new
theme file.

The theme needs to have exactly one image file.  The image size needs to be
height ~290px and width 600..800px to make the theme gallery aligned and also
to keep the repository size small. The filename should be `<theme
name>-dark.png` or `<theme name>-light.png` depending on the dark or light
background of the terminal used to make the image.  The image should be
unscaled screen shot of a terminal.  If the terminal size is larger than the
expected image size, the image should be clipped instead of being resized and
downscaled.

When you add a new theme, please also update
[themes/THEMES.md](https://github.com/ohmybash/oh-my-bash/blob/master/themes/THEMES.md).
After your new theme is merged, the list in
[Themes](https://github.com/ohmybash/oh-my-bash/wiki/Themes) in the wiki also
needs to be updated.

### New Plugin

A new plugin is accepted when it is needed to implement features in themes or
when it provides significantly useful tools for interactive uses.  To show that
it is worth including in Oh My Bash, you will have to find testers to +1 your
PR.

When you add a new plugin, please also update
[plugins/README.md](https://github.com/ohmybash/oh-my-bash/blob/master/plugins/README.md).

### Copyright and responsibility

If you submit codes derived from other's work, please confirm that the license
is compatible with the MIT license.  Please clarify which part is your own work
and which is not in the code and include **the copyright notice of the original
authors**.  You may also include your own copyright notice, but we may omit
them because we can track them in the Git history.

You can provide codes under any licenses which are compatible with the MIT
license.  When you submit and update a PR (*NOT when the PR is merged*), unless
otherwise specified, **we assume that you provide the codes/texts under the MIT
license**.  If you would like to provide the codes/texts with another license,
please specify it in the codes/texts.  If you forgot to declare the license
that is not MIT, you can later declare it for the part you contributed.

Do not submit AI-generated codes/documentation unless you understand both the
generated codes/documentation and the related **exiting codebase**.  You are
required to be responsible for requests to the changes and reports of the
issues for the submitted codes/documentation.  Also, please confirm that the
generated codes/texts can be included in Oh My Bash **with your own copyright
under the MIT license**.

### Improving PR

After opening PRs, you will usually receive requests for changes.  It is rare
for a PR to be merged without any modifications.  Please be so kind as to
respond to the requests.  If you have any questions, please feel free to ask
further.  If you become busy, please tell us that instead of ignoring our
messages.  You are expected to notify when you will be available again, hand
over the PR to others, or to notify that you would discard the PR.

After the final version of the PR is settled, the fix-up commits that fix
problems introduced in earlier commits in the same PR will be squashed.  Also,
the commits whose purposes heavily overlap will be squashed.

For this reason, a weight of one commit is not equal for different types of
contributions.  For the new theme/plugin/aliases, the PR is likely to be
squashed into a single commit unless the changes are properly separated into
commits for respective purposes.  On the other hand, PRs including several
minor fixes to the exiting codebase will not be squashed because each commit
gives a separate fix to the exiting code.

### Naming convention of functions and global variables

Initially, we haven't cared about the naming convention very much, but we now
try to improve it.  In particular, the new codes should follow this naming
convention.  The contributions to improve old codes are also welcome, but we
also need to keep the backward compatibility.  See [Discussion
#280](https://github.com/ohmybash/oh-my-bash/discussions/280) for background.

The functions/aliases that are supposed to be used as interactive commands can
have arbitrary names including short ones.

The functions that are used from the other functions have the names of the form
`_omb_*`.

* The functions defined by libraries has the form `_omb_${namespace}_${funcname}`
* The functions defined by a specific plugin has the form `_omb_plugin_${plugin_name}_${funcname}`
* The functions defined by a specific theme has the form `_omb_theme_${theme_name}_${funcname}`
* Some important functions might have the name `_omb_${funcname}` directly put under `_omb` namespace.

Public global variables that can be used to configure the behavior of
oh-my-bash have the form `OMB_*`.

* The settings for the main oh-my-bash behavior have the names of the form `OMB_${config^^}`
* The settings for the detailed behavior have the names of the form `OMB_${namespace^^}_${config^^}`
* The settings for a specific plugin has the form `OMB_PLUGIN_${plugin_name^^}_${config^^}`
* The settings for a specific theme has the form `OMB_THEME_${theme_name^^}_${config^^}`

Internal global variables put into global variables used by oh-my-bash has the
form `_omb_*`.

* The internal variables defined by libraries has the form `_omb_${namespace}_${varname}`
* The internal variables used by a specific plugin has the form `_omb_plugin_${plugin_name}_${varname}`
* The internal variables used by a specific theme has the form `_omb_theme_${theme_name}_${varname}`
* Some important variables might have the name `_omb_${varname}` directly put under `_omb` namespace.

There are no restrictions on the local variable names.  A prefix like
`_omb_${namespace}_` is unnecessary because the namespace of the local
variables is separated for each function call.

----

## Use the Search, Luke

_May the Force (of past experiences) be with you_

GitHub offers [many search features](https://help.github.com/articles/searching-github/)
to help you check whether a similar contribution to yours already exists. Please search
before making any contribution, it avoids duplicates and eases maintenance. Trust me,
that works 90% of the time.

You can also take a look at the [FAQ](https://github.com/ohmybash/oh-my-bash/wiki/FAQ)
to be sure your contribution has not already come up.

If all fails, your thing has probably not been reported yet, so you can go ahead
and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-requests).

----

### You have spare time to volunteer

Very nice!! :)

Please have a look at the [Volunteer](https://github.com/ohmybash/oh-my-bash/wiki/Volunteers)
page for instructions on where to start and more.


================================================
FILE: LICENSE.md
================================================
Copyright (c) 2009-2017 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors)

Copyright 2017-present Toan Nguyen and contributors (https://github.com/ohmybash/oh-my-bash/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
Oh My Bash is an open source, community-driven framework for managing your [bash](https://www.gnu.org/software/bash/) configuration.

Sounds boring. Let's try again.

Oh My Bash will not make you a 10x developer...but you might feel like one.

Once 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?"

Finally, 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.

## Getting Started

### Prerequisites

__Disclaimer:__ _Oh My Bash works best on macOS and Linux._

* Unix-like operating system (macOS or Linux)
* `curl` or `wget` should be installed
* `git` should be installed

### Basic Installation

Oh 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`.

#### via curl

```shell
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
```

#### via wget

```shell
bash -c "$(wget https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)"
```

This replaces `~/.bashrc` with the version provided by Oh My Bash. The original `.bashrc` is backed up with the name `~/.bashrc.omb-TIMESTAMP`.
If `~/.bash_profile` does not exist, this also creates a new file `~/.bash_profile` with the default contents.

⚠️ If `~/.bash_profile` already existed before Oh My Bash is installed, please make sure that`~/.bash_profile` contains the line `source ~/.bashrc` or `. ~/.bashrc`.
If not, please add the following three lines in `~/.bash_profile`:
```bash
if [[ -f ~/.bashrc ]]; then
  source ~/.bashrc
fi
```

## Using Oh My Bash

### Plugins

Oh 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.

#### Enabling Plugins

Once 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.

For example, this line might begin to look like this:

```shell
plugins=(git bundler osx rake ruby)
```

##### With Conditionals

You may want to control when and/or how plugins should be enabled.

For 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.

``` bash
[ "$SSH_TTY" ] && plugins+=(tmux-autoattach)
```

#### Using Plugins

Most plugins (should! we're working on this) include a __README__, which documents how to use them.

### Themes

We'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.

#### Selecting a Theme

_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._

Once 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:

```shell
OSH_THEME="font"
```

To use a different theme, simply change the value to match the name of your desired theme. For example:

```shell
OSH_THEME="agnoster" # (this is one of the fancy ones)
# you might need to install a special Powerline font on your console's host for this to work
# see https://github.com/ohmybash/oh-my-bash/wiki/Themes#agnoster
```

Open up a new terminal window and your prompt should look something like this:

![Font theme](themes/font/font-dark.png)

In case you did not find a suitable theme for your needs, please have a look
at the wiki for [more of them](https://github.com/ohmybash/oh-my-bash/wiki/Themes).

If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window.

```shell
OSH_THEME="random" # (...please let it be pie... please be some pie..)
```

If you want to randomly select a theme from a specified list, you can set the
list in the following array:

```shell
OMB_THEME_RANDOM_CANDIDATES=("font" "powerline-light" "minimal")
```

If there are themes you don't like, you can add them to an ignored list:

```shell
OMB_THEME_RANDOM_IGNORED=("powerbash10k" "wanelo")
```

The selected theme name can be checked by the following command:

```shell
$ echo "$OMB_THEME_RANDOM_SELECTED"
```

## Advanced Topics

If you're the type that likes to get their hands dirty, these sections might resonate.

### Advanced Installation

Some users may want to change the default path, or manually install Oh My Bash.

#### Custom Directory

The default location is `~/.oh-my-bash` (hidden in your home directory)

If 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:

```shell
export OSH="$HOME/.dotfiles/oh-my-bash"; bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)"
```

#### Unattended install

If you're running the Oh My Bash install script as part of an automated install, you can pass the
flag `--unattended` to the `install.sh` script. This will have the effect of not trying to change
the default shell, and also won't run `bash` when the installation has finished.

```sh
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" --unattended
```

#### System-wide installation

For 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`.

```sh
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohmybash/oh-my-bash/master/tools/install.sh)" --prefix=/usr/local
```

To enable Oh My Bash, the Bash startup file `.bashrc` needs to be manually set up by each user.
The template of `.bashrc` is available in `PREFIX/share/oh-my-bash/bashrc`.
The users can copy the template file to `~/.bashrc` and edit it.

```bash
cp /usr/local/share/oh-my-bash/bashrc ~/.bashrc
```

#### Manual Installation

##### 1. Clone the repository:

```shell
git clone https://github.com/ohmybash/oh-my-bash.git ~/.oh-my-bash
```

##### 2. *Optionally*, backup your existing `~/.bashrc` file:

```shell
cp ~/.bashrc ~/.bashrc.orig
```

##### 3. Create a new sh configuration file

You can create a new sh config file by copying the template that we have included for you.

```shell
cp ~/.oh-my-bash/templates/bashrc.osh-template ~/.bashrc
```

##### 4. Reload your .bashrc

```shell
source ~/.bashrc
```

##### 5. Initialize your new bash configuration

Once you open up a new terminal window, it should load sh with Oh My Bash's configuration.

### Installation Problems

If you have any hiccups installing, here are a few common fixes.

* You _might_ need to modify your `PATH` in `~/.bashrc` if you're not able to find some commands after switching to `oh-my-bash`.
* If you installed manually or changed the install location, check the `OSH` environment variable in `~/.bashrc`.

### Customization of  Plugins and Themes

If you want to override any of the default behaviors, just add a new file (ending in `.sh`) in the `custom/` directory.

If you have many functions that go well together, you can put them as a
`XYZ.plugin.sh` file in the `custom/plugins/XYZ` directory and then enable this
plugin by adding the name to the `plugins` array in `~/.bashrc`.

If you would like to modify an existing module
(theme/plugin/aliases/completion) bundled with Oh My Bash, first copy the
original module to `custom/` directory and modify it.  It will be loaded
instead of the original one when it is enabled through
`OSH_THEME`/`plugins`/`aliases`/`completions` in `~/.bashrc`.

```bash
$ mkdir -p "$OSH_CUSTOM/themes"
$ cp -r {"$OSH","$OSH_CUSTOM"}/themes/agnoster
$ EDIT "$OSH_CUSTOM/themes/agnoster/agnoster.theme.sh"
```

If you would like to track the upstream changes for your customized version of
modules, you can optionally directly edit the original files and commit them.
In this case, you need to handle possible conflicts with the upstream
(`github.com/ohmybash/oh-my-bash`) in upgrading.

If you want to replace an existing module (theme/plugin/aliases/complet)
bundled with Oh My Bash, create a module of the same name in the `custom/`
directory so that it will be loaded instead of the original one.

### Configuration

#### Enable/disable python venv

The python virtualenv/condaenv information in the prompt may be enabled by the following line in `~/.bashrc`.

```bash
OMB_PROMPT_SHOW_PYTHON_VENV=true
```

Some themes turn on it by default.  If you would like to turn it off, you may disable it by the following line in `~/.bashrc`:

```bash
OMB_PROMPT_SHOW_PYTHON_VENV=false
```

#### Enable/disable Spack environment information

To enable the Spack environment information in the prompt, please set the
following shell variable in `~/.bashrc`:

```bash
OMB_PROMPT_SHOW_SPACK_ENV=true
```

If the theme supports it, the information of the currently active Spack
environment will be shown.  If the theme you use does not support the Spack
environment information, a pull request to add it is welcome.  See the `font`
theme as an example implementation of including the Spack environment.

#### Disable internal uses of `sudo`

Some 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`.

```bash
OMB_USE_SUDO=false
```

Each plugin might provides finer configuration variables to control the use of `sudo` by each plugin.

## Getting Updates

By 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`:

```shell
DISABLE_UPDATE_PROMPT=true
```

To disable automatic upgrades, set the following in your `~/.bashrc`:

```shell
DISABLE_AUTO_UPDATE=true
```

### Manual Updates

If 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:

```shell
upgrade_oh_my_bash
```

Magic!

## Uninstalling Oh My Bash

Oh My Bash isn't for everyone. We'll miss you, but we want to make this an easy breakup.

If 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.

## Contributing

Check out [`CONTRIBUTING.md`](CONTRIBUTING.md) and also [Code of
Conduct](CODE_OF_CONDUCT.md).

This project is initially ported from Oh My Zsh and Bash-it by `@nntoan` and
has been developed in a community-driven way.  Most of the contributors are far
from being [Bash](https://www.gnu.org/software/bash/) experts, and there are
many ways to improve the codebase.  We are looking for more people with
expertise in Bash scripting.  If you have ideas on how to make the
configuration easier to maintain (and faster), don't hesitate to fork and send
pull requests!

We also need people to test out pull-requests.  Take a look through [the open
issues](https://github.com/ohmybash/oh-my-bash/issues) and help where you can.

## Contributors

Oh 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.

Thank you so much!

## License

See [`LICENSE.md`](License.md).
Oh My Bash is derived from [Oh My Zsh](https://github.com/ohmyzsh/ohmyzsh).
Oh My Bash is released under the [MIT license](LICENSE.md).


================================================
FILE: aliases/README.md
================================================
# aliases

An `aliases` module define a set of aliases closely related with each other.
To activate an `aliases` module, add the name of the module in the `aliases`
array in your `~/.bashrc`:

```bash
aliases=(... <ALIASES_NAME>)
```

where `<ALIASES_NAME>` should be related by the name of the module to activate.

## List of aliases modules

See the respective pages for details.

- `chmod`
- [`debian`](debian.aliases.md)
- [`docker`](docker.aliases.md)
- [`general`](general.aliases.md)
- `ls`
- `misc`
- [`package-manager`](package-manager.aliases.md)
- [`terraform`](terraform.aliases.md)
- [`cargo`](cargo.aliases.md)


================================================
FILE: aliases/cargo.aliases.md
================================================
# Aliases `cargo`

| Alias | Command                 | Description                                    |
|-------|-------------------------|------------------------------------------------|
| cg    | 'cargo'                 | launch cargo                                   |
| cgr   | 'cargo run'             | run project                                    |
| cgt   | 'cargo test'            | run tests                                      |
| cgb   | 'cargo build'           | building a project                             |
| cgbr  | 'cargo build --release' | building a project with compiler optimizations |
| cgi   | 'cargo init'            | initialize the project inside the directory    |
| cgn   | 'cargo new'             | create a new project                           |
| cga   | 'cargo add'             | add a new dependency to the project            |
| cgf   | 'cargo fmt'             | start formatting linters                       |


================================================
FILE: aliases/cargo.aliases.sh
================================================
#! bash oh-my-bash.module

alias cg='cargo'
alias cgr='cargo run'
alias cgt='cargo test'
alias cgb='cargo build'
alias cgbr='cargo build --release'
alias cgi='cargo init'
alias cgn='cargo new'
alias cga='cargo add'
alias cgf='cargo fmt'


================================================
FILE: aliases/chmod.aliases.sh
================================================
#! bash oh-my-bash.module
#  ---------------------------------------------------------------------------

alias perm='stat --printf "%a %n \n "'      # perm: Show permission of target in number
alias 000='chmod 000'                       # ---------- (nobody)
alias 640='chmod 640'                       # -rw-r----- (user: rw, group: r)
alias 644='chmod 644'                       # -rw-r--r-- (user: rw, group: r, other: r)
alias 755='chmod 755'                       # -rwxr-xr-x (user: rwx, group: rx, other: rx)
alias 775='chmod 775'                       # -rwxrwxr-x (user: rwx, group: rwx, other: rx)
alias mx='chmod a+x'                        # ---x--x--x (user: --x, group: --x, other: --x)
alias ux='chmod u+x'                        # ---x------ (user: --x, group: -, other: -)


================================================
FILE: aliases/debian.aliases.bash
================================================
#!/usr/bin/env bash
# Short aliases for most used debian specific commands.

alias apup='sudo apt update'
alias apug='sudo apt upgrade'
alias apuu='sudo apt update && sudo apt upgrade'
alias apfu='sudo apt full-upgrade'

alias apin='sudo apt install'
alias apri='sudo apt install --reinstall'

alias aprm='sudo apt remove'
alias apur='sudo apt purge'
alias apar='sudo apt autoremove'
alias apcl='sudo apt-get autoclean'

alias apse='apt search'
alias apsh='apt show'
alias apsc='apt-get source'
alias apesr='sudo apt edit-sources'
alias apdl='apt-get download'

alias apbd='sudo apt build-deb'
alias aphst='cat /var/log/apt/history.log | less'

alias drcf='sudo dpkg-reconfigure'

alias upgrb='sudo update-grub'
alias uirfs='sudo update-initramfs -u'


================================================
FILE: aliases/debian.aliases.md
================================================
# Aliases `debian`

Shorted aliases for most used Debian specific commands.
To activate it, add `debian` to `aliases=(...)` in your `.bashrc` file:

```bash
aliases=(... debian)`
```

## Basic Commands

| Alias  | Command                               |
| ------ | ------------------------------------- |
| `apup` | `sudo apt update`                     |
| `apug` | `sudo apt upgrade`                    |
| `apuu` | `sudo apt update && sudo apt upgrade` |
| `apfu` | `sudo apt full-upgrade`               |
| `apin` | `sudo apt install`                    |
| `apri` | `sudo apt install --reinstall `       |
| `aprm` | `sudo apt remove`                     |
| `apur` | `sudo apt purge`                      |
| `apse` | `apt search`                          |
| `apdl` | `apt-get download`                    |

## APT Maintainance & Diagnostic Commands

| Alias   | Command                                                |
| ------- | ------------------------------------------------------ |
| `apar`  | `sudo apt autoremove`                                  |
| `apcl`  | `sudo apt-get autoclean`                               |
| `apesr` | `sudo apt edit-sources`                                |
| `apsh`  | `apt show`                                             |
| `aphst` | <code>cat /var/log/apt/history.log &#124; less </code> |
| `drcf`  | `sudo dpkg-reconfigure`                                |

## APT Source & Building Commands

| Alias  | Command              |
| ------ | -------------------- |
| `apsc` | `apt-get source`     |
| `apbd` | `sudo apt build-deb` |

## Debian's update-\* commands

| Alias   | Command                    |
| ------- | -------------------------- |
| `upgrb` | `sudo update-grub`         |
| `uirfs` | `sudo update-initramfs -u` |


================================================
FILE: aliases/docker.aliases.md
================================================
# Aliases `Docker`

|  Alias    |  Command                      |  Description                                                                             |
| :------   | :---------------------------- | :--------------------------------------------------------------------------------------- |
| `dbl`     | `docker build`                | Build an image from a Dockerfile                                                         |
| `dcin`    | `docker container inspect`    | Display detailed information on one or more containers                                   |
| `dcls`    | `docker container ls`         | List all the running docker containers                                                   |
| `dclsa`   | `docker container ls -a`      | List all running and stopped containers                                                  |
| `dib`     | `docker image build`          | Build an image from a Dockerfile (same as docker build)                                  |
| `dii`     | `docker image inspect`        | Display detailed information on one or more images                                       |
| `dils`    | `docker image ls`             | List docker images                                                                       |
| `dipu`    | `docker image push`           | Push an image or repository to a remote registry                                         |
| `dirm`    | `docker image rm`             | Remove one or more images                                                                |
| `dit`     | `docker image tag`            | Add a name and tag to a particular image                                                 |
| `dlo`     | `docker container logs`       | Fetch the logs of a docker container                                                     |
| `dnc`     | `docker network create`       | Create a new network                                                                     |
| `dncn`    | `docker network connect`      | Connect a container to a network                                                         |
| `dndcn`   | `docker network disconnect`   | Disconnect a container from a network                                                    |
| `dni`     | `docker network inspect`      | Return information about one or more networks                                            |
| `dnls`    | `docker network ls`           | List all networks the engine daemon knows about, including those spanning multiple hosts |
| `dnrm`    | `docker network rm`           | Remove one or more networks                                                              |
| `dpo`     | `docker container port`       | List port mappings or a specific mapping for the container                               |
| `dpu`     | `docker pull`                 | Pull an image or a repository from a registry                                            |
| `dr`      | `docker container run`        | Create a new container and start it using the specified command                          |
| `drit`    | `docker container run -it`    | Create a new container and start it in an interactive shell                              |
| `drm`     | `docker container rm`         | Remove the specified container(s)                                                        |
| `drm!`    | `docker container rm -f`      | Force the removal of a running container (uses SIGKILL)                                  |
| `dst`     | `docker container start`      | Start one or more stopped containers                                                     |
| `drs`     | `docker container restart`    | Restart one or more containersa                                                          |
| `dsta`    | `docker stop $(docker ps -q)` | Stop all running containers                                                              |
| `dstp`    | `docker container stop`       | Stop one or more running containers                                                      |
| `dtop`    | `docker top`                  | Display the running processes of a container                                             |
| `dvi`     | `docker volume inspect`       | Display detailed information about one or more volumes                                   |
| `dvls`    | `docker volume ls`            | List all the volumes known to docker                                                     |
| `dvprune` | `docker volume prune`         | Cleanup dangling volumes                                                                 |
| `dxc`     | `docker container exec`       | Run a new command in a running container                                                 |
| `dxcit`   | `docker container exec -it`   | Run a new command in a running container in an interactive shell                         |


================================================
FILE: aliases/docker.aliases.sh
================================================
# This is a direct copy of https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/docker/docker.plugin.zsh
alias dbl='docker build'
alias dcin='docker container inspect'
alias dcls='docker container ls'
alias dclsa='docker container ls -a'
alias dib='docker image build'
alias dii='docker image inspect'
alias dils='docker image ls'
alias dipu='docker image push'
alias dirm='docker image rm'
alias dit='docker image tag'
alias dlo='docker container logs'
alias dnc='docker network create'
alias dncn='docker network connect'
alias dndcn='docker network disconnect'
alias dni='docker network inspect'
alias dnls='docker network ls'
alias dnrm='docker network rm'
alias dpo='docker container port'
alias dpu='docker pull'
alias dr='docker container run'
alias drit='docker container run -it'
alias drm='docker container rm'
alias 'drm!'='docker container rm -f'
alias dst='docker container start'
alias drs='docker container restart'
alias dsta='docker stop $(docker ps -q)'
alias dstp='docker container stop'
alias dtop='docker top'
alias dvi='docker volume inspect'
alias dvls='docker volume ls'
alias dvprune='docker volume prune'
alias dxc='docker container exec'
alias dxcit='docker container exec -it'


================================================
FILE: aliases/general.aliases.md
================================================
# Aliases `general`

This plugin provides aliases originally introduced in a blog post by Nathaniel
Landau (2013-07-02) [1] and later modified:

- [1] Nathaniel Landau, ["My Mac OSX Bash Profile"](https://natelandau.com/my-mac-osx-bash_profile/), 2013-07-02.

## Basic Commands

| Alias          | Command                                | Description                                                                        |
|----------------|----------------------------------------|------------------------------------------------------------------------------------|
| `c`            | `clear`                                | Clear terminal display                                                             |
| `cic`          | `bind "set completion-ignore-case on"` | Make tab-completion case-insensitive                                               |
| `cp`           | `cp -iv`                               | `cp` with confirmation on overwriting (option `-v` is added if supported)          |
| `fix_stty`     | `stty sane`                            | Restore terminal settings when screwed up                                          |
| `fix_term`     | `echo -e "\033c"`                      | Reset the conosle.  Similar to the reset command                                   |
| `less`         | `less -FSRXc`                          | Preferred `less` implementation                                                    |
| `ll`           | `ls -lAFh`                             | Preferred `ls` implementation                                                      |
| `mkdir`        | `mkdir -pv`                            | Recursive `mkdir` if the target does not exist (option `-v` is added if supported) |
| `mv`           | `mv -iv`                               | `mv` with confirmation on overwriting (option `-v` is added if supported)          |
| `nano`         | `nano -W`                              | (option `-W` is added if supported)                                                |
| `path`         | `echo -e ${PATH//:/\\n}`               | Echo all executable Paths                                                          |
| `show_options` | `shopt`                                | display bash options settings                                                      |
| `src`          | `source ~/.bashrc`                     | Reload `.bashrc` file                                                              |
| `wget`         | `wget -c`                              | Preferred `wget` implementation (resume download)                                  |


================================================
FILE: aliases/general.aliases.sh
================================================
#! bash oh-my-bash.module
#------------------------------------------------------------------------------
# Note on copyright (2022-08-23): The aliases defined in this file seems to
# originally come from a blog post [1].  See also the comments in lib/base.sh.
#
# [1] Nathaniel Landau, "My Mac OSX Bash Profile",
#     https://natelandau.com/my-mac-osx-bash_profile/, 2013-07-02.
#
#------------------------------------------------------------------------------
#  Description:  This file holds all general BASH aliases
#
#  For your own benefit, we won't load all aliases in the general, we will
#  keep the very generic command here and enough for daily basis tasks.
#
#  If you are looking for the more sexier aliases, we suggest you take a look
#  into other core alias files which installed by default.
#
#------------------------------------------------------------------------------

#   -----------------------------
#   1.  MAKE TERMINAL BETTER
#   -----------------------------

# Preferred 'cp' implementation.  Determines the use of the option `-v' on the
# first call Ref. https://github.com/ohmybash/oh-my-bash/issues/351
function _omb_util_alias_select_cp {
  if (tmp=$(_omb_util_mktemp); trap 'rm -f "$tmp"{,.2}' EXIT; command cp -v "$tmp" "$tmp.2" &>/dev/null); then
    _omb_command='cp -iv'
  else
    _omb_command='cp -i'
  fi
}
_omb_util_alias_delayed cp force

# Preferred 'mv' implementation
function _omb_util_alias_select_mv {
  if (tmp=$(_omb_util_mktemp); trap 'rm -f "$tmp.2"' EXIT; command mv -v "$tmp" "$tmp.2" &>/dev/null); then
    _omb_command='mv -iv'
  else
    _omb_command='mv -i'
  fi
}
_omb_util_alias_delayed mv force

# Preferred 'mkdir' implementation
function _omb_util_alias_select_mkdir {
  if command mkdir -pv . &>/dev/null; then
    _omb_command='mkdir -pv'
  else
    _omb_command='mkdir -p'
  fi
}
_omb_util_alias_delayed mkdir force

# Preferred 'nano' implementation
function _omb_util_alias_select_nano {
  if LANG=C command nano --help 2>/dev/null | grep -q '^[[:space:]]*[-]W'; then
    _omb_command='nano -W'
  else
    _omb_command='nano'
  fi
}
_omb_util_alias_delayed nano force

alias ll='ls -lAFh'                         # Preferred 'ls' implementation
alias less='less -FSRXc'                    # Preferred 'less' implementation
alias wget='wget -c'                        # Preferred 'wget' implementation (resume download)
alias c='clear'                             # c:            Clear terminal display
alias path='echo -e ${PATH//:/\\n}'         # path:         Echo all executable Paths
alias show_options='shopt'                  # Show_options: display bash options settings
alias fix_stty='stty sane'                  # fix_stty:     Restore terminal settings when screwed up
alias fix_term='echo -e "\033c"'            # fix_term:     Reset the conosle.  Similar to the reset command
alias cic='bind "set completion-ignore-case on"' # cic:          Make tab-completion case-insensitive
alias src='source ~/.bashrc'                # src:          Reload .bashrc file


================================================
FILE: aliases/ls.aliases.sh
================================================
#! bash oh-my-bash.module
#  ---------------------------------------------------------------------------

# Directory Listing aliases
alias dir='ls -hFx'
alias l.='ls -d .* --color=tty' # short listing, only hidden files - .*
alias l='ls -lathF'             # long, sort by newest to oldest
alias L='ls -latrhF'            # long, sort by oldest to newest
alias la='ls -Al'               # show hidden files
alias lc='ls -lcr'              # sort by change time
alias lk='ls -lSr'              # sort by size
alias lh='ls -lSrh'             # sort by size human readable
alias lm='ls -al | more'        # pipe through 'more'
alias lo='ls -laSFh'            # sort by size largest to smallest
alias lr='ls -lR'               # recursive ls
alias lt='ls -ltr'              # sort by date
alias lu='ls -lur'              # sort by access time


#   lr:  Full Recursive Directory Listing
#   ------------------------------------------
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/   /'\'' -e '\''s/-/|/'\'' | less'

alias dud='du -d 1 -h'                      # Short and human-readable directory listing
alias duf='du -sh *'                        # Short and human-readable file listing


================================================
FILE: aliases/misc.aliases.sh
================================================
#! bash oh-my-bash.module
#------------------------------------------------------------------------------
# Note on copyright (2022-08-23): The aliases defined in this file seems to
# originally come from a blog post [1].  See also the comments in lib/base.sh.
#
# [1] Nathaniel Landau, "My Mac OSX Bash Profile",
#     https://natelandau.com/my-mac-osx-bash_profile/, 2013-07-02.
#
#------------------------------------------------------------------------------
#  Description:  This file holds many useful BASH aliases and save our lives!
#
#  Sections:
#  1.   File and Folder Management
#  2.   Searching
#  3.   Process Management
#  4.   Networking
#  5.   System Operations & Information
#  6.   Date & Time Management
#  7.   Web Development
#  8.   <your_section>
#
#  X.   Reminders & Notes
#
#------------------------------------------------------------------------------

#   -------------------------------
#   1.  FILE AND FOLDER MANAGEMENT
#   -------------------------------

alias numFiles='_omb_util_print $(ls -1 | wc -l)'       # numFiles:     Count of non-hidden files in current dir
alias make1mb='truncate -s 1m ./1MB.dat'     # make1mb:      Creates a file of 1mb size (all zeros)
alias make5mb='truncate -s 5m ./5MB.dat'     # make5mb:      Creates a file of 5mb size (all zeros)
alias make10mb='truncate -s 10m ./10MB.dat'  # make10mb:     Creates a file of 10mb size (all zeros)


#   ---------------------------
#   2.  SEARCHING
#   ---------------------------

alias qfind="find . -name "                 # qfind:    Quickly search for file


#   ---------------------------
#   3.  PROCESS MANAGEMENT
#   ---------------------------

#   memHogsTop, memHogsPs:  Find memory hogs
#   -----------------------------------------------------
    alias memHogsTop='top -l 1 -o rsize | head -20'
    alias memHogsPs='ps wwaxm -o pid,stat,vsize,rss,time,command | head -10'

#   cpuHogs:  Find CPU hogs
#   -----------------------------------------------------
    alias cpu_hogs='ps wwaxr -o pid,stat,%cpu,time,command | head -10'

#   topForever:  Continual 'top' listing (every 10 seconds)
#   -----------------------------------------------------
    alias topForever='top -l 9999999 -s 10 -o cpu'

#   ttop:  Recommended 'top' invocation to minimize resources
#   ------------------------------------------------------------
#       Taken from this macosxhints article
#       http://www.macosxhints.com/article.php?story=20060816123853639
#   ------------------------------------------------------------
    alias ttop="top -R -F -s 10 -o rsize"


#   ---------------------------
#   4.  NETWORKING
#   ---------------------------

alias netCons='lsof -i'                         # netCons:      Show all open TCP/IP sockets
alias lsock='sudo lsof -i -P'                   # lsock:        Display open sockets
alias lsockU='sudo lsof -nP | grep UDP'         # lsockU:       Display only open UDP sockets
alias lsockT='sudo lsof -nP | grep TCP'         # lsockT:       Display only open TCP sockets
alias openPorts='sudo lsof -i | grep LISTEN'    # openPorts:    All listening connections
alias showBlocked='sudo ipfw list'              # showBlocked:  All ipfw rules inc/ blocked IPs
if _omb_util_binary_exists ifconfig; then
  alias ipInfo0='ifconfig getpacket en0'          # ipInfo0:      Get info on connections for en0
  alias ipInfo1='ifconfig getpacket en1'          # ipInfo1:      Get info on connections for en1
fi


#   ---------------------------------------
#   5.  SYSTEMS OPERATIONS & INFORMATION
#   ---------------------------------------

alias mountReadWrite='mount -uw /'    # mountReadWrite:   For use when booted into single-user


#   ---------------------------------------
#   6.  DATE & TIME MANAGEMENT
#   ---------------------------------------

alias bdate="date '+%a, %b %d %Y %T %Z'"
alias cal3='cal -3'
alias da='date "+%Y-%m-%d %A    %T %Z"'
alias daysleft='_omb_util_print "There are $(($(date +%j -d"Dec 31, $(date +%Y)")-$(date +%j))) left in year $(date +%Y)."'
alias epochtime='date +%s'
alias mytime='date +%H:%M:%S'
alias secconvert='date -d@1234567890'
alias stamp='date "+%Y%m%d%a%H%M"'
alias timestamp='date "+%Y%m%dT%H%M%S"'
alias today='date +"%A, %B %-d, %Y"'
alias weeknum='date +%V'


#   ---------------------------------------
#   8.  WEB DEVELOPMENT
#   ---------------------------------------

alias editHosts='sudo edit /etc/hosts'                  # editHosts:        Edit /etc/hosts file

if _omb_util_binary_exists apachectl; then
  alias apacheEdit='sudo edit /etc/httpd/httpd.conf'      # apacheEdit:       Edit httpd.conf
  alias apacheRestart='sudo apachectl graceful'           # apacheRestart:    Restart Apache
  alias herr='tail /var/log/httpd/error_log'              # herr:             Tails HTTP error logs
  alias apacheLogs="less +F /var/log/apache2/error_log"   # Apachelogs:       Shows apache error logs
fi

#   ---------------------------------------
#   9.  OTHER ALIASES
#   ---------------------------------------

# Aliases by Jacob Hrbek
# Outputs List of Loadable Modules (llm) for current kernel
alias llm="find /lib/modules/$(uname -r) -type f -name '*.ko*'"
# Used for piping to remote pastebin from cmdline to generate a url
_omb_util_binary_exists curl && ix() { curl -n -F 'f:1=<-' http://ix.io ; }
# Used for piping to clipboard
_omb_util_binary_exists xclip && alias xcopy="xclip -se c"


================================================
FILE: aliases/package-manager.aliases.bash
================================================
#!/usr/bin/env bash
# Created by Jacob Hrbek github.com in 2019

# A local temporary variable
declare _omb_tmp_sudo

# Switch for the use of "sudo"
_omb_tmp_sudo=
if [[ ${OMB_ALIAS_PACKAGE_MANAGER_SUDO+set} ]]; then
  _omb_tmp_sudo=${OMB_ALIAS_PACKAGE_MANAGER_SUDO:+$OMB_ALIAS_PACKAGE_MANAGER_SUDO }
elif [[ ${OMB_USE_SUDO-true} == true ]]; then
  if ((EUID != 0)) && _omb_util_binary_exists sudo; then
    _omb_tmp_sudo='sudo '
  fi
fi

# Portage - Enoch Merge
if _omb_util_binary_exists emerge; then
  alias em="${_omb_tmp_sudo}emerge" # Enoch Merge
  alias es="${_omb_tmp_sudo}emerge --search" # Enoch Search
  alias esync="${_omb_tmp_sudo}emerge --sync" # Enoch SYNC
  alias eb="${_omb_tmp_sudo}ebuild" # Enoch Build
  alias er="${_omb_tmp_sudo}emerge -c" # Enoch Remove
  alias emfu="${_omb_tmp_sudo}emerge --sync && ${_omb_tmp_sudo}emerge -uDN @world" # Enoch Update & Upgrade System
  alias eu="${_omb_tmp_sudo}emerge -uDN @world" # Enoch Upgrade System
  alias ei="${_omb_tmp_sudo}emerge --info" # Enoch Display Information
  alias ep="${_omb_tmp_sudo}emerge -p" # Enoch Display What Would Have Been Installed
  alias e1="${_omb_tmp_sudo}emerge -1" # Enoch Merge Without Adding the Packages to the World File
  # Deprecated, retained for backward compatibility. Use `er` instead.
  alias ers="${_omb_tmp_sudo}emerge -c"
fi
if _omb_util_binary_exists eclean; then
  alias ecd="${_omb_tmp_sudo}eclean-dist -d" # Enoch Clean Repository Source Files
  alias ecp="${_omb_tmp_sudo}eclean-pkg -d" # Enoch Clean Binary Packages
fi
if _omb_util_binary_exists eix; then
  alias elip="${_omb_tmp_sudo}eix-installed -a" # Enoch List Installed Packages
fi
if _omb_util_binary_exists equery; then
  alias eq="${_omb_tmp_sudo}equery" # Enoch Query
fi

# Paludis - Cave
if _omb_util_binary_exists cave; then
  alias cave="${_omb_tmp_sudo}cave"
  alias cr="${_omb_tmp_sudo}cave resolve" # Cave Resolve
  alias cui="${_omb_tmp_sudo}cave uninstall" # Cave UnInstall
  alias cs="${_omb_tmp_sudo}cave show" # Cave Show
  alias cli="${_omb_tmp_sudo}cave print-ids --matching '*/*::/'" # Cave List Installed
fi

# Snap Package manager - Snap
if _omb_util_binary_exists snap; then
  alias snap="${_omb_tmp_sudo}snap"
  alias snapfu="${_omb_tmp_sudo}snap refresh" # Update all installed snaps
  alias snapi="${_omb_tmp_sudo}snap install" # Installs the named snaps
  alias snaps="${_omb_tmp_sudo}snap find" # Queries the store for available packages
  alias snapr="${_omb_tmp_sudo}snap remove --terminate --purge" # Performs a full, clean and data remove
  alias snapli="${_omb_tmp_sudo}snap list --all" # List all installed snaps and revisions in the current system
fi

# Advanced Packaging Tool - APT
if _omb_util_binary_exists apt; then
  alias apt="${_omb_tmp_sudo}apt" # Advanced Packaging Tool
  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"
  alias apti="${_omb_tmp_sudo}apt install -y" # Apt install
  alias apts="${_omb_tmp_sudo}apt-cache search" # Apt search
  alias aptr="${_omb_tmp_sudo}apt remove -y" # Apt remove
  alias aptar="${_omb_tmp_sudo}apt autoremove -y" # Apt Auto Remove
  alias aptli="${_omb_tmp_sudo}apt list --installed"
fi

# Debian PacKaGe - DPKG
if _omb_util_binary_exists dpkg; then
  alias dpkg="${_omb_tmp_sudo}dpkg"
fi

# Volian - Nala
if _omb_util_binary_exists nala; then
  alias nala="${_omb_tmp_sudo}nala" # A faster, prettier front-end for libapt->
  alias nalaf="${_omb_tmp_sudo}nala fetch" # Nala Fastest Mirror
  alias nalau="${_omb_tmp_sudo}nala update" # Nala Update
  alias nalafu="${_omb_tmp_sudo}nala upgrade -y" # Nala Update & Full-Upgrade >
  alias nalai="${_omb_tmp_sudo}nala install -y" # Nala Install
  alias nalar="${_omb_tmp_sudo}nala remove -y" # Nala Remove
  alias nalaa="${_omb_tmp_sudo}nala autoremove -y" # Nala Auto Remove
  alias nalah="${_omb_tmp_sudo}nala history" # Nala History
  alias nalal="${_omb_tmp_sudo}nala list" # Nala List
  alias nalas="${_omb_tmp_sudo}nala search" # Nala Search
  alias nalav="${_omb_tmp_sudo}nala show" # Nala View Package Info
fi

# # Zypper = Zen Yast Package Program (ZYPP?)
# if _omb_util_binary_exists zypper; then
#   # Yast = Yet Another Silly/Setup Thing/Thing
#   alias lcp="${_omb_tmp_sudo}zypper"
#   alias lcpi="${_omb_tmp_sudo}zypper install"
#   alias lcps="${_omb_tmp_sudo}zypper search"
#   alias lcpsi="${_omb_tmp_sudo}zypper source-install"
#   alias lcpr="${_omb_tmp_sudo}zypper remove"
#   if grep -q 'openSUSE Tumbleweed' /etc/os-release; then
#     # Zypper update kills the system - LCP
#     alias lcpfu="${_omb_tmp_sudo}zypper dup"
#     # Because Geeko uses sublime3 to call sublime_text instead of something that makes sence like 'subl'..
#     alias subl="${_omb_tmp_sudo}sublime3"
#   fi
# fi

# Fedora Package - dnf
if _omb_util_binary_exists dnf; then
  alias dnf="${_omb_tmp_sudo}dnf" # DNF Packaging Tool
  alias dnfl="${_omb_tmp_sudo}dnf list" # List
  alias dnfli="${_omb_tmp_sudo}dnf list installed" # List Installed
  alias dnfgl="${_omb_tmp_sudo}dnf grouplist" # Group List
  alias dnfmc="${_omb_tmp_sudo}dnf makecache" # Make Cache
  alias dnfp="${_omb_tmp_sudo}dnf info" # Show Package Info
  alias dnfs="${_omb_tmp_sudo}dnf search" # Search

  alias dnfu="${_omb_tmp_sudo}dnf upgrade" # Update
  alias dnfi="${_omb_tmp_sudo}dnf install" # Install
  alias dnfgi="${_omb_tmp_sudo}dnf group install" # Group Install
  alias dnfr="${_omb_tmp_sudo}dnf remove" # Remove
  alias dnfgr="${_omb_tmp_sudo}dnf groupremove" # Group Remove
  alias dnfc="${_omb_tmp_sudo}dnf clean all" # Clean All
fi

unset -v _omb_tmp_sudo


================================================
FILE: aliases/package-manager.aliases.md
================================================
# Aliases `package-manager`

This plugin provides the set of aliases that can be used to control package
managers.  Here is the list of the supported aliases for each package manager.
You can find the details of each alias in the source
[`package-manager.aliases.bash`](package-manager.aliases.bash).

- `emerge` (Portage Enoch Merge) ... `em`, `es`, `esync`, `eb`, `er`, `emfu`, `ecd`, `ecp`, `elip`
- `cave` (Paludis Cave) ... `cave`, `cr`, `cui`, `cs`, `cli`
- `apt` (Advanced Packaging Tool) ... `apt`, `aptfu`, `apti`, `apts`, `aptr`, `aptar`, `aptli`
- `dpkg` (Debian Package) ... `dpkg`
- `nala` (Nala APT Wrapper) ... `nala`, `nalaf`, `nalau`, `nalafu`, `nalai`, `nalar`, `nalaa`, `nalah`, `nalal`, `nalas`, `nalav`
- `snap` (Snap Package Manager) ... `snap`, `snapfu`, `snapi`, `snaps`, `snapr`, `snapli`

The command to use to call these package manager can be specified in the
variable `OMB_ALIAS_PACKAGE_MANAGER_SUDO`.  By default, `sudo` is used when the
current use is not root and the command `sudo` is available.

```bash
# Use sudo to run the package manager
OMB_ALIAS_PACKAGE_MANAGER_SUDO=sudo

# Do not use sudo but directly run the package manager
OMB_ALIAS_PACKAGE_MANAGER_SUDO=
```

## Emerge Package Manager

| Alias   | Command                                          | Description                                                                                                                      |
| ------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `em`    | `sudo emerge`                                    | Emerge is the definitive command-line interface to the Portage system.                                                           |
| `es`    | `sudo emerge --search`                           | Searches for matches of the supplied string in the ebuild repository.                                                            |
| `esync` | `sudo emerge --sync`                             | Updates repositories, for which auto-sync, sync-type and sync-uri attributes are set in repos.conf.                              |
| `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.|
| `er`    | `sudo emerge -c`                                 | Cleans the system by removing packages that are not associated with explicitly merged packages.                                  |
| `emfu`  | `sudo emerge --sync && sudo emerge -uDN @world`  | Emerge update & upgrade system.                                                                                                  |
| `eu`    | `sudo emerge -uDN @world`                        | Emerge upgrade system.                                                                                                           |
| `ei`    | `sudo emerge --info`                             | Emerge display information.                                                                                                      |
| `ep`    | `sudo emerge -p`                                 | Emerge display what would have been installed.                                                                                   |
| `e1`    | `sudo emerge -1`                                 | Emerge merge without adding the packages to the world file.                                                                      |
| `ecp`   | `sudo eclean-pkg -d`                             | Cleans binary packages.                                                                                                          |
| `elip`  | `sudo eix-installed -a`                          | Lists all installed programs.                                                                                                    |
| `ecd`   | `sudo eclean-dist -d`                            | Cleans repository source files.                                                                                                  |
| `eq`    | `sudo equery`                                    | Package query tool.                                                                                                              |
| `ers`   | `sudo emerge -c`                                 | (Deprecated, retained for backward compatibility. Use `er` instead.)                                                             |

## Paludis Package Manager (`cave`)

| Alias  | Command               | Description                                                                                             |
| ------ | --------------------- | ------------------------------------------------------------------------------------------------------- |
| `cave` | `sudo cave`           | The Other Package Manager.                                                                              |
| `cr`   | `sudo cave resolve`   | Solve the dependencies and print out the results. Pass the `-x` option to actually install the package. |
| `cui`  | `sudo cave uninstall` | Uninstall a package.                                                                                    |
| `cs`   | `sudo cave show`      | Show the dependencies of a package.                                                                     |
| `cli`  | `sudo cave list`      | List all available Packages.                                                                            |

## APT Package Manager

| Alias   | Command                                                                                           | Description                                                                                                          |
| ------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `apt`   | `sudo apt`                                                                                        | Advanced Packaging Tool.                                                                                             |
| `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.                    |
| `apti`  | `sudo apt install -y`                                                                             | Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match.                |
| `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.   |
| `aptr`  | `sudo apt remove -y`                                                                              | Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match.                |
| `aptar` | `sudo apt autoremove -y`                                                                          | Remove packages that were automatically installed for dependencies but are now no longer needed.                     |
| `aptli` | `sudo apt list`                                                                                   | List is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. |

## Debian Package Manager (`dpkg`)

| Alias  | Command     | Description                 |
| ------ | ----------- | --------------------------- |
| `dpkg` | `sudo dpkg` | Package manager for Debian. |

## Nala Package Manager

| Alias   | Command                   | Description                                                                                              |
| ------- | ------------------------- | -------------------------------------------------------------------------------------------------------- |
| `nala`  | `sudo nala`               | Nala is a prettier front-end for libapt-pkg, doubles as --help.                                          |
| `nalaf` | `sudo nala fetch`         | Fetch fast mirrors to improve download speed.                                                            |
| `nalau` | `sudo nala update`        | Update the list of available packages.                                                                   |
| `nalafu`| `sudo nala upgrade -y`    | The equivalent of apt update && apt full-upgrade --auto-remove.                                          |
| `nalai` | `sudo nala install -y`    | Takes multiple packages as arguments and will install all of them.                                       |
| `nalar` | `sudo nala remove -y`     | Remove or purge packages that are no longer needed.                                                      |
| `nalaa` | `sudo nala autoremove -y` | Automatically remove or purge any packages that are no longer needed.                                    |
| `nalah` | `sudo nala history`       | Nala history with no subcommands will show a summary of all transactions made.                           |
| `nalal` | `sudo nala list`          | List all packages or only packages based on the provided name, glob or regex. By default will only glob. |
| `nalas` | `sudo nala search`        | Search package names and descriptions using a word, regex or glob.                                       |
| `nalav` | `sudo nala show`          | Show information about a package such as the name, version, dependencies etc.                            |

## Snap Package Manager

| Alias    | Command                                | Description                                                                                                                                              |
| -------- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `snap`   | `sudo snap`                            | The snap command lets you install, configure, refresh and remove snaps. Snaps are packages that work across many different Linux distributions.          |
| `snapfu` | `sudo snap refresh`                    | Update all installed snaps.                                                                                                                              |
| `snapi`  | `sudo snap install`                    | Installs the named snaps.                                                                                                                                |
| `snaps`  | `sudo snap find`                       | Queries the store for available packages.                                                                                                                |
| `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=`. |
| `snapli` | `sudo snap list --all`                 | List all installed snaps and revisions in the current system.                                                                                            |


================================================
FILE: aliases/terraform.aliases.md
================================================
# Aliases `terraform`

This defines aliases for `terraform`.

| Alias    | Command                      |
| -------- | ---------------------------- |
| `t`      | `terraform`                  |
| `tinit`  | `terraform init`             |
| `tplan`  | `terraform plan`             |
| `tapply` | `terraform apply`            |
| `tfmt`   | `terraform fmt`              |


================================================
FILE: aliases/terraform.aliases.sh
================================================
# Aliases
# (sorted alphabetically)
#

alias t='terraform'

alias tapply='terraform apply'
alias tfmt='terraform fmt'
alias tinit='terraform init'
alias tplan='terraform plan'


================================================
FILE: cache/.gitkeep
================================================


================================================
FILE: completions/apm.completion.sh
================================================
#! bash oh-my-bash.module

# apm-bash-completion is written by Ugur Ozyilmazel
# repo: https://github.com/vigo/apm-bash-completion

function __apm {
    local cur prev options apm_command
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    __apm_get_command
    if [[ $cur = -* ]]; then
        options="--color"
        if [[ -z $apm_command ]]; then
            options="$options --version --help"
        fi
        if [[ $apm_command && $apm_command = publish ]]; then
            options="--tag --rename"
        fi
    else
        if [[ -z $apm_command || $apm_command = help ]]; then
            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"
        fi
        if [[ $apm_command && $apm_command = publish ]]; then
            options="major minor patch build"
        fi
        if [[ $apm_command && $apm_command = config ]]; then
            options="set get delete list edit"
        fi
    fi
    COMPREPLY=($(compgen -W "$options" -- "$cur"))
}
function __apm_get_command {
    local i
    for ((i=1; i < $COMP_CWORD; ++i)); do
        local arg=${COMP_WORDS[$i]}
        case $arg in
        [^-]*)
            apm_command=$arg
            return;;
        --version)
            apm_command=-
            return;;
        --help)
            apm_command=help
            return;;
        publish)
            apm_command=publish
            return;;
        config)
            apm_command=config
            return;;
        esac
    done
}
complete -F __apm -o bashdefault -o default apm


================================================
FILE: completions/asdf.completion.sh
================================================
#! bash oh-my-bash.module
# Bash completion support for the `asdf` command.
# Depends on the `asdf` plugin.

# Only load the completions if the ASDF_DIR variable was set.
if [[ ${ASDF_DIR+set} ]]; then
  . "$ASDF_DIR/completions/asdf.bash"
fi


================================================
FILE: completions/awscli.completion.sh
================================================
#! bash oh-my-bash.module
_omb_util_binary_exists aws_completer && complete -C "$(type -P aws_completer)" aws


================================================
FILE: completions/brew.completion.sh
================================================
#! bash oh-my-bash.module
if _omb_util_command_exists brew; then
  _omb_completion_brew_prefix=$(brew --prefix)
  if [[ $_omb_completion_brew_prefix ]]; then
    if [[ -f $_omb_completion_brew_prefix/etc/bash_completion ]]; then
      source "$_omb_completion_brew_prefix"/etc/bash_completion
    fi

    if [[ -f $_omb_completion_brew_prefix/Library/Contributions/brew_bash_completion.sh ]]; then
      source "$_omb_completion_brew_prefix"/Library/Contributions/brew_bash_completion.sh
    fi
  fi
  unset -v _omb_completion_brew_prefix
fi


================================================
FILE: completions/bundler.completion.sh
================================================
#! bash oh-my-bash.module
# bash completion for the `bundle` command.
#
# Copyright (c) 2011-2013 Daniel Luz <dev at mernen dot com>.
# Distributed under the MIT license.
# http://mernen.com/projects/completion-ruby
#
# To use, source this file on bash:
#   . completion-bundle

function __bundle {
  local cur=$2
  local prev=$3
  local bundle_command
  __bundle_get_command
  COMPREPLY=()

  local options
  if [[ $cur = -* ]]; then
      options="--no-color --verbose"
      if [[ -z $bundle_command ]]; then
          options="$options --version --help"
      fi
  else
      if [[ -z $bundle_command || $bundle_command = help ]]; then
          options="help install update package exec config check list show
                   console open viz init gem"
      fi
  fi
  COMPREPLY=($(compgen -W "$options" -- "$cur"))
}

function __bundle_get_command {
    local i
    for ((i=1; i < $COMP_CWORD; ++i)); do
        local arg=${COMP_WORDS[$i]}

        case $arg in
        [^-]*)
            bundle_command=$arg
            return;;
        --version)
            # command-killer
            bundle_command=-
            return;;
        --help)
            bundle_command=help
            return;;
        esac
    done
}


complete -F __bundle -o bashdefault -o default bundle
# vim: ai ft=sh sw=4 sts=2 et


================================================
FILE: completions/capistrano.completion.sh
================================================
#! bash oh-my-bash.module
# Bash completion support for Capistrano.

_omb_module_require lib:omb-completion

function _omb_completion_cap {
  local cur
  _omb_completion_reassemble_breaks :

  if [[ -f Capfile ]]; then
    local recent=$(ls -t .cap_tasks~ Capfile **/*.cap 2> /dev/null | head -n 1)
    if [[ $recent != '.cap_tasks~' ]]; then
      if cap --version | grep 'Capistrano v2.' > /dev/null; then
        # Capistrano 2.x
        cap --tool --verbose --tasks | cut -d " " -f 2 > .cap_tasks~
      else
        # Capistrano 3.x
        cap --all --tasks | cut -d " " -f 2 > .cap_tasks~
      fi
    fi
    COMPREPLY=($(compgen -W '$(< .cap_tasks)' -- "$cur"))
  fi

  _omb_completion_resolve_breaks
}

complete -o default -o nospace -F _omb_completion_cap cap


================================================
FILE: completions/chezmoi.completion.sh
================================================
#! bash oh-my-bash.module

if _omb_util_command_exists chezmoi; then
    eval -- "$(chezmoi completion bash)"
fi


================================================
FILE: completions/composer.completion.sh
================================================
#! bash oh-my-bash.module

_composer()
{
    local cur script coms opts com
    COMPREPLY=()
    _get_comp_words_by_ref -n : cur words

    # for an alias, get the real script behind it
    if [[ $(type -t ${words[0]}) == "alias" ]]; then
        script=$(alias ${words[0]} | sed -E "s/alias ${words[0]}='(.*)'/\1/")
    else
        script=${words[0]}
    fi

    # lookup for command
    for word in ${words[@]:1}; do
        if [[ $word != -* ]]; then
            com=$word
            break
        fi
    done

    # completing for an option
    if [[ ${cur} == --* ]] ; then
        opts="--help --quiet --verbose --version --ansi --no-ansi --no-interaction --profile --no-plugins --working-dir"

        case "$com" in
            about)
            opts="${opts} "
            ;;
            archive)
            opts="${opts} --format --dir --file"
            ;;
            browse)
            opts="${opts} --homepage --show"
            ;;
            clear-cache)
            opts="${opts} "
            ;;
            config)
            opts="${opts} --global --editor --auth --unset --list --file --absolute"
            ;;
            create-project)
            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"
            ;;
            depends)
            opts="${opts} --recursive --tree"
            ;;
            diagnose)
            opts="${opts} "
            ;;
            dump-autoload)
            opts="${opts} --no-scripts --optimize --classmap-authoritative --apcu --no-dev"
            ;;
            exec)
            opts="${opts} --list"
            ;;
            global)
            opts="${opts} "
            ;;
            help)
            opts="${opts} --xml --format --raw"
            ;;
            init)
            opts="${opts} --name --description --author --type --homepage --require --require-dev --stability --license --repository"
            ;;
            install)
            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"
            ;;
            licenses)
            opts="${opts} --format --no-dev"
            ;;
            list)
            opts="${opts} --xml --raw --format"
            ;;
            outdated)
            opts="${opts} --outdated --all --direct --strict"
            ;;
            prohibits)
            opts="${opts} --recursive --tree"
            ;;
            remove)
            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"
            ;;
            require)
            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"
            ;;
            run-script)
            opts="${opts} --timeout --dev --no-dev --list"
            ;;
            search)
            opts="${opts} --only-name --type"
            ;;
            self-update)
            opts="${opts} --rollback --clean-backups --no-progress --update-keys --stable --preview --snapshot"
            ;;
            show)
            opts="${opts} --all --installed --platform --available --self --name-only --path --tree --latest --outdated --minor-only --direct --strict"
            ;;
            status)
            opts="${opts} "
            ;;
            suggests)
            opts="${opts} --by-package --by-suggestion --no-dev"
            ;;
            update)
            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"
            ;;
            validate)
            opts="${opts} --no-check-all --no-check-lock --no-check-publish --with-dependencies --strict"
            ;;

        esac

        COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
        __ltrim_colon_completions "$cur"

        return 0;
    fi

    # completing for a command
    if [[ $cur == $com ]]; then
        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"

        COMPREPLY=($(compgen -W "${coms}" -- ${cur}))
        __ltrim_colon_completions "$cur"

        return 0
    fi
}

complete -o default -F _composer composer


================================================
FILE: completions/conda.completion.sh
================================================
#! bash oh-my-bash.module
if _omb_util_binary_exists register-python-argcomplete; then
  eval -- "$(register-python-argcomplete conda)"
elif _omb_util_binary_exists register-python-argcomplete3; then
  eval -- "$(register-python-argcomplete3 conda)"
elif _omb_util_binary_exists register-python-argcomplete2; then
  eval -- "$(register-python-argcomplete2 conda)"
else
  echo "Please install argcomplete to use conda completion" >&2
fi


================================================
FILE: completions/crc.completion.sh
================================================
#! bash oh-my-bash.module
if _omb_util_command_exists crc; then
  eval -- "$(crc completion bash)"
fi


================================================
FILE: completions/defaults.completion.sh
================================================
#! bash oh-my-bash.module
#
# Note: I could not find the true original source of this completion, but we
# can find several versions at the following places:
#
# * https://gist.github.com/mbauman/839902
# * https://github.com/taylanpince/wiki/blob/master/scripts/bash_completion_scripts/defaults (Version 1.0)
# * https://github.com/gaelicWizard/bash-progcomp/tree/main (Version 2.0)
#
# The v2 script seems to be a complete rewrite of the original v1.0, though it
# retains the original copyright notice.  The current version is based on
# Version 1.0.
#
#------------------------------------------------------------------------------
# defaults
# Bash command line completion for defaults
#
# Created by Jonathon Mah on 2006-11-08.
# Copyright 2006 Playhaus. All rights reserved.
#
# Version 1.0 (2006-11-08)

function _defaults_domains {
  local cur
  COMPREPLY=()
  cur=${COMP_WORDS[COMP_CWORD]}

  local domains=$(defaults domains | sed -e 's/, /:/g' | tr : '\n' | sed -e 's/ /\\ /g' | grep -i "^$cur")
  _omb_util_split COMPREPLY "$domains" $'\n'
  if grep -q "^$cur" <<< '-app'; then
    COMPREPLY[${#COMPREPLY[@]}]="-app"
  fi
  return 0
}

function _defaults {
  local cur prev host_opts cmds cmd domain keys key_index
  cur=${COMP_WORDS[COMP_CWORD]}
  prev=${COMP_WORDS[COMP_CWORD-1]}

  host_opts='-currentHost -host'
  cmds='read read-type write rename delete domains find help'

  if ((COMP_CWORD == 1)); then
    COMPREPLY=( $(compgen -W "$host_opts $cmds" -- "$cur") )
    return 0
  elif ((COMP_CWORD == 2)); then
    if [[ $prev == "-currentHost" ]]; then
      COMPREPLY=( $(compgen -W "$cmds" -- "$cur") )
      return 0
    elif [[ $prev == "-host" ]]; then
      if _omb_util_function_exists _known_hosts; then
        _known_hosts -a
      fi
      return 0
    else
      _defaults_domains
      return 0
    fi
  elif ((COMP_CWORD == 3)); then
    if [[ ${COMP_WORDS[1]} == "-host" ]]; then
      _defaults_domains
      return 0
    fi
  fi

  # Both a domain and command have been specified

  if [[ ${COMP_WORDS[1]} == @(${cmds// /|}) ]]; then
    cmd=${COMP_WORDS[1]}
    domain=${COMP_WORDS[2]}
    key_index=3
    if [[ $domain == "-app" ]]; then
      if ((COMP_CWORD == 3)); then
        # Completing application name. Can't help here, sorry
        return 0
      fi
      domain="-app ${COMP_WORDS[3]}"
      key_index=4
    fi
  elif [[ ${COMP_WORDS[2]} == "-currentHost" && ${COMP_WORDS[2]} == @(${cmds// /|}) ]]; then
    cmd=${COMP_WORDS[2]}
    domain=${COMP_WORDS[3]}
    key_index=4
    if [[ "$domain" == "-app" ]]; then
      if [[ $COMP_CWORD -eq 4 ]]; then
        # Completing application name. Can't help here, sorry
        return 0
      fi
      domain="-app ${COMP_WORDS[4]}"
      key_index=5
    fi
  elif [[ ${COMP_WORDS[3]} == "-host" && ${COMP_WORDS[3]} == @(${cmds// /|}) ]]; then
    cmd=${COMP_WORDS[3]}
    domain=${COMP_WORDS[4]}
    key_index=5
    if [[ $domain == "-app" ]]; then
      if ((COMP_CWORD == 5)); then
        # Completing application name. Can't help here, sorry
        return 0
      fi
      domain="-app ${COMP_WORDS[5]}"
      key_index=6
    fi
  fi

  keys=$(defaults read $domain 2>/dev/null |
           sed -ne '/^    [^}) ]/p' |
           sed -e 's/^    \([^" ]\{1,\}\) = .*$/\1/g' -e 's/^    "\([^"]\{1,\}\)" = .*$/\1/g' |
           sed -e 's/ /\\ /g' )

  case $cmd in
  read|read-type)
    # Complete key
    local IFS=$'\n'
    COMPREPLY=( $(grep -i "^${cur//\\/\\\\}" <<< "$keys") )
    ;;
  write)
    if ((key_index == COMP_CWORD)); then
      # Complete key
      local IFS=$'\n'
      COMPREPLY=( $(grep -i "^${cur//\\/\\\\}" <<< "$keys") )
    elif ((key_index + 1 == COMP_CWORD)); then
      # Complete value type
      # Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces
      local value_types='-string -data -integer -float -boolean -date -array -array-add -dict -dict-add'
      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")
      if [[ $cur_type ]]; then
        COMPREPLY=( $cur_type )
      else
        COMPREPLY=( $(compgen -W "$value_types" -- "$cur") )
      fi
    elif ((key_index + 2 == COMP_CWORD)); then
      # Complete value
      # Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces
      COMPREPLY=( $(defaults read $domain ${COMP_WORDS[key_index]} 2>/dev/null | grep -i "^${cur//\\/\\\\}") )
    fi
    ;;
  rename)
    if ((key_index == COMP_CWORD || key_index + 1 == COMP_CWORD)); then
      # Complete source and destination keys
      local IFS=$'\n'
      COMPREPLY=( $(grep -i "^${cur//\\/\\\\}" <<< "$keys") )
    fi
    ;;
  delete)
    if ((key_index == COMP_CWORD)); then
      # Complete key
      local IFS=$'\n'
      COMPREPLY=( $(grep -i "^${cur//\\/\\\\}" <<< "$keys") )
    fi
    ;;
  esac

  return 0
}

complete -F _defaults -o default defaults


# This file is licensed under the BSD license, as follows:
#
# Copyright (c) 2006, Playhaus
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
#   list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
#   this list of conditions and the following disclaimer in the documentation
#   and/or other materials provided with the distribution.
# * Neither the name of the Playhaus nor the names of its contributors may be
#   used to endorse or promote products derived from this software without
#   specific prior written permission.
#
# This software is provided by the copyright holders and contributors "as is"
# and any express or implied warranties, including, but not limited to, the
# implied warranties of merchantability and fitness for a particular purpose are
# disclaimed. In no event shall the copyright owner or contributors be liable
# for any direct, indirect, incidental, special, exemplary, or consequential
# damages (including, but not limited to, procurement of substitute goods or
# services; loss of use, data, or profits; or business interruption) however
# caused and on any theory of liability, whether in contract, strict liability,
# or tort (including negligence or otherwise) arising in any way out of the use
# of this software, even if advised of the possibility of such damage.


================================================
FILE: completions/dirs.completion.sh
================================================
#! bash oh-my-bash.module
# Bash completion support for the 'dirs' plugin (commands G, R).

function _dirs-complete {
    local CURRENT_PROMPT="${COMP_WORDS[COMP_CWORD]}"

    # parse all defined shortcuts from ~/.dirs
    if [ -r "$HOME/.dirs" ]; then
        COMPREPLY=($(compgen -W "$(grep -v '^#' ~/.dirs | sed -e 's/\(.*\)=.*/\1/')" -- ${CURRENT_PROMPT}) )
    fi

    return 0
}

complete -o default -o nospace -F _dirs-complete G R


================================================
FILE: completions/django.completion.sh
================================================
#! bash oh-my-bash.module
# Upstream: https://github.com/django/django/blob/90c59b4e12e6ff41407694a460f5f30c4688dbfd/extras/django_bash_completion
#
# #########################################################################
# This bash script adds tab-completion feature to django-admin and manage.py.
#
# Testing it out without installing
# =================================
#
# To test out the completion without "installing" this, just run this file
# directly, like so:
#
#     . ~/path/to/django_bash_completion
#
# Note: There's a dot ('.') at the beginning of that command.
#
# After you do that, tab completion will immediately be made available in your
# current Bash shell. But it won't be available next time you log in.
#
# Installing
# ==========
#
# To install this, point to this file from your .bash_profile, like so:
#
#     . ~/path/to/django_bash_completion
#
# Do the same in your .bashrc if .bashrc doesn't invoke .bash_profile.
#
# Settings will take effect the next time you log in.
#
# Uninstalling
# ============
#
# To uninstall, just remove the line from your .bash_profile and .bashrc.

function _omb_completion_django {
  COMPREPLY=($(COMP_WORDS="${COMP_WORDS[*]}" \
    COMP_CWORD=$COMP_CWORD \
	  DJANGO_AUTO_COMPLETE=1 "$1"))
}
# When the django-admin.py deprecation ends, remove django-admin.py.
complete -F _omb_completion_django -o default manage.py django-admin

function _omb_completion_django_python {
  if ((COMP_CWORD >= 2)); then
    if command grep -qE "python([3-9]\.[0-9])?" <<< "${COMP_WORDS[0]##*/}"; then
      if command grep -qE "manage\.py|django-admin" <<< "${COMP_WORDS[1]##*/}"; then
        COMPREPLY=($(COMP_WORDS="${COMP_WORDS[*]:1}" \
          COMP_CWORD=$((COMP_CWORD - 1)) \
          DJANGO_AUTO_COMPLETE=1 "${COMP_WORDS[@]}"))
      fi
    fi
  fi
}

function _omb_completion_django_init {
  # Support for multiple interpreters.
  local -a pythons=(python)
  if _omb_util_command_exists whereis; then
    local python_interpreters
    _omb_util_split python_interpreters "$(whereis python | cut -d " " -f 2-)"
    local python
    for python in "${python_interpreters[@]}"; do
      [[ -x $python ]] || continue
      [[ $python == *-config ]] || continue
      python=${python##*/}
      [[ $python ]] && pythons+=("$python")
    done
    _omb_util_split pythons "$(_omb_util_print_lines "${pythons[@]}" | sort -u)" $'\n'
  fi

  complete -F _omb_completion_django_python -o default "${pythons[@]}"
  unset -f "$FUNCNAME"
}
_omb_completion_django_init


================================================
FILE: completions/docker-compose.completion.sh
================================================
#! bash oh-my-bash.module

function _omb_completion_docker_compose_has_completion {
  local complete
  complete=$(complete -p docker-compose 2>/dev/null) && [[ $complete ]] || return 1

  unset -f _omb_completion_docker_compose_has_completion
  unset -f _omb_completion_docker_compose_try
  return 0
}

function _omb_completion_docker_compose_try {
  if [[ -s $1 ]]; then
    source "$1"
    _omb_completion_docker_compose_has_completion && return 0
  elif [[ -s $1.sh ]]; then
    source "$1.sh"
    _omb_completion_docker_compose_has_completion && return 0
  elif [[ -s $1.bash ]]; then
    source "$1.bash"
    _omb_completion_docker_compose_has_completion && return 0
  fi
  return 1
}

_omb_completion_docker_compose_has_completion && return 0

if _omb_util_function_exists _comp_load; then
  # bash-completion 2.12
  _comp_load -- docker-compose
  _omb_completion_docker_compose_has_completion && return 0
elif _omb_util_function_exists __load_completion; then
  # bash-completion <= 2.11
  __load_completion docker-compose
  _omb_completion_docker_compose_has_completion && return 0
fi

_omb_completion_docker_compose_try /usr/share/bash-completion/completions/docker-compose && return 0
_omb_completion_docker_compose_try /etc/bash_completion.d/docker-compose && return 0

unset -f _omb_completion_docker_compose_has_completion
unset -f _omb_completion_docker_compose_try
source "$OSH/completions/fallback/docker-compose.bash"


================================================
FILE: completions/docker-machine.completion.sh
================================================
#! bash oh-my-bash.module
#
# bash completion file for docker-machine commands
#
# This script provides completion of:
#  - commands and their options
#  - machine names
#  - filepaths
#
# To enable the completions either:
#  - place this file in /etc/bash_completion.d
#  or
#  - copy this file to e.g. ~/.docker-machine-completion.sh and add the line
#    below to your .bashrc after bash completion features are loaded
#    . ~/.docker-machine-completion.sh
#

function _docker_machine_active {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=()
    fi
}

function _docker_machine_config {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--swarm --help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_create {
    # cheating, b/c there are approximately one zillion options to create
    COMPREPLY=($(compgen -W "$(docker-machine create --help | grep '^   -' | sed 's/^   //; s/[^a-z0-9-].*$//')" -- "${cur}"))
}

function _docker_machine_env {
    case "${prev}" in
        --shell)
            # What are the options for --shell?
            COMPREPLY=()
            ;;
        *)
            if [[ "${cur}" == -* ]]; then
                COMPREPLY=($(compgen -W "--swarm --shell --unset --no-proxy --help" -- "${cur}"))
            else
                COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
            fi
    esac
}

# See docker-machine-wrapper.bash for the use command
function _docker_machine_use {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--swarm --unset --help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_inspect {
    case "${prev}" in
        -f|--format)
            COMPREPLY=()
            ;;
        *)
            if [[ "${cur}" == -* ]]; then
                COMPREPLY=($(compgen -W "--format --help" -- "${cur}"))
            else
                COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
            fi
            ;;
    esac
}

function _docker_machine_ip {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_kill {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_ls {
    case "${prev}" in
        --filter)
            COMPREPLY=()
            ;;
        *)
            COMPREPLY=($(compgen -W "--quiet --filter --format --timeout --help" -- "${cur}"))
            ;;
    esac
}

function _docker_machine_regenerate_certs {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help --force" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_restart {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_rm {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help --force -y" -- "${cur}"))
    else
        # For rm, it's best to be explicit
        COMPREPLY=()
    fi
}

function _docker_machine_ssh {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_scp {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help --recursive" -- "${cur}"))
    else
        _filedir
        # It would be really nice to ssh to the machine and ls to complete
        # remote files.
        COMPREPLY=($(compgen -W "$(docker-machine ls -q | sed 's/$/:/')" -- "${cur}") "${COMPREPLY[@]}")
    fi
}

function _docker_machine_start {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_status {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_stop {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_upgrade {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_url {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_version {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "$(docker-machine ls -q)" -- "${cur}"))
    fi
}

function _docker_machine_help {
    if [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "--help" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "${commands[*]}" -- "${cur}"))
    fi
}

function _docker_machine_docker_machine {
    if [[ " ${wants_file[*]} " =~ " ${prev} " ]]; then
        _filedir
    elif [[ " ${wants_dir[*]} " =~ " ${prev} " ]]; then
        _filedir -d
    elif [[ "${cur}" == -* ]]; then
        COMPREPLY=($(compgen -W "${flags[*]} ${wants_dir[*]} ${wants_file[*]}" -- "${cur}"))
    else
        COMPREPLY=($(compgen -W "${commands[*]}" -- "${cur}"))
    fi
}

function _docker_machine {
    COMPREPLY=()
    local commands=(active config create env inspect ip kill ls regenerate-certs restart rm ssh scp start status stop upgrade url version help)

    local flags=(--debug --native-ssh --github-api-token --bugsnag-api-token --help --version)
    local wants_dir=(--storage-path)
    local wants_file=(--tls-ca-cert --tls-ca-key --tls-client-cert --tls-client-key)

    # Add the use subcommand, if we have an alias loaded
    if [[ ${DOCKER_MACHINE_WRAPPED} = true ]]; then
        commands=("${commands[@]}" use)
    fi

    local cur prev words cword
    _get_comp_words_by_ref -n : cur prev words cword
    local i
    local command=docker-machine

    for (( i=1; i < ${cword}; ++i)); do
        local word=${words[i]}
        if [[ " ${wants_file[*]} ${wants_dir[*]} " =~ " ${word} " ]]; then
            # skip the next option
            (( ++i ))
        elif [[ " ${commands[*]} " =~ " ${word} " ]]; then
            command=${word}
        fi
    done

    local completion_func=_docker_machine_"${command//-/_}"
    if _omb_util_function_exists "${completion_func}"; then
        "${completion_func}"
    fi

    return 0
}

complete -F _docker_machine docker-machine


================================================
FILE: completions/docker.completion.sh
================================================
#! bash oh-my-bash.module

function _omb_completion_docker_has_completion {
  local complete
  complete=$(complete -p docker 2>/dev/null) && [[ $complete ]] || return 1

  # bash-completion runs $(docker completion bash) as a fallback, but the
  # official docker completion is not provided through $(docker completion
  # bash), which is automatically generated by cobra's bash completion V2.  In
  # this case, we can instead use the completion file bundled with OMB.
  if [[ $complete == *__start_docker* ]]; then
    complete -r docker
    return 1
  fi

  unset -f _omb_completion_docker_has_completion
  unset -f _omb_completion_docker_try
  return 0
}

function _omb_completion_docker_try {
  if [[ -s $1 ]]; then
    source "$1"
    _omb_completion_docker_has_completion && return 0
  elif [[ -s $1.sh ]]; then
    source "$1.sh"
    _omb_completion_docker_has_completion && return 0
  elif [[ -s $1.bash ]]; then
    source "$1.bash"
    _omb_completion_docker_has_completion && return 0
  fi
  return 1
}

_omb_completion_docker_has_completion && return 0

if _omb_util_function_exists _comp_load; then
  # bash-completion 2.12
  _comp_load -- docker-compose
  _omb_completion_docker_has_completion && return 0
elif _omb_util_function_exists __load_completion; then
  # bash-completion <= 2.11
  __load_completion docker-compose
  _omb_completion_docker_has_completion && return 0
fi

_omb_completion_docker_try /usr/share/bash-completion/completions/docker && return 0
_omb_completion_docker_try /etc/bash_completion.d/docker && return 0

unset -f _omb_completion_docker_has_completion
unset -f _omb_completion_docker_try
source "$OSH/completions/fallback/docker.bash"


================================================
FILE: completions/drush.completion.sh
================================================
#! bash oh-my-bash.module
#
# bash completion support for Drush:
#   https://github.com/drush-ops/drush
#
# Originally from:
#   http://github.com/drush-ops/drush/blob/master/drush.complete.sh

# Ensure drush is available.
_omb_util_command_exists drush || return

function __drush_ps1 {
  f="${TMPDIR:-/tmp/}/drush-env/drush-drupal-site-$$"
  if [ -f $f ]
  then
    __DRUPAL_SITE=$(cat "$f")
  else
    __DRUPAL_SITE="$DRUPAL_SITE"
  fi

  [[ -n "$__DRUPAL_SITE" ]] && printf "${1:- (%s)}" "$__DRUPAL_SITE"
}

# Completion function, uses the "drush complete" command to retrieve
# completions for a specific command line COMP_WORDS.
function _drush_completion {
  # Set IFS to newline (locally), since we only use newline separators, and
  # need to retain spaces (or not) after completions.
  local IFS=$'\n'
  # The '< /dev/null' is a work around for a bug in php libedit stdin handling.
  # Note that libedit in place of libreadline in some distributions. See:
  # https://bugs.launchpad.net/ubuntu/+source/php5/+bug/322214
  COMPREPLY=( $(drush --early=includes/complete.inc "${COMP_WORDS[@]}" < /dev/null 2> /dev/null) )
}

# Register our completion function. We include common short aliases for Drush.
complete -o bashdefault -o default -o nospace -F _drush_completion d dr drush drush5 drush6 drush6 drush.php


================================================
FILE: completions/fabric-completion.sh
================================================
#! bash oh-my-bash.module
#
# Bash completion support for Fabric (http://fabfile.org/)
#
#
# Copyright (C) 2011 by Konstantin Bakulin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Thanks to:
# - Adam Vandenberg,
#   https://github.com/adamv/dotfiles/blob/master/completion_scripts/fab_completion.bash
#
# - Enrico Batista da Luz,
#   https://github.com/ricobl/dotfiles/blob/master/bin/fab_bash_completion
#


# Use cache files for fab tasks or not.
# If set to "false" command "fab --shortlist" will be executed every time.
export FAB_COMPLETION_CACHE_TASKS=true

# File name where tasks cache will be stored (in current dir).
export FAB_COMPLETION_CACHED_TASKS_FILENAME=".fab_tasks~"


# Set command to get time of last file modification as seconds since Epoch
case `uname` in
    Darwin|FreeBSD)
        __FAB_COMPLETION_MTIME_COMMAND="stat -f '%m'"
        ;;
    *)
        __FAB_COMPLETION_MTIME_COMMAND="stat -c '%Y'"
        ;;
esac


#
# Get time of last fab cache file modification as seconds since Epoch
#
function __fab_chache_mtime() {
    ${__FAB_COMPLETION_MTIME_COMMAND} \
        $FAB_COMPLETION_CACHED_TASKS_FILENAME | xargs -n 1 expr
}


#
# Get time of last fabfile file/module modification as seconds since Epoch
#
function __fab_fabfile_mtime() {
    local f="fabfile"
    if [[ -e "$f.py" ]]; then
        ${__FAB_COMPLETION_MTIME_COMMAND} "$f.py" | xargs -n 1 expr
    else
        # Suppose that it's a fabfile dir
        find $f/*.py -exec ${__FAB_COMPLETION_MTIME_COMMAND} {} + \
            | xargs -n 1 expr | sort -n -r | head -1
    fi
}


#
# Completion for "fab" command
#
function __fab_completion() {
    # Return if "fab" command doesn't exists
    _omb_util_binary_exists fab || return 0

    # Variables to hold the current word and possible matches
    local cur="${COMP_WORDS[COMP_CWORD]}"
    local opts=()

    # Generate possible matches and store them in variable "opts"
    case "${cur}" in
        -*)
            if [[ -z "${__FAB_COMPLETION_LONG_OPT}" ]]; then
                export __FAB_COMPLETION_LONG_OPT=$(
                    fab --help | command grep -Eo "\-\-[A-Za-z_\-]+\=?" | sort -u)
            fi
            opts="${__FAB_COMPLETION_LONG_OPT}"
            ;;

        # Completion for short options is not nessary.
        # It's left here just for history.
        # -*)
        #     if [[ -z "${__FAB_COMPLETION_SHORT_OPT}" ]]; then
        #         export __FAB_COMPLETION_SHORT_OPT=$(
        #             fab --help | command grep -Eo "^ +\-[A-Za-z_\]" | sort -u)
        #     fi
        #     opts="${__FAB_COMPLETION_SHORT_OPT}"
        #     ;;

        *)
            # If "fabfile.py" or "fabfile" dir with "__init__.py" file exists
            local f="fabfile"
            if [[ -e "$f.py" || (-d "$f" && -e "$f/__init__.py") ]]; then
                # Build a list of the available tasks
                if $FAB_COMPLETION_CACHE_TASKS; then
                    # If use cache
                    if [[ ! -s ${FAB_COMPLETION_CACHED_TASKS_FILENAME} ||
                          $(__fab_fabfile_mtime) -gt $(__fab_chache_mtime) ]]; then
                        fab --shortlist > ${FAB_COMPLETION_CACHED_TASKS_FILENAME} \
                            2> /dev/null
                    fi
                    opts=$(cat ${FAB_COMPLETION_CACHED_TASKS_FILENAME})
                else
                    # Without cache
                    opts=$(fab --shortlist 2> /dev/null)
                fi
            fi
            ;;
    esac

    # Set possible completions
    COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
}
complete -o default -o nospace -F __fab_completion fab


================================================
FILE: completions/fallback/docker-compose.bash
================================================
#! bash oh-my-bash.module
#------------------------------------------------------------------------------
# Note by OMB: This file is taken from the following version of Docker Compose
# v1:
#
# https://github.com/docker/compose/blob/30fcb72cf3b136598883752edfa6ea4f3b8643d4/contrib/completion/bash/docker-compose
#
# Licence: Apache-2.0 license
# Copyright: original authors of Docker Compose v1
#------------------------------------------------------------------------------
#
# bash completion for docker-compose
#
# This work is based on the completion for the docker command.
#
# This script provides completion of:
#  - commands and their options
#  - service names
#  - filepaths
#
# To enable the completions either:
#  - place this file in /etc/bash_completion.d
#  or
#  - copy this file to e.g. ~/.docker-compose-completion.sh and add the line
#    below to your .bashrc after bash completion features are loaded
#    . ~/.docker-compose-completion.sh

__docker_compose_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob

function __docker_compose_q {
	docker-compose 2>/dev/null "${top_level_options[@]}" "$@"
}

# Transforms a multiline list of strings into a single line string
# with the words separated by "|".
function __docker_compose_to_alternatives {
	local parts=( $1 )
	local IFS='|'
	echo "${parts[*]}"
}

# Transforms a multiline list of options into an extglob pattern
# suitable for use in case statements.
function __docker_compose_to_extglob {
	local extglob=$( __docker_compose_to_alternatives "$1" )
	echo "@($extglob)"
}

# Determines whether the option passed as the first argument exist on
# the commandline. The option may be a pattern, e.g. `--force|-f`.
function __docker_compose_has_option {
	local pattern="$1"
	for (( i=2; i < $cword; ++i)); do
		if [[ ${words[$i]} =~ ^($pattern)$ ]] ; then
			return 0
		fi
	done
	return 1
}

# Returns `key` if we are currently completing the value of a map option (`key=value`)
# which matches the extglob passed in as an argument.
# This function is needed for key-specific completions.
function __docker_compose_map_key_of_current_option {
        local glob="$1"

        local key glob_pos
        if [ "$cur" = "=" ] ; then        # key= case
                key="$prev"
                glob_pos=$((cword - 2))
        elif [[ $cur == *=* ]] ; then     # key=value case (OSX)
                key=${cur%=*}
                glob_pos=$((cword - 1))
        elif [ "$prev" = "=" ] ; then
                key=${words[$cword - 2]}  # key=value case
                glob_pos=$((cword - 3))
        else
                return
        fi

        [ "${words[$glob_pos]}" = "=" ] && ((glob_pos--))  # --option=key=value syntax

        [[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"
}

# suppress trailing whitespace
function __docker_compose_nospace {
	# compopt is not available in ancient bash versions
	_omb_util_command_exists compopt && compopt -o nospace
}


# Outputs a list of all defined services, regardless of their running state.
# Arguments for `docker-compose ps` may be passed in order to filter the service list,
# e.g. `status=running`.
function __docker_compose_services {
	__docker_compose_q ps --services "$@"
}

# Applies completion of services based on the current value of `$cur`.
# Arguments for `docker-compose ps` may be passed in order to filter the service list,
# see `__docker_compose_services`.
function __docker_compose_complete_services {
	COMPREPLY=( $(compgen -W "$(__docker_compose_services "$@")" -- "$cur") )
}

# The services for which at least one running container exists
function __docker_compose_complete_running_services {
	local names=$(__docker_compose_services --filter status=running)
	COMPREPLY=( $(compgen -W "$names" -- "$cur") )
}


function _docker_compose_build {
	case "$prev" in
		--build-arg)
			COMPREPLY=( $( compgen -e -- "$cur" ) )
			__docker_compose_nospace
			return
			;;
		--memory|-m)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--build-arg --compress --force-rm --help --memory -m --no-cache --no-rm --pull --parallel -q --quiet" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services --filter source=build
			;;
	esac
}


function _docker_compose_config {
	case "$prev" in
		--hash)
			if [[ $cur == \\* ]] ; then
				COMPREPLY=( '\*' )
			else
				COMPREPLY=( $(compgen -W "$(__docker_compose_services) \\\* " -- "$cur") )
			fi
			return
			;;
	esac

	COMPREPLY=( $( compgen -W "--hash --help --no-interpolate --profiles --quiet -q --resolve-image-digests --services --volumes" -- "$cur" ) )
}


function _docker_compose_create {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--build --force-recreate --help --no-build --no-recreate" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_docker_compose {
	case "$prev" in
		--tlscacert|--tlscert|--tlskey)
			_filedir
			return
			;;
		--file|-f)
			_filedir "y?(a)ml"
			return
			;;
		--ansi)
			COMPREPLY=( $( compgen -W "never always auto" -- "$cur" ) )
			return
			;;
		--log-level)
			COMPREPLY=( $( compgen -W "debug info warning error critical" -- "$cur" ) )
			return
			;;
		--profile)
			COMPREPLY=( $( compgen -W "$(__docker_compose_q config --profiles)" -- "$cur" ) )
			return
			;;
		--project-directory)
			_filedir -d
			return
			;;
		--env-file)
			_filedir
			return
			;;
		$(__docker_compose_to_extglob "$daemon_options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$daemon_boolean_options $daemon_options_with_args $top_level_options_with_args --help -h --no-ansi --verbose --version -v" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
			;;
	esac
}


function _docker_compose_down {
	case "$prev" in
		--rmi)
			COMPREPLY=( $( compgen -W "all local" -- "$cur" ) )
			return
			;;
		--timeout|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --rmi --timeout -t --volumes -v --remove-orphans" -- "$cur" ) )
			;;
	esac
}


function _docker_compose_events {
	case "$prev" in
		--json)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --json" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_exec {
	case "$prev" in
		--index|--user|-u|--workdir|-w)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "-d --detach --help --index --privileged -T --user -u --workdir -w" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_help {
	COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
}

function _docker_compose_images {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --quiet -q" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}

function _docker_compose_kill {
	case "$prev" in
		-s)
			COMPREPLY=( $( compgen -W "SIGHUP SIGINT SIGKILL SIGUSR1 SIGUSR2" -- "$(echo $cur | tr '[:lower:]' '[:upper:]')" ) )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help -s" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_logs {
	case "$prev" in
		--tail)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--follow -f --help --no-color --no-log-prefix --tail --timestamps -t" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_pause {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_port {
	case "$prev" in
		--protocol)
			COMPREPLY=( $( compgen -W "tcp udp" -- "$cur" ) )
			return;
			;;
		--index)
			return;
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --index --protocol" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_ps {
	local key=$(__docker_compose_map_key_of_current_option '--filter')
	case "$key" in
		source)
			COMPREPLY=( $( compgen -W "build image" -- "${cur##*=}" ) )
			return
			;;
		status)
			COMPREPLY=( $( compgen -W "paused restarting running stopped" -- "${cur##*=}" ) )
			return
			;;
	esac

	case "$prev" in
		--filter)
			COMPREPLY=( $( compgen -W "source status" -S "=" -- "$cur" ) )
			__docker_compose_nospace
			return;
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--all -a --filter --help --quiet -q --services" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_pull {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --ignore-pull-failures --include-deps --no-parallel --quiet -q" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services --filter source=image
			;;
	esac
}


function _docker_compose_push {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --ignore-push-failures" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_restart {
	case "$prev" in
		--timeout|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_rm {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--force -f --help --stop -s -v" -- "$cur" ) )
			;;
		*)
			if __docker_compose_has_option "--stop|-s" ; then
				__docker_compose_complete_services
			else
				__docker_compose_complete_services --filter status=stopped
			fi
			;;
	esac
}


function _docker_compose_run {
	case "$prev" in
		-e)
			COMPREPLY=( $( compgen -e -- "$cur" ) )
			__docker_compose_nospace
			return
			;;
		--entrypoint|--label|-l|--name|--user|-u|--volume|-v|--workdir|-w)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( 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" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_scale {
	case "$prev" in
		=)
			COMPREPLY=("$cur")
			return
			;;
		--timeout|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $(compgen -S "=" -W "$(__docker_compose_services)" -- "$cur") )
			__docker_compose_nospace
			;;
	esac
}


function _docker_compose_start {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services --filter status=stopped
			;;
	esac
}


function _docker_compose_stop {
	case "$prev" in
		--timeout|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_top {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_running_services
			;;
	esac
}


function _docker_compose_unpause {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_compose_complete_services --filter status=paused
			;;
	esac
}


function _docker_compose_up {
	case "$prev" in
		=)
			COMPREPLY=("$cur")
			return
			;;
		--exit-code-from)
			__docker_compose_complete_services
			return
			;;
		--scale)
			COMPREPLY=( $(compgen -S "=" -W "$(__docker_compose_services)" -- "$cur") )
			__docker_compose_nospace
			return
			;;
		--timeout|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( 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" ) )
			;;
		*)
			__docker_compose_complete_services
			;;
	esac
}


function _docker_compose_version {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--short" -- "$cur" ) )
			;;
	esac
}


function _docker_compose {
	local previous_extglob_setting=$(shopt -p extglob)
	shopt -s extglob

	local commands=(
		build
		config
		create
		down
		events
		exec
		help
		images
		kill
		logs
		pause
		port
		ps
		pull
		push
		restart
		rm
		run
		scale
		start
		stop
		top
		unpause
		up
		version
	)

	# Options for the docker daemon that have to be passed to secondary calls to
	# docker-compose executed by this script.
	local daemon_boolean_options="
		--skip-hostname-check
		--tls
		--tlsverify
	"
	local daemon_options_with_args="
		--context -c
		--env-file
		--file -f
		--host -H
		--project-directory
		--project-name -p
		--tlscacert
		--tlscert
		--tlskey
	"

	# These options require special treatment when searching the command.
	local top_level_options_with_args="
		--ansi
		--log-level
		--profile
	"

	COMPREPLY=()
	local cur prev words cword
	_get_comp_words_by_ref -n : cur prev words cword

	# search subcommand and invoke its handler.
	# special treatment of some top-level options
	local command='docker_compose'
	local top_level_options=()
	local counter=1

	while [ $counter -lt $cword ]; do
		case "${words[$counter]}" in
			$(__docker_compose_to_extglob "$daemon_boolean_options") )
				local opt=${words[counter]}
				top_level_options+=($opt)
				;;
			$(__docker_compose_to_extglob "$daemon_options_with_args") )
				local opt=${words[counter]}
				local arg=${words[++counter]}
				top_level_options+=($opt $arg)
				;;
			$(__docker_compose_to_extglob "$top_level_options_with_args") )
				(( counter++ ))
				;;
			-*)
				;;
			*)
				command="${words[$counter]}"
				break
				;;
		esac
		(( counter++ ))
	done

	local completions_func=_docker_compose_${command//-/_}
	_omb_util_function_exists "$completions_func" && "$completions_func"

	eval "$previous_extglob_setting"
	return 0
}

eval "$__docker_compose_previous_extglob_setting"
unset __docker_compose_previous_extglob_setting

complete -F _docker_compose docker-compose docker-compose.exe


================================================
FILE: completions/fallback/docker.bash
================================================
#! bash oh-my-bash.module
# shellcheck disable=SC2016,SC2119,SC2155,SC2206,SC2207,SC2254
#------------------------------------------------------------------------------
# Note by OMB: This file is taken from the following version of Docker CLI:
#
# https://github.com/docker/cli/blob/34797d167891c11d2e10c1339b072166b77a3378/contrib/completion/bash/docker
#
# Licence: Apache-2.0 license
# Copyright: original authors of Docker CLI
#------------------------------------------------------------------------------
#
# Shellcheck ignore list:
#  - SC2016: Expressions don't expand in single quotes, use double quotes for that.
#  - SC2119: Use foo "$@" if function's $1 should mean script's $1.
#  - SC2155: Declare and assign separately to avoid masking return values.
#  - SC2206: Quote to prevent word splitting, or split robustly with mapfile or read -a.
#  - SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
#  - SC2254: Quote expansions in case patterns to match literally rather than as a glob.
#
# You can find more details for each warning at the following page:
#    https://github.com/koalaman/shellcheck/wiki/<SCXXXX>
#
# bash completion file for core docker commands
#
# This script provides completion of:
#  - commands and their options
#  - container ids and names
#  - image repos and tags
#  - filepaths
#
# To enable the completions either:
#  - place this file in /etc/bash_completion.d
#  or
#  - copy this file to e.g. ~/.docker-completion.sh and add the line
#    below to your .bashrc after bash completion features are loaded
#    . ~/.docker-completion.sh
#
# Configuration:
#
# For several commands, the amount of completions can be configured by
# setting environment variables.
#
# DOCKER_COMPLETION_SHOW_CONFIG_IDS
# DOCKER_COMPLETION_SHOW_CONTAINER_IDS
# DOCKER_COMPLETION_SHOW_NETWORK_IDS
# DOCKER_COMPLETION_SHOW_NODE_IDS
# DOCKER_COMPLETION_SHOW_PLUGIN_IDS
# DOCKER_COMPLETION_SHOW_SECRET_IDS
# DOCKER_COMPLETION_SHOW_SERVICE_IDS
#   "no"  - Show names only (default)
#   "yes" - Show names and ids
#
# You can tailor completion for the "events", "history", "inspect", "run",
# "rmi" and "save" commands by settings the following environment
# variables:
#
# DOCKER_COMPLETION_SHOW_IMAGE_IDS
#   "none" - Show names only (default)
#   "non-intermediate" - Show names and ids, but omit intermediate image IDs
#   "all" - Show names and ids, including intermediate image IDs
#
# DOCKER_COMPLETION_SHOW_TAGS
#   "yes" - include tags in completion options (default)
#   "no"  - don't include tags in completion options

#
# Note:
# Currently, the completions will not work if the docker daemon is not
# bound to the default communication port/socket
# If the docker daemon is using a unix socket for communication your user
# must have access to the socket for the completions to function correctly
#
# Note for developers:
# Please arrange options sorted alphabetically by long name with the short
# options immediately following their corresponding long form.
# This order should be applied to lists, alternatives and code blocks.

__docker_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob

function __docker_q {
	docker ${host:+--host "$host"} ${config:+--config "$config"} ${context:+--context "$context"} 2>/dev/null "$@"
}

# __docker_configs returns a list of configs. Additional options to
# `docker config ls` may be specified in order to filter the list, e.g.
# `__docker_configs --filter label=stage=production`.
# By default, only names are returned.
# Set DOCKER_COMPLETION_SHOW_CONFIG_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
function __docker_configs {
	local format
	if [ "${1-}" = "--id" ] ; then
		format='{{.ID}}'
		shift
	elif [ "${1-}" = "--name" ] ; then
		format='{{.Name}}'
		shift
	elif [ "${DOCKER_COMPLETION_SHOW_CONFIG_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Name}}'
	else
		format='{{.Name}}'
	fi

	__docker_q config ls --format "$format" "$@"
}

# __docker_complete_configs applies completion of configs based on the current value
# of `$cur` or the value of the optional first option `--cur`, if given.
function __docker_complete_configs {
	local current="$cur"
	if [ "$1" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_configs "$@")" -- "$current") )
}

# __docker_containers returns a list of containers. Additional options to
# `docker ps` may be specified in order to filter the list, e.g.
# `__docker_containers --filter status=running`
# By default, only names are returned.
# Set DOCKER_COMPLETION_SHOW_CONTAINER_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
function __docker_containers {
	local format
	if [ "${1-}" = "--id" ] ; then
		format='{{.ID}}'
		shift
	elif [ "${1-}" = "--name" ] ; then
		format='{{.Names}}'
		shift
	elif [ "${DOCKER_COMPLETION_SHOW_CONTAINER_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Names}}'
	else
		format='{{.Names}}'
	fi
	__docker_q ps --format "$format" "$@"
}

# __docker_complete_containers applies completion of containers based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_containers`.
function __docker_complete_containers {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_containers "$@")" -- "$current") )
}

function __docker_complete_containers_all {
	__docker_complete_containers "$@" --all
}

# shellcheck disable=SC2120
function __docker_complete_containers_removable {
	__docker_complete_containers "$@" --filter status=created --filter status=exited
}

function __docker_complete_containers_running {
	__docker_complete_containers "$@" --filter status=running
}

# shellcheck disable=SC2120
function __docker_complete_containers_stoppable {
	__docker_complete_containers "$@" --filter status=running --filter status=paused
}

# shellcheck disable=SC2120
function __docker_complete_containers_stopped {
	__docker_complete_containers "$@" --filter status=exited
}

# shellcheck disable=SC2120
function __docker_complete_containers_unpauseable {
	__docker_complete_containers "$@" --filter status=paused
}

function __docker_complete_container_names {
	local containers=( $(__docker_q ps -aq --no-trunc) )
	local names=( $(__docker_q inspect --format '{{.Name}}' "${containers[@]}") )
	names=( "${names[@]#/}" ) # trim off the leading "/" from the container names
	COMPREPLY=( $(compgen -W "${names[*]}" -- "$cur") )
}

function __docker_complete_container_ids {
	local containers=( $(__docker_q ps -aq) )
	COMPREPLY=( $(compgen -W "${containers[*]}" -- "$cur") )
}

# __docker_contexts returns a list of contexts without the special "default" context.
# Completions may be added with `--add`, e.g. `--add default`.
function __docker_contexts {
	local add=()
	while true ; do
		case "${1-}" in
			--add)
				add+=("$2")
				shift 2
				;;
			*)
				break
				;;
		esac
	done
	__docker_q context ls -q
	echo "${add[@]}"
}

function __docker_complete_contexts {
	local contexts=( $(__docker_contexts "$@") )
	COMPREPLY=( $(compgen -W "${contexts[*]}" -- "$cur") )
}


# __docker_images returns a list of images. For each image, up to three representations
# can be generated: the repository (e.g. busybox), repository:tag (e.g. busybox:latest)
# and the ID (e.g. sha256:ee22cbbd4ea3dff63c86ba60c7691287c321e93adfc1009604eb1dde7ec88645).
#
# The optional arguments `--repo`, `--tag` and `--id` select the representations that
# may be returned. Whether or not a particular representation is actually returned
# depends on the user's customization through several environment variables:
# - image IDs are only shown if DOCKER_COMPLETION_SHOW_IMAGE_IDS=all|non-intermediate.
# - tags can be excluded by setting DOCKER_COMPLETION_SHOW_TAGS=no.
# - repositories are always shown.
#
# In cases where an exact image specification is needed, `--force-tag` can be used.
# It ignores DOCKER_COMPLETION_SHOW_TAGS and only lists valid repository:tag combinations,
# avoiding repository names that would default to a potentially missing default tag.
#
# Additional arguments to `docker image ls` may be specified in order to filter the list,
# e.g. `__docker_images --filter dangling=true`.
#
function __docker_images {
	local repo_format='{{.Repository}}'
	local tag_format='{{.Repository}}:{{.Tag}}'
	local id_format='{{.ID}}'
	local all
	local format

	if [ "${DOCKER_COMPLETION_SHOW_IMAGE_IDS-}" = "all" ] ; then
		all='--all'
	fi

	while true ; do
		case "${1-}" in
			--repo)
				format+="$repo_format\n"
				shift
				;;
			--tag)
				if [ "${DOCKER_COMPLETION_SHOW_TAGS:-yes}" = "yes" ]; then
					format+="$tag_format\n"
				fi
				shift
				;;
			--id)
				if [[ ${DOCKER_COMPLETION_SHOW_IMAGE_IDS-} =~ ^(all|non-intermediate)$ ]] ; then
					format+="$id_format\n"
				fi
				shift
				;;
			--force-tag)
				# like `--tag` but ignores environment setting
				format+="$tag_format\n"
				shift
				;;
			*)
				break
				;;
		esac
	done

	__docker_q image ls --no-trunc --format "${format%\\n}" ${all-} "$@" | grep -v '<none>$'
}

# __docker_complete_images applies completion of images based on the current value of `$cur` or
# the value of the optional first option `--cur`, if given.
# See __docker_images for customization of the returned items.
function __docker_complete_images {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_images "$@")" -- "$current") )
	__ltrim_colon_completions "$current"
}

# __docker_networks returns a list of all networks. Additional options to
# `docker network ls` may be specified in order to filter the list, e.g.
# `__docker_networks --filter type=custom`
# By default, only names are returned.
# Set DOCKER_COMPLETION_SHOW_NETWORK_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
function __docker_networks {
	local format
	if [ "${1-}" = "--id" ] ; then
		format='{{.ID}}'
		shift
	elif [ "${1-}" = "--name" ] ; then
		format='{{.Name}}'
		shift
	elif [ "${DOCKER_COMPLETION_SHOW_NETWORK_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Name}}'
	else
		format='{{.Name}}'
	fi
	__docker_q network ls --format "$format" "$@"
}

# __docker_complete_networks applies completion of networks based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_networks`.
function __docker_complete_networks {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_networks "$@")" -- "$current") )
}

function __docker_complete_containers_in_network {
	local containers=($(__docker_q network inspect -f '{{range $i, $c := .Containers}}{{$i}} {{$c.Name}} {{end}}' "$1"))
	COMPREPLY=( $(compgen -W "${containers[*]}" -- "$cur") )
}

# __docker_volumes returns a list of all volumes. Additional options to
# `docker volume ls` may be specified in order to filter the list, e.g.
# `__docker_volumes --filter dangling=true`
# Because volumes do not have IDs, this function does not distinguish between
# IDs and names.
function __docker_volumes {
	__docker_q volume ls -q "$@"
}

# __docker_complete_volumes applies completion of volumes based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_volumes`.
function __docker_complete_volumes {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_volumes "$@")" -- "$current") )
}

# __docker_plugins_bundled returns a list of all plugins of a given type.
# The type has to be specified with the mandatory option `--type`.
# Valid types are: Network, Volume, Authorization.
# Completions may be added or removed with `--add` and `--remove`
# This function only deals with plugins that come bundled with Docker.
# For plugins managed by `docker plugin`, see `__docker_plugins_installed`.
function __docker_plugins_bundled {
	local type add=() remove=()
	while true ; do
		case "${1-}" in
			--type)
				type="$2"
				shift 2
				;;
			--add)
				add+=("$2")
				shift 2
				;;
			--remove)
				remove+=("$2")
				shift 2
				;;
			*)
				break
				;;
		esac
	done

	local plugins=($(__docker_q info --format "{{range \$i, \$p := .Plugins.$type}}{{.}} {{end}}"))
	for del in "${remove[@]}" ; do
		plugins=(${plugins[@]/$del/})
	done
	echo "${plugins[@]}" "${add[@]}"
}

# __docker_complete_plugins_bundled applies completion of plugins based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# The plugin type has to be specified with the next option `--type`.
# This function only deals with plugins that come bundled with Docker.
# For completion of plugins managed by `docker plugin`, see
# `__docker_complete_plugins_installed`.
function __docker_complete_plugins_bundled {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_plugins_bundled "$@")" -- "$current") )
}

# __docker_plugins_installed returns a list of all plugins that were installed with
# the Docker plugin API.
# By default, only names are returned.
# Set DOCKER_COMPLETION_SHOW_PLUGIN_IDS=yes to also complete IDs.
# Additional options to `docker plugin ls` may be specified in order to filter the list,
# e.g. `__docker_plugins_installed --filter enabled=true`
# For built-in pugins, see `__docker_plugins_bundled`.
function __docker_plugins_installed {
	local format
	if [ "${DOCKER_COMPLETION_SHOW_PLUGIN_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Name}}'
	else
		format='{{.Name}}'
	fi
	__docker_q plugin ls --format "$format" "$@"
}

# __docker_complete_plugins_installed applies completion of plugins that were installed
# with the Docker plugin API, based on the current value of `$cur` or the value of
# the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_plugins_installed`.
# For completion of built-in pugins, see `__docker_complete_plugins_bundled`.
function __docker_complete_plugins_installed {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_plugins_installed "$@")" -- "$current") )
}

function __docker_runtimes {
	__docker_q info | sed -n 's/^Runtimes: \(.*\)/\1/p'
}

function __docker_complete_runtimes {
	COMPREPLY=( $(compgen -W "$(__docker_runtimes)" -- "$cur") )
}

# __docker_secrets returns a list of secrets. Additional options to
# `docker secret ls` may be specified in order to filter the list, e.g.
# `__docker_secrets --filter label=stage=production`
# By default, only names are returned.
# Set DOCKER_COMPLETION_SHOW_SECRET_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
function __docker_secrets {
	local format
	if [ "${1-}" = "--id" ] ; then
		format='{{.ID}}'
		shift
	elif [ "${1-}" = "--name" ] ; then
		format='{{.Name}}'
		shift
	elif [ "${DOCKER_COMPLETION_SHOW_SECRET_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Name}}'
	else
		format='{{.Name}}'
	fi

	__docker_q secret ls --format "$format" "$@"
}

# __docker_complete_secrets applies completion of secrets based on the current value
# of `$cur` or the value of the optional first option `--cur`, if given.
function __docker_complete_secrets {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_secrets "$@")" -- "$current") )
}

# __docker_stacks returns a list of all stacks.
function __docker_stacks {
	__docker_q stack ls | awk 'NR>1 {print $1}'
}

# __docker_complete_stacks applies completion of stacks based on the current value
# of `$cur` or the value of the optional first option `--cur`, if given.
function __docker_complete_stacks {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_stacks "$@")" -- "$current") )
}

# __docker_nodes returns a list of all nodes. Additional options to
# `docker node ls` may be specified in order to filter the list, e.g.
# `__docker_nodes --filter role=manager`
# By default, only node names are returned.
# Set DOCKER_COMPLETION_SHOW_NODE_IDS=yes to also complete node IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
# Completions may be added with `--add`, e.g. `--add self`.
function __docker_nodes {
	local format
	if [ "${DOCKER_COMPLETION_SHOW_NODE_IDS-}" = yes ] ; then
		format='{{.ID}} {{.Hostname}}'
	else
		format='{{.Hostname}}'
	fi

	local add=()

	while true ; do
		case "${1-}" in
			--id)
				format='{{.ID}}'
				shift
				;;
			--name)
				format='{{.Hostname}}'
				shift
				;;
			--add)
				add+=("$2")
				shift 2
				;;
			*)
				break
				;;
		esac
	done

	echo "$(__docker_q node ls --format "$format" "$@")" "${add[@]}"
}

# __docker_complete_nodes applies completion of nodes based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_nodes`.
function __docker_complete_nodes {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(compgen -W "$(__docker_nodes "$@")" -- "$current") )
}

# __docker_services returns a list of all services. Additional options to
# `docker service ls` may be specified in order to filter the list, e.g.
# `__docker_services --filter name=xxx`
# By default, only node names are returned.
# Set DOCKER_COMPLETION_SHOW_SERVICE_IDS=yes to also complete IDs.
# An optional first option `--id|--name` may be used to limit the
# output to the IDs or names of matching items. This setting takes
# precedence over the environment setting.
function __docker_services {
	local format='{{.Name}}'  # default: service name only
	[ "${DOCKER_COMPLETION_SHOW_SERVICE_IDS-}" = yes ] && format='{{.ID}} {{.Name}}' # ID & name

	if [ "${1-}" = "--id" ] ; then
		format='{{.ID}}' # IDs only
		shift
	elif [ "${1-}" = "--name" ] ; then
		format='{{.Name}}' # names only
		shift
	fi

	__docker_q service ls --quiet --format "$format" "$@"
}

# __docker_complete_services applies completion of services based on the current
# value of `$cur` or the value of the optional first option `--cur`, if given.
# Additional filters may be appended, see `__docker_services`.
function __docker_complete_services {
	local current="$cur"
	if [ "${1-}" = "--cur" ] ; then
		current="$2"
		shift 2
	fi
	COMPREPLY=( $(__docker_services "$@" --filter "name=$current") )
}

# __docker_tasks returns a list of all task IDs.
function __docker_tasks {
	__docker_q service ps --format '{{.ID}}' ""
}

# __docker_complete_services_and_tasks applies completion of services and task IDs.
# shellcheck disable=SC2120
function __docker_complete_services_and_tasks {
	COMPREPLY=( $(compgen -W "$(__docker_services "$@") $(__docker_tasks)" -- "$cur") )
}

# __docker_append_to_completions appends the word passed as an argument to every
# word in `$COMPREPLY`.
# Normally you do this with `compgen -S` while generating the completions.
# This function allows you to append a suffix later. It allows you to use
# the __docker_complete_XXX functions in cases where you need a suffix.
function __docker_append_to_completions {
	COMPREPLY=( ${COMPREPLY[@]/%/"$1"} )
}

# __docker_fetch_info fetches information about the configured Docker server and updates
# several variables with the results.
# The result is cached for the duration of one invocation of bash completion.
function __docker_fetch_info {
	if [ -z "${info_fetched-}" ] ; then
		read -r server_experimental server_os <<< "$(__docker_q version -f '{{.Server.Experimental}} {{.Server.Os}}')"
		info_fetched=true
	fi
}

# __docker_server_is_experimental tests whether the currently configured Docker
# server runs in experimental mode. If so, the function exits with 0 (true).
# Otherwise, or if the result cannot be determined, the exit value is 1 (false).
function __docker_server_is_experimental {
	__docker_fetch_info
	[ "$server_experimental" = "true" ]
}

# __docker_server_os_is tests whether the currently configured Docker server runs
# on the operating system passed in as the first argument.
# Known operating systems: linux, windows.
function __docker_server_os_is {
	local expected_os="$1"
	__docker_fetch_info
	[ "$server_os" = "$expected_os" ]
}

# __docker_pos_first_nonflag finds the position of the first word that is neither
# option nor an option's argument. If there are options that require arguments,
# you should pass a glob describing those options, e.g. "--option1|-o|--option2"
# Use this function to restrict completions to exact positions after the argument list.
function __docker_pos_first_nonflag {
	local argument_flags=${1-}

	local counter=$((${subcommand_pos:-${command_pos}} + 1))
	while [ "$counter" -le "$cword" ]; do
		if [ -n "$argument_flags" ] && eval "case '${words[$counter]}' in $argument_flags) true ;; *) false ;; esac"; then
			(( counter++ ))
			# eat "=" in case of --option=arg syntax
			[ "${words[$counter]}" = "=" ] && (( counter++ ))
		else
			case "${words[$counter]}" in
				-*)
					;;
				*)
					break
					;;
			esac
		fi

		# Bash splits words at "=", retaining "=" as a word, examples:
		# "--debug=false" => 3 words, "--log-opt syslog-facility=daemon" => 4 words
		while [ "${words[$counter + 1]}" = "=" ] ; do
			counter=$(( counter + 2))
		done

		(( counter++ ))
	done

	echo "$counter"
}

# __docker_map_key_of_current_option returns `key` if we are currently completing the
# value of a map option (`key=value`) which matches the extglob given as an argument.
# This function is needed for key-specific completions.
function __docker_map_key_of_current_option {
	local glob="$1"

	local key glob_pos
	if [ "$cur" = "=" ] ; then        # key= case
		key="$prev"
		glob_pos=$((cword - 2))
	elif [[ $cur == *=* ]] ; then     # key=value case (OSX)
		key=${cur%=*}
		glob_pos=$((cword - 1))
	elif [ "$prev" = "=" ] ; then
		key=${words[$cword - 2]}  # key=value case
		glob_pos=$((cword - 3))
	else
		return
	fi

	[ "${words[$glob_pos]}" = "=" ] && ((glob_pos--))  # --option=key=value syntax

	[[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"
}

# __docker_value_of_option returns the value of the first option matching `option_glob`.
# Valid values for `option_glob` are option names like `--log-level` and globs like
# `--log-level|-l`
# Only positions between the command and the current word are considered.
function __docker_value_of_option {
	local option_extglob=$(__docker_to_extglob "$1")

	local counter=$((command_pos + 1))
	while [ "$counter" -lt "$cword" ]; do
		case ${words[$counter]} in
			$option_extglob )
				echo "${words[$counter + 1]}"
				break
				;;
		esac
		(( counter++ ))
	done
}

# __docker_to_alternatives transforms a multiline list of strings into a single line
# string with the words separated by `|`.
# This is used to prepare arguments to __docker_pos_first_nonflag().
function __docker_to_alternatives {
	local parts=( $1 )
	local IFS='|'
	echo "${parts[*]}"
}

# __docker_to_extglob transforms a multiline list of options into an extglob pattern
# suitable for use in case statements.
function __docker_to_extglob {
	local extglob=$( __docker_to_alternatives "$1" )
	echo "@($extglob)"
}

# __docker_subcommands processes subcommands
# Locates the first occurrence of any of the subcommands contained in the
# first argument. In case of a match, calls the corresponding completion
# function and returns 0.
# If no match is found, 1 is returned. The calling function can then
# continue processing its completion.
#
# TODO if the preceding command has options that accept arguments and an
# argument is equal ot one of the subcommands, this is falsely detected as
# a match.
function __docker_subcommands {
	local subcommands="$1"

	local counter=$((command_pos + 1))
	while [ "$counter" -lt "$cword" ]; do
		case "${words[$counter]}" in
			$(__docker_to_extglob "$subcommands") )
				subcommand_pos=$counter
				local subcommand=${words[$counter]}
				local completions_func=_docker_${command}_${subcommand//-/_}
				_omb_util_function_exists "$completions_func" && "$completions_func"
				return 0
				;;
		esac
		(( counter++ ))
	done
	return 1
}

# __docker_nospace suppresses trailing whitespace
function __docker_nospace {
	# compopt is not available in ancient bash versions
	_omb_util_command_exists compopt && compopt -o nospace
}

function __docker_complete_resolved_hostname {
	_omb_util_command_exists host || return
	COMPREPLY=( $(host 2>/dev/null "${cur%:}" | awk '/has address/ {print $4}') )
}

# __docker_local_interfaces returns a list of the names and addresses of all
# local network interfaces.
# If `--ip-only` is passed as a first argument, only addresses are returned.
function __docker_local_interfaces {
	_omb_util_command_exists ip || return

	local format
	if [ "${1-}" = "--ip-only" ] ; then
		format='\1'
		shift
	else
		 format='\1 \2'
	fi

	ip addr show scope global 2>/dev/null | sed -n "s| \+inet \([0-9.]\+\).* \([^ ]\+\)|$format|p"
}

# __docker_complete_local_interfaces applies completion of the names and addresses of all
# local network interfaces based on the current value of `$cur`.
# An additional value can be added to the possible completions with an `--add` argument.
function __docker_complete_local_interfaces {
	local additional_interface
	if [ "${1-}" = "--add" ] ; then
		additional_interface="$2"
		shift 2
	fi

	COMPREPLY=( $( compgen -W "$(__docker_local_interfaces "$@") $additional_interface" -- "$cur" ) )
}

# __docker_complete_local_ips applies completion of the addresses of all local network
# interfaces based on the current value of `$cur`.
function __docker_complete_local_ips {
	__docker_complete_local_interfaces --ip-only
}

# __docker_complete_capabilities_addable completes Linux capabilities which are
# not granted by default and may be added.
# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
function __docker_complete_capabilities_addable {
  local capabilities=(
		ALL
		CAP_AUDIT_CONTROL
		CAP_AUDIT_READ
		CAP_BLOCK_SUSPEND
		CAP_BPF
		CAP_CHECKPOINT_RESTORE
		CAP_DAC_READ_SEARCH
		CAP_IPC_LOCK
		CAP_IPC_OWNER
		CAP_LEASE
		CAP_LINUX_IMMUTABLE
		CAP_MAC_ADMIN
		CAP_MAC_OVERRIDE
		CAP_NET_ADMIN
		CAP_NET_BROADCAST
		CAP_PERFMON
		CAP_SYS_ADMIN
		CAP_SYS_BOOT
		CAP_SYSLOG
		CAP_SYS_MODULE
		CAP_SYS_NICE
		CAP_SYS_PACCT
		CAP_SYS_PTRACE
		CAP_SYS_RAWIO
		CAP_SYS_RESOURCE
		CAP_SYS_TIME
		CAP_SYS_TTY_CONFIG
		CAP_WAKE_ALARM
		RESET
  )
	COMPREPLY=( $( compgen -W "${capabilities[*]} ${capabilities[*]#CAP_}" -- "$cur" ) )
}

# __docker_complete_capabilities_droppable completes Linux capability options which are
# allowed by default and can be dropped.
# see https://docs.docker.com/engine/reference/run/#/runtime-privilege-and-linux-capabilities
function __docker_complete_capabilities_droppable {
	local capabilities=(
		ALL
		CAP_AUDIT_WRITE
		CAP_CHOWN
		CAP_DAC_OVERRIDE
		CAP_FOWNER
		CAP_FSETID
		CAP_KILL
		CAP_MKNOD
		CAP_NET_BIND_SERVICE
		CAP_NET_RAW
		CAP_SETFCAP
		CAP_SETGID
		CAP_SETPCAP
		CAP_SETUID
		CAP_SYS_CHROOT
		RESET
	)
	COMPREPLY=( $( compgen -W "${capabilities[*]} ${capabilities[*]#CAP_}" -- "$cur" ) )
}

function __docker_complete_detach_keys {
	case "$prev" in
		--detach-keys)
			case "$cur" in
				*,)
					COMPREPLY=( $( compgen -W "${cur}ctrl-" -- "$cur" ) )
					;;
				*)
					COMPREPLY=( $( compgen -W "ctrl-" -- "$cur" ) )
					;;
			esac

			__docker_nospace
			return
			;;
	esac
	return 1
}

function __docker_complete_isolation {
	COMPREPLY=( $( compgen -W "default hyperv process" -- "$cur" ) )
}

function __docker_complete_log_drivers {
	COMPREPLY=( $( compgen -W "
		awslogs
		etwlogs
		fluentd
		gcplogs
		gelf
		journald
		json-file
		local
		none
		splunk
		syslog
	" -- "$cur" ) )
}

function __docker_complete_log_options {
	# see https://docs.docker.com/config/containers/logging/configure/

	# really global options, defined in https://github.com/moby/moby/blob/master/daemon/logger/factory.go
	local common_options1="max-buffer-size mode"
	# common options defined in https://github.com/moby/moby/blob/master/daemon/logger/loginfo.go
	# but not implemented in all log drivers
	local common_options2="env env-regex labels"

	# awslogs does not implement the $common_options2.
	local awslogs_options="$common_options1 awslogs-create-group awslogs-credentials-endpoint awslogs-datetime-format awslogs-group awslogs-multiline-pattern awslogs-region awslogs-stream tag"

	local 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"
	local gcplogs_options="$common_options1 $common_options2 gcp-log-cmd gcp-meta-id gcp-meta-name gcp-meta-zone gcp-project"
	local gelf_options="$common_options1 $common_options2 gelf-address gelf-compression-level gelf-compression-type gelf-tcp-max-reconnect gelf-tcp-reconnect-delay tag"
	local journald_options="$common_options1 $common_options2 tag"
	local json_file_options="$common_options1 $common_options2 compress max-file max-size"
	local local_options="$common_options1 compress max-file max-size"
	local 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"
	local 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"

	local all_options="$fluentd_options $gcplogs_options $gelf_options $journald_options $json_file_options $syslog_options $splunk_options"

	case $(__docker_value_of_option --log-driver) in
		'')
			COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) )
			;;
		awslogs)
			COMPREPLY=( $( compgen -W "$awslogs_options" -S = -- "$cur" ) )
			;;
		fluentd)
			COMPREPLY=( $( compgen -W "$fluentd_options" -S = -- "$cur" ) )
			;;
		gcplogs)
			COMPREPLY=( $( compgen -W "$gcplogs_options" -S = -- "$cur" ) )
			;;
		gelf)
			COMPREPLY=( $( compgen -W "$gelf_options" -S = -- "$cur" ) )
			;;
		journald)
			COMPREPLY=( $( compgen -W "$journald_options" -S = -- "$cur" ) )
			;;
		json-file)
			COMPREPLY=( $( compgen -W "$json_file_options" -S = -- "$cur" ) )
			;;
		local)
			COMPREPLY=( $( compgen -W "$local_options" -S = -- "$cur" ) )
			;;
		syslog)
			COMPREPLY=( $( compgen -W "$syslog_options" -S = -- "$cur" ) )
			;;
		splunk)
			COMPREPLY=( $( compgen -W "$splunk_options" -S = -- "$cur" ) )
			;;
		*)
			return
			;;
	esac

	__docker_nospace
}

function __docker_complete_log_driver_options {
	local key=$(__docker_map_key_of_current_option '--log-opt')
	case "$key" in
		awslogs-create-group)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
			return
			;;
		awslogs-credentials-endpoint)
			COMPREPLY=( $( compgen -W "/" -- "${cur##*=}" ) )
			__docker_nospace
			return
			;;
		compress|fluentd-async-connect)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
			return
			;;
		fluentd-sub-second-precision)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
			return
			;;
		gelf-address)
			COMPREPLY=( $( compgen -W "tcp udp" -S "://" -- "${cur##*=}" ) )
			__docker_nospace
			return
			;;
		gelf-compression-level)
			COMPREPLY=( $( compgen -W "1 2 3 4 5 6 7 8 9" -- "${cur##*=}" ) )
			return
			;;
		gelf-compression-type)
			COMPREPLY=( $( compgen -W "gzip none zlib" -- "${cur##*=}" ) )
			return
			;;
		line-only)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
			return
			;;
		mode)
			COMPREPLY=( $( compgen -W "blocking non-blocking" -- "${cur##*=}" ) )
			return
			;;
		syslog-address)
			COMPREPLY=( $( compgen -W "tcp:// tcp+tls:// udp:// unix://" -- "${cur##*=}" ) )
			__docker_nospace
			__ltrim_colon_completions "${cur}"
			return
			;;
		syslog-facility)
			COMPREPLY=( $( compgen -W "
				auth
				authpriv
				cron
				daemon
				ftp
				kern
				local0
				local1
				local2
				local3
				local4
				local5
				local6
				local7
				lpr
				mail
				news
				syslog
				user
				uucp
			" -- "${cur##*=}" ) )
			return
			;;
		syslog-format)
			COMPREPLY=( $( compgen -W "rfc3164 rfc5424 rfc5424micro" -- "${cur##*=}" ) )
			return
			;;
		syslog-tls-ca-cert|syslog-tls-cert|syslog-tls-key)
			_filedir
			return
			;;
		syslog-tls-skip-verify)
			COMPREPLY=( $( compgen -W "true" -- "${cur##*=}" ) )
			return
			;;
		splunk-url)
			COMPREPLY=( $( compgen -W "http:// https://" -- "${cur##*=}" ) )
			__docker_nospace
			__ltrim_colon_completions "${cur}"
			return
			;;
		splunk-gzip|splunk-insecureskipverify|splunk-verify-connection)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
			return
			;;
		splunk-format)
			COMPREPLY=( $( compgen -W "inline json raw" -- "${cur##*=}" ) )
			return
			;;
	esac
	return 1
}

function __docker_complete_log_levels {
	COMPREPLY=( $( compgen -W "debug info warn error fatal" -- "$cur" ) )
}

function __docker_complete_restart {
	case "$prev" in
		--restart)
			case "$cur" in
				on-failure:*)
					;;
				*)
					COMPREPLY=( $( compgen -W "always no on-failure on-failure: unless-stopped" -- "$cur") )
					;;
			esac
			return
			;;
	esac
	return 1
}

# __docker_complete_signals returns a subset of the available signals that is most likely
# relevant in the context of docker containers
function __docker_complete_signals {
	local signals=(
		SIGCONT
		SIGHUP
		SIGINT
		SIGKILL
		SIGQUIT
		SIGSTOP
		SIGTERM
		SIGUSR1
		SIGUSR2
	)
	COMPREPLY=( $( compgen -W "${signals[*]} ${signals[*]#SIG}" -- "$( echo "$cur" | tr '[:lower:]' '[:upper:]')" ) )
}

function __docker_complete_ulimits {
	local limits="
		as
		chroot
		core
		cpu
		data
		fsize
		locks
		maxlogins
		maxsyslogins
		memlock
		msgqueue
		nice
		nofile
		nproc
		priority
		rss
		rtprio
		sigpending
		stack
	"
	if [ "${1-}" = "--rm" ] ; then
		COMPREPLY=( $( compgen -W "$limits" -- "$cur" ) )
	else
		COMPREPLY=( $( compgen -W "$limits" -S = -- "$cur" ) )
		__docker_nospace
	fi
}

function __docker_complete_user_group {
	if [[ $cur == *:* ]] ; then
		COMPREPLY=( $(compgen -g -- "${cur#*:}") )
	else
		COMPREPLY=( $(compgen -u -S : -- "$cur") )
		__docker_nospace
	fi
}

function __docker_plugins_path {
	local docker_plugins_path=$(docker info --format '{{range .ClientInfo.Plugins}}{{.Path}}:{{end}}')
	echo "${docker_plugins_path//:/ }"
}

function __docker_complete_plugin {
	local path=$1
	local completionCommand="__completeNoDesc"
	local resultArray=($path $completionCommand)
	for value in "${words[@]:2}"; do
		if [ -z "$value" ]; then
			resultArray+=( "''" )
		else
			resultArray+=( "$value" )
		fi
	done
	local rawResult=$(eval "${resultArray[*]}" 2> /dev/null)
	local result=$(grep -v '^:[0-9]*$' <<< "$rawResult")

	# Compose V2 completions sometimes returns returns `:8` (ShellCompDirectiveFilterFileExt)
	# with the expected file extensions (such as `yml`, `yaml`) to indicate that the shell should
	# provide autocompletions for files with matching extensions
	local completionFlag=$(tail -1 <<< "$rawResult")
	if [ "$completionFlag" == ":8" ]; then
		# format a valid glob pattern for the provided file extensions
		local filePattern=$(tr '\n' '|' <<< "$result")

		_filedir "$filePattern"
		return
	fi

	# if result empty, just use filename completion as fallback
	if [ -z "$result" ]; then
		_filedir
	else
		COMPREPLY=( $(compgen -W "${result}" -- "${current-}") )
	fi
}

function _docker_docker {
	# global options that may appear after the docker command
	local boolean_options="
		$global_boolean_options
		--help
		--version -v
	"

	case "$prev" in
		--config)
			_filedir -d
			return
			;;
		--context|-c)
			__docker_complete_contexts
			return
			;;
		--log-level|-l)
			__docker_complete_log_levels
			return
			;;
		$(__docker_to_extglob "$global_options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$boolean_options $global_options_with_args" -- "$cur" ) )
			;;
		*)
			local counter=$( __docker_pos_first_nonflag "$(__docker_to_extglob "$global_options_with_args")" )
			if [ "$cword" -eq "$counter" ]; then
				__docker_server_is_experimental && commands+=(${experimental_server_commands[*]})
				COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
			fi
			;;
	esac
}

function _docker_attach {
	_docker_container_attach
}

function _docker_build {
	_docker_image_build
}


function _docker_builder {
	local subcommands="
		build
		prune
	"
	__docker_subcommands "$subcommands" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_builder_build {
	_docker_image_build
}

function _docker_builder_prune {
	case "$prev" in
		--filter)
			COMPREPLY=( $( compgen -S = -W "description id inuse parent private shared type until unused-for" -- "$cur" ) )
			__docker_nospace
			return
			;;
		--keep-storage)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--all -a --filter --force -f --help --keep-storage" -- "$cur" ) )
			;;
	esac
}

function _docker_checkpoint {
	local subcommands="
		create
		ls
		rm
	"
	local aliases="
		list
		remove
	"
	__docker_subcommands "$subcommands $aliases" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_checkpoint_create {
	case "$prev" in
		--checkpoint-dir)
			_filedir -d
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--checkpoint-dir --help --leave-running" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--checkpoint-dir')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_running
			fi
			;;
	esac
}

function _docker_checkpoint_ls {
	case "$prev" in
		--checkpoint-dir)
			_filedir -d
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--checkpoint-dir --help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--checkpoint-dir')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_checkpoint_rm {
	case "$prev" in
		--checkpoint-dir)
			_filedir -d
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--checkpoint-dir --help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--checkpoint-dir')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			elif [ "$cword" -eq "$((counter + 1))" ]; then
				COMPREPLY=( $( compgen -W "$(__docker_q checkpoint ls "$prev" | sed 1d)" -- "$cur" ) )
			fi
			;;
	esac
}


function _docker_config {
	local subcommands="
		create
		inspect
		ls
		rm
	"
	local aliases="
		list
		remove
	"
	__docker_subcommands "$subcommands $aliases" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_config_create {
	case "$prev" in
		--label|-l)
			return
			;;
		--template-driver)
			COMPREPLY=( $( compgen -W "golang" -- "$cur" ) )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --label -l --template-driver" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--label|-l|--template-driver')
			if [ "$cword" -eq "$((counter + 1))" ]; then
				_filedir
			fi
			;;
	esac
}

function _docker_config_inspect {
	case "$prev" in
		--format|-f)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
			;;
		*)
			__docker_complete_configs
			;;
	esac
}

function _docker_config_list {
	_docker_config_ls
}

function _docker_config_ls {
	local key=$(__docker_map_key_of_current_option '--filter|-f')
	case "$key" in
		id)
			__docker_complete_configs --cur "${cur##*=}" --id
			return
			;;
		name)
			__docker_complete_configs --cur "${cur##*=}" --name
			return
			;;
	esac

	case "$prev" in
		--filter|-f)
			COMPREPLY=( $( compgen -S = -W "id label name" -- "$cur" ) )
			__docker_nospace
			return
			;;
		--format)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--format --filter -f --help --quiet -q" -- "$cur" ) )
			;;
	esac
}

function _docker_config_remove {
	_docker_config_rm
}

function _docker_config_rm {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_complete_configs
			;;
	esac
}


function _docker_container {
	local subcommands="
		attach
		commit
		cp
		create
		diff
		exec
		export
		inspect
		kill
		logs
		ls
		pause
		port
		prune
		rename
		restart
		rm
		run
		start
		stats
		stop
		top
		unpause
		update
		wait
	"
	local aliases="
		list
		ps
	"
	__docker_subcommands "$subcommands $aliases" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_container_attach {
	__docker_complete_detach_keys && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--detach-keys --help --no-stdin --sig-proxy=false" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--detach-keys')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_running
			fi
			;;
	esac
}

function _docker_container_commit {
	case "$prev" in
		--author|-a|--change|-c|--message|-m)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--author -a --change -c --help --message -m --pause=false -p=false" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--author|-a|--change|-c|--message|-m')

			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
				return
			elif [ "$cword" -eq "$((counter + 1))" ]; then
				__docker_complete_images --repo --tag
				return
			fi
			;;
	esac
}

function _docker_container_cp {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--archive -a --follow-link -L --help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				case "$cur" in
					*:)
						return
						;;
					*)
						# combined container and filename completion
						_filedir
						local files=( ${COMPREPLY[@]} )

						__docker_complete_containers_all
						COMPREPLY=( $( compgen -W "${COMPREPLY[*]}" -S ':' ) )
						local containers=( ${COMPREPLY[@]} )

						COMPREPLY=( $( compgen -W "${files[*]} ${containers[*]}" -- "$cur" ) )
						if [[ "${COMPREPLY[*]}" = *: ]]; then
							__docker_nospace
						fi
						return
						;;
				esac
			fi
			(( counter++ ))

			if [ "$cword" -eq "$counter" ]; then
				if [ -e "$prev" ]; then
					__docker_complete_containers_all
					COMPREPLY=( $( compgen -W "${COMPREPLY[*]}" -S ':' ) )
					__docker_nospace
				else
					_filedir
				fi
				return
			fi
			;;
	esac
}

function _docker_container_create {
	_docker_container_run_and_create
}

function _docker_container_diff {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_container_exec {
	__docker_complete_detach_keys && return

	case "$prev" in
		--env|-e)
			# we do not append a "=" here because "-e VARNAME" is legal syntax, too
			COMPREPLY=( $( compgen -e -- "$cur" ) )
			__docker_nospace
			return
			;;
		--env-file)
			_filedir
			return
			;;
		--user|-u)
			__docker_complete_user_group
			return
			;;
		--workdir|-w)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--detach -d --detach-keys --env -e --env-file --help --interactive -i --privileged -t --tty -u --user --workdir -w" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_running
			;;
	esac
}

function _docker_container_export {
	case "$prev" in
		--output|-o)
			_filedir
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --output -o" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_container_inspect {
	_docker_inspect --type container
}

function _docker_container_kill {
	case "$prev" in
		--signal|-s)
			__docker_complete_signals
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --signal -s" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_running
			;;
	esac
}

function _docker_container_logs {
	case "$prev" in
		--since|--tail|-n|--until)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--details --follow -f --help --since --tail -n --timestamps -t --until" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--since|--tail|-n|--until')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_container_list {
	_docker_container_ls
}

function _docker_container_ls {
	local key=$(__docker_map_key_of_current_option '--filter|-f')
	case "$key" in
		ancestor)
			__docker_complete_images --cur "${cur##*=}" --repo --tag --id
			return
			;;
		before)
			__docker_complete_containers_all --cur "${cur##*=}"
			return
			;;
		expose|publish)
			return
			;;
		id)
			__docker_complete_containers_all --cur "${cur##*=}" --id
			return
			;;
		health)
			COMPREPLY=( $( compgen -W "healthy starting none unhealthy" -- "${cur##*=}" ) )
			return
			;;
		is-task)
			COMPREPLY=( $( compgen -W "true false" -- "${cur##*=}" ) )
			return
			;;
		name)
			__docker_complete_containers_all --cur "${cur##*=}" --name
			return
			;;
		network)
			__docker_complete_networks --cur "${cur##*=}"
			return
			;;
		since)
			__docker_complete_containers_all --cur "${cur##*=}"
			return
			;;
		status)
			COMPREPLY=( $( compgen -W "created dead exited paused restarting running removing" -- "${cur##*=}" ) )
			return
			;;
		volume)
			__docker_complete_volumes --cur "${cur##*=}"
			return
			;;
	esac

	case "$prev" in
		--filter|-f)
			COMPREPLY=( $( compgen -S = -W "ancestor before exited expose health id is-task label name network publish since status volume" -- "$cur" ) )
			__docker_nospace
			return
			;;
		--format|--last|-n)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--all -a --filter -f --format --help --last -n --latest -l --no-trunc --quiet -q --size -s" -- "$cur" ) )
			;;
	esac
}

function _docker_container_pause {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_running
			;;
	esac
}

function _docker_container_port {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_container_prune {
	case "$prev" in
		--filter)
			COMPREPLY=( $( compgen -W "label label! until" -S = -- "$cur" ) )
			__docker_nospace
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--force -f --filter --help" -- "$cur" ) )
			;;
	esac
}

function _docker_container_ps {
	_docker_container_ls
}

function _docker_container_rename {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_all
			fi
			;;
	esac
}

function _docker_container_restart {
	case "$prev" in
		--time|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --time -t" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_all
			;;
	esac
}

function _docker_container_rm {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--force -f --help --link -l --volumes -v" -- "$cur" ) )
			;;
		*)
			for arg in "${COMP_WORDS[@]}"; do
				case "$arg" in
					--force|-f)
						__docker_complete_containers_all
						return
						;;
				esac
			done
			__docker_complete_containers_removable
			;;
	esac
}

function _docker_container_run {
	_docker_container_run_and_create
}

# _docker_container_run_and_create is the combined completion for `_docker_container_run`
# and `_docker_container_create`
function _docker_container_run_and_create {
	local options_with_args="
		--add-host
		--annotation
		--attach -a
		--blkio-weight
		--blkio-weight-device
		--cap-add
		--cap-drop
		--cgroupns
		--cgroup-parent
		--cidfile
		--cpu-period
		--cpu-quota
		--cpu-rt-period
		--cpu-rt-runtime
		--cpuset-cpus
		--cpus
		--cpuset-mems
		--cpu-shares -c
		--device
		--device-cgroup-rule
		--device-read-bps
		--device-read-iops
		--device-write-bps
		--device-write-iops
		--dns
		--dns-option
		--dns-search
		--domainname
		--entrypoint
		--env -e
		--env-file
		--expose
		--gpus
		--group-add
		--health-cmd
		--health-interval
		--health-retries
		--health-start-period
		--health-timeout
		--hostname -h
		--ip
		--ip6
		--ipc
		--kernel-memory
		--label-file
		--label -l
		--link
		--link-local-ip
		--log-driver
		--log-opt
		--mac-address
		--memory -m
		--memory-swap
		--memory-swappiness
		--memory-reservation
		--mount
		--name
		--network
		--network-alias
		--oom-score-adj
		--pid
		--pids-limit
		--platform
		--publish -p
		--pull
		--restart
		--runtime
		--security-opt
		--shm-size
		--stop-signal
		--stop-timeout
		--storage-opt
		--tmpfs
		--sysctl
		--ulimit
		--user -u
		--userns
		--uts
		--volume-driver
		--volumes-from
		--volume -v
		--workdir -w
	"
	__docker_server_os_is windows && options_with_args+="
		--cpu-count
		--cpu-percent
		--io-maxbandwidth
		--io-maxiops
		--isolation
	"

	local boolean_options="
		--disable-content-trust=false
		--help
		--init
		--interactive -i
		--no-healthcheck
		--oom-kill-disable
		--privileged
		--publish-all -P
		--quiet -q
		--read-only
		--tty -t
	"

	if [ "$command" = "run" ] || [ "$subcommand" = "run" ] ; then
		options_with_args="$options_with_args
			--detach-keys
		"
		boolean_options="$boolean_options
			--detach -d
			--rm
			--sig-proxy=false
		"
		__docker_complete_detach_keys && return
	fi

	local all_options="$options_with_args $boolean_options"


	__docker_complete_log_driver_options && return
	__docker_complete_restart && return

	local key=$(__docker_map_key_of_current_option '--security-opt')
	case "$key" in
		label)
			[[ $cur == *: ]] && return
			COMPREPLY=( $( compgen -W "user: role: type: level: disable" -- "${cur##*=}") )
			if [ "${COMPREPLY[*]}" != "disable" ] ; then
				__docker_nospace
			fi
			return
			;;
		seccomp)
			local cur=${cur##*=}
			_filedir
			COMPREPLY+=( $( compgen -W "unconfined" -- "$cur" ) )
			return
			;;
	esac

	case "$prev" in
		--add-host)
			case "$cur" in
				*:)
					__docker_complete_resolved_hostname
					return
					;;
			esac
			;;
		--attach|-a)
			COMPREPLY=( $( compgen -W 'stdin stdout stderr' -- "$cur" ) )
			return
			;;
		--cap-add)
			__docker_complete_capabilities_addable
			return
			;;
		--cap-drop)
			__docker_complete_capabilities_droppable
			return
			;;
		--cidfile|--env-file|--label-file)
			_filedir
			return
			;;
		--cgroupns)
			COMPREPLY=( $( compgen -W "host private" -- "$cur" ) )
			return
			;;
		--device|--tmpfs|--volume|-v)
			case "$cur" in
				*:*)
					# TODO somehow do _filedir for stuff inside the image, if it's already specified (which is also somewhat difficult to determine)
					;;
				'')
					COMPREPLY=( $( compgen -W '/' -- "$cur" ) )
					__docker_nospace
					;;
				/*)
					_filedir
					__docker_nospace
					;;
			esac
			return
			;;
		--env|-e)
			# we do not append a "=" here because "-e VARNAME" is legal syntax, too
			COMPREPLY=( $( compgen -e -- "$cur" ) )
			__docker_nospace
			return
			;;
		--ipc)
			case "$cur" in
				*:*)
					cur="${cur#*:}"
					__docker_complete_containers_running
					;;
				*)
					COMPREPLY=( $( compgen -W 'none host private shareable container:' -- "$cur" ) )
					if [ "${COMPREPLY[*]}" = "container:" ]; then
						__docker_nospace
					fi
					;;
			esac
			return
			;;
		--isolation)
			if __docker_server_os_is windows ; then
				__docker_complete_isolation
				return
			fi
			;;
		--link)
			case "$cur" in
				*:*)
					;;
				*)
					__docker_complete_containers_running
					COMPREPLY=( $( compgen -W "${COMPREPLY[*]}" -S ':' ) )
					__docker_nospace
					;;
			esac
			return
			;;
		--log-driver)
			__docker_complete_log_drivers
			return
			;;
		--log-opt)
			__docker_complete_log_options
			return
			;;
		--network)
			case "$cur" in
				container:*)
					__docker_complete_containers_all --cur "${cur#*:}"
					;;
				*)
					COMPREPLY=( $( compgen -W "$(__docker_plugins_bundled --type Network) $(__docker_networks) container:" -- "$cur") )
					if [ "${COMPREPLY[*]}" = "container:" ] ; then
						__docker_nospace
					fi
					;;
			esac
			return
			;;
		--pid)
			case "$cur" in
				*:*)
					__docker_complete_containers_running --cur "${cur#*:}"
					;;
				*)
					COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) )
					if [ "${COMPREPLY[*]}" = "container:" ]; then
						__docker_nospace
					fi
					;;
			esac
			return
			;;
		--pull)
		  COMPREPLY=( $( compgen -W 'always missing never' -- "$cur" ) )
		  return
		  ;;
		--runtime)
			__docker_complete_runtimes
			return
			;;
		--security-opt)
			COMPREPLY=( $( compgen -W "apparmor= label= no-new-privileges seccomp= systempaths=unconfined" -- "$cur") )
			if [[ ${COMPREPLY[*]} = *= ]] ; then
				__docker_nospace
			fi
			return
			;;
		--stop-signal)
			__docker_complete_signals
			return
			;;
		--storage-opt)
			COMPREPLY=( $( compgen -W "size" -S = -- "$cur") )
			__docker_nospace
			return
			;;
		--ulimit)
			__docker_complete_ulimits
			return
			;;
		--user|-u)
			__docker_complete_user_group
			return
			;;
		--userns)
			COMPREPLY=( $( compgen -W "host" -- "$cur" ) )
			return
			;;
		--volume-driver)
			__docker_complete_plugins_bundled --type Volume
			return
			;;
		--volumes-from)
			__docker_complete_containers_all
			return
			;;
		$(__docker_to_extglob "$options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) )
			;;
		*)
			local counter=$( __docker_pos_first_nonflag "$( __docker_to_alternatives "$options_with_args" )" )
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_images --repo --tag --id
			fi
			;;
	esac
}

function _docker_container_start {
	__docker_complete_detach_keys && return
	case "$prev" in
		--checkpoint)
			if __docker_server_is_experimental ; then
				return
			fi
			;;
		--checkpoint-dir)
			if __docker_server_is_experimental ; then
				_filedir -d
				return
			fi
			;;
	esac

	case "$cur" in
		-*)
			local options="--attach -a --detach-keys --help --interactive -i"
			__docker_server_is_experimental && options+=" --checkpoint --checkpoint-dir"
			COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_stopped
			;;
	esac
}

function _docker_container_stats {
	case "$prev" in
		--format)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--all -a --format --help --no-stream --no-trunc" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_running
			;;
	esac
}

function _docker_container_stop {
	case "$prev" in
		--time|-t)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --time -t" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_stoppable
			;;
	esac
}

function _docker_container_top {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_running
			fi
			;;
	esac
}

function _docker_container_unpause {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_containers_unpauseable
			fi
			;;
	esac
}

function _docker_container_update {
	local options_with_args="
		--blkio-weight
		--cpu-period
		--cpu-quota
		--cpu-rt-period
		--cpu-rt-runtime
		--cpus
		--cpuset-cpus
		--cpuset-mems
		--cpu-shares -c
		--kernel-memory
		--memory -m
		--memory-reservation
		--memory-swap
		--pids-limit
		--restart
	"

	local boolean_options="
		--help
	"

	local all_options="$options_with_args $boolean_options"

	__docker_complete_restart && return

	case "$prev" in
		$(__docker_to_extglob "$options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_all
			;;
	esac
}

function _docker_container_wait {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			__docker_complete_containers_all
			;;
	esac
}


function _docker_context {
	local subcommands="
		create
		export
		import
		inspect
		ls
		rm
		update
		use
	"
	local aliases="
		list
		remove
	"
	__docker_subcommands "$subcommands $aliases" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_context_create {
	case "$prev" in
		--description|--docker)
			return
			;;
		--from)
			__docker_complete_contexts
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--description --docker --from --help" -- "$cur" ) )
			;;
	esac
}

function _docker_context_export {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_contexts
			elif [ "$cword" -eq "$((counter + 1))" ]; then
				_filedir
			fi
			;;
	esac
}

function _docker_context_import {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				:
			elif [ "$cword" -eq "$((counter + 1))" ]; then
				_filedir
			fi
			;;
	esac
}

function _docker_context_inspect {
	case "$prev" in
		--format|-f)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--format -f --help" -- "$cur" ) )
			;;
		*)
			__docker_complete_contexts
			;;
	esac
}

function _docker_context_list {
	_docker_context_ls
}

function _docker_context_ls {
	case "$prev" in
		--format|-f)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--format -f --help --quiet -q" -- "$cur" ) )
			;;
	esac
}

function _docker_context_remove {
	_docker_context_rm
}

function _docker_context_rm {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--force -f --help" -- "$cur" ) )
			;;
		*)
			__docker_complete_contexts
			;;
	esac
}

function _docker_context_update {
	case "$prev" in
		--description|--docker)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--description --docker --help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_contexts
			fi
			;;
	esac
}

function _docker_context_use {
	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag)
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_contexts --add default
			fi
			;;
	esac
}


function _docker_commit {
	_docker_container_commit
}

function _docker_cp {
	_docker_container_cp
}

function _docker_create {
	_docker_container_create
}

function _docker_daemon {
	local boolean_options="
		$global_boolean_options
		--experimental
		--help
		--icc=false
		--init
		--ip-forward=false
		--ip-masq=false
		--iptables=false
		--ip6tables
		--ipv6
		--live-restore
		--no-new-privileges
		--raw-logs
		--selinux-enabled
		--userland-proxy=false
		--validate
		--version -v
	"
	local options_with_args="
		$global_options_with_args
		--add-runtime
		--allow-nondistributable-artifacts
		--api-cors-header
		--authorization-plugin
		--bip
		--bridge -b
		--cgroup-parent
		--config-file
		--containerd
		--containerd-namespace
		--containerd-plugins-namespace
		--cpu-rt-period
		--cpu-rt-runtime
		--data-root
		--default-address-pool
		--default-gateway
		--default-gateway-v6
		--default-runtime
		--default-shm-size
		--default-ulimit
		--dns
		--dns-search
		--dns-opt
		--exec-opt
		--exec-root
		--fixed-cidr
		--fixed-cidr-v6
		--group -G
		--init-path
		--insecure-registry
		--ip
		--label
		--log-driver
		--log-opt
		--max-concurrent-downloads
		--max-concurrent-uploads
		--max-download-attempts
		--metrics-addr
		--mtu
		--network-control-plane-mtu
		--node-generic-resource
		--oom-score-adjust
		--pidfile -p
		--registry-mirror
		--seccomp-profile
		--shutdown-timeout
		--storage-driver -s
		--storage-opt
		--swarm-default-advertise-addr
		--userland-proxy-path
		--userns-remap
	"

	__docker_complete_log_driver_options && return

 	local key=$(__docker_map_key_of_current_option '--storage-opt')
 	case "$key" in
 		dm.blkdiscard|dm.override_udev_sync_check|dm.use_deferred_removal|dm.use_deferred_deletion)
 			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}" ) )
 			return
 			;;
		dm.directlvm_device|dm.thinpooldev)
			cur=${cur##*=}
			_filedir
			return
			;;
		dm.fs)
			COMPREPLY=( $( compgen -W "ext4 xfs" -- "${cur##*=}" ) )
			return
			;;
		dm.libdm_log_level)
			COMPREPLY=( $( compgen -W "2 3 4 5 6 7" -- "${cur##*=}" ) )
			return
			;;
 	esac

	case "$prev" in
		--authorization-plugin)
			__docker_complete_plugins_bundled --type Authorization
			return
			;;
		--config-file|--containerd|--init-path|--pidfile|-p|--tlscacert|--tlscert|--tlskey|--userland-proxy-path)
			_filedir
			return
			;;
		--default-ulimit)
			__docker_complete_ulimits
			return
			;;
		--exec-root|--data-root)
			_filedir -d
			return
			;;
		--log-driver)
			__docker_complete_log_drivers
			return
			;;
		--storage-driver|-s)
			COMPREPLY=( $( compgen -W "btrfs overlay2 vfs zfs" -- "$(echo "$cur" | tr '[:upper:]' '[:lower:]')" ) )
			return
			;;
		--storage-opt)
			local btrfs_options="btrfs.min_space"
			local overlay2_options="overlay2.size"
			local zfs_options="zfs.fsname"

			local all_options="$btrfs_options $overlay2_options $zfs_options"

			case $(__docker_value_of_option '--storage-driver|-s') in
				'')
					COMPREPLY=( $( compgen -W "$all_options" -S = -- "$cur" ) )
					;;
				btrfs)
					COMPREPLY=( $( compgen -W "$btrfs_options" -S = -- "$cur" ) )
					;;
				overlay2)
					COMPREPLY=( $( compgen -W "$overlay2_options" -S = -- "$cur" ) )
					;;
				zfs)
					COMPREPLY=( $( compgen -W "$zfs_options" -S = -- "$cur" ) )
					;;
				*)
					return
					;;
			esac
			__docker_nospace
			return
			;;
		--log-level|-l)
			__docker_complete_log_levels
			return
			;;
		--log-opt)
			__docker_complete_log_options
			return
			;;
		--metrics-addr)
			__docker_complete_local_ips
			__docker_append_to_completions ":"
			__docker_nospace
			return
			;;
		--seccomp-profile)
			_filedir json
			return
			;;
		--swarm-default-advertise-addr)
			__docker_complete_local_interfaces
			return
			;;
		--userns-remap)
			__docker_complete_user_group
			return
			;;
		$(__docker_to_extglob "$options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) )
			;;
	esac
}

function _docker_diff {
	_docker_container_diff
}


function _docker_events {
	_docker_system_events
}

function _docker_exec {
	_docker_container_exec
}

function _docker_export {
	_docker_container_export
}

function _docker_help {
	local counter=$(__docker_pos_first_nonflag)
	if [ "$cword" -eq "$counter" ]; then
		COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
	fi
}

function _docker_history {
	_docker_image_history
}


function _docker_image {
	local subcommands="
		build
		history
		import
		inspect
		load
		ls
		prune
		pull
		push
		rm
		save
		tag
	"
	local aliases="
		images
		list
		remove
		rmi
	"
	__docker_subcommands "$subcommands $aliases" && return

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
			;;
		*)
			COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
			;;
	esac
}

function _docker_image_build {
	local options_with_args="
		--add-host
		--build-arg
		--cache-from
		--cgroup-parent
		--cpuset-cpus
		--cpuset-mems
		--cpu-shares -c
		--cpu-period
		--cpu-quota
		--file -f
		--iidfile
		--label
		--memory -m
		--memory-swap
		--network
		--platform
		--shm-size
		--tag -t
		--target
		--ulimit
	"
	__docker_server_os_is windows && options_with_args+="
		--isolation
	"

	local boolean_options="
		--disable-content-trust=false
		--force-rm
		--help
		--no-cache
		--pull
		--quiet -q
		--rm
	"

	if __docker_server_is_experimental ; then
		boolean_options+="
			--squash
		"
	fi

	if [ "${DOCKER_BUILDKIT-}" = "1" ] ; then
		options_with_args+="
			--output -o
			--progress
			--secret
			--ssh
		"
	else
		boolean_options+="
			--compress
		"
	fi

	local all_options="$options_with_args $boolean_options"

	case "$prev" in
		--add-host)
			case "$cur" in
				*:)
					__docker_complete_resolved_hostname
					return
					;;
			esac
			;;
		--build-arg)
			COMPREPLY=( $( compgen -e -- "$cur" ) )
			__docker_nospace
			return
			;;
		--cache-from)
			__docker_complete_images --repo --tag --id
			return
			;;
		--file|-f|--iidfile)
			_filedir
			return
			;;
		--isolation)
			if __docker_server_os_is windows ; then
				__docker_complete_isolation
				return
			fi
			;;
		--network)
			case "$cur" in
				container:*)
					__docker_complete_containers_all --cur "${cur#*:}"
					;;
				*)
					COMPREPLY=( $( compgen -W "$(__docker_plugins_bundled --type Network) $(__docker_networks) container:" -- "$cur") )
					if [ "${COMPREPLY[*]}" = "container:" ] ; then
						__docker_nospace
					fi
					;;
			esac
			return
			;;
		--progress)
			COMPREPLY=( $( compgen -W "auto plain tty" -- "$cur" ) )
			return
			;;
		--tag|-t)
			__docker_complete_images --repo --tag
			return
			;;
		--target)
			local context_pos=$( __docker_pos_first_nonflag "$( __docker_to_alternatives "$options_with_args" )" )
			local context="${words[$context_pos]}"
			context="${context:-.}"

			local file="$( __docker_value_of_option '--file|f' )"
			local default_file="${context%/}/Dockerfile"
			local dockerfile="${file:-$default_file}"

			local targets="$( sed -n 's/^FROM .\+ AS \(.\+\)/\1/p' "$dockerfile" 2>/dev/null )"
			COMPREPLY=( $( compgen -W "$targets" -- "$cur" ) )
			return
			;;
		--ulimit)
			__docker_complete_ulimits
			return
			;;
		$(__docker_to_extglob "$options_with_args") )
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) )
			;;
		*)
			local counter=$( __docker_pos_first_nonflag "$( __docker_to_alternatives "$options_with_args" )" )
			if [ "$cword" -eq "$counter" ]; then
				_filedir -d
			fi
			;;
	esac
}

function _docker_image_history {
	case "$prev" in
		--format)
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--format --help --human=false -H=false --no-trunc --quiet -q" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--format')
			if [ "$cword" -eq "$counter" ]; then
				__docker_complete_images --force-tag --id
			fi
			;;
	esac
}

function _docker_image_images {
	_docker_image_ls
}

function _docker_image_import {
	case "$prev" in
		--change|-c|--message|-m|--platform)
			return
			;;
	esac

	case "$cur" in
		-*)
			local options="--change -c --help --message -m --platform"
			COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
			;;
		*)
			local counter=$(__docker_pos_first_nonflag '--change|-c|--message|-m')
			if [ "$cword" -eq "$counter" ]; then
				_filedir
				return
			elif [ "$cword" -eq "$((counter + 1))" ]; then
				__docker_complete_images --repo --tag
				return
			fi
			;;
	esac
}

function _docker_image_inspect {
	_docker_inspect --type image
}

function _docker_image_load {
	case "$prev" in
		--input|-i|"<")
			_filedir
			return
			;;
	esac

	case "$cur" in
		-*)
			COMPREPLY=( $( compgen -W "--help --input -i --quiet -q" -- "$cur" ) )
			;;
	esac
}

function _docker_image_list {
	_docker_image_ls
}

function _docker_image_ls {
	local key=$(__docker_map_key_of_current_option '--filter|-f')
	case "$key" in
		before|since)
			__docker_complete_images --cur "${cur##*=}" --force-tag --id
			return
			;;
		dangling)
			COMPREPLY=( $( compgen -W "false true" -- "${cur##*=}"
Download .txt
gitextract_1l1cb4dc/

├── .editorconfig
├── .git-blame-ignore-revs
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── format.yml
│       ├── test.sh
│       └── test.yml
├── .gitignore
├── .shellcheckrc
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── aliases/
│   ├── README.md
│   ├── cargo.aliases.md
│   ├── cargo.aliases.sh
│   ├── chmod.aliases.sh
│   ├── debian.aliases.bash
│   ├── debian.aliases.md
│   ├── docker.aliases.md
│   ├── docker.aliases.sh
│   ├── general.aliases.md
│   ├── general.aliases.sh
│   ├── ls.aliases.sh
│   ├── misc.aliases.sh
│   ├── package-manager.aliases.bash
│   ├── package-manager.aliases.md
│   ├── terraform.aliases.md
│   └── terraform.aliases.sh
├── cache/
│   └── .gitkeep
├── completions/
│   ├── apm.completion.sh
│   ├── asdf.completion.sh
│   ├── awscli.completion.sh
│   ├── brew.completion.sh
│   ├── bundler.completion.sh
│   ├── capistrano.completion.sh
│   ├── chezmoi.completion.sh
│   ├── composer.completion.sh
│   ├── conda.completion.sh
│   ├── crc.completion.sh
│   ├── defaults.completion.sh
│   ├── dirs.completion.sh
│   ├── django.completion.sh
│   ├── docker-compose.completion.sh
│   ├── docker-machine.completion.sh
│   ├── docker.completion.sh
│   ├── drush.completion.sh
│   ├── fabric-completion.sh
│   ├── fallback/
│   │   ├── docker-compose.bash
│   │   └── docker.bash
│   ├── gem.completion.sh
│   ├── gh.completion.sh
│   ├── git.completion.bash
│   ├── git_flow.completion.sh
│   ├── git_flow_avh.completion.sh
│   ├── go.completion.sh
│   ├── gradle.completion.sh
│   ├── grunt.completion.sh
│   ├── gulp.completion.sh
│   ├── helm.completion.sh
│   ├── homesick.completion.sh
│   ├── hub.completion.sh
│   ├── jboss7.completion.sh
│   ├── jump.completion.sh
│   ├── jungle.completion.sh
│   ├── kontena.completion.sh
│   ├── kubectl.completion.sh
│   ├── makefile.completion.sh
│   ├── maven.completion.sh
│   ├── minikube.completion.sh
│   ├── npm.completion.sh
│   ├── nvm.completion.sh
│   ├── oc.completion.sh
│   ├── packer.completion.sh
│   ├── pip.completion.sh
│   ├── pip3.completion.sh
│   ├── projects.completion.sh
│   ├── rake.completion.sh
│   ├── salt.completion.sh
│   ├── sdkman.completion.sh
│   ├── ssh.completion.sh
│   ├── svn.completion.sh
│   ├── system.completion.sh
│   ├── terraform.completion.sh
│   ├── test_kitchen.completion.sh
│   ├── tkn.completion.sh
│   ├── tmux.completion.sh
│   ├── todo.completion.sh
│   ├── uv.completion.sh
│   ├── vagrant.completion.sh
│   ├── vault.completion.sh
│   └── virtualbox.completion.sh
├── lib/
│   ├── base.sh
│   ├── bourne-shell.sh
│   ├── cli.bash
│   ├── directories.sh
│   ├── functions.sh
│   ├── git.sh
│   ├── grep.sh
│   ├── history.sh
│   ├── misc.sh
│   ├── mo.sh
│   ├── nvm.sh
│   ├── omb-completion.sh
│   ├── omb-deprecate.sh
│   ├── omb-prompt-base.sh
│   ├── omb-prompt-colors.sh
│   ├── omb-util.sh
│   ├── readlink.sh
│   ├── shopt.sh
│   ├── spectrum.sh
│   ├── spinner.sh
│   ├── theme-and-appearance.sh
│   └── utils.sh
├── log/
│   └── .gitkeep
├── oh-my-bash.sh
├── plugins/
│   ├── README.md
│   ├── ansible/
│   │   ├── README.md
│   │   └── ansible.plugin.sh
│   ├── asdf/
│   │   ├── README.md
│   │   └── asdf.plugin.sh
│   ├── aws/
│   │   └── aws.plugin.sh
│   ├── bash-preexec/
│   │   ├── README.md
│   │   └── bash-preexec.plugin.sh
│   ├── bashmarks/
│   │   ├── README.md
│   │   └── bashmarks.plugin.sh
│   ├── battery/
│   │   ├── README.md
│   │   └── battery.plugin.sh
│   ├── brew/
│   │   ├── README.md
│   │   └── brew.plugin.sh
│   ├── bu/
│   │   └── bu.plugin.sh
│   ├── cargo/
│   │   ├── README.md
│   │   └── cargo.plugin.sh
│   ├── chezmoi/
│   │   ├── README.md
│   │   └── chezmoi.plugin.sh
│   ├── colored-man-pages/
│   │   ├── README.md
│   │   └── colored-man-pages.plugin.sh
│   ├── dotnet/
│   │   ├── README.md
│   │   └── dotnet.plugin.sh
│   ├── fasd/
│   │   └── fasd.plugin.sh
│   ├── fzf/
│   │   ├── README.md
│   │   └── fzf.plugin.sh
│   ├── gcloud/
│   │   ├── README.md
│   │   └── gcloud.plugin.sh
│   ├── git/
│   │   ├── README.md
│   │   └── git.plugin.sh
│   ├── goenv/
│   │   ├── README.md
│   │   └── goenv.plugin.sh
│   ├── golang/
│   │   ├── README.md
│   │   └── golang.plugin.sh
│   ├── jump/
│   │   ├── README.md
│   │   └── jump.plugin.sh
│   ├── kubectl/
│   │   ├── README.md
│   │   └── kubectl.plugin.sh
│   ├── npm/
│   │   ├── README.md
│   │   └── npm.plugin.sh
│   ├── nvm/
│   │   ├── README.md
│   │   └── nvm.plugin.sh
│   ├── progress/
│   │   ├── README.md
│   │   └── progress.plugin.sh
│   ├── pyenv/
│   │   ├── README.md
│   │   └── pyenv.plugin.sh
│   ├── rbenv/
│   │   ├── README.md
│   │   └── rbenv.plugin.sh
│   ├── sdkman/
│   │   ├── README.md
│   │   └── sdkman.plugin.sh
│   ├── starship/
│   │   ├── README.md
│   │   └── starship.plugin.sh
│   ├── sudo/
│   │   ├── README.md
│   │   └── sudo.plugin.sh
│   ├── tmux/
│   │   ├── README.md
│   │   └── tmux.plugin.bash
│   ├── tmux-autoattach/
│   │   ├── README.md
│   │   └── tmux-autoattach.plugin.sh
│   ├── vagrant/
│   │   ├── README.md
│   │   └── vagrant.plugin.sh
│   ├── virtualenvwrapper/
│   │   ├── README.md
│   │   └── virtualenvwrapper.plugin.sh
│   ├── xterm/
│   │   ├── README.md
│   │   └── xterm.plugin.bash
│   ├── zellij-autoattach/
│   │   ├── README.md
│   │   └── zellij-autoattach.plugin.sh
│   └── zoxide/
│       ├── README.md
│       └── zoxide.plugin.sh
├── templates/
│   ├── bash_profile.osh-template
│   └── bashrc.osh-template
├── themes/
│   ├── 90210/
│   │   ├── 90210.theme.sh
│   │   └── README.md
│   ├── THEMES.md
│   ├── absimple/
│   │   ├── README.md
│   │   └── absimple.theme.sh
│   ├── agnoster/
│   │   ├── README.md
│   │   └── agnoster.theme.sh
│   ├── axin/
│   │   ├── README.md
│   │   └── axin.theme.sh
│   ├── bakke/
│   │   ├── README.md
│   │   └── bakke.theme.sh
│   ├── binaryanomaly/
│   │   ├── README.md
│   │   └── binaryanomaly.theme.sh
│   ├── bobby/
│   │   ├── README.md
│   │   └── bobby.theme.sh
│   ├── bobby-python/
│   │   └── bobby-python.theme.sh
│   ├── brainy/
│   │   ├── README.md
│   │   └── brainy.theme.sh
│   ├── brunton/
│   │   └── brunton.theme.sh
│   ├── candy/
│   │   └── candy.theme.sh
│   ├── clean/
│   │   └── clean.theme.sh
│   ├── cooperkid/
│   │   └── cooperkid.theme.sh
│   ├── copied-duru/
│   │   ├── README.md
│   │   └── copied-duru.theme.sh
│   ├── cupcake/
│   │   └── cupcake.theme.sh
│   ├── demula/
│   │   └── demula.theme.sh
│   ├── developer/
│   │   └── developer.theme.sh
│   ├── dos/
│   │   └── dos.theme.sh
│   ├── doubletime/
│   │   └── doubletime.theme.sh
│   ├── doubletime_multiline/
│   │   └── doubletime_multiline.theme.sh
│   ├── doubletime_multiline_pyonly/
│   │   └── doubletime_multiline_pyonly.theme.sh
│   ├── dulcie/
│   │   └── dulcie.theme.sh
│   ├── duru/
│   │   └── duru.theme.sh
│   ├── edsonarios/
│   │   └── edsonarios.theme.sh
│   ├── emperor/
│   │   └── emperor.theme.sh
│   ├── envy/
│   │   └── envy.theme.sh
│   ├── font/
│   │   └── font.theme.sh
│   ├── gallifrey/
│   │   └── gallifrey.theme.sh
│   ├── garo/
│   │   └── garo.theme.sh
│   ├── half-life/
│   │   └── half-life.theme.sh
│   ├── hawaii50/
│   │   └── hawaii50.theme.sh
│   ├── ht/
│   │   └── ht.theme.sh
│   ├── iterate/
│   │   └── iterate.theme.sh
│   ├── kitsune/
│   │   └── kitsune.theme.sh
│   ├── lambda/
│   │   └── lambda.theme.sh
│   ├── luan/
│   │   └── luan.theme.sh
│   ├── lucky/
│   │   └── lucky.theme.sh
│   ├── mairan/
│   │   └── mairan.theme.sh
│   ├── mbriggs/
│   │   └── mbriggs.theme.sh
│   ├── minimal/
│   │   └── minimal.theme.sh
│   ├── minimal-gh/
│   │   └── minimal-gh.theme.sh
│   ├── modern/
│   │   └── modern.theme.sh
│   ├── modern-t/
│   │   └── modern-t.theme.sh
│   ├── morris/
│   │   └── morris.theme.sh
│   ├── n0qorg/
│   │   └── n0qorg.theme.sh
│   ├── nekolight/
│   │   ├── README.md
│   │   └── nekolight.theme.sh
│   ├── nekonight/
│   │   ├── nekonight.base.sh
│   │   └── nekonight.theme.sh
│   ├── nekonight_moon/
│   │   └── nekonight_moon.theme.sh
│   ├── nwinkler/
│   │   └── nwinkler.theme.sh
│   ├── nwinkler_random_colors/
│   │   ├── README.md
│   │   └── nwinkler_random_colors.theme.sh
│   ├── pete/
│   │   └── pete.theme.sh
│   ├── powerbash10k/
│   │   ├── README.md
│   │   └── powerbash10k.theme.sh
│   ├── powerline/
│   │   ├── README.md
│   │   ├── powerline.base.sh
│   │   └── powerline.theme.sh
│   ├── powerline-icon/
│   │   ├── README.md
│   │   ├── powerline-icon.base.sh
│   │   └── powerline-icon.theme.sh
│   ├── powerline-light/
│   │   ├── README.md
│   │   └── powerline-light.theme.sh
│   ├── powerline-multiline/
│   │   ├── README.md
│   │   ├── powerline-multiline.base.sh
│   │   └── powerline-multiline.theme.sh
│   ├── powerline-naked/
│   │   ├── README.md
│   │   ├── powerline-naked.base.sh
│   │   └── powerline-naked.theme.sh
│   ├── powerline-plain/
│   │   ├── README.md
│   │   ├── powerline-plain.base.sh
│   │   └── powerline-plain.theme.sh
│   ├── powerline-wizard/
│   │   ├── README.md
│   │   └── powerline-wizard.theme.sh
│   ├── primer/
│   │   └── primer.theme.sh
│   ├── pro/
│   │   └── pro.theme.sh
│   ├── pure/
│   │   └── pure.theme.sh
│   ├── purity/
│   │   └── purity.theme.sh
│   ├── pzq/
│   │   └── pzq.theme.sh
│   ├── rainbowbrite/
│   │   └── rainbowbrite.theme.sh
│   ├── rana/
│   │   └── rana.theme.sh
│   ├── random/
│   │   ├── README.md
│   │   └── random.theme.bash
│   ├── rjorgenson/
│   │   └── rjorgenson.theme.sh
│   ├── robbyrussell/
│   │   └── robbyrussell.theme.sh
│   ├── roderik/
│   │   └── roderik.theme.sh
│   ├── rr/
│   │   └── rr.theme.sh
│   ├── sexy/
│   │   └── sexy.theme.sh
│   ├── simple/
│   │   └── simple.theme.sh
│   ├── sirup/
│   │   └── sirup.theme.sh
│   ├── slick/
│   │   └── slick.theme.sh
│   ├── standard/
│   │   └── standard.theme.sh
│   ├── tonka/
│   │   └── tonka.theme.sh
│   ├── tonotdo/
│   │   └── tonotdo.theme.sh
│   ├── tylenol/
│   │   └── tylenol.theme.sh
│   ├── vscode/
│   │   └── vscode.theme.sh
│   ├── wanelo/
│   │   └── wanelo.theme.sh
│   ├── zitron/
│   │   └── zitron.theme.sh
│   └── zork/
│       └── zork.theme.sh
└── tools/
    ├── autossh.sh
    ├── bash-preexec.sh
    ├── check_for_upgrade.sh
    ├── git-completion.bash
    ├── git-prompt.sh
    ├── install.sh
    ├── uninstall.sh
    ├── update-wiki-themes.sh
    └── upgrade.sh
Condensed preview — 304 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,148K chars).
[
  {
    "path": ".editorconfig",
    "chars": 355,
    "preview": "# EditorConfig is awesome: http://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with"
  },
  {
    "path": ".git-blame-ignore-revs",
    "chars": 108,
    "preview": "# style: Remove trailing whitespace and add missing final newlines\n5cd1f0eb1668f06bf20378d6d4308fd4a1890581\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 716,
    "preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
  },
  {
    "path": ".github/workflows/format.yml",
    "chars": 933,
    "preview": "name: \"Check EditorConfig Format\"\non:\n  push:\n    branches:\n      - \"*\"\n  pull_request:\n    branches:\n      - \"*\"\njobs:\n"
  },
  {
    "path": ".github/workflows/test.sh",
    "chars": 382,
    "preview": "#!/usr/bin/env bash\n\nset -e\n\ntmpdir=$(mktemp -d)\n\nexport OSH=\"$tmpdir/path with space\"\nexport HOME=\"$tmpdir/home with sp"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 653,
    "preview": "name: Test\n\non:\n  push:\n    branches:\n      - '*'\n  pull_request:\n    branches:\n      - '*'\n\njobs:\n  test:\n    runs-on: "
  },
  {
    "path": ".gitignore",
    "chars": 294,
    "preview": "# custom files\n!/custom/aliases/example.aliases.sh\n!/custom/completions/example.completion.sh\n!/custom/plugins/example/\n"
  },
  {
    "path": ".shellcheckrc",
    "chars": 78,
    "preview": "disable=SC1087 # Use braces when expanding arrays -- needed for Zsh, not Bash\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3217,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 11548,
    "preview": "# CONTRIBUTING GUIDELINES\n\nOh-My-Bash is a community-driven project. Contribution is welcome, encouraged and appreciated"
  },
  {
    "path": "LICENSE.md",
    "chars": 1243,
    "preview": "Copyright (c) 2009-2017 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors)\n\nCopyright 2017"
  },
  {
    "path": "README.md",
    "chars": 12451,
    "preview": "Oh My Bash is an open source, community-driven framework for managing your [bash](https://www.gnu.org/software/bash/) co"
  },
  {
    "path": "aliases/README.md",
    "chars": 625,
    "preview": "# aliases\n\nAn `aliases` module define a set of aliases closely related with each other.\nTo activate an `aliases` module,"
  },
  {
    "path": "aliases/cargo.aliases.md",
    "chars": 954,
    "preview": "# Aliases `cargo`\n\n| Alias | Command                 | Description                                    |\n|-------|-------"
  },
  {
    "path": "aliases/cargo.aliases.sh",
    "chars": 237,
    "preview": "#! bash oh-my-bash.module\n\nalias cg='cargo'\nalias cgr='cargo run'\nalias cgt='cargo test'\nalias cgb='cargo build'\nalias c"
  },
  {
    "path": "aliases/chmod.aliases.sh",
    "chars": 791,
    "preview": "#! bash oh-my-bash.module\n#  ---------------------------------------------------------------------------\n\nalias perm='st"
  },
  {
    "path": "aliases/debian.aliases.bash",
    "chars": 751,
    "preview": "#!/usr/bin/env bash\n# Short aliases for most used debian specific commands.\n\nalias apup='sudo apt update'\nalias apug='su"
  },
  {
    "path": "aliases/debian.aliases.md",
    "chars": 1780,
    "preview": "# Aliases `debian`\n\nShorted aliases for most used Debian specific commands.\nTo activate it, add `debian` to `aliases=(.."
  },
  {
    "path": "aliases/docker.aliases.md",
    "chars": 4815,
    "preview": "# Aliases `Docker`\n\n|  Alias    |  Command                      |  Description                                          "
  },
  {
    "path": "aliases/docker.aliases.sh",
    "chars": 1207,
    "preview": "# This is a direct copy of https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/docker/docker.plugin.zsh\nalias dbl='do"
  },
  {
    "path": "aliases/general.aliases.md",
    "chars": 2599,
    "preview": "# Aliases `general`\n\nThis plugin provides aliases originally introduced in a blog post by Nathaniel\nLandau (2013-07-02) "
  },
  {
    "path": "aliases/general.aliases.sh",
    "chars": 3042,
    "preview": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copy"
  },
  {
    "path": "aliases/ls.aliases.sh",
    "chars": 1234,
    "preview": "#! bash oh-my-bash.module\n#  ---------------------------------------------------------------------------\n\n# Directory Li"
  },
  {
    "path": "aliases/misc.aliases.sh",
    "chars": 5403,
    "preview": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copy"
  },
  {
    "path": "aliases/package-manager.aliases.bash",
    "chars": 5639,
    "preview": "#!/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# S"
  },
  {
    "path": "aliases/package-manager.aliases.md",
    "chars": 11496,
    "preview": "# Aliases `package-manager`\n\nThis plugin provides the set of aliases that can be used to control package\nmanagers.  Here"
  },
  {
    "path": "aliases/terraform.aliases.md",
    "chars": 370,
    "preview": "# Aliases `terraform`\n\nThis defines aliases for `terraform`.\n\n| Alias    | Command                      |\n| -------- | -"
  },
  {
    "path": "aliases/terraform.aliases.sh",
    "chars": 176,
    "preview": "# Aliases\n# (sorted alphabetically)\n#\n\nalias t='terraform'\n\nalias tapply='terraform apply'\nalias tfmt='terraform fmt'\nal"
  },
  {
    "path": "cache/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "completions/apm.completion.sh",
    "chars": 1796,
    "preview": "#! bash oh-my-bash.module\n\n# apm-bash-completion is written by Ugur Ozyilmazel\n# repo: https://github.com/vigo/apm-bash-"
  },
  {
    "path": "completions/asdf.completion.sh",
    "chars": 243,
    "preview": "#! bash oh-my-bash.module\n# Bash completion support for the `asdf` command.\n# Depends on the `asdf` plugin.\n\n# Only load"
  },
  {
    "path": "completions/awscli.completion.sh",
    "chars": 110,
    "preview": "#! 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",
    "chars": 542,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_command_exists brew; then\n  _omb_completion_brew_prefix=$(brew --prefix)\n  if [[ "
  },
  {
    "path": "completions/bundler.completion.sh",
    "chars": 1316,
    "preview": "#! bash oh-my-bash.module\n# bash completion for the `bundle` command.\n#\n# Copyright (c) 2011-2013 Daniel Luz <dev at mer"
  },
  {
    "path": "completions/capistrano.completion.sh",
    "chars": 770,
    "preview": "#! bash oh-my-bash.module\n# Bash completion support for Capistrano.\n\n_omb_module_require lib:omb-completion\n\nfunction _o"
  },
  {
    "path": "completions/chezmoi.completion.sh",
    "chars": 113,
    "preview": "#! 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",
    "chars": 5105,
    "preview": "#! bash oh-my-bash.module\n\n_composer()\n{\n    local cur script coms opts com\n    COMPREPLY=()\n    _get_comp_words_by_ref "
  },
  {
    "path": "completions/conda.completion.sh",
    "chars": 436,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_binary_exists register-python-argcomplete; then\n  eval -- \"$(register-python-argc"
  },
  {
    "path": "completions/crc.completion.sh",
    "chars": 102,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_command_exists crc; then\n  eval -- \"$(crc completion bash)\"\nfi\n"
  },
  {
    "path": "completions/defaults.completion.sh",
    "chars": 6510,
    "preview": "#! bash oh-my-bash.module\n#\n# Note: I could not find the true original source of this completion, but we\n# can find seve"
  },
  {
    "path": "completions/dirs.completion.sh",
    "chars": 439,
    "preview": "#! bash oh-my-bash.module\n# Bash completion support for the 'dirs' plugin (commands G, R).\n\nfunction _dirs-complete {\n  "
  },
  {
    "path": "completions/django.completion.sh",
    "chars": 2516,
    "preview": "#! bash oh-my-bash.module\n# Upstream: https://github.com/django/django/blob/90c59b4e12e6ff41407694a460f5f30c4688dbfd/ext"
  },
  {
    "path": "completions/docker-compose.completion.sh",
    "chars": 1435,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_completion_docker_compose_has_completion {\n  local complete\n  complete=$(comple"
  },
  {
    "path": "completions/docker-machine.completion.sh",
    "chars": 7196,
    "preview": "#! bash oh-my-bash.module\n#\n# bash completion file for docker-machine commands\n#\n# This script provides completion of:\n#"
  },
  {
    "path": "completions/docker.completion.sh",
    "chars": 1680,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_completion_docker_has_completion {\n  local complete\n  complete=$(complete -p do"
  },
  {
    "path": "completions/drush.completion.sh",
    "chars": 1319,
    "preview": "#! bash oh-my-bash.module\n#\n# bash completion support for Drush:\n#   https://github.com/drush-ops/drush\n#\n# Originally f"
  },
  {
    "path": "completions/fabric-completion.sh",
    "chars": 4660,
    "preview": "#! bash oh-my-bash.module\n#\n# Bash completion support for Fabric (http://fabfile.org/)\n#\n#\n# Copyright (C) 2011 by Konst"
  },
  {
    "path": "completions/fallback/docker-compose.bash",
    "chars": 14233,
    "preview": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note by OMB:"
  },
  {
    "path": "completions/fallback/docker.bash",
    "chars": 116943,
    "preview": "#! bash oh-my-bash.module\n# shellcheck disable=SC2016,SC2119,SC2155,SC2206,SC2207,SC2254\n#------------------------------"
  },
  {
    "path": "completions/gem.completion.sh",
    "chars": 1084,
    "preview": "#! bash oh-my-bash.module\n# Completion for gem\n\nfunction _installcomp {\n  if [ -z \"$REMOTE_GEMS\" ]\n  then\n    REMOTE_GEM"
  },
  {
    "path": "completions/gh.completion.sh",
    "chars": 9505,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/owent"
  },
  {
    "path": "completions/git.completion.bash",
    "chars": 1236,
    "preview": "#! bash oh-my-bash.module\n# bash completion support for Git.\nfunction _omb_completion_git_initialize {\n    if ! _omb_uti"
  },
  {
    "path": "completions/git_flow.completion.sh",
    "chars": 3558,
    "preview": "#! bash oh-my-bash.module\n#\n# git-flow-completion\n# ===================\n#\n# Bash completion support for [git-flow](http:"
  },
  {
    "path": "completions/git_flow_avh.completion.sh",
    "chars": 12515,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/peter"
  },
  {
    "path": "completions/go.completion.sh",
    "chars": 6167,
    "preview": "#! bash oh-my-bash.module\n#\n# bash completion for go tool\n# https://github.com/thomasf/go-bash-completion/blob/73c7543f2"
  },
  {
    "path": "completions/gradle.completion.sh",
    "chars": 1880,
    "preview": "#! bash oh-my-bash.module\n# This completion setting seems to be only found in Oh My Bash.\n#-----------------------------"
  },
  {
    "path": "completions/grunt.completion.sh",
    "chars": 2048,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/grunt"
  },
  {
    "path": "completions/gulp.completion.sh",
    "chars": 732,
    "preview": "#! bash oh-my-bash.module\n# Borrowed from grunt-cli\n# http://gruntjs.com/\n#\n# Copyright (c) 2012 Tyler Kellen, contribut"
  },
  {
    "path": "completions/helm.completion.sh",
    "chars": 104,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_command_exists helm; then\n  eval -- \"$(helm completion bash)\"\nfi\n"
  },
  {
    "path": "completions/homesick.completion.sh",
    "chars": 1694,
    "preview": "#! bash oh-my-bash.module\n# Bash completion script for homesick\n#\n# The homebrew bash completion script was used as insp"
  },
  {
    "path": "completions/hub.completion.sh",
    "chars": 10265,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/misla"
  },
  {
    "path": "completions/jboss7.completion.sh",
    "chars": 4597,
    "preview": "#! bash oh-my-bash.module\n# Completions for JBoss Application Server 7 (EAP 6)\n# VERSION: 0.6\n# DATE: 2012-10-30\n# rparr"
  },
  {
    "path": "completions/jump.completion.sh",
    "chars": 312,
    "preview": "#! bash oh-my-bash.module\n\nif _omb_util_command_exists jump; then\n  function _omb_plugin_jump_completion {\n    local JUM"
  },
  {
    "path": "completions/jungle.completion.sh",
    "chars": 101,
    "preview": "#! bash oh-my-bash.module\n_omb_util_binary_exists jungle && eval \"$(_JUNGLE_COMPLETE=source jungle)\"\n"
  },
  {
    "path": "completions/kontena.completion.sh",
    "chars": 108,
    "preview": "#! bash oh-my-bash.module\n_omb_util_binary_exists kontena && . \"$( kontena whoami --bash-completion-path )\"\n"
  },
  {
    "path": "completions/kubectl.completion.sh",
    "chars": 714,
    "preview": "#! bash oh-my-bash.module\n\n# kubectl (Kubernetes CLI) completion\n\nif _omb_util_command_exists kubectl; then\n  # Note: We"
  },
  {
    "path": "completions/makefile.completion.sh",
    "chars": 274,
    "preview": "#! bash oh-my-bash.module\n# Add completion for Makefile\n# see http://stackoverflow.com/a/38415982/1472048\ncomplete -W \"\\"
  },
  {
    "path": "completions/maven.completion.sh",
    "chars": 16612,
    "preview": "#! bash oh-my-bash.module\n#\n# Bash completion support for maven inspired from:\n#\n#  - https://github.com/juven/maven-bas"
  },
  {
    "path": "completions/minikube.completion.sh",
    "chars": 153,
    "preview": "#! bash oh-my-bash.module\n\n# minikube (Kubernetes CLI) completion\n\nif _omb_util_command_exists minikube; then\n  eval -- "
  },
  {
    "path": "completions/npm.completion.sh",
    "chars": 179,
    "preview": "#! bash oh-my-bash.module\n\n# npm (Node Package Manager) completion\n# https://docs.npmjs.com/cli/completion\n\nif _omb_util"
  },
  {
    "path": "completions/nvm.completion.sh",
    "chars": 163,
    "preview": "#! bash oh-my-bash.module\n\n# nvm (Node Version Manager) completion\n\nif [ \"$NVM_DIR\" ] && [ -r \"$NVM_DIR\"/bash_completion"
  },
  {
    "path": "completions/oc.completion.sh",
    "chars": 100,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_command_exists oc; then\n  eval -- \"$(oc completion bash)\"\nfi\n"
  },
  {
    "path": "completions/packer.completion.sh",
    "chars": 4227,
    "preview": "#! bash oh-my-bash.module\n\n# Packer (http://www.packer.io) bash completion\n#\n# This script provides bash completion for "
  },
  {
    "path": "completions/pip.completion.sh",
    "chars": 288,
    "preview": "#! bash oh-my-bash.module\n\n# pip bash completion start\n_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*"
  },
  {
    "path": "completions/pip3.completion.sh",
    "chars": 289,
    "preview": "#! bash oh-my-bash.module\n\n# pip bash completion start\n_pip_completion()\n{\n    COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*"
  },
  {
    "path": "completions/projects.completion.sh",
    "chars": 899,
    "preview": "#! bash oh-my-bash.module\nfunction _pj {\n  [ -z \"$PROJECT_PATHS\" ] && return\n  shift\n  [ \"$1\" == \"open\" ] && shift\n\n  lo"
  },
  {
    "path": "completions/rake.completion.sh",
    "chars": 590,
    "preview": "#! bash oh-my-bash.module\n# Bash completion support for Rake, Ruby Make.\n\n_omb_module_require lib:omb-completion\n\nfuncti"
  },
  {
    "path": "completions/salt.completion.sh",
    "chars": 10880,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version corresponds to the following upstream version:\n# https://github.com/sa"
  },
  {
    "path": "completions/sdkman.completion.sh",
    "chars": 2857,
    "preview": "#! bash oh-my-bash.module\n#\n# This probably originates from Bash-it.\n#--------------------------------------------------"
  },
  {
    "path": "completions/ssh.completion.sh",
    "chars": 2560,
    "preview": "#! bash oh-my-bash.module\n# Bash completion support for ssh.\n\n_omb_module_require lib:omb-completion\n\nfunction _omb_comp"
  },
  {
    "path": "completions/svn.completion.sh",
    "chars": 49944,
    "preview": "#! bash oh-my-bash.module\n#\n# The completion settings are found in the following places:\n# * https://github.com/Luladjie"
  },
  {
    "path": "completions/system.completion.sh",
    "chars": 823,
    "preview": "#! bash oh-my-bash.module\n\n# Loads the system's Bash completion modules.\n# If Homebrew is installed (OS X), its Bash com"
  },
  {
    "path": "completions/terraform.completion.sh",
    "chars": 722,
    "preview": "#! bash oh-my-bash.module\n# Bash Terraform completion\n\n_terraform()\n{\n   local cmds cur colonprefixes\n   cmds=\"apply des"
  },
  {
    "path": "completions/test_kitchen.completion.sh",
    "chars": 916,
    "preview": "#! bash oh-my-bash.module\nfunction __kitchen_instance_list {\n  # cache to .kitchen.list.yml\n  if [[ .kitchen.yml -nt .ki"
  },
  {
    "path": "completions/tkn.completion.sh",
    "chars": 187,
    "preview": "#! bash oh-my-bash.module\nif _omb_util_command_exists tkn; then\n  eval -- \"$(tkn completion bash)\"\nfi\n\nif _omb_util_comm"
  },
  {
    "path": "completions/tmux.completion.sh",
    "chars": 5043,
    "preview": "#! bash oh-my-bash.module\n\n# tmux completion\n# See: http://www.debian-administration.org/articles/317 for how to write m"
  },
  {
    "path": "completions/todo.completion.sh",
    "chars": 3260,
    "preview": "#! bash oh-my-bash.module\n# link: https://github.com/ginatrapani/todo.txt-cli/blob/master/todo_completion\n\n_todo()\n{\n   "
  },
  {
    "path": "completions/uv.completion.sh",
    "chars": 242,
    "preview": "#! bash oh-my-bash.module\n\n# uv (Python package and project manager) completion\n# https://docs.astral.sh/uv/reference/cl"
  },
  {
    "path": "completions/vagrant.completion.sh",
    "chars": 6042,
    "preview": "#! bash oh-my-bash.module\n#\n# The current version is based on the following upstream version:\n# https://github.com/hashi"
  },
  {
    "path": "completions/vault.completion.sh",
    "chars": 1906,
    "preview": "#! bash oh-my-bash.module\n#\n# Taken from https://github.com/iljaweis/vault-bash-completion\n#\n# * 2024-08-13 Confirmed th"
  },
  {
    "path": "completions/virtualbox.completion.sh",
    "chars": 7995,
    "preview": "#! bash oh-my-bash.module\n#\n# This completion setting seems to originate from the following repository:\n# https://github"
  },
  {
    "path": "lib/base.sh",
    "chars": 12188,
    "preview": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# Note on copy"
  },
  {
    "path": "lib/bourne-shell.sh",
    "chars": 3868,
    "preview": "#! bash oh-my-bash.module\n# ~/.bashrc: executed by bash(1) for non-login shells.\n# see /usr/share/doc/bash/examples/star"
  },
  {
    "path": "lib/cli.bash",
    "chars": 5707,
    "preview": "#!/usr/bin/env bash\n\n_omb_module_require lib:utils\n\nfunction _omb_cmd_help {\n  echo 'Not yet implemented'\n}\nfunction _om"
  },
  {
    "path": "lib/directories.sh",
    "chars": 2799,
    "preview": "#! bash oh-my-bash.module\n# Common directories functions\n\nOMB_DIRECTORIES_CD_USE_PUSHD=false\n\n_omb_cd_dirstack=(\"$PWD\")\n"
  },
  {
    "path": "lib/functions.sh",
    "chars": 2407,
    "preview": "#! bash oh-my-bash.module\nfunction bash_stats() {\n  fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] "
  },
  {
    "path": "lib/git.sh",
    "chars": 8115,
    "preview": "#! bash oh-my-bash.module\n# Outputs current branch info in prompt format\n\n_omb_module_require lib:omb-prompt-colors\n_omb"
  },
  {
    "path": "lib/grep.sh",
    "chars": 1032,
    "preview": "#! bash oh-my-bash.module\n\n# is x grep argument available?\nfunction _omb_grep_flag_available {\n  echo | grep \"$1\" \"\" >/d"
  },
  {
    "path": "lib/history.sh",
    "chars": 4298,
    "preview": "#! 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 "
  },
  {
    "path": "lib/misc.sh",
    "chars": 559,
    "preview": "#! 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## su"
  },
  {
    "path": "lib/mo.sh",
    "chars": 26616,
    "preview": "#! bash oh-my-bash.module\n#\n#/ Mo is a mustache template rendering software written in bash.  It inserts\n#/ environment "
  },
  {
    "path": "lib/nvm.sh",
    "chars": 342,
    "preview": "#! bash oh-my-bash.module\n# get the node.js version\nfunction nvm_prompt_info() {\n  [[ -f \"$NVM_DIR/nvm.sh\" ]] || return\n"
  },
  {
    "path": "lib/omb-completion.sh",
    "chars": 1795,
    "preview": "#! bash oh-my-bash.module\n# Copyright 2023 Koichi Murase.\n#\n# Helper functions for completions\n#\n\n## @fn _omb_completion"
  },
  {
    "path": "lib/omb-deprecate.sh",
    "chars": 13650,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_deprecate_warning {\n  local level=$1 msg=$2\n  local sep=$_omb_term_teal:\n  loca"
  },
  {
    "path": "lib/omb-prompt-base.sh",
    "chars": 21491,
    "preview": "#! bash oh-my-bash.module\n\n_omb_module_require lib:omb-util\n_omb_module_require lib:omb-deprecate\n_omb_module_require li"
  },
  {
    "path": "lib/omb-prompt-colors.sh",
    "chars": 13527,
    "preview": "#! bash oh-my-bash.module\n#\n# 2022-01-20 Koichi Murase: renamed from \"themes/colours.theme.sh\" to \"lib/omb-prompt-colors"
  },
  {
    "path": "lib/omb-util.sh",
    "chars": 501,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_util_put {\n  printf '%s' \"$@\"\n}\n\nfunction _omb_util_print {\n  local IFS=$' \\t\\n"
  },
  {
    "path": "lib/readlink.sh",
    "chars": 3050,
    "preview": "#! bash oh-my-bash.module\n\n## This module provides the following function which can be used as \"readlink\n## -f\" that can"
  },
  {
    "path": "lib/shopt.sh",
    "chars": 3644,
    "preview": "#! bash oh-my-bash.module\n\n# This file originally came from bash-sensible [1].  Some of the settings\n# related to histor"
  },
  {
    "path": "lib/spectrum.sh",
    "chars": 2611,
    "preview": "#! bash oh-my-bash.module\n# A script to make using 256 colors in bash less painful.\n# P.C. Shyamshankar <sykora@lucentbe"
  },
  {
    "path": "lib/spinner.sh",
    "chars": 968,
    "preview": "#! 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 "
  },
  {
    "path": "lib/theme-and-appearance.sh",
    "chars": 81,
    "preview": "#! bash oh-my-bash.module\n\n# colored ls\nexport LSCOLORS='Gxfxcxdxdxegedabagacad'\n"
  },
  {
    "path": "lib/utils.sh",
    "chars": 15620,
    "preview": "#! bash oh-my-bash.module\n############################---Description---###################################\n#            "
  },
  {
    "path": "log/.gitkeep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "oh-my-bash.sh",
    "chars": 5553,
    "preview": "#!/usr/bin/env bash\n\n# Bail out early if non-interactive\n#\n# Note: We cannot produce any error messages here because, in"
  },
  {
    "path": "plugins/README.md",
    "chars": 6760,
    "preview": "# Oh-My-Bash Plugins: Enhancing Your Development Experience\n\n\"Oh My Bash won't make you a tenfold developer... but it mi"
  },
  {
    "path": "plugins/ansible/README.md",
    "chars": 1817,
    "preview": "# ansible plugin\n\n## Introduction\n\nThe `ansible plugin` adds several aliases for useful [ansible](https://docs.ansible.c"
  },
  {
    "path": "plugins/ansible/ansible.plugin.sh",
    "chars": 694,
    "preview": "#! bash oh-my-bash.module\n# Functions\nfunction ansible-version(){\n  ansible --version\n}\n\nfunction ansible-role-init(){\n "
  },
  {
    "path": "plugins/asdf/README.md",
    "chars": 843,
    "preview": "# asdf plugin\n\nAdd [oh-my-bash](https://ohmybash.github.io) integration with [asdf](https://github.com/asdf-vm/asdf), th"
  },
  {
    "path": "plugins/asdf/asdf.plugin.sh",
    "chars": 1044,
    "preview": "#! bash oh-my-bash.module\n# asdf.plugin.sh: asdf plugin for oh-my-bash.\n# Author: @RobLoach (https://github.com/robloach"
  },
  {
    "path": "plugins/aws/aws.plugin.sh",
    "chars": 459,
    "preview": "#! bash oh-my-bash.module\n# aws.plugin.sh\n# Author: Michael Anckaert <michael.anckaert@sinax.be>\n# Based on oh-my-zsh AW"
  },
  {
    "path": "plugins/bash-preexec/README.md",
    "chars": 83,
    "preview": "# bash preexec\n\nThis plugin loads `bash-preexec.sh` bundled with OMB if necessary.\n"
  },
  {
    "path": "plugins/bash-preexec/bash-preexec.plugin.sh",
    "chars": 129,
    "preview": "#! bash oh-my-bash.module\nif [[ ! ${bash_preexec_imported:-${__bp_imported:-}} ]]; then\n  source \"$OSH/tools/bash-preexe"
  },
  {
    "path": "plugins/bashmarks/README.md",
    "chars": 1612,
    "preview": "# Bashmarks plugin\n\nThe Bashmarks plugin allows you to create and use bookmarks for directories on\nyour filesystems.  Th"
  },
  {
    "path": "plugins/bashmarks/bashmarks.plugin.sh",
    "chars": 9047,
    "preview": "#! bash oh-my-bash.module\n# Copyright (c) 2010, Huy Nguyen, https://everyhue.me\n# Copyright (c) 2015, Toan Nguyen, https"
  },
  {
    "path": "plugins/battery/README.md",
    "chars": 2022,
    "preview": "# Battery Plugin for Oh My Bash\n\n## Overview\n\nThis custom plugin for Oh My Bash enhances your terminal experience by pro"
  },
  {
    "path": "plugins/battery/battery.plugin.sh",
    "chars": 6260,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_plugin_battery__upower_print_info {\n  upower -i \"$(upower -e | sed -n '/BAT/{p;"
  },
  {
    "path": "plugins/brew/README.md",
    "chars": 1504,
    "preview": "# brew plugin\n\nThe plugin adds several aliases for common [brew](https://brew.sh) commands.\n\nTo use it, add `brew` to th"
  },
  {
    "path": "plugins/brew/brew.plugin.sh",
    "chars": 341,
    "preview": "#! bash oh-my-bash.module\n\nalias brewp='brew pin'\nalias brews='brew list -1'\nalias brewsp='brew list --pinned'\nalias bub"
  },
  {
    "path": "plugins/bu/bu.plugin.sh",
    "chars": 785,
    "preview": "#! 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"
  },
  {
    "path": "plugins/cargo/README.md",
    "chars": 52,
    "preview": "# cargo plugin\n\nThis plugin configures cargo paths.\n"
  },
  {
    "path": "plugins/cargo/cargo.plugin.sh",
    "chars": 537,
    "preview": "#! bash oh-my-bash.module\n# @sjplanet 2025\n\n# Set CARGO_HOME to default if not already set\n: \"${CARGO_HOME:=$HOME/.cargo"
  },
  {
    "path": "plugins/chezmoi/README.md",
    "chars": 1631,
    "preview": "# Chezmoi plugin\n\nThe chezmoi plugin defines a number of useful aliases for you. [Consult the complete list](./chezmoi.p"
  },
  {
    "path": "plugins/chezmoi/chezmoi.plugin.sh",
    "chars": 181,
    "preview": "#! bash oh-my-bash.module\n\nalias cz='chezmoi'\nalias cza='chezmoi add'\nalias czcd='chezmoi cd'\nalias cze='chezmoi edit'\na"
  },
  {
    "path": "plugins/colored-man-pages/README.md",
    "chars": 515,
    "preview": "# Colored Man Pages Plugin\n\nAdds colors to [`man`](https://man7.org/linux/man-pages/man1/man.1.html) pages.\n\nTo use it, "
  },
  {
    "path": "plugins/colored-man-pages/colored-man-pages.plugin.sh",
    "chars": 1233,
    "preview": "#! 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# htt"
  },
  {
    "path": "plugins/dotnet/README.md",
    "chars": 1512,
    "preview": "# .NET Core CLI plugin\n\nThis plugin provides completion and useful aliases for [.NET Core CLI](https://dotnet.microsoft."
  },
  {
    "path": "plugins/dotnet/dotnet.plugin.sh",
    "chars": 1894,
    "preview": "#! bash oh-my-bash.module\n#\n# This plugin is based on the following version of the Oh-My-Zsh plugin:\n# https://github.co"
  },
  {
    "path": "plugins/fasd/fasd.plugin.sh",
    "chars": 680,
    "preview": "#! 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"
  },
  {
    "path": "plugins/fzf/README.md",
    "chars": 254,
    "preview": "# fzf plugin\n\nThe fzf plugin enables fzf keybindings and completions on bash.\n\nTo use it, install\n[fzf](https://github.c"
  },
  {
    "path": "plugins/fzf/fzf.plugin.sh",
    "chars": 283,
    "preview": "#! 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"
  },
  {
    "path": "plugins/gcloud/README.md",
    "chars": 940,
    "preview": "# gcloud\n\nThis plugin provides completion support for the\n[Google Cloud SDK CLI](https://cloud.google.com/sdk/gcloud/).\n"
  },
  {
    "path": "plugins/gcloud/gcloud.plugin.sh",
    "chars": 1818,
    "preview": "#!/bin/bash oh-my-bash.module\n# gcloud.plugin.sh\n# Author: Ian Chesal (github.com/ianchesal) -- ohmyzsh/gloud.plugin.zsh"
  },
  {
    "path": "plugins/git/README.md",
    "chars": 3232,
    "preview": "# Git Plugin\n\nThe git plugin defines a number of useful aliases for you. [Consult the complete list](git.plugin.sh#L34)\n"
  },
  {
    "path": "plugins/git/git.plugin.sh",
    "chars": 19418,
    "preview": "#! 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-c"
  },
  {
    "path": "plugins/goenv/README.md",
    "chars": 109,
    "preview": "# 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",
    "chars": 340,
    "preview": "#! bash oh-my-bash.module\n# @chopnico 2021\n\nif [[ -d ~/.goenv ]]; then\n  # goenv exported variables\n  export GOENV_ROOT="
  },
  {
    "path": "plugins/golang/README.md",
    "chars": 1957,
    "preview": "# Golang plugin\n\nThe `golang plugin` plugin adds some aliases for common [Golang](https://golang.org/) commands.\n\nTo use"
  },
  {
    "path": "plugins/golang/golang.plugin.sh",
    "chars": 351,
    "preview": "#! bash oh-my-bash.module\n\nalias gob='go build'\nalias goc='go clean'\nalias god='go doc'\nalias gof='go fmt'\nalias gofa='g"
  },
  {
    "path": "plugins/jump/README.md",
    "chars": 766,
    "preview": "# jump plugin\n\nThe jump plugin enables jump on bash.\n\nJump integrates with your shell and learns about your navigational"
  },
  {
    "path": "plugins/jump/jump.plugin.sh",
    "chars": 247,
    "preview": "#! bash oh-my-bash.module\n\n# Check if jump is installed\nif _omb_util_command_exists jump; then\n  eval -- \"$(jump shell b"
  },
  {
    "path": "plugins/kubectl/README.md",
    "chars": 14174,
    "preview": "# Kubectl plugin\n\nThis plugin adds completion for the [Kubernetes cluster manager](https://kubernetes.io/docs/reference/"
  },
  {
    "path": "plugins/kubectl/kubectl.plugin.sh",
    "chars": 3348,
    "preview": "#! 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"
  },
  {
    "path": "plugins/npm/README.md",
    "chars": 1829,
    "preview": "# npm plugin\n\nThe npm plugin provides completion as well as adding many useful aliases.\n\nTo use it, add npm to the plugi"
  },
  {
    "path": "plugins/npm/npm.plugin.sh",
    "chars": 989,
    "preview": "#! bash oh-my-bash.module\n# Install dependencies globally\nalias npmg=\"npm i -g \"\n\n# npm package names are lowercase\n# Th"
  },
  {
    "path": "plugins/nvm/README.md",
    "chars": 961,
    "preview": "# nvm plugin\n\nThis plugin automatically source nvm[1]\n\n## Installation\n\n### Install nvm\n\nLets install[2] the nvm without"
  },
  {
    "path": "plugins/nvm/nvm.plugin.sh",
    "chars": 3902,
    "preview": "#! bash oh-my-bash.module\n# Description: automatically load nvm\n#\n# @var[opt] OMB_PLUGIN_NVM_AUTO_USE enable .nvmrc auto"
  },
  {
    "path": "plugins/progress/README.md",
    "chars": 2082,
    "preview": "# Using the Progress Bar Script\n\n## Description\n\nThis script provides a simple progress bar TUI for the terminal platfor"
  },
  {
    "path": "plugins/progress/progress.plugin.sh",
    "chars": 5579,
    "preview": "#! bash oh-my-bash.module\n############################---Description---###################################\n#            "
  },
  {
    "path": "plugins/pyenv/README.md",
    "chars": 61,
    "preview": "# pyenv plugin\n\nThe pyenv plugin will configure pyenv paths.\n"
  },
  {
    "path": "plugins/pyenv/pyenv.plugin.sh",
    "chars": 209,
    "preview": "#! bash oh-my-bash.module\n# @chopnico 2021\n\nif [[ -d ~/.pyenv ]]; then\n  export PYENV_ROOT=~/.pyenv\n  export PATH=$PYENV"
  },
  {
    "path": "plugins/rbenv/README.md",
    "chars": 289,
    "preview": "# rbenv plugin\n\nThe rbenv plugin will configure rbenv paths.\n\n## List of aliases\n\n| Alias  | Command          | Descript"
  },
  {
    "path": "plugins/rbenv/rbenv.plugin.sh",
    "chars": 188,
    "preview": "#! bash oh-my-bash.module\n\nif [[ -d ~/.rbenv ]]; then\n  export RBENV_ROOT=~/.rbenv\n  export PATH=$RBENV_ROOT/bin:$PATH\n "
  },
  {
    "path": "plugins/sdkman/README.md",
    "chars": 347,
    "preview": "# sdkman plugin\n\nThis plugin will automatically source [sdkman](https://sdkman.io/).\n\n## Installation\n\n### Install sdkma"
  },
  {
    "path": "plugins/sdkman/sdkman.plugin.sh",
    "chars": 308,
    "preview": "#! bash oh-my-bash.module\n\n# Set SDKMAN_DIR if it isn't already defined\n[[ ${SDKMAN_DIR-} ]] || export SDKMAN_DIR=~/.sdk"
  },
  {
    "path": "plugins/starship/README.md",
    "chars": 459,
    "preview": "# starship plugin\n\nInitializes [starship](https://github.com/starship/starship), the minimal, blazing-fast, and infinite"
  },
  {
    "path": "plugins/starship/starship.plugin.sh",
    "chars": 311,
    "preview": "#! bash oh-my-bash.module\n\n# Check if starship is installed\nif _omb_util_command_exists starship; then\n  # ignore oh-my-"
  },
  {
    "path": "plugins/sudo/README.md",
    "chars": 982,
    "preview": "# sudo\n\nEasily prefix your current or previous commands with `sudo` by pressing <kbd>esc</kbd> twice.\n\nTo use it, add `s"
  },
  {
    "path": "plugins/sudo/sudo.plugin.sh",
    "chars": 738,
    "preview": "#! bash oh-my-bash.module\n\nfunction _omb_plugin_sudo__is_inserted {\n  [[ $READLINE_LINE = 'sudo '* ]]\n}\n\nfunction _omb_p"
  },
  {
    "path": "plugins/tmux/README.md",
    "chars": 1494,
    "preview": "# tmux\n\nThis plugin provides aliases for [tmux](https://github.com/tmux/tmux), the terminal multiplexer.\n\nTo use it, add"
  },
  {
    "path": "plugins/tmux/tmux.plugin.bash",
    "chars": 1890,
    "preview": "#! bash oh-my-bash.module\n\n# tmux plugin: aliases for tmux, the terminal multiplexer.\n# Last reference implementation li"
  },
  {
    "path": "plugins/tmux-autoattach/README.md",
    "chars": 1502,
    "preview": "# tmux-autoattach.plugin\n\nThis tmux plugin will automatically attach a tmux session to your shell session.\n\n## Variables"
  },
  {
    "path": "plugins/tmux-autoattach/tmux-autoattach.plugin.sh",
    "chars": 978,
    "preview": "#! bash oh-my-bash.module\n# @chopnico 2021\n#\n# tmux-autoattach.plugin.sh\n#\n# A tmux plugin that will automatically attac"
  },
  {
    "path": "plugins/vagrant/README.md",
    "chars": 2009,
    "preview": "# vagrant plugin\n\n## Introduction\n\nThe `vagrant plugin` adds several useful aliases for [vagrant](https://www.vagrantup."
  },
  {
    "path": "plugins/vagrant/vagrant.plugin.sh",
    "chars": 2504,
    "preview": "#! bash oh-my-bash.module\n# Author: Enzo Arroyo <enzo@arroyof.com>\n\n# Functions\nfunction vagrant-version() {\n  vagrant -"
  },
  {
    "path": "plugins/virtualenvwrapper/README.md",
    "chars": 318,
    "preview": "# virtualenvwrapper plugin\n\nThe virtualenvwrapper plugin enables virtualenvwrapper functions in bash.\n\nTo use it, instal"
  },
  {
    "path": "plugins/virtualenvwrapper/virtualenvwrapper.plugin.sh",
    "chars": 353,
    "preview": "#! bash oh-my-bash.module\n\n# Check if virtualenvwrapper is installed\nif _omb_util_command_exists virtualenvwrapper.sh; t"
  },
  {
    "path": "plugins/xterm/README.md",
    "chars": 1986,
    "preview": "# Xterm Plugin\n\n## Description\n\nThis script automatically sets your xterm title with host and location information. It d"
  },
  {
    "path": "plugins/xterm/xterm.plugin.bash",
    "chars": 1847,
    "preview": "#! bash oh-my-bash.module\n# Description: automatically set your xterm title with host and location info'\n# Source: https"
  },
  {
    "path": "plugins/zellij-autoattach/README.md",
    "chars": 1524,
    "preview": "# zellij-autoattach.plugin\n\nThis zellij plugin will automatically attach a zellij session to your shell session.\n\n## Var"
  },
  {
    "path": "plugins/zellij-autoattach/zellij-autoattach.plugin.sh",
    "chars": 701,
    "preview": "#! bash oh-my-bash.module\n# @chopnico 2021\n# @NN--- 2025\n#\n# zellij-autoattach.plugin.sh\n#\n# A zellij plugin that will a"
  },
  {
    "path": "plugins/zoxide/README.md",
    "chars": 460,
    "preview": "# zoxide plugin\n\nInitializes [zoxide](https://github.com/ajeetdsouza/zoxide), a smarter cd\ncommand for your terminal.\n\n!"
  },
  {
    "path": "plugins/zoxide/zoxide.plugin.sh",
    "chars": 255,
    "preview": "#! bash oh-my-bash.module\n\n# Check if zoxide is installed\nif _omb_util_command_exists zoxide; then\n  eval -- \"$(zoxide i"
  },
  {
    "path": "templates/bash_profile.osh-template",
    "chars": 213,
    "preview": "# .bash_profile -*- mode: sh -*-\n\n# Load login settings and environment variables\nif [[ -f ~/.profile ]]; then\n  source "
  },
  {
    "path": "templates/bashrc.osh-template",
    "chars": 5560,
    "preview": "# Enable the subsequent settings only in interactive sessions\ncase $- in\n  *i*) ;;\n    *) return;;\nesac\n\n# Path to your "
  },
  {
    "path": "themes/90210/90210.theme.sh",
    "chars": 1019,
    "preview": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_gr"
  },
  {
    "path": "themes/90210/README.md",
    "chars": 789,
    "preview": "# 90210 💜\n\n![theme 90210](90210-dark.png)\n\n- **Brown**: Used to indicate a dirty state in source control management (SCM"
  },
  {
    "path": "themes/THEMES.md",
    "chars": 6512,
    "preview": "## `90210`\n\n[![](90210/90210-dark.png)](90210/90210-dark.png)\n\n## `ab+simple`\n\n[![](absimple/absimple-bash.png)](absimpl"
  },
  {
    "path": "themes/absimple/README.md",
    "chars": 640,
    "preview": "# ab+simple theme\n\nThis theme needs a Powerline-patched font to be rendered correctly. The original author of the theme "
  },
  {
    "path": "themes/absimple/absimple.theme.sh",
    "chars": 2902,
    "preview": "#!/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"
  },
  {
    "path": "themes/agnoster/README.md",
    "chars": 1827,
    "preview": "# agnoster\n\nIn order for this theme to render correctly, you will need a\n[Powerline-patched font](https://gist.github.co"
  },
  {
    "path": "themes/agnoster/agnoster.theme.sh",
    "chars": 19997,
    "preview": "#! bash oh-my-bash.module\n#------------------------------------------------------------------------------\n# MIT License\n"
  },
  {
    "path": "themes/axin/README.md",
    "chars": 93,
    "preview": "# 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",
    "chars": 1259,
    "preview": "#! bash oh-my-bash.module\n\n# Axin Bash Prompt, inspired by theme \"Sexy\" and \"Bobby\"\n# thanks to them\n\nif [[ $COLORTERM ="
  },
  {
    "path": "themes/bakke/README.md",
    "chars": 919,
    "preview": "# Bakke\n\n![theme Bakke](bakke-dark.png)\n\n- **Version Control State Indicators:** It uses brown to indicate a dirty state"
  },
  {
    "path": "themes/bakke/bakke.theme.sh",
    "chars": 1739,
    "preview": "#! bash oh-my-bash.module\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_gr"
  },
  {
    "path": "themes/binaryanomaly/README.md",
    "chars": 806,
    "preview": "# Binary Anomaly\n\n![Binaryanomaly Theme](binaryanomaly-dark.png)\n\n- **Reboot Required Detection:**\n  - If a system reboo"
  },
  {
    "path": "themes/binaryanomaly/binaryanomaly.theme.sh",
    "chars": 2817,
    "preview": "#! bash oh-my-bash.module\n\n# Set term to 256color mode, if 256color is not supported, colors won't work properly\nif [[ $"
  },
  {
    "path": "themes/bobby/README.md",
    "chars": 1491,
    "preview": "# Bobby\n\n![theme Bobby](bobby-dark.png)\n\n## Styles and Colors\n\nThis repository presents a custom Bash prompt configurati"
  },
  {
    "path": "themes/bobby/bobby.theme.sh",
    "chars": 1544,
    "preview": "#! bash oh-my-bash.module\n\nSCM_THEME_PROMPT_DIRTY=\" ${_omb_prompt_brown}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${_omb_prompt_bold_g"
  }
]

// ... and 104 more files (download for full content)

About this extraction

This page contains the full source code of the ohmybash/oh-my-bash GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 304 files (1.0 MB), approximately 315.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!