[
  {
    "path": ".ackrc",
    "content": "--ignore-dir=enabled/\n"
  },
  {
    "path": ".editorconfig",
    "content": "# EditorConfig is awesome: http://EditorConfig.org\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\n\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[**.{md,rst}]\ntrim_trailing_whitespace = false\n\n[.git*]\nindent_size = tab\nindent_style = tab\n\n[{**.*sh,test/run,**.bats}]\nindent_size = tab\nindent_style = tab\n\nshell_variant      = bash\nbinary_next_line   = true  # like -bn\nswitch_case_indent = true  # like -ci\nspace_redirects    = true  # like -sr\nkeep_padding       = false # like -kp\nend_of_line        = lf\ncharset            = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[**.bats]\nindent_size = tab\nindent_style = tab\nshell_variant\t= bats\n"
  },
  {
    "path": ".git-blame-ignore-revs",
    "content": "# Ignore shfmt related commits\n003b0ce802c10ab6e161d7ba5a7d9b6722312cc5\n7c2c2a5525557cbfee98e73de921fd7f7e6811a1\nd37505b636ca7bc95301d8daaf9c58a3186ce57a\nd7695d5456b980190b6d1c4a4715b13d1b63c332\n"
  },
  {
    "path": ".gitattributes",
    "content": "*.sh text eol=lf\n*.bash text eol=lf\n*.bats text eol=lf\n\n# Docs allow trailing whitespaces\n*.md whitespace=-blank-at-eol\n*.rst whitespace=-blank-at-eol\n\n# Windows files\n*.bat text eol=crlf\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: 🐛 Bug report\ntitle: \"[Bug]: \"\ndescription: Create a bug report to help us improve\nlabels: \"bug:general\"\nbody:\n  - type: textarea\n    attributes:\n      label: Expected behavior\n      description: Tell us what should happen.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Current behavior\n      description: Tell us what happens instead of the expected behavior.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Possible solution\n      description: Tell us how it could be fixed at your glance.\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Context\n      description: >\n        How has this issue affected you? What are you trying to accomplish?\n        Providing context helps us come up with a solution that is most useful in the real world.\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Steps to reproduce\n      description: >\n        Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: \"Diagnostic Information\"\n      description: >\n        **Please run `bash-it doctor` and paste the complete output below.**\n        This single command provides all the diagnostic information we need including:\n        bash-it version, enabled components, bash version, OS version, and configuration.\n      placeholder: \"Run: bash-it doctor\"\n      value: |\n        ```\n        # Paste the output of: bash-it doctor\n\n\n        ```\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: \"Additional Context (Optional)\"\n      description: >\n        Any additional information that might help diagnose the issue.\n        This could include specific error messages, relevant parts of your ~/.bashrc,\n        or other configuration details not captured by `bash-it doctor`.\n      placeholder: \"Paste any additional relevant information here\"\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Notes\n      description: >\n        Provide any extra details here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: true\ncontact_links:\n  - name: Libera chat\n    url: https://web.libera.chat/?channel=#bash-it\n    about: You can ask and answer questions here\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: 💡 Feature request\ntitle: \"[Feature]: \"\ndescription: Suggest an idea for this project\nlabels: \"feature request\"\nbody:\n  - type: textarea\n    attributes:\n      label: Expected behavior\n      description: Tell us how your feature should work.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Current behavior\n      description: Explain the difference your feature will have from current behavior.\n    validations:\n      required: true\n  - type: textarea\n    attributes:\n      label: Possible solution\n      description: Tell us how it could be fixed at your glance.\n    validations:\n      required: false\n  - type: textarea\n    attributes:\n      label: Context\n      description: >\n        How has this issue affected you? What are you trying to accomplish?\n        Providing context helps us come up with a solution that is most useful in the real world.\n  - type: textarea\n    attributes:\n      label: Notes\n      description: >\n        Provide any extra details here.\n"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!--- Provide a general summary of your changes in the Title above -->\n\n## Description\n<!--- Describe your changes in detail -->\n\n## Motivation and Context\n<!--- Why is this change required? What problem does it solve? -->\n<!--- If it fixes an open issue, please link to the issue here. -->\n\n## How Has This Been Tested?\n<!--- Please describe in detail how you tested your changes. -->\n<!--- Include details of your testing environment, and the tests you ran to -->\n<!--- see how your change affects other areas of the code, etc. -->\n\n## Screenshots (if appropriate):\n\n## Types of changes\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\n- [ ] Bug fix (non-breaking change which fixes an issue)\n- [ ] New feature (non-breaking change which adds functionality)\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\n\n## Checklist:\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\n- [ ] My code follows the code style of this project.\n- [ ] If my change requires a change to the documentation, I have updated the documentation accordingly.\n- [ ] I have read the **CONTRIBUTING** document.\n- [ ] If I have added a new file, I also added it to ``clean_files.txt`` and formatted it using ``lint_clean_files.sh``.\n- [ ] I have added tests to cover my changes, and all the new and existing tests pass.\n"
  },
  {
    "path": ".github/no-response.yml",
    "content": "# Configuration for probot-no-response - https://github.com/probot/no-response\n\n# Number of days of inactivity before an Issue is closed for lack of response\ndaysUntilClose: 14\n# Label requiring a response\nresponseRequiredLabel: waiting-for-response\n# Comment to post when closing an Issue for lack of response. Set to `false` to disable\ncloseComment: >\n  This issue has been automatically closed because there has been no response\n  to our request for more information from the original author.\n  You can always reopen the issue if needed.\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\n# Triggers the workflow on push or pull request events\non: [push, pull_request]\n\njobs:\n  bats-test:\n    strategy:\n      matrix:\n        os: [ubuntu-24.04, macos-14]\n\n    runs-on: ${{ matrix.os }}\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Install greadlink\n      if: startsWith(runner.os, 'macOS')\n      run: brew install coreutils\n    - name: Install parallel\n      if: startsWith(runner.os, 'macOS')\n      run: brew install parallel\n    - name: Test code\n      run: test/run\n\n  build-docs:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up Python\n      uses: actions/setup-python@v4\n      with:\n        python-version: 3.8\n    - name: Install docs dependencies\n      run: python3 -m pip install -r docs/requirements.txt\n    - name: Build the docs\n      run: sphinx-build -W -b html docs docs/_build/html\n\n  lint:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v4\n    - name: Set up Go\n      uses: actions/setup-go@v4\n      with:\n        go-version: 1.21.0\n    - name: Set up Python\n      uses: actions/setup-python@v4\n      with:\n        python-version: 3.8\n    - name: Install shfmt\n      run: go install mvdan.cc/sh/v3/cmd/shfmt@latest\n    - name: Install shellcheck\n      env:\n        scversion: stable # Or latest, vxx, etc\n      run: |\n        wget -qO- \"https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz\" | tar -xJv \"shellcheck-${scversion}/shellcheck\"\n        sudo cp \"shellcheck-${scversion}/shellcheck\" /usr/bin/\n        shellcheck --version\n    - name: Install pre-commit\n      run: python3 -m pip install -r test/lint-requirements.txt\n    - name: Run lint\n      run: ./lint_clean_files.sh\n\n  lint-differential:\n    runs-on: ubuntu-latest\n\n    permissions:\n      security-events: write\n\n    steps:\n      - name: Repository checkout\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - id: ShellCheck\n        name: Differential ShellCheck\n        uses: redhat-plumbers-in-action/differential-shellcheck@v5\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".gitignore",
    "content": ".atom-build.json\n*/enabled/*\n.DS_Store\ncustom/*\n!custom/example.bash\n.rvmrc\naliases/custom.aliases.bash\ncompletion/custom.completion.bash\nlib/custom.bash\nplugins/custom.plugins.bash\n*.swp\n.*.un~\nbats\n.idea\n*.sublime-workspace\n*.sublime-project\nenabled/*\n/enabled\ntmp/\n\n# Do not save profiles\nprofiles/*\n# apart from the default one\n!profiles/default.bash_it\n\n/vendor/github.com/nojhan/liquidprompt\n.trunk/\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"test_lib/bats-core\"]\n\tpath = test_lib/bats-core\n\turl = https://github.com/bats-core/bats-core\n\tbranch = tags/v1.11.1\n[submodule \"test_lib/bats-support\"]\n\tpath = test_lib/bats-support\n\turl = https://github.com/bats-core/bats-support\n\tbranch = master\n\t#branch = tags/v0.3.0\n[submodule \"test_lib/bats-assert\"]\n\tpath = test_lib/bats-assert\n\turl = https://github.com/bats-core/bats-assert\n\tbranch = tags/v2.1.0\n[submodule \"test_lib/bats-file\"]\n\tpath = test_lib/bats-file\n\turl = https://github.com/bats-core/bats-file\n\tbranch = master\n"
  },
  {
    "path": ".pre-commit-config.yaml",
    "content": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\n---\n# fail_fast: true\nminimum_pre_commit_version: 1.18.1\nexclude: \"docs/_build/|vendor/\"\nrepos:\n  - repo: https://github.com/pre-commit/pre-commit-hooks\n    rev: v2.3.0\n    hooks:\n      - id: trailing-whitespace\n        exclude: \".(md|rst)$\"\n      - id: end-of-file-fixer\n      - id: check-merge-conflict\n      - id: mixed-line-ending\n      - id: check-added-large-files\n  - repo: https://github.com/jumanjihouse/pre-commit-hooks\n    rev: 2.1.5\n    hooks:\n      - id: git-check  # Configure in .gitattributes\n      - id: shellcheck\n        files: \"\\\\.(bash)$\"\n      - id: shfmt\n  - repo: https://github.com/Lucas-C/pre-commit-hooks\n    rev: v1.1.7\n    hooks:\n      # - id: forbid-crlf\n      - id: remove-crlf\n        exclude: \".bat$\"\n  - repo: local\n    hooks:\n      - id: dot-sh\n        name: Check .sh files against bash-it requirements\n        entry: ./hooks/dot-sh.sh\n        language: system\n        files: \"\\\\.sh$\"\n        types: [file]\n      - id: dot-bash\n        name: Check .bash files against bash-it requirements\n        entry: ./hooks/dot-bash.sh\n        language: system\n        files: \"\\\\.bash$\"\n        types: [file]\n      - id: clean-files-txt\n        name: Check that clean_files.txt is sorted alphabetically.\n        entry: ./hooks/check-clean-files-txt.sh\n        language: system\n        files: clean_files.txt\n"
  },
  {
    "path": ".readthedocs.yml",
    "content": "version: 2\n\nsphinx:\n  builder: htmldir\n  configuration: docs/conf.py\n\npython:\n  version: 3.7\n  install:\n    - requirements: docs/requirements.txt\n"
  },
  {
    "path": "CLAUDE.md",
    "content": "# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nBash-it is a collection of community Bash commands and scripts for Bash 3.2+, providing a framework for aliases, themes, plugins, and completions. It's structured as a modular system where components can be individually enabled or disabled.\n\n## Architecture\n\n### Core Components\n\n- **bash_it.sh**: Main entry point that initializes the framework\n- **lib/**: Core libraries providing utilities, logging, helpers, and appearance functions\n- **scripts/reloader.bash**: Component loader that sources enabled components\n- **install.sh**: Installation script with interactive and silent modes\n- **enabled/**: Symlinks to active components from available/ directories\n\n### Component Types\n\n1. **Aliases** (`aliases/available/`): Command shortcuts and convenience functions\n2. **Plugins** (`plugins/available/`): Extended functionality and integrations\n3. **Completions** (`completion/available/`): Tab completion definitions\n4. **Themes** (`themes/`): Prompt customizations and visual styles\n\n### Loading Order\n\n1. Libraries (except appearance)\n2. Global enabled directory\n3. Enabled aliases, plugins, completions\n4. Theme files (if BASH_IT_THEME is set)\n5. Custom files from BASH_IT_CUSTOM directory\n\n## Development Commands\n\n### Testing\n```bash\n# Run all tests using BATS (Bash Automated Testing System)\ntest/run\n\n# Run specific test suites\ntest/run test/bash_it test/completion test/plugins\n\n# Tests require git submodules to be initialized\ngit submodule init && git submodule update\n```\n\n### Linting and Code Quality\n\nThe project uses a gradual pre-commit system implementation via `clean_files.txt` allow-list:\n\n```bash\n# Run pre-commit hooks only on allow-listed clean files\n./lint_clean_files.sh\n\n# Run pre-commit hooks on all files (for testing new coverage)\npre-commit run --all-files\n\n# Manual shellcheck on bash files\nshellcheck **/*.bash\n\n# Format shell scripts\nshfmt -w **/*.bash\n```\n\n**Gradual Linting System**:\n- `clean_files.txt`: Allow-list of files/directories that pass all linting rules\n- `lint_clean_files.sh`: Runs pre-commit hooks only on allow-listed files\n- When modifying files NOT in `clean_files.txt`, ensure they pass linting before adding them to the allow-list\n- Before creating a PR, add newly cleaned files to `clean_files.txt` to expand coverage\n- This system allows gradual improvement of code quality across the large codebase\n\n**Vendor Directory Policy**:\n- Files in `vendor/` are treated as immutable external dependencies\n- Pre-commit hooks exclude vendor files via `.pre-commit-config.yaml` global exclude pattern\n- `clean_files.txt` does not include vendor shell scripts, only `.gitattributes`\n- CI and local linting will skip vendor files entirely\n\n### Component Management\n```bash\n# Enable/disable components\nbash-it enable alias git\nbash-it enable plugin history\nbash-it enable completion docker\n\n# Show available components\nbash-it show aliases\nbash-it show plugins  \nbash-it show completions\n\n# Search components\nbash-it search docker\n```\n\n## Key Configuration\n\n### Environment Variables\n- `BASH_IT`: Base directory path\n- `BASH_IT_THEME`: Active theme name\n- `BASH_IT_CUSTOM`: Custom components directory\n- `BASH_IT_LOG_PREFIX`: Logging prefix for debug output\n\n### File Structure Conventions\n- Available components: `{type}/available/{name}.{type}.bash`\n- Enabled components: `{type}/enabled/{name}.{type}.bash` (symlinks)\n- Custom components: `custom/{name}.bash`\n- Themes: `themes/{name}/`\n\n## Development Guidelines\n\n### Git Workflow\n- **NEVER commit directly to master branch**\n- Master should always stay in sync with `origin/master`\n- Always create a feature branch for new work: `git checkout -b feature/feature-name`\n- Keep feature branches focused on a single issue/feature\n- Create separate branches for separate features\n- Push feature branches with upstream tracking: `git push -u fork feature-branch-name`\n  - This allows manual pushes later with just `git push`\n  - Use `--force-with-lease` for rebased branches\n\n### Component Development\n- Use composure metadata: `about`, `group`, `author`, `example`\n- Follow naming convention: `{name}.{type}.bash`\n- Test components before submitting\n- Components should be modular and not conflict with others\n\n### Testing Components\n- Each component type has dedicated test files in `test/`\n- Use BATS framework for shell script testing\n- Test files follow pattern: `{component}.bats`\n\n### Code Standards\n- Use shellcheck for linting\n- Follow existing code style in the repository\n- Add appropriate metadata using composure functions\n- Components should handle missing dependencies gracefully\n- **Prefix sensitive commands with `command`** to bypass user aliases:\n  - `command mv` instead of `mv` (users may have `alias mv='mv -i'`)\n  - `command grep` instead of `grep` (users may have custom grep flags)\n  - `command rm` instead of `rm` (users may have `alias rm='rm -i'`)\n  - Apply to any command that could be aliased and break core functionality\n  - This prevents surprises from user's alias configurations in bash-it core functions\n- **Use parameter expansion with default for potentially unset variables**:\n  - `${VARIABLE-}` instead of `$VARIABLE` when variable may be unset\n  - Prevents errors when `set -u` is active in user's shell\n  - Examples: `${BASH_VERSION-}`, `${HOME-}`, `${PATH-}`\n  - Critical for variables checked in conditionals: `if [ -n \"${BASH_VERSION-}\" ]`\n  - This defensive practice ensures scripts work regardless of user's shell options\n\n## Project Planning & Roadmaps\n\nStrategic planning documents are maintained in `docs/plans/`:\n\n- **[Quick Reference](docs/plans/bash-it-quick-reference.md)** - TL;DR summary of current issues and action items\n- **[Comprehensive Issue Analysis](docs/plans/bash-it-issues-comprehensive-analysis.md)** - Detailed breakdown of all open issues with categorization and recommendations\n- **[2025 Roadmap](docs/plans/bash-it-roadmap-2025.md)** - 6-month technical debt reduction plan with phases and success metrics\n\nThese documents guide ongoing maintenance, issue triage, and code quality improvements.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020-2021 Bash-it\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "aliases/available/ag.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'the silver searcher (ag) aliases'\nurl \"https://geoff.greer.fm/ag/\"\n\n## Summary for args to less:\n# less(1)\n#   -M (-M or --LONG-PROMPT) Prompt very verbosely\n#   -I (-I or --IGNORE-CASE) Searches with '/' ignore case\n#   -R (-R or --RAW-CONTROL-CHARS) For handling ANSI colors\n#   -F (-F or --quit-if-one-screen) Auto exit if <1 screen\n#   -X (-X or --no-init) Disable termcap init & deinit\n\nalias ag='ag --smart-case --pager=\"less -MIRFX\"'\n"
  },
  {
    "path": "aliases/available/ansible.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'ansible abbreviations'\nurl \"https://docs.ansible.com/\"\n\nalias ans=ansible\nalias ap=ansible-playbook\n"
  },
  {
    "path": "aliases/available/apt.aliases.bash",
    "content": "# shellcheck shell=bash\n#\n# -binaryanomaly\n\ncite 'about-alias'\nabout-alias 'Apt and dpkg aliases for Ubuntu and Debian distros.'\nurl \"https://wiki.debian.org/Apt\"\n\n# set apt aliases\nfunction _set_pkg_aliases() {\n\tif _command_exists apt; then\n\t\talias apts='apt-cache search'\n\t\talias aptshow='apt-cache show'\n\t\talias aptinst='sudo apt-get install -V'\n\t\talias aptupd='sudo apt-get update'\n\t\talias aptupg='sudo apt-get dist-upgrade -V && sudo apt-get autoremove'\n\t\talias aptupgd='sudo apt-get update && sudo apt-get dist-upgrade -V && sudo apt-get autoremove'\n\t\talias aptrm='sudo apt-get remove'\n\t\talias aptpurge='sudo apt-get remove --purge'\n\n\t\talias chkup='/usr/lib/update-notifier/apt-check -p --human-readable'\n\t\talias chkboot='cat /var/run/reboot-required'\n\n\t\talias pkgfiles='dpkg --listfiles'\n\tfi\n}\n\n_set_pkg_aliases\n"
  },
  {
    "path": "aliases/available/atom.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Atom.io editor abbreviations'\nurl \"https://atom-editor.cc/\"\n\nalias a='atom'\nalias ah='atom .'\nalias apmup='apm update --no-confirm'\nalias apmi='apm install'\n"
  },
  {
    "path": "aliases/available/bash-it.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Aliases for the bash-it command (these aliases are automatically included with the \"general\" aliases)'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Common misspellings of bash-it\nalias shit='bash-it'\nalias batshit='bash-it'\nalias bashit='bash-it'\nalias batbsh='bash-it'\nalias babsh='bash-it'\nalias bash_it='bash-it'\nalias bash_ti='bash-it'\n\n# Additional bash-it aliases for help/show\nalias bshsa='bash-it show aliases'\nalias bshsc='bash-it show completions'\nalias bshsp='bash-it show plugins'\nalias bshha='bash-it help aliases'\nalias bshhc='bash-it help completions'\nalias bshhp='bash-it help plugins'\nalias bshsch=\"bash-it search\"\nalias bshenp=\"bash-it enable plugin\"\nalias bshena=\"bash-it enable alias\"\nalias bshenc=\"bash-it enable completion\"\n"
  },
  {
    "path": "aliases/available/bolt.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'puppet bolt aliases'\nurl \"https://www.puppet.com/docs/bolt/\"\n\n# Aliases\nalias bolt='bolt command run --tty --no-host-key-check'\nalias boltas='bolt -p -u'\nalias sudobolt='bolt --run-as root --sudo-password'\nalias sudoboltas='sudobolt -p -u'\n"
  },
  {
    "path": "aliases/available/bundler.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'ruby bundler'\nurl \"https://bundler.io/\"\n\n# Bundler Commands\nalias be='bundle exec'\nalias bi='bundle install'\nalias bl='bundle list'\nalias bu='bundle update'\nalias bp='bundle package'\n"
  },
  {
    "path": "aliases/available/clipboard.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'xclip shortcuts'\nurl \"https://github.com/astrand/xclip\"\n\nalias pbcopy=\"xclip -selection clipboard\"\nalias pbpaste=\"xclip -selection clipboard -o\"\n\nalias xcpy=\"xclip -selection clipboard\"\nalias xpst=\"xclip -selection clipboard -o\"\n# to use it just install xclip on your distribution and it would work like:\n# $ echo \"hello\" | xcpy\n# $ xpst\n# hello\n\n# very useful for things like:\n# cat ~/.ssh/id_rsa.pub | xcpy\n# have fun!\n"
  },
  {
    "path": "aliases/available/composer.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'common composer abbreviations'\nurl \"https://getcomposer.org/\"\n\n# Aliases\nalias coab='composer about'\nalias coar='composer archive'\nalias cob='composer browser'\nalias cocpr='composer check-platform-reqs'\nalias cocc='composer clear-cache'\nalias cocfg='composer config'\nalias cocp='composer create-project'\nalias codp='composer depends'\nalias codiag='composer diagnose'\nalias codmp='composer dump-autoload'\nalias coex='composer exec'\nalias coglob='composer global'\nalias coh='composer help'\nalias cohome='composer home'\nalias coi='composer install'\nalias coinf='composer info'\nalias coini='composer init'\nalias coli='composer license'\nalias colis='composer list'\nalias coout='composer outdated'\nalias cop='composer prohibits'\nalias corem='composer remove'\nalias coreq='composer require'\nalias coreqd='composer require --dev'\nalias cors='composer run-script'\nalias cos='composer search'\nalias cosu='composer self-update'\nalias coshow='composer show'\nalias costat='composer status'\nalias cosugg='composer suggest'\nalias coup='composer update'\nalias coupg='composer upgrade'\nalias coval='composer validate'\nalias cowhy='composer why'\nalias cowhyn='composer why-not'\n"
  },
  {
    "path": "aliases/available/curl.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Curl aliases for convenience.'\nurl \"https://curl.se/\"\n\n# set apt aliases\nfunction _set_pkg_aliases() {\n\tif _command_exists curl; then\n\t\t# follow redirects\n\t\talias cl='curl -L'\n\t\t# follow redirects, download as original name\n\t\talias clo='curl -L -O'\n\t\t# follow redirects, download as original name, continue\n\t\talias cloc='curl -L -C - -O'\n\t\t# follow redirects, download as original name, continue, retry 5 times\n\t\talias clocr='curl -L -C - -O --retry 5'\n\t\t# follow redirects, fetch banner\n\t\talias clb='curl -L -I'\n\t\t# see only response headers from a get request\n\t\talias clhead='curl -D - -so /dev/null'\n\tfi\n}\n\n_set_pkg_aliases\n"
  },
  {
    "path": "aliases/available/directory.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Shortcuts for directory commands: ls, cd, &c.'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif command ls --color -d . &> /dev/null; then\n\talias ls='ls --color=auto'\n\t# BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set.\nfi\n\n# List directory contents\nalias sl=ls\nalias la='ls -AF' # Compact view, show hidden\nalias ll='ls -Al'\nalias l='ls -A'\nalias l1='ls -1'\nalias lf='ls -F'\n\n# Change directory\nalias ..='cd ..'         # Go up one directory\nalias cd..='cd ..'       # Common misspelling for going up one directory\nalias ...='cd ../..'     # Go up two directories\nalias ....='cd ../../..' # Go up three directories\nalias -- -='cd -'        # Go back\n\n# Create or remove directory\nalias md='mkdir -p'\nalias rd='rmdir'\n"
  },
  {
    "path": "aliases/available/dnf.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'dnf aliases for fedora 22+ distros'\nurl \"https://dnf.readthedocs.io/\"\n\nif _command_exists dnf; then\n\talias dnfp=\"dnf info\"            # Show package information\n\talias dnfl=\"dnf list\"            # List packages\n\talias dnfli=\"dnf list installed\" # List installed packages\n\talias dnfgl=\"dnf grouplist\"      # List package groups\n\talias dnfmc=\"dnf makecache\"      # Generate metadata cache\n\talias dnfs=\"dnf search\"          # Search package\n\n\talias dnfi=\"sudo dnf install\"       # Install package\n\talias dnfr=\"sudo dnf remove\"        # Remove package\n\talias dnfu=\"sudo dnf upgrade\"       # Upgrade package\n\talias dnfc=\"sudo dnf clean all\"     # Clean cache\n\talias dnfri=\"sudo dnf reinstall\"    # Reinstall package\n\talias dnfgi=\"sudo dnf groupinstall\" # Install package group\n\talias dnfgr=\"sudo dnf groupremove\"  # Remove package group\nfi\n"
  },
  {
    "path": "aliases/available/docker-compose.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'docker-compose abbreviations'\nurl \"https://docs.docker.com/compose/\"\n\nalias dco=\"docker-compose\"\n\n# Defined in the `docker-compose` plugin, please check there for details.\nalias dcofresh=\"docker-compose-fresh\"\nalias dcol=\"docker-compose logs -f --tail 100\"\nalias dcou=\"docker-compose up\"\nalias dcouns=\"dcou --no-start\"\n"
  },
  {
    "path": "aliases/available/docker.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'docker abbreviations'\nurl \"https://docs.docker.com/\"\n\nalias dk='docker'\nalias dklc='docker ps -l'                                                            # List last Docker container\nalias dklcid='docker ps -l -q'                                                       # List last Docker container ID\nalias dklcip='docker inspect -f \"{{.NetworkSettings.IPAddress}}\" $(docker ps -l -q)' # Get IP of last Docker container\nalias dkps='docker ps'                                                               # List running Docker containers\nalias dkpsa='docker ps -a'                                                           # List all Docker containers\nalias dki='docker images'                                                            # List Docker images\nalias dkrmac='docker rm $(docker ps -a -q)'                                          # Delete all Docker containers\n\ncase $OSTYPE in\n\tdarwin* | *bsd* | *BSD*)\n\t\talias dkrmui='docker images -q -f dangling=true | xargs docker rmi' # Delete all untagged Docker images\n\t\t;;\n\t*)\n\t\talias dkrmui='docker images -q -f dangling=true | xargs -r docker rmi' # Delete all untagged Docker images\n\t\t;;\nesac\n\nif _bash-it-component-item-is-enabled plugin docker; then\n\t# Function aliases from docker plugin:\n\talias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container\n\talias dkrmall='docker-remove-stale-assets'         # Delete all untagged images and exited containers\n\talias dkrmli='docker-remove-most-recent-image'     # Delete most recent (i.e., last) Docker image\n\talias dkrmi='docker-remove-images'                 # Delete images for supplied IDs or all if no IDs are passed as arguments\n\talias dkideps='docker-image-dependencies'          # Output a graph of image dependencies using Graphiz\n\talias dkre='docker-runtime-environment'            # List environmental variables of the supplied image ID\nfi\nalias dkelc='docker exec -it $(dklcid) bash --login' # Enter last container (works with Docker 1.3 and above)\nalias dkrmflast='docker rm -f $(dklcid)'\nalias dkbash='dkelc'\nalias dkex='docker exec -it ' # Useful to run any commands into container without leaving host\nalias dkri='docker run --rm -i '\nalias dkric='docker run --rm -i -v $PWD:/cwd -w /cwd '\nalias dkrit='docker run --rm -it '\nalias dkritc='docker run --rm -it -v $PWD:/cwd -w /cwd '\n\n# Added more recent cleanup options from newer docker versions\nalias dkip='docker image prune -a -f'\nalias dkvp='docker volume prune -f'\nalias dksp='docker system prune -a -f'\n"
  },
  {
    "path": "aliases/available/editor.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'shortcuts for editing'\nurl \"https://github.com/Bash-it/bash-it\"\n\nalias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}'\nalias e='edit'\n\n# sudo editors\nalias svim='sudo ${VISUAL:-vim}'\nalias snano='sudo ${ALTERNATE_EDITOR:-nano}'\nalias sedit='sudo ${EDITOR:-${ALTERNATE_EDITOR:-nano}}'\n\n# Shortcuts to edit startup files\nalias vbrc='${VISUAL:-vim} ~/.bashrc'\nalias vbpf='${VISUAL:-vim} ~/.bash_profile'\n"
  },
  {
    "path": "aliases/available/emacs.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'emacs editor'\nurl \"https://www.gnu.org/software/emacs/\"\n\ncase $OSTYPE in\n\tlinux*)\n\t\talias em='emacs'\n\t\talias en='emacs -nw'\n\t\talias e='emacsclient -n'\n\t\talias et='emacsclient -t'\n\t\talias ed='emacs --daemon'\n\t\talias E='SUDO_EDITOR=emacsclient sudo -e'\n\t\t;;\n\tdarwin*)\n\t\talias em='open -a emacs'\n\t\t;;\nesac\n"
  },
  {
    "path": "aliases/available/fuck.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'fuck/please to retry last command with sudo'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Play nicely with 'thefuck' plugin\nif ! _command_exists fuck; then\n\talias fuck='sudo $(fc -ln -1)'\nfi\nalias please=fuck\nalias plz=please\nalias fucking=sudo\n"
  },
  {
    "path": "aliases/available/general.aliases.bash",
    "content": "# shellcheck shell=bash\n# shellcheck source-path=SCRIPTDIR\nabout-alias 'general aliases'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif command ls --color -d . &> /dev/null; then\n\talias ls='ls --color=auto'\n\t# BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set.\nfi\n\n# List directory contents\nalias sl=ls\nalias la='ls -AF' # Compact view, show hidden\nalias ll='ls -Al'\nalias l='ls -A'\nalias l1='ls -1'\nalias lf='ls -F'\n\nalias _='sudo'\n\n# colored grep\n# Need to check an existing file for a pattern that will be found to ensure\n# that the check works when on an OS that supports the color option\nif command grep --color=auto \"a\" \"${BASH_IT?}\"/*.md &> /dev/null; then\n\talias grep='grep --color=auto'\nfi\n\nif _command_exists gshuf; then\n\talias shuf=gshuf\nfi\n\nalias c='clear'\nalias cls='clear'\n\nalias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}'\nalias pager='${PAGER:=less}'\n\nalias q='exit'\n\nalias irc='${IRC_CLIENT:-irc}'\n\n# Language aliases\nalias rb='ruby'\nalias py='python'\nalias ipy='ipython'\n\n# Pianobar can be found here: http://github.com/PromyLOPh/pianobar/\nif _command_exists pianobar; then\n\talias piano='pianobar'\nfi\n\nalias ..='cd ..'               # Go up one directory\nalias cd..='cd ..'             # Common misspelling for going up one directory\nalias ...='cd ../..'           # Go up two directories\nalias ....='cd ../../..'       # Go up three directories\nalias -- -='cd -'              # Go back\nalias dow='cd $HOME/Downloads' # Go to the Downloads directory\n\n# Shell History\nalias h='history'\n\n# Tree\nif ! _command_exists tree; then\n\talias tree=\"find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'\"\nfi\n\n# Directory\nalias md='mkdir -p'\nalias rd='rmdir'\n\n# Remove\nalias rmrf='rm -rf'\n\n# Shorten extract\n_command_exists 'extract' \\\n\t&& alias xt='extract'\n\n# sudo editors\nalias svim='sudo \"${VISUAL:-vim}\"'\nalias snano='sudo \"${ALTERNATE_EDITOR:-nano}\"'\n\n# Display whatever file is regular file or folder\nfunction catt() {\n\tfor i in \"$@\"; do\n\t\tif [[ -d \"$i\" ]]; then\n\t\t\tls \"$i\"\n\t\telse\n\t\t\tcat \"$i\"\n\t\tfi\n\tdone\n}\n\n# The Bash-it aliases were moved to the `bash-it.aliases.bash` file. The intent of this\n# is to keep the script readable and less bloated. If you don't need to use\n# the `general` aliases, but you want the Bash-it aliases, you can disable the `general`\n# aliases and enable just the ones for Bash-it explicitly:\n# bash-it disable alias general\n# bash-it enable alias bash-it\nsource \"$BASH_IT/aliases/available/bash-it.aliases.bash\"\nsource \"$BASH_IT/aliases/available/directory.aliases.bash\"\nsource \"$BASH_IT/aliases/available/editor.aliases.bash\"\n"
  },
  {
    "path": "aliases/available/git-omz.aliases.bash",
    "content": "# shellcheck shell=bash\ncite 'about-alias'\nabout-alias 'git aliases from oh-my-zsh (incompatible with regular git aliases option)'\nurl \"https://git-scm.com/\"\n\nif _bash-it-component-item-is-enabled aliases git; then\n\t_log_warning \"git-omz aliases are incompatible with regular git aliases\"\n\treturn 1\nfi\n\n# Load after regular git aliases\n# BASH_IT_LOAD_PRIORITY: 160\n\n# Setup git version\nread -ra git_version_arr <<< \"$(git version 2> /dev/null)\"\n# shellcheck disable=SC2034\ngit_version=\"${git_version_arr[2]}\"\n\n# Setup is-at-least\nfunction is-at-least {\n\tlocal expected_version=$1\n\tlocal actual_version=$2\n\tlocal versions\n\n\tprintf -v versions '%s\\n%s' \"$expected_version\" \"$actual_version\"\n\t[[ $versions = \"$(sort -V <<< \"$versions\")\" ]]\n}\n\n# Setup git_current_branch\nfunction git_current_branch {\n\t_git-branch\n}\n\n# shellcheck disable=SC1090\nsource \"${BASH_IT}\"/vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/git.plugin.zsh\n"
  },
  {
    "path": "aliases/available/git.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'common git abbreviations'\nurl \"https://git-scm.com/\"\n\n# We can use this variable to make sure that we don't accidentally clash with git-zsh aliases\nif _bash-it-component-item-is-enabled aliases git-omz; then\n\t_log_warning \"The aliases from 'git' and from 'git-omz' conflict with each other; please only enable one.\"\n\treturn 1\nfi\n\nalias g='git'\nalias get='git'\nalias got='git'\n\n# add\nalias ga='git add'\nalias gall='git add -A'\nalias gap='git add -p'\nalias gav='git add -v'\n\n# branch\nalias gb='git branch'\nalias gba='git branch --all'\nalias gbd='git branch -d'\nalias gbD='git branch -D'\nalias gbl='git branch --list'\nalias gbla='git branch --list --all'\nalias gblr='git branch --list --remotes'\nalias gbm='git branch --move'\nalias gbr='git branch --remotes'\nalias gbt='git branch --track'\n\n# for-each-ref\nalias gbc='git for-each-ref --format=\"%(authorname) %09 %(if)%(HEAD)%(then)*%(else)%(refname:short)%(end) %09 %(creatordate)\" refs/remotes/ --sort=authorname DESC' # FROM https://stackoverflow.com/a/58623139/10362396\n\n# commit\nalias gc='git commit -v'\nalias gca='git commit -v -a'\nalias gcaa='git commit -a --amend -C HEAD' # Add uncommitted and unstaged changes to the last commit\nalias gcam='git commit -v -am'\nalias gcamd='git commit --amend'\nalias gc!='git commit -v --amend'\nalias gca!='git commit -v -a --amend'\nalias gcn!='git commit -v --amend --no-edit'\nalias gcm='git commit -v -m'\nalias gci='git commit --interactive'\nalias gcsam='git commit -S -am'\n\n# checkout\nalias gcb='git checkout -b'\nalias gco='git checkout'\nalias gcob='git checkout -b'\nalias gcobu='git checkout -b ${USER}/'\nalias gcom='git checkout $(get_default_branch)'\nalias gcpd='git checkout $(get_default_branch); git pull; git branch -D'\nalias gct='git checkout --track'\n\n# clone\nalias gcl='git clone'\n\n# clean\nalias gclean='git clean -fd'\n\n# cherry-pick\nalias gcp='git cherry-pick'\nalias gcpx='git cherry-pick -x'\n\n# diff\nalias gd='git diff'\nalias gds='git diff --staged'\nalias gdt='git difftool'\n\n# archive\nalias gexport='git archive --format zip --output'\n\n# fetch\nalias gf='git fetch --all --prune'\nalias gft='git fetch --all --prune --tags'\nalias gftv='git fetch --all --prune --tags --verbose'\nalias gfv='git fetch --all --prune --verbose'\nalias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/$(get_default_branch)'\nalias gup='git fetch && git rebase'\n\n# log\nalias gg='git log --graph --pretty=format:'\\''%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset'\\'' --abbrev-commit --date=relative'\nalias ggf='git log --graph --date=short --pretty=format:'\\''%C(auto)%h %Cgreen%an%Creset %Cblue%cd%Creset %C(auto)%d %s'\\'''\nalias ggs='gg --stat'\nalias ggup='git log --branches --not --remotes --no-walk --decorate --oneline' # FROM https://stackoverflow.com/questions/39220870/in-git-list-names-of-branches-with-unpushed-commits\nalias gll='git log --graph --pretty=oneline --abbrev-commit'\nalias gnew='git log HEAD@{1}..HEAD@{0}' # Show commits since last pull, see http://blogs.atlassian.com/2014/10/advanced-git-aliases/\nalias gwc='git whatchanged'\nalias ghist='git log --pretty=format:'\\''%h %ad | %s%d [%an]'\\'' --graph --date=short'                                          # Use it to be fast and without color.\nalias gprogress='git log --pretty=format:'\\''%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d'\\'' --decorate --date=short' #Usually use \"git progress\" in the file .gitconfig. The new alias from Git friends will be truly welcome.\n\n# ls-files\nalias gu='git ls-files . --exclude-standard --others' # Show untracked files\nalias glsut='gu'\nalias glsum='git diff --name-only --diff-filter=U' # Show unmerged (conflicted) files\n\n# gui\nalias ggui='git gui'\n\n# home\nalias ghm='cd \"$(git rev-parse --show-toplevel)\"' # Git home\n# appendage to ghm\nif ! _command_exists gh; then\n\talias gh='ghm'\nfi\n\n# merge\nalias gm='git merge'\nalias gma='git merge --abort'\nalias gmc='git merge --continue'\nalias gms='git merge --squash'\nalias gmt='git mergetool'\n\n# mv\nalias gmv='git mv'\n\n# patch\nalias gpatch='git format-patch -1'\n\n# push\nalias gp='git push'\nalias gpd='git push --delete'\nalias gpf='git push --force-with-lease'\nalias gpff='git push --force'\nalias gpo='git push origin HEAD'\nalias gpom='git push origin $(get_default_branch)'\nalias gpu='git push --set-upstream'\nalias gpunch='git push --force-with-lease'\nalias gpuo='git push --set-upstream origin'\nalias gpuoc='git push --set-upstream origin $(git symbolic-ref --short HEAD)'\n\n# pull\nalias gl='git pull'\nalias glp='git pull --prune'\nalias glum='git pull upstream $(get_default_branch)'\nalias gpl='git pull'\nalias gpp='git pull && git push'\nalias gpr='git pull --rebase'\n\n# remote\nalias gr='git remote'\nalias gra='git remote add'\nalias grv='git remote -v'\n\n# rm\nalias grm='git rm'\nalias grmc='git rm --cached' # Removes the file only from the Git repository, but not from the filesystem. This is useful to undo some of the changes you made to a file before you commit it.\n\n# rebase\nalias grb='git rebase'\nalias grba='git rebase --abort'\nalias grbc='git rebase --continue'\nalias grbm='git rebase $(get_default_branch)'\nalias grbmi='git rebase $(get_default_branch) --interactive'\nalias grbma='GIT_SEQUENCE_EDITOR=: git rebase $(get_default_branch) --interactive --autosquash'\nalias gprom='git fetch origin $(get_default_branch) && git rebase origin/$(get_default_branch) && git update-ref refs/heads/$(get_default_branch) origin/$(get_default_branch)' # Rebase with latest remote\n\n# reset\nalias gus='git reset HEAD' # read as: 'git unstage'\nalias grh='git reset'      # equivalent to: git reset HEAD\nalias grh!='git reset --hard'\nalias gpristine='git reset --hard && git clean -dfx'\n\n# status\nalias gs='git status'\nalias gss='git status -s'\n\n# shortlog\nalias gcount='git shortlog -sn'\nalias gsl='git shortlog -sn'\n\n# show\nalias gsh='git show'\nalias gshn='git show --name-only'\nalias gshns='git show --name-status'\n\n# svn\nalias gsd='git svn dcommit'\nalias gsr='git svn rebase' # Git SVN\n\n# stash\nalias gst='git stash'\nalias gstb='git stash branch'\nalias gstd='git stash drop'\nalias gstl='git stash list'\nalias gstp='git stash pop'  # kept due to long-standing usage\nalias gstpo='git stash pop' # recommended for it's symmetry with gstpu (push)\n\n## 'stash push' introduced in git v2.13.2\nalias gstpu='git stash push'\nalias gstpum='git stash push -m'\n\n## 'stash save' deprecated since git v2.16.0, alias is now push\nalias gsts='git stash push'\nalias gstsm='git stash push -m'\n\n# submodules\nalias gsu='git submodule update --init --recursive'\n\n# switch\n# these aliases requires git v2.23+\nalias gsw='git switch'\nalias gswc='git switch --create'\nalias gswm='git switch $(get_default_branch)'\nalias gswt='git switch --track'\n\n# tag\nalias gt='git tag'\nalias gta='git tag -a'\nalias gtd='git tag -d'\nalias gtl='git tag -l'\n\n#worktree\nalias gw='git worktree'\nalias gwa='git worktree add'\nalias gwl='git worktree list'\nalias gwr='git worktree remove'\n\ncase $OSTYPE in\n\tdarwin*)\n\t\talias gtls=\"git tag -l | gsort -V\"\n\t\t;;\n\t*)\n\t\talias gtls='git tag -l | sort -V'\n\t\t;;\nesac\n\n# functions\nfunction gdv() {\n\tgit diff --ignore-all-space \"$@\" | vim -R -\n}\n\nfunction get_default_branch() {\n\tbranch=$(git symbolic-ref refs/remotes/origin/HEAD)\n\t${branch#refs/remotes/origin/}\n}\n"
  },
  {
    "path": "aliases/available/gitsvn.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'common git-svn abbreviations'\nurl \"https://git-scm.com/docs/git-svn\"\n\n# Aliases\nalias gsr='git svn rebase'\nalias gsc='git svn dcommit'\nalias gsi='git svn info'\n"
  },
  {
    "path": "aliases/available/heroku.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'heroku task abbreviations'\nurl \"https://devcenter.heroku.com/\"\n\n# heroku\nalias h='heroku'\nalias hl='heroku list'\nalias hi='heroku info'\nalias ho='heroku open'\n\n# dynos and workers\nalias hd='heroku dynos'\nalias hw='heroku workers'\n\n# rake console\nalias hr='heroku rake'\nalias hcon='heroku console'\n\n# new and restart\nalias hnew='heroku create'\nalias hrestart='heroku restart'\n\n# logs\nalias hlog='heroku logs'\nalias hlogs='heroku logs'\n\n# maint\nalias hon='heroku maintenance:on'\nalias hoff='heroku maintenance:off'\n\n# heroku configs\nalias hc='heroku config'\nalias hca='heroku config:add'\nalias hcr='heroku config:remove'\nalias hcc='heroku config:clear'\n"
  },
  {
    "path": "aliases/available/hg.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'mercurial abbreviations'\nurl \"https://www.mercurial-scm.org/\"\n\nalias hs='hg status'\nalias hsum='hg summary'\nalias hcm='hg commit -m'\n"
  },
  {
    "path": "aliases/available/homebrew-cask.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Some aliases for Homebrew Cask'\nurl \"https://github.com/Homebrew/homebrew-cask\"\n\nalias bcin='brew cask install'\nalias bcrm='brew cask uninstall'\nalias bczp='brew cask zap'\nalias bccl='brew cask cleanup'\nalias bcls='brew cask list'\nalias bcinf='brew cask info'\nalias bcdr='brew cask doctor'\nalias bced='brew cask edit'\n"
  },
  {
    "path": "aliases/available/homebrew.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Some aliases for Homebrew'\nurl \"https://brew.sh/\"\n\nif _command_exists brew; then\n\talias bed='brew edit'\n\talias bls='brew list'\n\talias bsr='brew search'\n\talias bdr='brew doctor'\n\talias bin='brew install'\n\talias bcl='brew cleanup'\n\talias brm='brew uninstall'\n\talias bout='brew outdated'\n\talias binf='brew info'\n\talias bup='brew update && brew upgrade'\nfi\n"
  },
  {
    "path": "aliases/available/homesick.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'homesick aliases'\nurl \"https://github.com/technicalpickles/homesick\"\n\n# Aliases\nalias sikhm=\"homesick cd dotfiles\"\nalias sikclone=\"homesick clone\"\nalias sikcomt=\"homesick commit dotfiles\"\nalias sikdstry=\"homesick destroy\"\nalias sikdif=\"homesick diff dotfiles\"\nalias sikexec=\"homesick exec dotfiles\"\nalias sikexeca=\"homesick exec_all\"\nalias sikgen=\"homesick generate\"\nalias sikhlp=\"homesick help\"\nalias siklnk=\"homesick link dotfiles\"\nalias sikls=\"homesick list\"\nalias sikopn=\"homesick open dotfiles\"\nalias sikpll=\"homesick pull dotfiles\"\nalias sikpsh=\"homesick push dotfiles\"\nalias sikrc=\"homesick rc dotfiles\"\nalias sikpth=\"homesick show_path dotfiles\"\nalias sikst=\"homesick status dotfiles\"\nalias sikulnk=\"homesick unlink dotfiles\"\nalias sikv=\"homesick version\"\n"
  },
  {
    "path": "aliases/available/jitsu.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'jitsu task abbreviations'\nurl \"https://github.com/nodejitsu/jitsu\"\n\n# jitsu\nalias j='jitsu'\nalias jl='jitsu login'\nalias jo='jitsu logout'\n\n# deploy and update\nalias jd='jitsu apps deploy'\nalias ju='jitsu apps update'\n\n# new and start, restart, stop\nalias jn='jitsu apps create'\nalias js='jitsu apps start'\nalias jr='jitsu apps restart'\nalias jx='jitsu apps stop'\n\n# logs\nalias jll='jitsu logs'\nalias jlog='jitsu logs'\nalias jlogs='jitsu logs'\n\n# env\nalias je='jitsu env'\nalias jel='jitsu env list'\nalias jes='jitsu env set'\nalias jeg='jitsu env get'\nalias jed='jitsu env delete'\nalias jec='jitsu env clear'\nalias jesv='jitsu env save'\nalias jeld='jitsu env load'\n\n# configuration\nalias jc='jitsu conf'\nalias jcl='jitsu config list'\nalias jcs='jitsu config set'\nalias jcg='jitsu config get'\nalias jcd='jitsu config delete'\n\n#  list and install, view\nalias jls='jitsu list'\nalias jin='jitsu install'\nalias jv='jitsu apps view'\n\n# Database, Snapshots and Tokens\nalias jdb='jitsu databases'\nalias jss='jitsu snapshots'\nalias jto='jitsu tokens'\n"
  },
  {
    "path": "aliases/available/kubectl.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'kubectl aliases'\nurl \"https://kubernetes.io/docs/reference/kubectl/\"\n\nif _command_exists kubectl; then\n\talias kc='kubectl'\n\talias kcgp='kubectl get pods'\n\talias kcgd='kubectl get deployments'\n\talias kcgn='kubectl get nodes'\n\talias kcdp='kubectl describe pod'\n\talias kcdd='kubectl describe deployment'\n\talias kcdn='kubectl describe node'\n\talias kcgpan='kubectl get pods --all-namespaces'\n\talias kcgdan='kubectl get deployments --all-namespaces'\n\t# launches a disposable netshoot pod in the k8s cluster\n\talias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'\nfi\n"
  },
  {
    "path": "aliases/available/laravel.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'laravel artisan abbreviations'\nurl \"https://laravel.com/docs/artisan\"\n\n# A list of useful laravel aliases\n\nif [[ -x \"${HOME?}/.config/composer/vendor/bin/laravel\" ]]; then\n\talias laravel='${HOME?}/.config/composer/vendor/bin/laravel'\nelif [[ -x \"${HOME?}/.composer/vendor/bin/laravel\" ]]; then\n\talias laravel='${HOME?}/.composer/vendor/bin/laravel'\nelse\n\treturn\nfi\n\n# asset\nalias a:apub='php artisan asset:publish'\n\n# auth\nalias a:remclear='php artisan auth:clear-reminders'\nalias a:remcontroller='php artisan auth:reminders-controller'\nalias a:remtable='php artisan auth:reminders-table'\n\n# cache\nalias a:cacheclear='php artisan cache:clear'\n\n# command\nalias a:command='php artisan command:make'\n\n# config\nalias a:confpub='php artisan config:publish'\n\n# controller\nalias a:controller='php artisan make:controller'\n\n# db\nalias a:seed='php artisan db:seed'\n\n# key\nalias a:key='php artisan key:generate'\n\n# migrate\nalias a:migrate='php artisan migrate'\nalias a:mig='a:migrate'\nalias a:miginstall='php artisan migrate:install'\nalias a:migmake='php artisan migrate:make'\nalias a:migcreate='php artisan migrate:create'\nalias a:migpublish='php artisan migrate:publish'\nalias a:migrefresh='php artisan migrate:refresh'\nalias a:migreset='php artisan migrate:reset'\nalias a:migrollback='php artisan migrate:rollback'\nalias a:rollback='a:migrollback'\n\n# queue\nalias a:qfailed='php artisan queue:failed'\nalias a:qfailedtable='php artisan queue:failed-table'\nalias a:qflush='php artisan queue:flush'\nalias a:qforget='php artisan queue:forget'\nalias a:qlisten='php artisan queue:listen'\nalias a:qretry='php artisan queue:retry'\nalias a:qsubscribe='php artisan queue:subscribe'\nalias a:qwork='php artisan queue:work'\n\n# session\nalias a:stable='php artisan session:table'\n\n# view\nalias a:vpub='php artisan view:publish'\n\n# misc\nalias a:='php artisan'\nalias a:changes='php artisan changes'\nalias a:down='php artisan down'\nalias a:env='php artisan env'\nalias a:help='php artisan help'\nalias a:list='php artisan list'\nalias a:optimize='php artisan optimize'\nalias a:routes='php artisan routes'\nalias a:serve='php artisan serve'\nalias a:tail='php artisan tail'\nalias a:tinker='php artisan tinker'\nalias a:up='php artisan up'\nalias a:work='php artisan workbench'\n"
  },
  {
    "path": "aliases/available/maven.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'maven abbreviations'\nurl \"https://maven.apache.org/\"\n\nalias mci='mvn clean install'\nalias mi='mvn install'\nalias mc='mvn clean'\nalias mct='mvn clean test'\nalias mcc='mvn clean compile'\nalias mccnt='mvn clean compile -DskipTests=true'\nalias mp='mvn package'\nalias mcp='mvn clean package'\nalias mcpnt='mvn clean package -DskipTests=true'\nalias mrprep='mvn release:prepare'\nalias mrperf='mvn release:perform'\nalias mrrb='mvn release:rollback'\nalias mdep='mvn dependency:tree'\nalias mpom='mvn help:effective-pom'\nalias mcisk='mci -Dmaven.test.skip=true'\nalias mcpsk='mcp -Dmaven.test.skip=true'\n\n# Maven service plugin aliases\nalias mspring='mvn spring-boot:run'\nalias mjetty='mvn jetty:run'\nalias mquark='mvn quarkus:dev'\nalias mmicro='mvn mn:run'\n"
  },
  {
    "path": "aliases/available/msys2.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'MSYS2 aliases'\nurl \"https://www.msys2.org/\"\n\nLS_COMMON=\"-hG\"\nLS_COMMON=\"$LS_COMMON --color=auto\"\nLS_COMMON=\"$LS_COMMON -I NTUSER.DAT\\* -I ntuser.dat\\*\"\n\n# alias\n# setup the main ls alias if we've established common args\nalias ls='command ls ${LS_COMMON:-}'\nalias ll=\"ls -l\"\nalias la=\"ls -a\"\nalias lal=\"ll -a\"\nalias lf=\"ls -F\"\n"
  },
  {
    "path": "aliases/available/node.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'the Node.js environment aliases'\nurl \"https://nodejs.org/\"\n\n# alias to setup nodejs development environment\nalias node-dev='export NODE_ENV=development'\n\n# alias to setup nodejs production environment\nalias node-prod='export NODE_ENV=production'\n"
  },
  {
    "path": "aliases/available/npm.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'common npm abbreviations'\nurl \"https://docs.npmjs.com/\"\n\n# Aliases\n\n# npm\nalias ni='npm install'\nalias nis='npm install --save'\nalias nid='npm install --save-dev'\nalias nit='npm install-test'\nalias nits='npm install-test --save'\nalias nitd='npm install-test --save-dev'\nalias nu='npm uninstall'\nalias nus='npm uninstall --save'\nalias nusd='npm uninstall --save-dev'\nalias np='npm publish'\nalias nup='npm unpublish'\nalias nlk='npm link'\nalias nod='npm outdated'\nalias nrb='npm rebuild'\nalias nud='npm update'\nalias nr='npm run'\nalias nls='npm list --depth=0 2>/dev/null'\nalias nlsg='npm list -g --depth=0 2>/dev/null'\nalias nt='npm test'\n\n# npx\nalias nx='npx'\nalias nxplease='npx $(fc -ln -1)'\nalias nxn='npx --no-install '\nalias nxp='npx -p '\nalias nxnp='npx --no-install -p '\nalias nxq='npx -q '\nalias nxnq='npx --no-install -q '\nalias nxqp='npx -q -p '\nalias nxnqp='npx --no-install -q -p '\nalias nxni='npx --no-install --ignore-existing '\nalias nxip='npx --ignore-existing -p '\nalias nxnip='npx --no-install --ignore-existing -p '\nalias nxqi='npx -q --ignore-existing '\nalias nxniq='npx --no-install --ignore-existing -q '\nalias nxiqp='npx --ignore-existing -q -p '\nalias nxniqp='npx --no-install --ignore-existing -q -p '\n"
  },
  {
    "path": "aliases/available/osx.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'osx-specific aliases'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Desktop Programs\nalias fireworks='open -a \"/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app\"'\nalias photoshop='open -a \"/Applications/Adobe Photoshop CS3/Adobe Photoshop.app\"'\nalias preview='open -a \"${PREVIEW?}\"'\nalias xcode='open -a \"/Applications/XCode.app\"'\nalias filemerge='open -a \"/Developer/Applications/Utilities/FileMerge.app\"'\nalias safari='open -a safari'\nalias firefox='open -a firefox'\nalias chrome='open -a \"Google Chrome\"'\nalias chromium='open -a chromium'\nalias brave='open -a \"Brave Browser\"'\nalias dashcode='open -a dashcode'\nalias f='open -a Finder '\nalias fh='open -a Finder .'\nalias textedit='open -a TextEdit'\nalias hex='open -a \"Hex Fiend\"'\nalias skype='open -a Skype'\nalias mou='open -a Mou'\nalias subl='open -a \"Sublime Text\"'\n\nif [[ -s /usr/bin/firefox ]]; then\n\tunalias firefox\nfi\n\n# Requires growlnotify, which can be found in the Growl DMG under \"Extras\"\nalias grnot='growlnotify -s -t Terminal -m \"Done\"'\n\n# Get rid of those pesky .DS_Store files recursively\nalias dsclean='find . -type f -name .DS_Store -delete'\n\n# Track who is listening to your iTunes music\nalias whotunes='lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689'\n\n# Flush your dns cache\nalias flush='dscacheutil -flushcache'\n\n# Show/hide hidden files (for Mac OS X Mavericks)\nalias showhidden='defaults write com.apple.finder AppleShowAllFiles TRUE'\nalias hidehidden='defaults write com.apple.finder AppleShowAllFiles FALSE'\n\n# From http://apple.stackexchange.com/questions/110343/copy-last-command-in-terminal\n# shellcheck disable=SC2142 # The quoting confuses `shellcheck`...\nalias copyLastCmd=\"fc -ln -1 | awk '{\\$1=\\$1}1' ORS='' | pbcopy\"\n\n# Use Finder's Quick Look on a file (^C or space to close)\nalias ql='qlmanage -p 2>/dev/null'\n\n# Mute/Unmute the system volume. Plays nice with all other volume settings.\nalias mute='osascript -e \"set volume output muted true\"'\nalias unmute='osascript -e \"set volume output muted false\"'\n\n# Pin to the tail of long commands for an audible alert after long processes\n## curl http://downloads.com/hugefile.zip; lmk\nalias lmk='say \"Process complete.\"'\n"
  },
  {
    "path": "aliases/available/phoenix.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'phoenix abbreviations'\nurl \"https://www.phoenixframework.org/\"\n\n# Phoenix Commands\nalias i='iex'\nalias ips='iex -S mix phx.server'\nalias ism='iex -S mix'\nalias m='mix'\nalias mab='mix archive.build'\nalias mai='mix archive.install'\nalias mat='mix app.tree'\nalias mc='mix compile'\nalias mcv='mix compile --verbose'\nalias mcx='mix compile.xref'\nalias mdc='mix deps.compile'\nalias mdg='mix deps.get'\nalias mdgc='mix do deps.get, deps.compile'\nalias mdu='mix deps.update'\nalias mdt='mix deps.tree'\nalias mdua='mix deps.update --all'\nalias mdun='mix deps.unlock'\nalias mduu='mix deps.unlock --unused'\nalias meb='mix escript.build'\nalias mec='mix ecto.create'\nalias mecm='mix do ecto.create, ecto.migrate'\nalias med='mix ecto.drop'\nalias mem='mix ecto.migrate'\nalias megm='mix ecto.gen.migration'\nalias merb='mix ecto.rollback'\nalias mers='mix ecto.reset'\nalias mho='mix hex.outdated'\nalias mlh='mix local.hex'\nalias mn='mix new'\nalias mns='mix new --sup'\nalias mpgc='mix phx.gen.channel'\nalias mpgh='mix phx.gen.html'\nalias mpgj='mix phx.gen.json'\nalias mpgm='mix phx.gen.model'\nalias mpgs='mix phx.gen.secret'\nalias mpn='mix phx.new'\nalias mpr='mix phx.routes'\nalias mps='mix phx.server'\nalias mr='mix run'\nalias mrnh='mix run --no-halt'\nalias mrl='mix release'\nalias mt='mix test'\nalias mts='mix test --stale'\nalias mtw='mix test.watch'\nalias mx='mix xref'\n"
  },
  {
    "path": "aliases/available/puppet.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'puppet aliases'\nurl \"https://www.puppet.com/docs/puppet/\"\n\n# Aliases\nalias pupval=\"puppet parser validate *.pp\"\nalias puplint=\"puppet-lint *.pp\"\nalias pupagt=\"puppet agent -t\"\nalias pupagtd=\"puppet agent -t --debug\"\nalias pupapp=\"puppet apply\"\n"
  },
  {
    "path": "aliases/available/pyrocms.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'pyrocms abbreviations'\nurl \"https://pyrocms.com/\"\n\n###\n## PyroCMS 3.4 bash aliases\n## @author Denis Efremov <efremov.a.denis@gmail.com>\n###\n\n# general\nalias a:cl=\"php artisan clear-compiled\" # Remove the compiled class file\nalias a:d=\"php artisan down\"            # Put the application into maintenance mode\nalias a:e=\"php artisan env\"             # Display the current framework environment\nalias a:h=\"php artisan help\"            # Displays help for a command\nalias a:i=\"php artisan install\"         # Install the Streams Platform.\nalias a:ls=\"php artisan list\"           # Lists commands\nalias a:mg=\"php artisan migrate\"        # Run the database migrations\nalias a:op=\"php artisan optimize\"       # Optimize the framework for better performance (deprecated)\nalias a:pr=\"php artisan preset\"         # Swap the front-end scaffolding for the application\nalias a:s=\"php artisan serve\"           # Serve the application on the PHP development server\nalias a:u=\"php artisan up\"              # Bring the application out of maintenance mode\n\n# addon\nalias a:ad:i=\"php artisan addon:install\"   # Install an addon.\nalias a:ad:p=\"php artisan addon:publish\"   # Publish an the configuration and translations for an addon.\nalias a:ad:r=\"php artisan addon:reinstall\" # Reinstall an addon.\nalias a:ad:u=\"php artisan addon:uninstall\" # Uninstall an addon.\n\n# app\nalias a:ap:n=\"php artisan app:name\"    # Set the application namespace\nalias a:ap:p=\"php artisan app:publish\" # Publish general application override files.\n\n# assets\nalias a:as:cl=\"php artisan assets:clear\" # Clear compiled public assets.\n\n# auth\nalias a:au:clrs=\"php artisan auth:clear-resets\" # Flush expired password reset tokens\n\n# cache\nalias a:ca:cl=\"php artisan cache:clear\" # Flush the application cache\nalias a:ca:f=\"php artisan cache:forget\" # Remove an item from the cache\nalias a:ca:t=\"php artisan cache:table\"  # Create a migration for the cache database table\n\n# config\nalias a:co:ca=\"php artisan config:cache\" # Create a cache file for faster configuration loading\nalias a:co:cl=\"php artisan config:clear\" # Remove the configuration cache file\n\n# db\nalias a:db:s=\"php artisan db:seed\" # Seed the database with records\n\n# env\nalias a:en:s=\"php artisan env:set\" # Set an environmental value.\n\n# event\nalias a:ev:g=\"php artisan event:generate\" # Generate the missing events and listeners based on registration\n\n# extension\nalias a:ex:i=\"php artisan extension:install\"   # Install a extension.\nalias a:ex:r=\"php artisan extension:reinstall\" # Reinstall a extension.\nalias a:ex:u=\"php artisan extension:uninstall\" # Uninstall a extension.\n\n# files\nalias a:fi:cl=\"php artisan files:clean\" # Clean missing files from the files table.\n\n# key\nalias a:ke:g=\"php artisan key:generate\" # Set the application key\n\n# make\nalias a:mk:ad=\"php artisan make:addon\"        # Create a new addon.\nalias a:mk:au=\"php artisan make:auth\"         # Scaffold basic login and registration views and routes\nalias a:mk:cm=\"php artisan make:command\"      # Create a new Artisan command\nalias a:mk:ct=\"php artisan make:controller\"   # Create a new controller class\nalias a:mk:ev=\"php artisan make:event\"        # Create a new event class\nalias a:mk:fa=\"php artisan make:factory\"      # Create a new model factory\nalias a:mk:j=\"php artisan make:job\"           # Create a new job class\nalias a:mk:li=\"php artisan make:listener\"     # Create a new event listener class\nalias a:mk:ma=\"php artisan make:mail\"         # Create a new email class\nalias a:mk:mw=\"php artisan make:middleware\"   # Create a new middleware class\nalias a:mk:mg=\"php artisan make:migration\"    # Create a new migration file\nalias a:mk:md=\"php artisan make:model\"        # Create a new Eloquent model class\nalias a:mk:no=\"php artisan make:notification\" # Create a new notification class\nalias a:mk:po=\"php artisan make:policy\"       # Create a new policy class\nalias a:mk:pr=\"php artisan make:provider\"     # Create a new service provider class\nalias a:mk:rq=\"php artisan make:request\"      # Create a new form request class\nalias a:mk:rs=\"php artisan make:resource\"     # Create a new resource\nalias a:mk:rl=\"php artisan make:rule\"         # Create a new validation rule\nalias a:mk:sd=\"php artisan make:seeder\"       # Create a new seeder class\nalias a:mk:st=\"php artisan make:stream\"       # Make a streams entity namespace.\nalias a:mk:ts=\"php artisan make:test\"         # Create a new test class\n\n# migrate\nalias a:mg:fr=\"php artisan migrate:fresh\"    # Drop all tables and re-run all migrations\nalias a:mg:i=\"php artisan migrate:install\"   # Create the migration repository\nalias a:mg:rf=\"php artisan migrate:refresh\"  # Reset and re-run all migrations\nalias a:mg:rs=\"php artisan migrate:reset\"    # Rollback all database migrations\nalias a:mg:rl=\"php artisan migrate:rollback\" # Rollback the last database migration\nalias a:mg:st=\"php artisan migrate:status\"   # Show the status of each migration\n\n# module\nalias a:mo:i=\"php artisan module:install\"   # Install a module.\nalias a:mo:r=\"php artisan module:reinstall\" # Reinstall a module.\nalias a:mo:u=\"php artisan module:uninstall\" # Uninstall a module.\n\n# notifications\nalias a:no:tb=\"php artisan notifications:table\" # Create a migration for the notifications table\n\n# package\nalias a:pk:d=\"php artisan package:discover\" # Rebuild the cached package manifest\n\n# queue\nalias a:qu:fa=\"php artisan queue:failed\"       # List all of the failed queue jobs\nalias a:qu:ft=\"php artisan queue:failed-table\" # Create a migration for the failed queue jobs database table\nalias a:qu:fl=\"php artisan queue:flush\"        # Flush all of the failed queue jobs\nalias a:qu:fg=\"php artisan queue:forget\"       # Delete a failed queue job\nalias a:qu:li=\"php artisan queue:listen\"       # Listen to a given queue\nalias a:qu:rs=\"php artisan queue:restart\"      # Restart queue worker daemons after their current job\nalias a:qu:rt=\"php artisan queue:retry\"        # Retry a failed queue job\nalias a:qu:tb=\"php artisan queue:table\"        # Create a migration for the queue jobs database table\nalias a:qu:w=\"php artisan queue:work\"          # Start processing jobs on the queue as a daemon\n\n# route\nalias a:ro:ca=\"php artisan route:cache\" # Create a route cache file for faster route registration\nalias a:ro:cl=\"php artisan route:clear\" # Remove the route cache file\nalias a:ro:ls=\"php artisan route:list\"  # List all registered routes\n\n# schedule\nalias a:sc:r=\"php artisan schedule:run\" # Run the scheduled commands\n\n# scout\nalias a:su:fl=\"php artisan scout:flush\"  # Flush all of the model's records from the index\nalias a:su:im=\"php artisan scout:import\" # Import the given model into the search index\n\n# session\nalias a:se:tb=\"php artisan session:table\" # Create a migration for the session database table\n\n# storage\nalias a:sg:l=\"php artisan storage:link\" # Create a symbolic link from \"public/storage\" to \"storage/app/public\"\n\n# streams\nalias a:st:cl=\"php artisan streams:cleanup\" # Cleanup streams entry models.\nalias a:st:co=\"php artisan streams:compile\" # Compile streams entry models.\nalias a:st:d=\"php artisan streams:destroy\"  # Destroy a namespace.\nalias a:st:p=\"php artisan streams:publish\"  # Publish configuration and translations for streams.\nalias a:st:r=\"php artisan streams:refresh\"  # Refresh streams generated components.\n\n# tntsearch\nalias a:tn:im=\"php artisan tntsearch:import\" # Import the given model into the search index\n\n# vendor\nalias a:ve:p=\"php artisan vendor:publish\" # Publish any publishable assets from vendor packages\n\n# view\nalias a:vi:cl=\"php artisan view:clear\" # Clear all compiled view files\n"
  },
  {
    "path": "aliases/available/rails.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'rails abbreviations'\nurl \"https://guides.rubyonrails.org/\"\n\n# Rails Commands\nalias r='rails'\nalias rg='rails g'\nalias rs='rails s'\nalias rc='rails c'\nalias rn='rails new'\nalias rb='rails dbconsole'\nalias rp='rails plugin'\nalias ra='rails application'\nalias rd='rails destroy'\nalias dbm='rake db:migrate'\n\nalias ss='script/server'\nalias ts=\"thin start\" # thin server\nalias sc='script/console'\nalias restartapp='touch tmp/restart.txt'\nalias restart='touch tmp/restart.txt' # restart passenger\nalias devlog='tail -f log/development.log'\nalias taild='tail -f log/development.log' # tail dev log\n"
  },
  {
    "path": "aliases/available/svn.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'common svn abbreviations'\nurl \"https://subversion.apache.org/\"\n\n# Aliases\nalias svs='svn status'\nalias sa='svn add'\nalias sci='svn ci -m'\nalias sco='svn co'\nalias sup='svn up'\nalias scu='svn cleanup'\nalias sli='svn list'\nalias sdel='svn delete'\nalias sdif='svn diff'\nalias slog='svn log'\nalias smv='svn move'\n"
  },
  {
    "path": "aliases/available/systemd.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'systemd service'\nurl \"https://systemd.io/\"\n\ncase $OSTYPE in\n\tlinux*)\n\t\t# Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user\n\t\talias sc='systemctl'\n\t\talias scu='systemctl --user'\n\t\talias scdr='systemctl daemon-reload'\n\t\talias scdru='systemctl --user daemon-reload'\n\t\talias scr='systemctl restart'\n\t\talias scru='systemctl --user restart'\n\t\talias sce='systemctl stop'\n\t\talias sceu='systemctl --user stop'\n\t\talias scs='systemctl start'\n\t\talias scsu='systemctl --user start'\n\t\t# Keeping previous aliases for a non-breaking change.\n\t\talias scue='sceu'\n\t\talias scus='scsu'\n\t\talias scur='scdru'\n\t\t;;\nesac\n"
  },
  {
    "path": "aliases/available/terraform.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Aliases for Terraform/OpenTofu and Terragrunt'\nurl \"https://www.terraform.io/\"\n\nif _command_exists terraform; then\n\talias tf='terraform'\nelif _command_exists tofu; then\n\talias tf='tofu'\nfi\n\nif _command_exists tf; then\n\talias tfa='tf apply'\n\talias tfp='tf plan'\n\talias tfd='tf destroy'\n\talias tfv='tf validate'\n\talias tfi='tf init'\n\talias tfo='tf output'\n\talias tfr='tf refresh'\n\talias tfw='tf workspace'\n\talias tfae='tf apply -auto-approve'\n\talias tfpa='tf plan -out=tfplan && tf apply tfplan'\n\talias tfpaf='tf plan -out=tfplan && tf apply -auto-approve tfplan'\nfi\n"
  },
  {
    "path": "aliases/available/terragrunt.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Aliases for Terraform and Terragrunt'\nurl \"https://terragrunt.gruntwork.io/\"\n\nalias tg='terragrunt'\nalias tgv='terragrunt validate'\nalias tgp='terragrunt plan'\nalias tga='terragrunt apply'\nalias tgd='terragrunt destroy'\n\nalias tgva='terragrunt validate-all'\nalias tgpa='terragrunt plan-all'\nalias tgaa='terragrunt apply-all'\nalias tgda='terragrunt destroy-all'\n"
  },
  {
    "path": "aliases/available/textmate.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'textmate abbreviations'\nurl \"https://macromates.com/\"\n\ncase $OSTYPE in\n\tdarwin*)\n\t\t# Textmate\n\t\talias e='mate . &'\n\t\talias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &'\n\t\t;;\nesac\n"
  },
  {
    "path": "aliases/available/tmux.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'Tmux terminal multiplexer'\nurl \"https://github.com/tmux/tmux\"\n\nalias txl='tmux ls'\nalias txn='tmux new -s'\nalias txa='tmux a -t'\n"
  },
  {
    "path": "aliases/available/todo.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'todo.txt-cli abbreviations'\nurl \"https://github.com/todotxt/todo.txt-cli\"\n\nalias tls='\"${TODO?}\" ls'\nalias ta='\"${TODO?}\" a'\nalias trm='\"${TODO?}\" rm'\nalias tdo='\"${TODO?}\" do'\nalias tpri='\"${TODO?}\" pri'\n"
  },
  {
    "path": "aliases/available/uuidgen.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'uuidgen aliases'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif _command_exists uuid; then # Linux\n\talias uuidu=\"uuid | tr '[:lower:]' '[:upper:]'\"\n\talias uuidl=uuid\nelif _command_exists uuidgen; then # macOS/BSD\n\talias uuidu=\"uuidgen\"\n\talias uuid=\"uuidgen | tr '[:upper:]' '[:lower:]'\" # because upper case is like YELLING\n\talias uuidl=uuid\nfi\n"
  },
  {
    "path": "aliases/available/vagrant.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'vagrant aliases'\nurl \"https://www.vagrantup.com/\"\n\n# Aliases\nalias vhl='vagrant hosts list'\nalias vscp='vagrant scp'\nalias vsl='vagrant snapshot list'\nalias vst='vagrant snapshot take'\nalias vup=\"vagrant up\"\nalias vupl=\"vagrant up 2>&1 | tee vagrant.log\"\nalias vh=\"vagrant halt\"\nalias vs=\"vagrant suspend\"\nalias vr=\"vagrant resume\"\nalias vrl=\"vagrant reload\"\nalias vssh=\"vagrant ssh\"\nalias vst=\"vagrant status\"\nalias vp=\"vagrant provision\"\nalias vdstr=\"vagrant destroy\"\n# requires vagrant-list plugin\nalias vl=\"vagrant list\"\n# requires vagrant-hostmanager plugin\nalias vhst=\"vagrant hostmanager\"\n"
  },
  {
    "path": "aliases/available/vault.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'vault aliases'\nurl \"https://www.vaultproject.io/\"\n\n# Aliases\nalias vad=\"vault delete\"\nalias val=\"vault list\"\nalias var=\"vault read\"\nalias varn=\"vault renew\"\nalias varv=\"vault revoke\"\nalias vasrv=\"vault server\"\nalias vas=\"vault status\"\nalias vav=\"vault version\"\nalias vaw=\"vault write\"\nalias vag=\"vault login -method=github\"\nalias varv=\"vault read -field=value\"\n"
  },
  {
    "path": "aliases/available/vim.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'vim abbreviations'\nurl \"https://www.vim.org/\"\n\nalias v='${VISUAL:-vim}'\n\nif ! _command_exists vim; then\n\t_log_warning \"Without 'vim', these aliases just aren't that useful...\"\nfi\n# open the vim help in fullscreen incorporated from\n# https://stackoverflow.com/a/4687513\nalias vimh='vim -c \":h | only\"'\n\n# open vim in new tab is taken from\n# http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek\n_command_exists mvim && function mvimt { command mvim --remote-tab-silent \"$@\" || command mvim \"$@\"; }\n_command_exists gvim && function gvimt { command gvim --remote-tab-silent \"$@\" || command gvim \"$@\"; }\n"
  },
  {
    "path": "aliases/available/yarn.aliases.bash",
    "content": "# shellcheck shell=bash\nabout-alias 'yarn package manager aliases'\nurl \"https://yarnpkg.com/\"\n\n# Aliases\nalias ya='yarn'\nalias yai='yarn init'\nalias yaa='yarn add'\nalias yaga='yarn global add'\nalias yaad='yarn add --dev'\nalias yau='yarn upgrade'\nalias yarm='yarn remove'\nalias yagrm='yarn global remove'\nalias yaod='yarn outdated'\nalias yapa='yarn pack'\nalias yap='yarn publish'\nalias yasu='yarn self-update'\nalias yaru='yarn run'\nalias yat='yarn test'\nalias yas='yarn serve'\nalias yacc='yarn cache clean'\nalias yack='yarn check'\nalias yals='yarn list'\nalias yain='yarn info'\nalias yali='yarn licenses ls'\nalias yaloi='yarn login'\nalias yaloo='yarn logout'\n"
  },
  {
    "path": "bash_it.sh",
    "content": "#!/usr/bin/env bash\n# shellcheck source-path=SCRIPTDIR/lib source-path=SCRIPTDIR/scripts\n# shellcheck disable=SC2034\n\n# Requires bash 3.2+ to install and run\n# Skip loading if bash version is too old\nif [[ \"${BASH_VERSINFO[0]-}\" -lt 3 ]] || [[ \"${BASH_VERSINFO[0]-}\" -eq 3 && \"${BASH_VERSINFO[1]}\" -lt 2 ]]; then\n\techo \"sorry, but the minimum version of BASH supported by bash_it is 3.2, consider upgrading?\" >&2\n\treturn 1\nfi\n\n# Initialize Bash It\nBASH_IT_LOG_PREFIX=\"core: main: \"\n: \"${BASH_IT:=${BASH_SOURCE%/*}}\"\n: \"${BASH_IT_CUSTOM:=${BASH_IT}/custom}\"\n: \"${CUSTOM_THEME_DIR:=\"${BASH_IT_CUSTOM}/themes\"}\"\n: \"${BASH_IT_BASHRC:=${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}}\"\n\n# Load composure first, so we support function metadata\n# shellcheck source-path=SCRIPTDIR/vendor/github.com/erichs/composure\nsource \"${BASH_IT}/vendor/github.com/erichs/composure/composure.sh\"\n\n# Extend composure with additional metadata functions\n# shellcheck disable=SC2329\nurl() { :; }\n\n# support 'plumbing' metadata\ncite _about _param _example _group _author _version url\ncite about-alias about-plugin about-completion\n\n# Declare our end-of-main finishing hook, but don't use `declare`/`typeset`\n_bash_it_library_finalize_hook=()\n\n# We need to load logging module early in order to be able to log\nsource \"${BASH_IT}/lib/log.bash\"\n\n# Load libraries\n_log_debug \"Loading libraries...\"\nfor _bash_it_main_file_lib in \"${BASH_IT}/lib\"/*.bash; do\n\t_bash-it-log-prefix-by-path \"${_bash_it_main_file_lib}\"\n\t_log_debug \"Loading library file...\"\n\t# shellcheck disable=SC1090\n\tsource \"$_bash_it_main_file_lib\"\n\tBASH_IT_LOG_PREFIX=\"core: main: \"\ndone\n\n# Load the global \"enabled\" directory, then enabled aliases, completion, plugins\n# \"_bash_it_main_file_type\" param is empty so that files get sourced in glob order\nfor _bash_it_main_file_type in \"\" \"aliases\" \"plugins\" \"completion\"; do\n\tBASH_IT_LOG_PREFIX=\"core: reloader: \"\n\t# shellcheck disable=SC2140\n\tsource \"${BASH_IT}/scripts/reloader.bash\" ${_bash_it_main_file_type:+\"skip\" \"$_bash_it_main_file_type\"}\n\tBASH_IT_LOG_PREFIX=\"core: main: \"\ndone\n\n# Load theme, if a theme was set\n# shellcheck source-path=SCRIPTDIR/themes\nif [[ -n \"${BASH_IT_THEME:-}\" ]]; then\n\t_log_debug \"Loading theme '${BASH_IT_THEME}'.\"\n\tBASH_IT_LOG_PREFIX=\"themes: githelpers: \"\n\tsource \"${BASH_IT}/themes/githelpers.theme.bash\"\n\tBASH_IT_LOG_PREFIX=\"themes: p4helpers: \"\n\tsource \"${BASH_IT}/themes/p4helpers.theme.bash\"\n\tBASH_IT_LOG_PREFIX=\"themes: base: \"\n\tsource \"${BASH_IT}/themes/base.theme.bash\"\n\n\tBASH_IT_LOG_PREFIX=\"lib: appearance: \"\n\t# shellcheck disable=SC1090\n\tif [[ -f \"${BASH_IT_THEME}\" ]]; then\n\t\tsource \"${BASH_IT_THEME}\"\n\telif [[ -f \"$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash\" ]]; then\n\t\tsource \"$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash\"\n\telif [[ -f \"$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash\" ]]; then\n\t\tsource \"$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash\"\n\tfi\nfi\n\n_log_debug \"Loading custom aliases, completion, plugins...\"\nfor _bash_it_main_file_type in \"aliases\" \"completion\" \"plugins\"; do\n\t_bash_it_main_file_custom=\"${BASH_IT}/${_bash_it_main_file_type}/custom.${_bash_it_main_file_type}.bash\"\n\tif [[ -s \"${_bash_it_main_file_custom}\" ]]; then\n\t\t_bash-it-log-prefix-by-path \"${_bash_it_main_file_custom}\"\n\t\t_log_debug \"Loading component...\"\n\t\t# shellcheck disable=SC1090\n\t\tsource \"${_bash_it_main_file_custom}\"\n\tfi\n\tBASH_IT_LOG_PREFIX=\"core: main: \"\ndone\n\n# Custom\n_log_debug \"Loading general custom files...\"\nfor _bash_it_main_file_custom in \"${BASH_IT_CUSTOM}\"/*.bash \"${BASH_IT_CUSTOM}\"/*/*.bash; do\n\tif [[ -s \"${_bash_it_main_file_custom}\" ]]; then\n\t\t_bash-it-log-prefix-by-path \"${_bash_it_main_file_custom}\"\n\t\t_log_debug \"Loading custom file...\"\n\t\t# shellcheck disable=SC1090\n\t\tsource \"$_bash_it_main_file_custom\"\n\tfi\n\tBASH_IT_LOG_PREFIX=\"core: main: \"\ndone\n\nif [[ -n \"${PROMPT:-}\" ]]; then\n\tPS1=\"${PROMPT}\"\nfi\n\n# Adding Support for other OSes\nif _command_exists gloobus-preview; then\n\tPREVIEW=\"gloobus-preview\"\nelif [[ -d /Applications/Preview.app ]]; then\n\tPREVIEW=\"/Applications/Preview.app\"\nelse\n\tPREVIEW=\"less\"\nfi\n\n# BASH_IT_RELOAD_LEGACY is set.\nif [[ -n \"${BASH_IT_RELOAD_LEGACY:-}\" ]] && ! _command_exists reload; then\n\t# shellcheck disable=SC2139\n\talias reload=\"builtin source '${BASH_IT_BASHRC?}'\"\nfi\n\nfor _bash_it_library_finalize_f in \"${_bash_it_library_finalize_hook[@]:-}\"; do\n\teval \"${_bash_it_library_finalize_f?}\" # Use `eval` to achieve the same behavior as `$PROMPT_COMMAND`.\ndone\nunset \"${!_bash_it_library_finalize_@}\" \"${!_bash_it_main_file_@}\"\n"
  },
  {
    "path": "clean_files.txt",
    "content": "#######################################################################\n# Allow-list of files to be lint-checked by CI\n#\n# Directory Support\n#   Directory references are allowed within the file, ie:\n#\n#       themes/powerline\n#\n#   All files under the referenced directory will be checked\n#\n# Checking Files Locally\n#   You can manually invoke the check via:\n#\n#       lint_clean_files.sh\n#\n\n# root directories\n#\naliases/\ncompletion/\ncustom/example.bash\ndocs/\nhooks/\nlib/\nplugins/\nscripts/\ntemplate/\ntest/\nthemes/\n\n# root files\n#\n.gitattributes\nbash_it.sh\nclean_files.txt\ninstall.sh\nlint_clean_files.sh\nuninstall.sh\n\n# vendor init files\n#\nvendor/.gitattributes\n"
  },
  {
    "path": "completion/available/aliases.completion.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'Automatic completion of aliases'\n# Load after all aliases and completions to understand what needs to be completed\n# BASH_IT_LOAD_PRIORITY: 800\n\n# References:\n# http://superuser.com/a/437508/119764\n# http://stackoverflow.com/a/1793178/1228454\n\n# Automatically add completion for all aliases to commands having completion functions\nfunction _bash-it-component-completion-callback-on-init-aliases() {\n\tlocal aliasCommandFunction namespace=\"alias_completion\"\n\tlocal tmp_file completion_loader alias_name line completions chars\n\tlocal alias_arg_words new_completion compl_func compl_wrapper alias_defn\n\n\t# create array of function completion triggers, keeping multi-word triggers together\n\tIFS=$'\\n' read -d '' -ra completions < <(complete -p)\n\t((${#completions[@]} == 0)) && return 0\n\n\tcompletions=(\"${completions[@]##complete -* * -}\") # strip all but last option plus trigger(s)\n\tcompletions=(\"${completions[@]#complete -}\")       # strip anything missed\n\tcompletions=(\"${completions[@]#? * }\")             # strip last option and arg, leaving only trigger(s)\n\tcompletions=(\"${completions[@]#? }\")               # strip anything missed\n\t#TODO: this will fail on some completions...\n\n\t# create temporary file for wrapper functions and completions\n\ttmp_file=\"$(mktemp -t \"${namespace}-${RANDOM}XXXXXX\")\" || return 1\n\n\tIFS=$'\\n' read -r completion_loader < <(complete -p -D 2> /dev/null)\n\tif [[ \"${completion_loader#complete }\" =~ '-F'[[:space:]]([[:alnum:]_]+)[[:space:]] ]]; then\n\t\tcompletion_loader=\"${BASH_REMATCH[1]}\"\n\telse\n\t\tcompletion_loader=\"\"\n\tfi\n\n\t# read in \"<alias> '<aliased command>' '<command args>'\" lines from defined aliases\n\t# some aliases do have backslashes that needs to be interpreted\n\t# shellcheck disable=SC2162\n\twhile read line; do\n\t\tline=\"${line#alias -- }\"\n\t\tline=\"${line#alias }\"\n\t\talias_name=\"${line%%=*}\"\n\n\t\t# Skip aliases not added by this script that already have completion functions.\n\t\t# This allows users to define their own alias completion functions.\n\t\t# For aliases added by this script, we do want to replace them in case the\n\t\t# alias getting the completion added has changed.\n\t\tif complete -p \"$alias_name\" &> /dev/null; then\n\t\t\t# Get the -F argument from the existing completion for this alias.\n\t\t\taliasCommandFunction=$(complete -p \"$alias_name\" | rev | cut -d \" \" -f 2 | rev)\n\t\t\t# Check if aliasCommandFunction starts with our namespace.\n\t\t\tif [[ \"$aliasCommandFunction\" != \"_${namespace}::\"* ]]; then\n\t\t\t\tcontinue\n\t\t\tfi\n\n\t\t\t# Remove existing completion. It will be replaced by the new one. We need to\n\t\t\t# delete it in case the new alias does not support having completion added.\n\t\t\tcomplete -r \"$alias_name\"\n\t\tfi\n\n\t\talias_defn=\"${line#*=\\'}\" # alias definition\n\t\talias_defn=\"${alias_defn%\\'}\"\n\t\talias_cmd=\"${alias_defn%%[[:space:]]*}\" # first word of alias\n\t\tif [[ ${alias_defn} == \"${alias_cmd}\" ]]; then\n\t\t\talias_args=''\n\t\telse\n\t\t\talias_args=\"${alias_defn#*[[:space:]]}\" # everything after first word\n\t\tfi\n\n\t\t# skip aliases to pipes, boolean control structures and other command lists\n\t\tchars=$'|&;()<>\\n'\n\t\tif [[ \"${alias_defn}\" =~ [$chars] ]]; then\n\t\t\tcontinue\n\t\tfi\n\t\t# avoid expanding wildcards\n\t\tread -ra alias_arg_words <<< \"$alias_args\"\n\n\t\t# skip alias if there is no completion function triggered by the aliased command\n\t\tif ! _bash-it-array-contains-element \"$alias_cmd\" \"${completions[@]}\"; then\n\t\t\tif [[ -n \"$completion_loader\" ]]; then\n\t\t\t\t# force loading of completions for the aliased command\n\t\t\t\t\"${completion_loader:?}\" \"${alias_cmd}\"\n\t\t\t\t# 124 means completion loader was successful\n\t\t\t\t[[ $? -eq 124 ]] || continue\n\t\t\t\tcompletions+=(\"$alias_cmd\")\n\t\t\telse\n\t\t\t\tcontinue\n\t\t\tfi\n\t\tfi\n\t\tnew_completion=\"$(complete -p \"$alias_cmd\" 2> /dev/null)\"\n\n\t\tcompl_func=\"${new_completion/#* -F /}\"\n\t\tcompl_func=\"${compl_func%% *}\"\n\t\t# avoid recursive call loops by ignoring our own functions\n\t\tif [[ \"${compl_func#_\"$namespace\"::}\" == \"$compl_func\" ]]; then\n\t\t\tcompl_wrapper=\"_${namespace}::${alias_name}\"\n\n\t\t\tif [[ -z $alias_args ]]; then\n\t\t\t\t# Create a wrapper without arguments.\n\t\t\t\t# This allows identifying the completions added by this script on reload.\n\t\t\t\techo \"function $compl_wrapper {\n\t\t\t\t$compl_func \\\"\\$@\\\"\n\t\t\t\t}\" >> \"$tmp_file\"\n\t\t\telse\n\t\t\t\t# Create a wrapper inserting the alias arguments\n\t\t\t\t# The use of printf on alias_arg_words is needed to ensure each element of\n\t\t\t\t# the array is quoted. E.X. (one two three) -> ('one' 'two' 'three')\n\t\t\t\techo \"function $compl_wrapper {\n                        local compl_word=\\${2?}\n                        local prec_word=\\${3?}\n                        # check if prec_word is the alias itself. if so, replace it\n                        # with the last word in the unaliased form, i.e.,\n                        # alias_cmd + ' ' + alias_args.\n                        if [[ \\$COMP_LINE == \\\"\\$prec_word \\$compl_word\\\" ]]; then\n                            prec_word='$alias_cmd $alias_args'\n                            prec_word=\\${prec_word#* }\n                        fi\n                        (( COMP_CWORD += ${#alias_arg_words[@]} ))\n                        COMP_WORDS=(\\\"$alias_cmd\\\" $(printf \"%q \" \"${alias_arg_words[@]}\") \\\"\\${COMP_WORDS[@]:1}\\\")\n                        (( COMP_POINT -= \\${#COMP_LINE} ))\n                        COMP_LINE=\\${COMP_LINE/$alias_name/$alias_cmd $alias_args}\n                        (( COMP_POINT += \\${#COMP_LINE} ))\n                        \\\"$compl_func\\\" \\\"$alias_cmd\\\" \\\"\\$compl_word\\\" \\\"\\$prec_word\\\"\n                    }\" >> \"$tmp_file\"\n\t\t\tfi\n\t\t\tnew_completion=\"${new_completion/ -F $compl_func / -F $compl_wrapper }\"\n\t\tfi\n\n\t\t# replace completion trigger by alias\n\t\tif [[ -n $new_completion ]]; then\n\t\t\tnew_completion=\"${new_completion% *} $alias_name\"\n\t\t\techo \"$new_completion\" >> \"$tmp_file\"\n\t\tfi\n\tdone < <(alias -p)\n\t# shellcheck source=/dev/null\n\tsource \"$tmp_file\" && command rm -f \"$tmp_file\"\n}\n\n_bash-it-component-completion-callback-on-init-aliases\n"
  },
  {
    "path": "completion/available/apm.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"apm completion\"\n# shellcheck source-path=SCRIPTDIR/../../vendor/github.com/vigo/apm-bash-completion\nsource \"${BASH_IT?}/vendor/github.com/vigo/apm-bash-completion/apm\"\n"
  },
  {
    "path": "completion/available/artisan.completion.bash",
    "content": "# shellcheck shell=bash\ncite \"about-completion\"\nabout-completion \"Laravel artisan completion\"\ngroup \"php\"\nurl \"https://laravel.com/docs/artisan\"\n\n# Completion function for Laravel artisan\n_artisan_completion() {\n\tlocal cur artisan_commands\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\n\t# Only provide completions if artisan file exists in current directory\n\tif [[ ! -f \"artisan\" ]]; then\n\t\treturn 0\n\tfi\n\n\t# Get list of available artisan commands\n\t# Use command prefix to bypass user aliases\n\t# shellcheck disable=SC2034\n\tartisan_commands=$(command php artisan --raw --no-ansi list 2> /dev/null | command sed \"s/[[:space:]].*//\")\n\n\t# shellcheck disable=SC2016,SC2207\n\tCOMPREPLY=($(compgen -W '${artisan_commands}' -- \"${cur}\"))\n\treturn 0\n}\n\n# Complete for both 'artisan' and common alias 'art'\ncomplete -F _artisan_completion artisan art\n"
  },
  {
    "path": "completion/available/awless.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure awless is installed\n_bash-it-completion-helper-necessary awless || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient awless || return\n\n# shellcheck disable=SC1090\nsource <(awless completion bash)\n"
  },
  {
    "path": "completion/available/awscli.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"aws - Amazon Web Services command-line interface\"\ngroup \"cloud\"\nurl \"https://aws.amazon.com/cli/\"\n\n# Make sure aws is installed\n_bash-it-completion-helper-necessary aws aws_completer || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient aws || return\n\ncomplete -C aws_completer aws\n"
  },
  {
    "path": "completion/available/bash-it.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"bash-it - completion for bash-it framework commands\"\ngroup \"bash-it\"\nurl \"https://bash-it.readthedocs.io/\"\n\nfunction _compreply_candidates() {\n\tlocal IFS=$'\\n'\n\n\tread -d '' -ra COMPREPLY < <(compgen -W \"${candidates[*]}\" -- \"${cur}\")\n}\n\nfunction _bash-it() {\n\tlocal cur prev verb file_type candidates suffix\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tverb=\"${COMP_WORDS[1]}\"\n\tfile_type=\"${COMP_WORDS[2]:-}\"\n\tcandidates=('disable' 'enable' 'help' 'migrate' 'reload' 'restart' 'preview' 'profile' 'doctor' 'search' 'show' 'update' 'version')\n\tcase \"${verb}\" in\n\t\tshow)\n\t\t\tcandidates=('aliases' 'completions' 'plugins')\n\t\t\t_compreply_candidates\n\t\t\t;;\n\t\thelp)\n\t\t\tif [[ \"${prev}\" == \"aliases\" ]]; then\n\t\t\t\tcandidates=('all' \"$(_bash-it-component-list \"${file_type}\")\")\n\t\t\t\t_compreply_candidates\n\t\t\telse\n\t\t\t\tcandidates=('aliases' 'completions' 'migrate' 'plugins' 'update')\n\t\t\t\t_compreply_candidates\n\t\t\tfi\n\t\t\t;;\n\t\tprofile)\n\t\t\tcase \"${file_type}\" in\n\t\t\t\tload | rm)\n\t\t\t\t\tif [[ \"${file_type}\" == \"$prev\" ]]; then\n\t\t\t\t\t\tcandidates=(\"${BASH_IT}/profiles\"/*.bash_it)\n\t\t\t\t\t\tcandidates=(\"${candidates[@]##*/}\")\n\t\t\t\t\t\tcandidates=(\"${candidates[@]%%.bash_it}\")\n\n\t\t\t\t\t\t_compreply_candidates\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\t\tsave | list) ;;\n\t\t\t\t*)\n\t\t\t\t\tcandidates=('load' 'save' 'list' 'rm')\n\t\t\t\t\t_compreply_candidates\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\tdoctor)\n\t\t\tcandidates=('errors' 'warnings' 'all')\n\t\t\t_compreply_candidates\n\t\t\t;;\n\t\tupdate)\n\t\t\tif [[ \"${cur}\" == -* ]]; then\n\t\t\t\tcandidates=('-s' '--silent')\n\t\t\telse\n\t\t\t\tcandidates=('stable' 'dev')\n\t\t\tfi\n\t\t\t_compreply_candidates\n\t\t\t;;\n\t\tmigrate | reload | restart | search | version) ;;\n\t\tpreview)\n\t\t\t_bash-it-preview # completes itself\n\t\t\treturn 0\n\t\t\t;;\n\t\tenable | disable)\n\t\t\tif [[ \"${verb}\" == \"enable\" ]]; then\n\t\t\t\tsuffix=\"disabled\"\n\t\t\telse\n\t\t\t\tsuffix=\"enabled\"\n\t\t\tfi\n\t\t\tcase \"${file_type}\" in\n\t\t\t\talias | completion | plugin)\n\t\t\t\t\tcandidates=('all' \"$(\"_bash-it-component-list-${suffix}\" \"${file_type}\")\")\n\t\t\t\t\t_compreply_candidates\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tcandidates=('alias' 'completion' 'plugin')\n\t\t\t\t\t_compreply_candidates\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\t*)\n\t\t\t_compreply_candidates\n\t\t\t;;\n\tesac\n}\n\n# Activate completion for bash-it and its common misspellings\ncomplete -F _bash-it bash-it\ncomplete -F _bash-it bash-ti\ncomplete -F _bash-it shit\ncomplete -F _bash-it bashit\ncomplete -F _bash-it batshit\ncomplete -F _bash-it bash_it\n"
  },
  {
    "path": "completion/available/brew.completion.bash",
    "content": "# shellcheck shell=bash\ncite \"about-completion\"\nabout-completion \"brew completion\"\ngroup \"package-manager\"\nurl \"https://brew.sh/\"\n\n# Load late to make sure `system` completion loads first\n# BASH_IT_LOAD_PRIORITY: 375\n\nif [[ \"$OSTYPE\" != 'darwin'* ]]; then\n\t_log_warning \"unsupported operating system - only 'Darwin' is supported\"\n\treturn 0\nfi\n\n# Make sure brew is installed\n_bash_it_homebrew_check || return 0\n\nif [[ -r \"$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew\" ]]; then\n\t# shellcheck disable=1090,1091\n\tsource \"$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew\"\n\nelif [[ -r \"$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh\" ]]; then\n\t# shellcheck disable=1090,1091\n\tsource \"$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh\"\n\nelif [[ -f \"$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew\" ]]; then\n\t# For the git-clone based installation, see here for more info:\n\t# https://github.com/Bash-it/bash-it/issues/1458\n\t# https://docs.brew.sh/Shell-Completion\n\t# shellcheck disable=1090,1091\n\tsource \"$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew\"\nfi\n"
  },
  {
    "path": "completion/available/bundler.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2207\n\ncite \"about-completion\"\nabout-completion \"bundler - Ruby dependency manager for managing gem dependencies\"\ngroup \"ruby\"\nurl \"https://bundler.io/\"\n\n# bash completion for the `bundle` command.\n#\n# Copyright (c) 2008 Daniel Luz\n\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation\n# files (the \"Software\"), to deal in the Software without\n# restriction, including without limitation the rights to use,\n# copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following\n# conditions:\n\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n#\n# To use, source this file on bash:\n#   . completion-bundle\n\n__bundle() {\n\tlocal bundle_bin=(\"${_RUBY_COMMAND_PREFIX[@]}\" \"$1\")\n\tlocal cur prev\n\t_get_comp_words_by_ref -n : cur prev\n\tlocal bundle_command\n\tlocal bundle_command_index\n\t__bundle_get_command\n\tCOMPREPLY=()\n\n\tlocal options\n\tif [[ $cur = -* && $bundle_command != exec ]]; then\n\t\toptions=\"-V --help --no-color --no-no-color --verbose --no-verbose\"\n\t\tcase $bundle_command in\n\t\t\t\"\")\n\t\t\t\toptions=\"$options --version\"\n\t\t\t\t;;\n\t\t\tcheck)\n\t\t\t\toptions=\"$options --dry-run --gemfile --path -r --retry\"\n\t\t\t\t;;\n\t\t\tclean)\n\t\t\t\toptions=\"$options --dry-run --force\"\n\t\t\t\t;;\n\t\t\tconfig)\n\t\t\t\toptions=\"$options --local --global --delete\"\n\t\t\t\t;;\n\t\t\tdoctor)\n\t\t\t\toptions=\"$options --gemfile --quiet --no-quiet\"\n\t\t\t\t;;\n\t\t\tgem)\n\t\t\t\toptions=\"$options -b -e -t --bin --coc --no-coc --edit --exe\n                     --no-exe --ext --no-ext --mit --no-mit --test\"\n\t\t\t\t;;\n\t\t\tinit)\n\t\t\t\toptions=\"$options --gemspec\"\n\t\t\t\t;;\n\t\t\tinstall)\n\t\t\t\toptions=\"$options --binstubs --clean --deployment --force --frozen\n                     --full-index --gemfile --jobs --local --no-cache\n                     --no-prune --path --quiet --retry --shebang --standalone\n                     --system --trust-policy --with --without\"\n\t\t\t\t;;\n\t\t\tlock)\n\t\t\t\toptions=\"$options --add-platform --conservative --full-index\n                     --local --lockfile --major --minor --patch --print\n                     --remove-platform --strict --update\"\n\t\t\t\t;;\n\t\t\tpackage)\n\t\t\t\toptions=\"$options --all --all-platforms\"\n\t\t\t\t;;\n\t\t\tplatform)\n\t\t\t\toptions=\"$options --ruby\"\n\t\t\t\t;;\n\t\t\tshow)\n\t\t\t\toptions=\"$options --outdated --paths --no-paths\"\n\t\t\t\t;;\n\t\t\tupdate)\n\t\t\t\toptions=\"$options --bundler --conservative --force --full-index\n                     --group --jobs --local --major --minor --patch --quiet\n                     --ruby --source --strict\"\n\t\t\t\t;;\n\t\t\tviz)\n\t\t\t\toptions=\"$options -f -F -R -v -W --file --format --requirements\n                     --no-requirements --version --no-version --without\"\n\t\t\t\t;;\n\t\tesac\n\telse\n\t\tcase $bundle_command in\n\t\t\t\"\" | help)\n\t\t\t\toptions=\"help install update package exec config\n                     check show outdated console open lock viz init gem\n                     platform clean doctor\"\n\t\t\t\t;;\n\t\t\tcheck | install)\n\t\t\t\tcase $prev in\n\t\t\t\t\t--binstubs | --path)\n\t\t\t\t\t\t_filedir -d\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t--standalone | --with | --without)\n\t\t\t\t\t\t__bundle_complete_groups\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t--trust-policy)\n\t\t\t\t\t\toptions=\"HighSecurity MediumSecurity LowSecurity\n                         AlmostNoSecurity NoSecurity\"\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\tconfig)\n\t\t\t\tcase $prev in\n\t\t\t\t\tconfig | --*)\n\t\t\t\t\t\tcase $cur in\n\t\t\t\t\t\t\tlocal.*)\n\t\t\t\t\t\t\t\toptions=($(__bundle_exec_ruby 'puts Bundler.definition.specs.to_hash.keys'))\n\t\t\t\t\t\t\t\toptions=(\"${options[*]/#/local.}\")\n\t\t\t\t\t\t\t\t;;\n\t\t\t\t\t\t\t*)\n\t\t\t\t\t\t\t\toptions=(path frozen without bin gemfile ssl_ca_cert\n\t\t\t\t\t\t\t\t\tssl_client_cert cache_path disable_multisource\n\t\t\t\t\t\t\t\t\tignore_messages retry redirect timeout\n\t\t\t\t\t\t\t\t\tforce_ruby_platform specific_platform\n\t\t\t\t\t\t\t\t\tdisable_checksum_validation disable_version_check\n\t\t\t\t\t\t\t\t\tallow_offline_install auto_install\n\t\t\t\t\t\t\t\t\tcache_all_platforms cache_all clean console\n\t\t\t\t\t\t\t\t\tdisable_exec_load disable_local_branch_check\n\t\t\t\t\t\t\t\t\tdisable_shared_gems jobs major_deprecations\n\t\t\t\t\t\t\t\t\tno_install no_prune only_update_to_newer_versions\n\t\t\t\t\t\t\t\t\tplugins shebang silence_root_warning\n\t\t\t\t\t\t\t\t\tssl_verify_mode system_bindir user_agent)\n\t\t\t\t\t\t\t\t# We want to suggest the options above as complete words,\n\t\t\t\t\t\t\t\t# and also \"local.\" and \"mirror.\" as prefixes\n\t\t\t\t\t\t\t\t# To achieve that, disable automatic space insertion,\n\t\t\t\t\t\t\t\t# insert it manually, then add the non-spaced prefixes\n\t\t\t\t\t\t\t\tcompopt -o nospace\n\t\t\t\t\t\t\t\toptions=(\"${options[@]/%/ }\")\n\t\t\t\t\t\t\t\t# And add prefix suggestions\n\t\t\t\t\t\t\t\toptions+=(local. mirror.)\n\t\t\t\t\t\t\t\t# Override $IFS for completion to work\n\t\t\t\t\t\t\t\tlocal IFS=$'\\n'\n\t\t\t\t\t\t\t\t# shellcheck disable=SC2016\n\t\t\t\t\t\t\t\tCOMPREPLY=($(compgen -W '${options[@]}' -- \"$cur\"))\n\t\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t\t\t;;\n\t\t\t\t\t\tesac\n\t\t\t\t\t\t;;\n\t\t\t\t\tpath | local.*)\n\t\t\t\t\t\t_filedir -d\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\texec)\n\t\t\t\tif [[ $COMP_CWORD -eq $bundle_command_index ]]; then\n\t\t\t\t\t# Figure out Bundler's binaries dir\n\t\t\t\t\tlocal bundler_bin\n\t\t\t\t\tbundler_bin=$(__bundle_exec_ruby 'puts Bundler.bundle_path + \"bin\"')\n\t\t\t\t\tif [[ -d $bundler_bin ]]; then\n\t\t\t\t\t\tlocal binaries\n\t\t\t\t\t\tbinaries=(\"$bundler_bin\"/*)\n\t\t\t\t\t\t# If there are binaries, strip directory name and use them\n\t\t\t\t\t\t[[ -f \"${binaries[0]}\" ]] && options=(\"${binaries[@]##*/}\")\n\t\t\t\t\telse\n\t\t\t\t\t\t# No binaries found; use full command completion\n\t\t\t\t\t\tCOMPREPLY=($(compgen -c -- \"$cur\"))\n\t\t\t\t\t\treturn\n\t\t\t\t\tfi\n\t\t\t\telse\n\t\t\t\t\tlocal _RUBY_COMMAND_PREFIX=(\"${bundle_bin[@]}\" exec)\n\t\t\t\t\t_command_offset \"$bundle_command_index\"\n\t\t\t\t\treturn\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\tgem)\n\t\t\t\tcase $prev in\n\t\t\t\t\t-e | --edit)\n\t\t\t\t\t\tCOMPREPLY=($(compgen -c -- \"$cur\"))\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t-t | --test)\n\t\t\t\t\t\toptions=(\"minitest\" \"rspec\")\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\tupdate)\n\t\t\t\tcase $prev in\n\t\t\t\t\t--group)\n\t\t\t\t\t\t__bundle_complete_groups\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\toptions=($(__bundle_exec_ruby 'puts Bundler.definition.specs.to_hash.keys'))\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\tviz)\n\t\t\t\tcase $prev in\n\t\t\t\t\t-F | --format)\n\t\t\t\t\t\toptions=(\"dot\" \"jpg\" \"png\" \"svg\")\n\t\t\t\t\t\t;;\n\t\t\t\t\t-W | --without)\n\t\t\t\t\t\t__bundle_complete_groups\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\tesac\n\tfi\n\tCOMPREPLY=($(compgen -W \"${options[*]}\" -- \"$cur\"))\n}\n\n__bundle_get_command() {\n\tlocal i\n\tfor ((i = 1; i < COMP_CWORD; ++i)); do\n\t\tlocal arg=${COMP_WORDS[$i]}\n\n\t\tcase $arg in\n\t\t\t[^-]*)\n\t\t\t\tbundle_command=$arg\n\t\t\t\tbundle_command_index=$((i + 1))\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\t--version)\n\t\t\t\t# Command-killer\n\t\t\t\tbundle_command=-\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\t--help)\n\t\t\t\tbundle_command=help\n\t\t\t\tbundle_command_index=$((i + 1))\n\t\t\t\treturn\n\t\t\t\t;;\n\t\tesac\n\tdone\n}\n\n# Provides completion for Bundler group names.\n#\n# Multiple groups can be entered, separated either by spaces or by colons.\n# Input is read from $cur, and the result is directly written to $COMPREPLY.\n__bundle_complete_groups() {\n\t# Group being currently written\n\tlocal cur_group=${cur##*[ :]}\n\t# All groups written before\n\tlocal prefix=${cur%\"$cur_group\"}\n\tlocal groups\n\tgroups=$(__bundle_exec_ruby 'puts Bundler.definition.dependencies.map(&:groups).reduce(:|).map(&:to_s)')\n\tif [[ ! $groups ]]; then\n\t\tCOMPREPLY=()\n\t\treturn\n\tfi\n\t# Duplicate \"default\" and anything already in $prefix, so that `uniq`\n\t# strips it; groups may be separated by ':', ' ', or '\\ '\n\tlocal excluded=$'\\ndefault\\n'${prefix//[: \\'\\\"\\\\]/$'\\n'}\n\t# Include them twice to ensure they are duplicates\n\tgroups=$groups$excluded$excluded\n\tCOMPREPLY=($(compgen -W \"$(sort <<< \"$groups\" | uniq -u)\" -- \"$cur_group\"))\n\t# Prepend prefix to all entries\n\tCOMPREPLY=(\"${COMPREPLY[@]/#/$prefix}\")\n\t__ltrim_colon_completions \"$cur\"\n}\n\n# __bundle_exec_ruby <script> [args...]\n#\n# Runs a Ruby script with Bundler loaded.\n# Results may be cached.\n__bundle_exec_ruby() {\n\tlocal bundle_bin=(\"${bundle_bin[@]:-bundle}\")\n\t# Lockfile is inferred here, and might not be correct (for example, when\n\t# running on a subdirectory). However, a wrong file path won't be a\n\t# cadastrophic mistake; it just means the cache won't be invalidated when\n\t# the local gem list changes (but will still invalidate if the command is\n\t# run on another directory)\n\tlocal lockfile=$PWD/Gemfile.lock\n\tlocal cachedir=${XDG_CACHE_HOME:-~/.cache}/completion-ruby\n\tlocal cachefile=$cachedir/bundle--exec-ruby\n\t# A representation of all arguments with newlines replaced by spaces,\n\t# to fit in a single line as a cache identifier\n\tlocal cache_id_line=\"${bundle_bin[*]} @ $lockfile: ${*//$'\\n'/ }\"\n\n\tif [[ (! -f $lockfile || $cachefile -nt $lockfile) &&\n\t\t$(head -n 1 -- \"$cachefile\" 2> /dev/null) = \"$cache_id_line\" ]]; then\n\t\ttail -n +2 -- \"$cachefile\"\n\telse\n\t\tlocal output\n\t\tif output=$(\"${bundle_bin[@]}\" exec ruby -e \"$@\" 2> /dev/null); then\n\t\t\t(mkdir -p -- \"$cachedir\" \\\n\t\t\t\t&& echo \"$cache_id_line\"$'\\n'\"$output\" > \"$cachefile\") 2> /dev/null\n\t\t\techo \"$output\"\n\t\tfi\n\tfi\n}\n\ncomplete -F __bundle -o bashdefault -o default bundle\n# vim: ai ft=sh sw=4 sts=4 et\n"
  },
  {
    "path": "completion/available/capistrano.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"capistrano - remote server automation and deployment tool for Ruby\"\ngroup \"deployment\"\nurl \"https://capistranorb.com/\"\n\n# Bash completion support for Capistrano.\n\nexport COMP_WORDBREAKS=${COMP_WORDBREAKS/\\:/}\n\n_capcomplete() {\n\tif [ -f Capfile ]; then\n\t\t# shellcheck disable=SC2012\n\t\trecent=$(ls -t .cap_tasks~ Capfile ./**/*.cap 2> /dev/null | head -n 1)\n\t\tif [[ $recent != '.cap_tasks~' ]]; then\n\t\t\tif cap --version | grep -q 'Capistrano v2.'; then\n\t\t\t\t# Capistrano 2.x\n\t\t\t\tcap --tool --verbose --tasks | cut -d \" \" -f 2 > .cap_tasks~\n\t\t\telse\n\t\t\t\t# Capistrano 3.x\n\t\t\t\tcap --all --tasks | cut -d \" \" -f 2 > .cap_tasks~\n\t\t\tfi\n\t\tfi\n\t\t# shellcheck disable=SC2207\n\t\tCOMPREPLY=($(compgen -W \"$(cat .cap_tasks~)\" -- \"${COMP_WORDS[COMP_CWORD]}\"))\n\t\treturn 0\n\tfi\n}\n\ncomplete -o default -o nospace -F _capcomplete cap\n"
  },
  {
    "path": "completion/available/cargo.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"cargo (Rust package manager) completion\"\n\n# Make sure cargo is installed\n_bash-it-completion-helper-necessary rustup cargo || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient cargo || return\n\neval \"$(rustup completions bash cargo)\"\n"
  },
  {
    "path": "completion/available/composer.completion.bash",
    "content": "# shellcheck shell=bash\ncite \"about-completion\"\nabout-completion \"composer completion\"\ngroup \"php\"\nurl \"https://getcomposer.org/\"\n\nfunction __composer_completion() {\n\tlocal cur coms opts com words\n\tCOMPREPLY=()\n\t_get_comp_words_by_ref -n : cur words\n\n\t# lookup for command\n\tfor word in \"${words[@]:1}\"; do\n\t\tif [[ \"${word}\" != -* ]]; then\n\t\t\tcom=\"${word}\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\t# completing for an option\n\tif [[ ${cur} == --* ]]; then\n\t\topts=\"--help --quiet --verbose --version --ansi --no-ansi --no-interaction --profile --no-plugins --working-dir\"\n\n\t\tcase \"${com}\" in\n\t\t\tabout)\n\t\t\t\topts=\"${opts} \"\n\t\t\t\t;;\n\t\t\tarchive)\n\t\t\t\topts=\"${opts} --format --dir --file\"\n\t\t\t\t;;\n\t\t\tbrowse)\n\t\t\t\topts=\"${opts} --homepage --show\"\n\t\t\t\t;;\n\t\t\tclear-cache)\n\t\t\t\topts=\"${opts} \"\n\t\t\t\t;;\n\t\t\tconfig)\n\t\t\t\topts=\"${opts} --global --editor --auth --unset --list --file --absolute\"\n\t\t\t\t;;\n\t\t\tcreate-project)\n\t\t\t\topts=\"${opts} --stability --prefer-source --prefer-dist --repository --repository-url --dev --no-dev --no-custom-installers --no-scripts --no-progress --no-secure-http --keep-vcs --no-install --ignore-platform-reqs\"\n\t\t\t\t;;\n\t\t\tdepends)\n\t\t\t\topts=\"${opts} --recursive --tree\"\n\t\t\t\t;;\n\t\t\tdiagnose)\n\t\t\t\topts=\"${opts} \"\n\t\t\t\t;;\n\t\t\tdump-autoload)\n\t\t\t\topts=\"${opts} --no-scripts --optimize --classmap-authoritative --apcu --no-dev\"\n\t\t\t\t;;\n\t\t\texec)\n\t\t\t\topts=\"${opts} --list\"\n\t\t\t\t;;\n\t\t\tglobal)\n\t\t\t\topts=\"${opts} \"\n\t\t\t\t;;\n\t\t\thelp)\n\t\t\t\topts=\"${opts} --xml --format --raw\"\n\t\t\t\t;;\n\t\t\tinit)\n\t\t\t\topts=\"${opts} --name --description --author --type --homepage --require --require-dev --stability --license --repository\"\n\t\t\t\t;;\n\t\t\tinstall)\n\t\t\t\topts=\"${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --no-custom-installers --no-autoloader --no-scripts --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --apcu-autoloader --ignore-platform-reqs\"\n\t\t\t\t;;\n\t\t\tlicenses)\n\t\t\t\topts=\"${opts} --format --no-dev\"\n\t\t\t\t;;\n\t\t\tlist)\n\t\t\t\topts=\"${opts} --xml --raw --format\"\n\t\t\t\t;;\n\t\t\toutdated)\n\t\t\t\topts=\"${opts} --outdated --all --direct --strict\"\n\t\t\t\t;;\n\t\t\tprohibits)\n\t\t\t\topts=\"${opts} --recursive --tree\"\n\t\t\t\t;;\n\t\t\tremove)\n\t\t\t\topts=\"${opts} --dev --no-progress --no-update --no-scripts --update-no-dev --update-with-dependencies --no-update-with-dependencies --ignore-platform-reqs --optimize-autoloader --classmap-authoritative --apcu-autoloader\"\n\t\t\t\t;;\n\t\t\trequire)\n\t\t\t\topts=\"${opts} --dev --prefer-source --prefer-dist --no-progress --no-suggest --no-update --no-scripts --update-no-dev --update-with-dependencies --ignore-platform-reqs --prefer-stable --prefer-lowest --sort-packages --optimize-autoloader --classmap-authoritative --apcu-autoloader\"\n\t\t\t\t;;\n\t\t\trun-script)\n\t\t\t\topts=\"${opts} --timeout --dev --no-dev --list\"\n\t\t\t\t;;\n\t\t\tsearch)\n\t\t\t\topts=\"${opts} --only-name --type\"\n\t\t\t\t;;\n\t\t\tself-update)\n\t\t\t\topts=\"${opts} --rollback --clean-backups --no-progress --update-keys --stable --preview --snapshot\"\n\t\t\t\t;;\n\t\t\tshow)\n\t\t\t\topts=\"${opts} --all --installed --platform --available --self --name-only --path --tree --latest --outdated --minor-only --direct --strict\"\n\t\t\t\t;;\n\t\t\tstatus)\n\t\t\t\topts=\"${opts} \"\n\t\t\t\t;;\n\t\t\tsuggests)\n\t\t\t\topts=\"${opts} --by-package --by-suggestion --no-dev\"\n\t\t\t\t;;\n\t\t\tupdate)\n\t\t\t\topts=\"${opts} --prefer-source --prefer-dist --dry-run --dev --no-dev --lock --no-custom-installers --no-autoloader --no-scripts --no-progress --no-suggest --with-dependencies --optimize-autoloader --classmap-authoritative --apcu-autoloader --ignore-platform-reqs --prefer-stable --prefer-lowest --interactive --root-reqs\"\n\t\t\t\t;;\n\t\t\tvalidate)\n\t\t\t\topts=\"${opts} --no-check-all --no-check-lock --no-check-publish --with-dependencies --strict\"\n\t\t\t\t;;\n\n\t\tesac\n\n\t\t# shellcheck disable=SC2207\n\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t__ltrim_colon_completions \"${cur}\"\n\n\t\treturn 0\n\tfi\n\n\t# completing for a command\n\tif [[ \"${cur}\" == \"${com}\" ]]; then\n\t\tcoms=\"about archive browse clear-cache config create-project depends diagnose dump-autoload exec global help init install licenses list outdated prohibits remove require run-script search self-update show status suggests update validate\"\n\n\t\t# shellcheck disable=SC2207\n\t\tCOMPREPLY=($(compgen -W \"${coms}\" -- \"${cur}\"))\n\t\t__ltrim_colon_completions \"${cur}\"\n\n\t\treturn 0\n\tfi\n}\n\ncomplete -o default -F __composer_completion composer\n"
  },
  {
    "path": "completion/available/conda.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"conda completion\"\n\nif _command_exists conda; then\n\tif _command_exists register-python-argcomplete; then\n\t\teval \"$(register-python-argcomplete conda)\"\n\telse\n\t\t_log_warning \"Argcomplete not found. Please run 'conda install argcomplete'\"\n\tfi\nfi\n"
  },
  {
    "path": "completion/available/consul.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"Hashicorp consul completion\"\n\n# Make sure consul is installed\n_bash-it-completion-helper-necessary consul || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient consul || return\n\ncomplete -C consul consul\n"
  },
  {
    "path": "completion/available/crystal.completion.bash",
    "content": "# shellcheck shell=bash\n\n_log_warning 'Bash completion for \"crystal\" is now covered by \"system\".'\n_disable-completion \"crystal\"\n"
  },
  {
    "path": "completion/available/dart.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"dart - programming language optimized for client-side development\"\ngroup \"mobile\"\nurl \"https://dart.dev/\"\n\n__dart_completion() {\n\t# shellcheck disable=SC2155\n\tlocal prev=$(_get_pword)\n\t# shellcheck disable=SC2155\n\tlocal curr=$(_get_cword)\n\n\tlocal HELP=\"--help -h\"\n\tlocal VERBOSE=\"-v --verbose\"\n\n\tcase $prev in\n\t\tanalyze)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP --fatal-infos --no-fatal-warnings --fatal-warnings\" -- \"$curr\"))\n\t\t\t;;\n\t\tcompile)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP aot-snapshot exe js jit-snapshot kernel\" -- \"$curr\"))\n\t\t\t;;\n\t\tcreate)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP --template -t --no-pub --pub --force\" -- \"$curr\"))\n\t\t\t;;\n\t\t-t | --template)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"console-simple console-full package-simple web-simple\" -- \"$curr\"))\n\t\t\t;;\n\t\tformat)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP $VERBOSE -o --output --fix -l --line-length\" -- \"$curr\"))\n\t\t\t;;\n\t\tpub)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP $VERBOSE --version --no-trace --trace --verbosity cache deps downgrade get global logout outdated publish run upgrade uploader version\" -- \"$curr\"))\n\t\t\t;;\n\t\trun)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP --observe --enable-vm-service --no-pause-isolates-on-exit --no-pause-isolates-on-unhandled-exceptions --no-warn-on-pause-with-no-debugger --pause-isolates-on-exit --pause-isolates-on-unhandled-exceptions --warn-on-pause-with-no-debugger\" -- \"$curr\"))\n\t\t\t;;\n\t\tdart)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$HELP $VERBOSE --version --enable-analytics --disable-analytics help analyze compile create format pub run test\" -- \"$curr\"))\n\t\t\t;;\n\tesac\n}\n\ncomplete -F __dart_completion dart\n"
  },
  {
    "path": "completion/available/defaults.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1090\n\nif [[ -s \"${BASH_IT?}/vendor/github.com/gaelicWizard/bash-progcomp/defaults.completion.bash\" ]]; then\n\t# shellcheck source-path=SCRIPTDIR/../../vendor/github.com/gaelicWizard/bash-progcomp\n\tsource \"${BASH_IT?}/vendor/github.com/gaelicWizard/bash-progcomp/defaults.completion.bash\"\nfi\n"
  },
  {
    "path": "completion/available/dirs.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"Bash completion support for the 'dirs' plugin (commands G, R).\"\n\nfunction _dirs-complete() {\n\t# parse all defined shortcuts ${BASH_IT_DIRS_BKS}\n\tif [[ -s \"${BASH_IT_DIRS_BKS:-/dev/null}\" ]]; then\n\t\tIFS=$'\\n' read -d '' -ra COMPREPLY < <(grep -v '^#' \"${BASH_IT_DIRS_BKS?}\" | sed -e 's/\\(.*\\)=.*/\\1/')\n\tfi\n\n\treturn 0\n}\n\ncomplete -o default -o nospace -F _dirs-complete -X '!&*' G R\n"
  },
  {
    "path": "completion/available/django.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"django completion\"\n# shellcheck disable=SC1090\nsource \"${BASH_IT}\"/vendor/github.com/django/django/extras/django_bash_completion\n"
  },
  {
    "path": "completion/available/dmidecode.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure dmidecode is installed\n_bash-it-completion-helper-necessary dmidecode || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient dmidecode || return\n\nfunction _dmidecode() {\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\tcase $prev in\n\t\t-s | --string | -t | --type)\n\t\t\tOPTS=$(dmidecode \"$prev\" 2>&1 | grep -E '^ ' | sed 's/ *//g')\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=(\"${OPTS[@]}\")\n\t\t\t;;\n\t\tdmidecode)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=(\"-d\" \"--dev-mem\" \"-h\" \"--help\" \"-q\" \"--quiet\" \"-s\" \"--string\" \"-t\" \"--type\" \"-H\" \"--handle\" \"-u\" \"--dump\" \"-dump-bin\" \"--from-dump\" \"--no-sysfs\" \"--oem-string\" \"-V\" \"--version\")\n\t\t\t;;\n\tesac\n}\n\ncomplete -F _dmidecode -X '!&*' dmidecode\n"
  },
  {
    "path": "completion/available/docker-compose.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2207\n\ncite \"about-completion\"\nabout-completion \"docker-compose - tool for defining and running multi-container Docker applications\"\ngroup \"docker\"\nurl \"https://docs.docker.com/compose/\"\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Copyright (c) 2014 Docker, Inc\n\n# bash completion for docker-compose\n#\n# This work is based on the completion for the docker command.\n#\n# This script provides completion of:\n#  - commands and their options\n#  - service names\n#  - filepaths\n#\n# To enable the completions either:\n#  - place this file in /etc/bash_completion.d\n#  or\n#  - copy this file to e.g. ~/.docker-compose-completion.sh and add the line\n#    below to your .bashrc after bash completion features are loaded\n#    . ~/.docker-compose-completion.sh\n\n__docker_compose_previous_extglob_setting=$(shopt -p extglob)\nshopt -s extglob\n\n__docker_compose_q() {\n\tdocker-compose 2> /dev/null \"${top_level_options[@]}\" \"$@\"\n}\n\n# Transforms a multiline list of strings into a single line string\n# with the words separated by \"|\".\n__docker_compose_to_alternatives() {\n\tlocal parts=(\"$1\")\n\tlocal IFS='|'\n\techo \"${parts[*]}\"\n}\n\n# Transforms a multiline list of options into an extglob pattern\n# suitable for use in case statements.\n__docker_compose_to_extglob() {\n\tlocal extglob\n\textglob=$(__docker_compose_to_alternatives \"$1\")\n\techo \"@($extglob)\"\n}\n\n# Determines whether the option passed as the first argument exist on\n# the commandline. The option may be a pattern, e.g. `--force|-f`.\n__docker_compose_has_option() {\n\tlocal pattern=\"$1\"\n\tfor ((i = 2; i < cword; ++i)); do\n\t\tif [[ ${words[$i]} =~ ^($pattern)$ ]]; then\n\t\t\treturn 0\n\t\tfi\n\tdone\n\treturn 1\n}\n\n# Returns `key` if we are currently completing the value of a map option (`key=value`)\n# which matches the extglob passed in as an argument.\n# This function is needed for key-specific completions.\n__docker_compose_map_key_of_current_option() {\n\tlocal glob=\"$1\"\n\n\tlocal key glob_pos\n\tif [ \"$cur\" = \"=\" ]; then # key= case\n\t\tkey=\"$prev\"\n\t\tglob_pos=$((cword - 2))\n\telif [[ $cur == *=* ]]; then # key=value case (OSX)\n\t\tkey=${cur%=*}\n\t\tglob_pos=$((cword - 1))\n\telif [ \"$prev\" = \"=\" ]; then\n\t\tkey=${words[$cword - 2]} # key=value case\n\t\tglob_pos=$((cword - 3))\n\telse\n\t\treturn\n\tfi\n\n\t[ \"${words[$glob_pos]}\" = \"=\" ] && ((glob_pos--)) # --option=key=value syntax\n\n\t[[ ${words[$glob_pos]} == @($glob) ]] && echo \"$key\"\n}\n\n# suppress trailing whitespace\n__docker_compose_nospace() {\n\t# compopt is not available in ancient bash versions\n\ttype compopt &> /dev/null && compopt -o nospace\n}\n\n# Outputs a list of all defined services, regardless of their running state.\n# Arguments for `docker-compose ps` may be passed in order to filter the service list,\n# e.g. `status=running`.\n__docker_compose_services() {\n\t__docker_compose_q ps --services \"$@\"\n}\n\n# Applies completion of services based on the current value of `$cur`.\n# Arguments for `docker-compose ps` may be passed in order to filter the service list,\n# see `__docker_compose_services`.\n__docker_compose_complete_services() {\n\tCOMPREPLY=($(compgen -W \"$(__docker_compose_services \"$@\")\" -- \"$cur\"))\n}\n\n# The services for which at least one running container exists\n__docker_compose_complete_running_services() {\n\tlocal names\n\tnames=$(__docker_compose_services --filter status=running)\n\tCOMPREPLY=($(compgen -W \"$names\" -- \"$cur\"))\n}\n\n_docker_compose_build() {\n\tcase \"$prev\" in\n\t\t--build-arg)\n\t\t\tCOMPREPLY=($(compgen -e -- \"$cur\"))\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--memory | -m)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--build-arg --compress --force-rm --help --memory -m --no-cache --no-rm --pull --parallel -q --quiet\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter source=build\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_bundle() {\n\tcase \"$prev\" in\n\t\t--output | -o)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tCOMPREPLY=($(compgen -W \"--push-images --help --output -o\" -- \"$cur\"))\n}\n\n_docker_compose_config() {\n\tcase \"$prev\" in\n\t\t--hash)\n\t\t\tif [[ $cur == \\\\* ]]; then\n\t\t\t\tCOMPREPLY=('\\*')\n\t\t\telse\n\t\t\t\tCOMPREPLY=($(compgen -W \"$(__docker_compose_services) \\\\\\* \" -- \"$cur\"))\n\t\t\tfi\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tCOMPREPLY=($(compgen -W \"--hash --help --quiet -q --resolve-image-digests --services --volumes\" -- \"$cur\"))\n}\n\n_docker_compose_create() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--build --force-recreate --help --no-build --no-recreate\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_docker_compose() {\n\tcase \"$prev\" in\n\t\t--tlscacert | --tlscert | --tlskey)\n\t\t\t_filedir\n\t\t\treturn\n\t\t\t;;\n\t\t--file | -f)\n\t\t\t_filedir \"y?(a)ml\"\n\t\t\treturn\n\t\t\t;;\n\t\t--log-level)\n\t\t\tCOMPREPLY=($(compgen -W \"debug info warning error critical\" -- \"$cur\"))\n\t\t\treturn\n\t\t\t;;\n\t\t--project-directory)\n\t\t\t_filedir -d\n\t\t\treturn\n\t\t\t;;\n\t\t\"$(__docker_compose_to_extglob \"$daemon_options_with_args\")\")\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"$daemon_boolean_options $daemon_options_with_args $top_level_options_with_args --help -h --no-ansi --verbose --version -v\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_down() {\n\tcase \"$prev\" in\n\t\t--rmi)\n\t\t\tCOMPREPLY=($(compgen -W \"all local\" -- \"$cur\"))\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout | -t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --rmi --timeout -t --volumes -v --remove-orphans\" -- \"$cur\"))\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_events() {\n\tcase \"$prev\" in\n\t\t--json)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --json\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_exec() {\n\tcase \"$prev\" in\n\t\t--index | --user | -u | --workdir | -w)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"-d --detach --help --index --privileged -T --user -u --workdir -w\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_help() {\n\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n}\n\n_docker_compose_images() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --quiet -q\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_kill() {\n\tcase \"$prev\" in\n\t\t-s)\n\t\t\tCOMPREPLY=($(compgen -W \"SIGHUP SIGINT SIGKILL SIGUSR1 SIGUSR2\" -- \"$(echo \"$cur\" | tr '[:lower:]' '[:upper:]')\"))\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help -s\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_logs() {\n\tcase \"$prev\" in\n\t\t--tail)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--follow -f --help --no-color --tail --timestamps -t\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_pause() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_port() {\n\tcase \"$prev\" in\n\t\t--protocol)\n\t\t\tCOMPREPLY=($(compgen -W \"tcp udp\" -- \"$cur\"))\n\t\t\treturn\n\t\t\t;;\n\t\t--index)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --index --protocol\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_ps() {\n\tlocal key\n\tkey=$(__docker_compose_map_key_of_current_option '--filter')\n\tcase \"$key\" in\n\t\tsource)\n\t\t\tCOMPREPLY=($(compgen -W \"build image\" -- \"${cur##*=}\"))\n\t\t\treturn\n\t\t\t;;\n\t\tstatus)\n\t\t\tCOMPREPLY=($(compgen -W \"paused restarting running stopped\" -- \"${cur##*=}\"))\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$prev\" in\n\t\t--filter)\n\t\t\tCOMPREPLY=($(compgen -W \"source status\" -S \"=\" -- \"$cur\"))\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--all -a --filter --help --quiet -q --services\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_pull() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --ignore-pull-failures --include-deps --no-parallel --quiet -q\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter source=image\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_push() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --ignore-push-failures\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_restart() {\n\tcase \"$prev\" in\n\t\t--timeout | -t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --timeout -t\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_rm() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--force -f --help --stop -s -v\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\tif __docker_compose_has_option \"--stop|-s\"; then\n\t\t\t\t__docker_compose_complete_services\n\t\t\telse\n\t\t\t\t__docker_compose_complete_services --filter status=stopped\n\t\t\tfi\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_run() {\n\tcase \"$prev\" in\n\t\t-e)\n\t\t\tCOMPREPLY=($(compgen -e -- \"$cur\"))\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--entrypoint | --label | -l | --name | --user | -u | --volume | -v | --workdir | -w)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--detach -d --entrypoint -e --help --label -l --name --no-deps --publish -p --rm --service-ports -T --use-aliases --user -u --volume -v --workdir -w\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_scale() {\n\tcase \"$prev\" in\n\t\t=)\n\t\t\tCOMPREPLY=(\"$cur\")\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout | -t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --timeout -t\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -S \"=\" -W \"$(__docker_compose_services)\" -- \"$cur\"))\n\t\t\t__docker_compose_nospace\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_start() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter status=stopped\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_stop() {\n\tcase \"$prev\" in\n\t\t--timeout | -t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help --timeout -t\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_top() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_running_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_unpause() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--help\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services --filter status=paused\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_up() {\n\tcase \"$prev\" in\n\t\t=)\n\t\t\tCOMPREPLY=(\"$cur\")\n\t\t\treturn\n\t\t\t;;\n\t\t--exit-code-from)\n\t\t\t__docker_compose_complete_services\n\t\t\treturn\n\t\t\t;;\n\t\t--scale)\n\t\t\tCOMPREPLY=($(compgen -S \"=\" -W \"$(__docker_compose_services)\" -- \"$cur\"))\n\t\t\t__docker_compose_nospace\n\t\t\treturn\n\t\t\t;;\n\t\t--timeout | -t)\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--abort-on-container-exit --always-recreate-deps --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\t__docker_compose_complete_services\n\t\t\t;;\n\tesac\n}\n\n_docker_compose_version() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"--short\" -- \"$cur\"))\n\t\t\t;;\n\tesac\n}\n\n_docker_compose() {\n\tlocal previous_extglob_setting\n\tprevious_extglob_setting=$(shopt -p extglob)\n\tshopt -s extglob\n\n\tlocal commands=(\n\t\tbuild\n\t\tbundle\n\t\tconfig\n\t\tcreate\n\t\tdown\n\t\tevents\n\t\texec\n\t\thelp\n\t\timages\n\t\tkill\n\t\tlogs\n\t\tpause\n\t\tport\n\t\tps\n\t\tpull\n\t\tpush\n\t\trestart\n\t\trm\n\t\trun\n\t\tscale\n\t\tstart\n\t\tstop\n\t\ttop\n\t\tunpause\n\t\tup\n\t\tversion\n\t)\n\n\t# Options for the docker daemon that have to be passed to secondary calls to\n\t# docker-compose executed by this script.\n\tlocal daemon_boolean_options=\"\n\t\t--skip-hostname-check\n\t\t--tls\n\t\t--tlsverify\n\t\"\n\tlocal daemon_options_with_args=\"\n\t\t--file -f\n\t\t--host -H\n\t\t--project-directory\n\t\t--project-name -p\n\t\t--tlscacert\n\t\t--tlscert\n\t\t--tlskey\n\t\"\n\n\t# These options are require special treatment when searching the command.\n\tlocal top_level_options_with_args=\"\n\t\t--log-level\n\t\"\n\n\tCOMPREPLY=()\n\tlocal cur prev words cword\n\t_get_comp_words_by_ref -n : cur prev words cword\n\n\t# search subcommand and invoke its handler.\n\t# special treatment of some top-level options\n\tlocal command='docker_compose'\n\tlocal top_level_options=()\n\tlocal counter=1\n\n\twhile [ $counter -lt \"$cword\" ]; do\n\t\tcase \"${words[$counter]}\" in\n\t\t\t\"$(__docker_compose_to_extglob \"$daemon_boolean_options\")\")\n\t\t\t\tlocal opt=${words[counter]}\n\t\t\t\ttop_level_options+=(\"$opt\")\n\t\t\t\t;;\n\t\t\t\"$(__docker_compose_to_extglob \"$daemon_options_with_args\")\")\n\t\t\t\tlocal opt=${words[counter]}\n\t\t\t\tlocal arg=${words[++counter]}\n\t\t\t\ttop_level_options+=(\"$opt\" \"$arg\")\n\t\t\t\t;;\n\t\t\t\"$(__docker_compose_to_extglob \"$top_level_options_with_args\")\")\n\t\t\t\t((counter++))\n\t\t\t\t;;\n\t\t\t-*) ;;\n\n\t\t\t*)\n\t\t\t\tcommand=\"${words[$counter]}\"\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\t\t((counter++))\n\tdone\n\n\tlocal completions_func=_docker_compose_${command//-/_}\n\t_is_function \"$completions_func\" && $completions_func\n\n\teval \"$previous_extglob_setting\"\n\treturn 0\n}\n\neval \"$__docker_compose_previous_extglob_setting\"\nunset __docker_compose_previous_extglob_setting\n\ncomplete -F _docker_compose docker-compose docker-compose.exe\n"
  },
  {
    "path": "completion/available/docker-machine.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"docker-machine - deprecated tool for provisioning Docker hosts (DEPRECATED)\"\ngroup \"docker\"\nurl \"https://github.com/docker/machine\"\n\n_log_warning '\"docker-machine\" is now deprecated, and as such the bash completion for it is also deprecated.\nPlease disable this completion.'\n"
  },
  {
    "path": "completion/available/docker.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"docker completion\"\n\n# Make sure docker is installed\n_bash-it-completion-helper-necessary docker || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient docker || return\n\n_docker_bash_completion_paths=(\n\t# MacOS App\n\t'/Applications/Docker.app/Contents/Resources/etc/docker.bash-completion'\n\t# Command Line\n\t'/usr/share/bash-completion/completions/docker'\n)\n\n# Load the first completion file found\n_docker_bash_completion_found=false\nfor _comp_path in \"${_docker_bash_completion_paths[@]}\"; do\n\tif [[ -r \"$_comp_path\" ]]; then\n\t\t_docker_bash_completion_found=true\n\t\t# shellcheck disable=SC1090\n\t\tsource \"$_comp_path\"\n\t\tbreak\n\tfi\ndone\n\n# Cleanup\nif [[ \"${_docker_bash_completion_found}\" == false ]]; then\n\t_log_warning \"no completion files found - please try enabling the 'system' completion instead.\"\nfi\nunset \"${!_docker_bash_completion@}\"\n"
  },
  {
    "path": "completion/available/dotnet.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"bash parameter completion for the dotnet CLI\"\n# see https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#bash\n\nfunction _dotnet_bash_complete() {\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\" IFS=$'\\n'\n\tlocal candidates\n\n\tread -d '' -ra candidates < <(dotnet complete --position \"${COMP_POINT}\" \"${COMP_LINE}\" 2> /dev/null)\n\n\tread -d '' -ra COMPREPLY < <(compgen -W \"${candidates[*]:-}\" -- \"$cur\")\n}\n\ncomplete -f -F _dotnet_bash_complete dotnet\n"
  },
  {
    "path": "completion/available/drush.completion.bash",
    "content": "# shellcheck shell=bash\n_log_warning 'Bash completion for \"drush\" is now deprecated, as it used code with incompatible license.\nPlease disable this completion and use the instructions from \"drush\" developers instead.'\n_disable-completion \"drush\"\n"
  },
  {
    "path": "completion/available/export.completion.bash",
    "content": "# shellcheck shell=bash\n\n_log_warning 'Bash completion for \"export\" is now covered by \"system\".'\n_disable-completion \"export\"\n"
  },
  {
    "path": "completion/available/fabric.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"fabric - Python library and CLI tool for streamlining SSH deployments\"\ngroup \"deployment\"\nurl \"https://www.fabfile.org/\"\n\n# Bash completion support for Fabric (http://fabfile.org/)\n#\n#\n# Copyright (C) 2011 by Konstantin Bakulin\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n#\n# Thanks to:\n# - Adam Vandenberg,\n#   https://github.com/adamv/dotfiles/blob/master/completion_scripts/fab_completion.bash\n#\n# - Enrico Batista da Luz,\n#   https://github.com/ricobl/dotfiles/blob/master/bin/fab_bash_completion\n#\n\n# Use cache files for fab tasks or not.\n# If set to \"false\" command \"fab --shortlist\" will be executed every time.\nexport FAB_COMPLETION_CACHE_TASKS=true\n\n# File name where tasks cache will be stored (in current dir).\nexport FAB_COMPLETION_CACHED_TASKS_FILENAME=\".fab_tasks~\"\n\n# Set command to get time of last file modification as seconds since Epoch\ncase \"$OSTYPE\" in\n\t'darwin'* | 'freebsd'*)\n\t\t__FAB_COMPLETION_MTIME_COMMAND=(stat -f '%m')\n\t\t;;\n\t*)\n\t\t__FAB_COMPLETION_MTIME_COMMAND=(stat -c '%Y')\n\t\t;;\nesac\n\n#\n# Get time of last fab cache file modification as seconds since Epoch\n#\nfunction __fab_chache_mtime() {\n\t\"${__FAB_COMPLETION_MTIME_COMMAND[@]}\" \\\n\t\t$FAB_COMPLETION_CACHED_TASKS_FILENAME | xargs -n 1 expr\n}\n\n#\n# Get time of last fabfile file/module modification as seconds since Epoch\n#\nfunction __fab_fabfile_mtime() {\n\tlocal f=\"fabfile\"\n\tif [[ -e \"$f.py\" ]]; then\n\t\t\"${__FAB_COMPLETION_MTIME_COMMAND[@]}\" \"$f.py\" | xargs -n 1 expr\n\telse\n\t\t# Suppose that it's a fabfile dir\n\t\t# shellcheck disable=SC2038\n\t\tfind \"$f\"/*.py -exec \"${__FAB_COMPLETION_MTIME_COMMAND[@]}\" {} + \\\n\t\t\t| xargs -n 1 expr | sort -n -r | head -1\n\tfi\n}\n\n#\n# Completion for \"fab\" command\n#\nfunction __fab_completion() {\n\t# Return if \"fab\" command doesn't exists\n\t[[ -e $(which fab 2> /dev/null) ]] || return 0\n\n\t# Variables to hold the current word and possible matches\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tlocal opts\n\n\t# Generate possible matches and store them in variable \"opts\"\n\tcase \"${cur}\" in\n\t\t-*)\n\t\t\tif [[ -z \"${__FAB_COMPLETION_LONG_OPT}\" ]]; then\n\t\t\t\t__FAB_COMPLETION_LONG_OPT=$(\n\t\t\t\t\tfab --help | grep -E -o \"\\-\\-[A-Za-z_\\-]+\\=?\" | sort -u\n\t\t\t\t)\n\t\t\t\texport __FAB_COMPLETION_LONG_OPT\n\t\t\tfi\n\t\t\topts=\"${__FAB_COMPLETION_LONG_OPT}\"\n\t\t\t;;\n\n\t\t# Completion for short options is not nessary.\n\t\t# It's left here just for history.\n\t\t# -*)\n\t\t#     if [[ -z \"${__FAB_COMPLETION_SHORT_OPT}\" ]]; then\n\t\t#         export __FAB_COMPLETION_SHORT_OPT=$(\n\t\t#             fab --help | grep -E -o \"^ +\\-[A-Za-z_\\]\" | sort -u)\n\t\t#     fi\n\t\t#     opts=\"${__FAB_COMPLETION_SHORT_OPT}\"\n\t\t#     ;;\n\n\t\t*)\n\t\t\t# If \"fabfile.py\" or \"fabfile\" dir with \"__init__.py\" file exists\n\t\t\tlocal f=\"fabfile\"\n\t\t\tif [[ -e \"$f.py\" || (-d \"$f\" && -e \"$f/__init__.py\") ]]; then\n\t\t\t\t# Build a list of the available tasks\n\t\t\t\tif $FAB_COMPLETION_CACHE_TASKS; then\n\t\t\t\t\t# If use cache\n\t\t\t\t\tif [[ ! -s ${FAB_COMPLETION_CACHED_TASKS_FILENAME} ||\n\t\t\t\t\t\t$(__fab_fabfile_mtime) -gt $(__fab_chache_mtime) ]]; then\n\t\t\t\t\t\tfab --shortlist > ${FAB_COMPLETION_CACHED_TASKS_FILENAME} \\\n\t\t\t\t\t\t\t2> /dev/null\n\t\t\t\t\tfi\n\t\t\t\t\topts=$(cat ${FAB_COMPLETION_CACHED_TASKS_FILENAME})\n\t\t\t\telse\n\t\t\t\t\t# Without cache\n\t\t\t\t\topts=$(fab --shortlist 2> /dev/null)\n\t\t\t\tfi\n\t\t\tfi\n\t\t\t;;\n\tesac\n\n\t# Set possible completions\n\tCOMPREPLY=()\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${opts}\" -- \"${cur}\")\n}\ncomplete -o default -o nospace -F __fab_completion fab\n"
  },
  {
    "path": "completion/available/flutter.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"flutter - Google's UI toolkit for building cross-platform applications\"\ngroup \"mobile\"\nurl \"https://flutter.dev\"\n\n# Make sure flutter is installed\n_bash-it-completion-helper-necessary flutter || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient flutter || return\n\neval \"$(flutter bash-completion)\"\n"
  },
  {
    "path": "completion/available/gcloud.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"Google Cloud SDK completion\"\n\nif _command_exists gcloud; then\n\t# get install path\n\tGOOGLE_SDK_ROOT=${GOOGLE_SDK_ROOT:-$(gcloud info --format=\"value(installation.sdk_root)\")}\n\n\t# source all the bash completion file that are available\n\tfor i in \"${GOOGLE_SDK_ROOT}\"/*.bash.inc; do\n\t\t# shellcheck disable=SC1090\n\t\tsource \"$i\"\n\tdone\nfi\n"
  },
  {
    "path": "completion/available/gem.completion.bash",
    "content": "# shellcheck shell=bash\ncite \"about-completion\"\nabout-completion \"gem completion\"\ngroup \"ruby\"\nurl \"https://rubygems.org/\"\n\n__gem_completion() {\n\tlocal cur=${COMP_WORDS[COMP_CWORD]}\n\tlocal prev=${COMP_WORDS[COMP_CWORD - 1]}\n\tcase $prev in\n\t\tinstall)\n\t\t\t# list the remote gems and add to completion\n\t\t\tif [ -z \"$REMOTE_GEMS\" ]; then\n\t\t\t\tread -r -a REMOTE_GEMS <<< \"$(gem list --remote --no-versions | sed 's/\\*\\*\\* REMOTE GEMS \\*\\*\\*//' | tr '\\n' ' ')\"\n\t\t\tfi\n\n\t\t\tlocal cur=${COMP_WORDS[COMP_CWORD]}\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"${REMOTE_GEMS[*]}\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tuninstall)\n\t\t\t# list all local installed gems and add to completion\n\t\t\tread -r -a LOCAL_GEMS <<< \"$(gem list --no-versions | sed 's/\\*\\*\\* LOCAL GEMS \\*\\*\\*//' | tr '\\n' ' ')\"\n\n\t\t\tlocal cur=${COMP_WORDS[COMP_CWORD]}\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"${LOCAL_GEMS[*]}\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\tlocal commands=(build cert check cleanup contents dependency environment fetch generate_index help install list lock outdated owner pristine push query rdoc search server sources specification stale uninstall unpack update which)\n\t# shellcheck disable=SC2207\n\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n}\n\ncomplete -F __gem_completion gem\n"
  },
  {
    "path": "completion/available/git.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"git - distributed version control system\"\ngroup \"version-control\"\nurl \"https://git-scm.com/\"\n\n# Locate and load completions for `git`.\n\n# Make sure git is installed\n_bash-it-completion-helper-necessary git || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient git || return\n\n_git_bash_completion_xcrun_git=\nif _command_exists xcrun; then\n\t_git_bash_completion_xcrun_git=\"$(xcrun --find git)\"\nfi\n_git_bash_completion_paths=(\n\t# Standard locations\n\t\"${GIT_EXE%/*}/../share/git-core/git-completion.bash\"\n\t\"${GIT_EXE%/*}/../share/git-core/contrib/completion/git-completion.bash\"\n\t\"${GIT_EXE%/*}/../etc/bash_completion.d/git-completion.bash\"\n\t# MacOS non-system locations\n\t\"${_git_bash_completion_xcrun_git%/bin/git}/share/git-core/git-completion.bash\"\n)\n\n# Load the first completion file found\n_git_bash_completion_found=false\nfor _comp_path in \"${_git_bash_completion_paths[@]}\"; do\n\tif [[ -r \"$_comp_path\" ]]; then\n\t\t_git_bash_completion_found=true\n\t\t# shellcheck disable=SC1090 # don't follow\n\t\tsource \"$_comp_path\"\n\t\tbreak\n\tfi\ndone\n\n# Cleanup\nif [[ \"${_git_bash_completion_found}\" == false ]]; then\n\t_log_warning \"no completion files found - please try enabling the 'system' completion instead.\"\nfi\nunset \"${!_git_bash_completion@}\"\n"
  },
  {
    "path": "completion/available/git_flow.completion.bash",
    "content": "# shellcheck shell=bash\n#\n# git-flow-completion\n# ===================\n#\n# Bash completion support for [git-flow](http://github.com/nvie/gitflow)\n#\n# The contained completion routines provide support for completing:\n#\n#  * git-flow init and version\n#  * feature, hotfix and release branches\n#  * remote feature branch names (for `git-flow feature track`)\n#\n#\n# Installation\n# ------------\n#\n# To achieve git-flow completion nirvana:\n#\n#  0. Install git-completion.\n#\n#  1. Install this file. Either:\n#\n#     a. Place it in a `bash-completion.d` folder:\n#\n#        * /etc/bash-completion.d\n#        * /usr/local/etc/bash-completion.d\n#        * ~/bash-completion.d\n#\n#     b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in\n#        your .bashrc:\n#\n#            source ~/.git-flow-completion.sh\n#\n#  2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant\n#     $command case in _git:\n#\n#         flow)        _git_flow ;;\n#\n#\n# The Fine Print\n# --------------\n#\n# Copyright (c) 2010 [Justin Hileman](http://justinhileman.com)\n#\n# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)\n\n_git_flow() {\n\tlocal subcommands subcommand\n\tsubcommands=\"init feature release hotfix\"\n\tsubcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tfeature)\n\t\t\t__git_flow_feature\n\t\t\treturn\n\t\t\t;;\n\t\trelease)\n\t\t\t__git_flow_release\n\t\t\treturn\n\t\t\t;;\n\t\thotfix)\n\t\t\t__git_flow_hotfix\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_feature() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish publish track diff rebase checkout pull\"\n\tsubcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tpull)\n\t\t\t__gitcomp \"$(__git_remotes)\"\n\t\t\treturn\n\t\t\t;;\n\t\tcheckout | finish | diff | rebase)\n\t\t\t__gitcomp \"$(__git_flow_list_features)\"\n\t\t\treturn\n\t\t\t;;\n\t\tpublish)\n\t\t\t__gitcomp \"$(comm -23 <(__git_flow_list_features) <(__git_flow_list_remote_features))\"\n\t\t\treturn\n\t\t\t;;\n\t\ttrack)\n\t\t\t__gitcomp \"$(__git_flow_list_remote_features)\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_list_features() {\n\tgit flow feature list 2> /dev/null | tr -d ' |*'\n}\n\n__git_flow_list_remote_features() {\n\tgit branch -r 2> /dev/null | grep \"origin/$(__git_flow_feature_prefix)\" | awk '{ sub(/^origin\\/$(__git_flow_feature_prefix)/, \"\", $1); print }'\n}\n\n__git_flow_feature_prefix() {\n\tgit config gitflow.prefix.feature 2> /dev/null || echo \"feature/\"\n}\n\n__git_flow_release() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish\"\n\tsubcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tfinish)\n\t\t\t__gitcomp \"$(__git_flow_list_releases)\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n\n}\n\n__git_flow_list_releases() {\n\tgit flow release list 2> /dev/null\n}\n\n__git_flow_hotfix() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish\"\n\tsubcommand=\"$(__git_find_subcommand \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tfinish)\n\t\t\t__gitcomp \"$(__git_flow_list_hotfixes)\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_list_hotfixes() {\n\tgit flow hotfix list 2> /dev/null\n}\n\n# temporarily wrap __git_find_on_cmdline() for backwards compatibility\nif ! _command_exists __git_find_subcommand; then\n\talias __git_find_subcommand=__git_find_on_cmdline\nfi\n"
  },
  {
    "path": "completion/available/git_flow_avh.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2154,SC2030,SC2031\n#\n# git-flow-completion\n# ===================\n#\n# Bash completion support for [git-flow (AVH Edition)](http://github.com/petervanderdoes/gitflow)\n#\n# The contained completion routines provide support for completing:\n#\n#  * git-flow init and version\n#  * feature, hotfix and release branches\n#  * remote feature, hotfix and release branch names\n#\n#\n# Installation\n# ------------\n#\n# To achieve git-flow completion nirvana:\n#\n#  0. Install git-completion.\n#\n#  1. Install this file. Either:\n#\n#     a. Place it in a `bash-completion.d` folder:\n#\n#        * /etc/bash-completion.d\n#        * /usr/local/etc/bash-completion.d\n#        * ~/bash-completion.d\n#\n#     b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in\n#        your .bashrc:\n#\n#            source ~/.git-flow-completion.sh\n#\n#  2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant\n#     $command case in _git:\n#\n#         flow)        _git_flow ;;\n#\n#\n# The Fine Print\n# --------------\n#\n# Author:\n# Copyright 2012-2013 Peter van der Does.\n#\n# Original Author:\n# Copyright (c) 2011 [Justin Hileman](http://justinhileman.com)\n#\n# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)\n\n__git_flow_config_file_options=\"\n\t--local --global --system --file=\n\t\"\n\n_git_flow() {\n\tlocal subcommands subcommand\n\tsubcommands=\"init feature release hotfix support help version config finish delete publish rebase\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tinit)\n\t\t\t__git_flow_init\n\t\t\treturn\n\t\t\t;;\n\t\tfeature)\n\t\t\t__git_flow_feature\n\t\t\treturn\n\t\t\t;;\n\t\trelease)\n\t\t\t__git_flow_release\n\t\t\treturn\n\t\t\t;;\n\t\thotfix)\n\t\t\t__git_flow_hotfix\n\t\t\treturn\n\t\t\t;;\n\t\tsupport)\n\t\t\t__git_flow_support\n\t\t\treturn\n\t\t\t;;\n\t\tconfig)\n\t\t\t__git_flow_config\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_init() {\n\tlocal subcommands subcommand\n\tsubcommands=\"help\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\tfi\n\n\tcase \"$cur\" in\n\t\t--*)\n\t\t\t__gitcomp \"\n\t\t\t\t--nodefaults --defaults\n\t\t\t\t--noforce --force\n\t\t\t\t$__git_flow_config_file_options\n\t\t\t\t\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n}\n\n__git_flow_feature() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish publish track diff rebase checkout pull help delete\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tpull)\n\t\t\t__gitcomp_nl \"$(__git_remotes)\"\n\t\t\treturn\n\t\t\t;;\n\t\tcheckout)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\tdelete)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--noforce --force\n\t\t\t\t\t--noremote --remote\n\t\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\tfinish)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\t--norebase --rebase\n\t\t\t\t\t--nopreserve-merges --preserve-merges\n\t\t\t\t\t--nokeep --keep\n\t\t\t\t\t--keepremote\n\t\t\t\t\t--keeplocal\n\t\t\t\t\t--noforce_delete --force_delete\n\t\t\t\t\t--nosquash --squash\n\t\t\t\t\t--no-ff\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\tdiff)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\trebase)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nointeractive --interactive\n\t\t\t\t\t--nopreserve-merges --preserve-merges\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\tpublish)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\ttrack)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'feature')\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_release() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish track publish help delete\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tfinish)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\t--sign\n\t\t\t\t\t--signingkey\n\t\t\t\t\t--message\n\t\t\t\t\t--nomessagefile --messagefile=\n\t\t\t\t\t--nopush --push\n\t\t\t\t\t--nokeep --keep\n\t\t\t\t\t--keepremote\n\t\t\t\t\t--keeplocal\n\t\t\t\t\t--noforce_delete --force_delete\n\t\t\t\t\t--notag --tag\n\t\t\t\t\t--nonobackmerge --nobackmerge\n\t\t\t\t\t--nosquash --squash\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n\t\t\treturn\n\t\t\t;;\n\t\trebase)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nointeractive --interactive\n\t\t\t\t\t--nopreserve-merges --preserve-merges\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n\t\t\treturn\n\t\t\t;;\n\t\tdelete)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--noforce --force\n\t\t\t\t\t--noremote --remote\n\t\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'release')\"\n\t\t\treturn\n\t\t\t;;\n\t\tpublish)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'release')\"\n\t\t\treturn\n\t\t\t;;\n\t\ttrack)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'release')\"\n\t\t\treturn\n\t\t\t;;\n\t\tstart)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n\n}\n\n__git_flow_hotfix() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start finish track publish help delete\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tfinish)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\t--sign\n\t\t\t\t\t--signingkey\n\t\t\t\t\t--message\n\t\t\t\t\t--nomessagefile --messagefile=\n\t\t\t\t\t--nopush --push\n\t\t\t\t\t--nokeep --keep\n\t\t\t\t\t--keepremote\n\t\t\t\t\t--keeplocal\n\t\t\t\t\t--noforce_delete --force_delete\n\t\t\t\t\t--notag --tag\n\t\t\t\t\t--nonobackmerge --nobackmerge\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n\t\t\treturn\n\t\t\t;;\n\t\trebase)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nointeractive --interactive\n\t\t\t\t\t--nopreserve-merges --preserve-merges\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n\t\t\treturn\n\t\t\t;;\n\t\tdelete)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--noforce --force\n\t\t\t\t\t--noremote --remote\n\t\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'hotfix')\"\n\t\t\treturn\n\t\t\t;;\n\t\tpublish)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'hotfix')\"\n\t\t\treturn\n\t\t\t;;\n\t\ttrack)\n\t\t\t__gitcomp_nl \"$(__git_flow_list_branches 'hotfix')\"\n\t\t\treturn\n\t\t\t;;\n\t\tstart)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_support() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list start help\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tstart)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nofetch --fetch\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\treturn\n\t\t\t;;\n\t\trebase)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t--nointeractive --interactive\n\t\t\t\t\t--nopreserve-merges --preserve-merges\n\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches 'support')\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_config() {\n\tlocal subcommands subcommand\n\tsubcommands=\"list set base\"\n\tsubcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\tif [ -z \"$subcommand\" ]; then\n\t\t__gitcomp \"$subcommands\"\n\t\treturn\n\tfi\n\n\tcase \"$subcommand\" in\n\t\tset)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t\t$__git_flow_config_file_options\n\t\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp \"\n\t\t\tmaster develop\n\t\t\tfeature hotfix release support\n\t\t\tversiontagprefix\n\t\t\t\"\n\t\t\treturn\n\t\t\t;;\n\t\tbase)\n\t\t\tcase \"$cur\" in\n\t\t\t\t--*)\n\t\t\t\t\t__gitcomp \"\n\t\t\t\t\t\tset get\n\t\t\t\t\t\"\n\t\t\t\t\treturn\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t__gitcomp_nl \"$(__git_flow_list_local_branches)\"\n\t\t\treturn\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=()\n\t\t\t;;\n\tesac\n}\n\n__git_flow_prefix() {\n\tcase \"$1\" in\n\t\tfeature | release | hotfix | support)\n\t\t\tgit config \"gitflow.prefix.$1\" 2> /dev/null || echo \"$1/\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n}\n\n__git_flow_list_local_branches() {\n\tif [ -n \"$1\" ]; then\n\t\tlocal prefix\n\t\tprefix=\"$(__git_flow_prefix \"$1\")\"\n\t\tgit for-each-ref --shell --format=\"ref=%(refname:short)\" \"refs/heads/$prefix\" \\\n\t\t\t| while read -r entry; do\n\t\t\t\teval \"$entry\"\n\t\t\t\tref=\"${ref#\"$prefix\"}\"\n\t\t\t\techo \"$ref\"\n\t\t\tdone | sort\n\telse\n\t\tgit for-each-ref --format=\"ref=%(refname:short)\" refs/heads/ | sort\n\n\tfi\n}\n\n__git_flow_list_remote_branches() {\n\tlocal prefix origin\n\tprefix=\"$(__git_flow_prefix \"$1\")\"\n\torigin=\"$(git config gitflow.origin 2> /dev/null || echo \"origin\")\"\n\tgit for-each-ref --shell --format='ref=%refname:short)' \"refs/remotes/$origin/$prefix\" \\\n\t\t| while read -r entry; do\n\t\t\teval \"$entry\"\n\t\t\tref=\"${ref##\"$prefix\"}\"\n\t\t\techo \"$ref\"\n\t\tdone | sort\n}\n\n__git_flow_list_branches() {\n\tlocal origin prefix\n\torigin=\"$(git config gitflow.origin 2> /dev/null || echo \"origin\")\"\n\tif [ -n \"$1\" ]; then\n\t\tprefix=\"$(__git_flow_prefix \"$1\")\"\n\t\tgit for-each-ref --shell --format=\"ref=%(refname:short)\" \"refs/heads/$prefix\" \"refs/remotes/$origin/$prefix\" \\\n\t\t\t| while read -r entry; do\n\t\t\t\teval \"$entry\"\n\t\t\t\tref=\"${ref##\"$prefix\"}\"\n\t\t\t\techo \"$ref\"\n\t\t\tdone | sort\n\telse\n\t\tgit for-each-ref --format=\"%(refname:short)\" refs/heads/ \"refs/remotes/$origin\" | sort\n\tfi\n}\n\n# alias __git_find_on_cmdline for backwards compatibility\nif ! _command_exists __git_find_on_cmdline; then\n\talias __git_find_on_cmdline=__git_find_subcommand\nfi\n"
  },
  {
    "path": "completion/available/github-cli.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"GitHub CLI completion\"\n\n# Make sure gh is installed\n_bash-it-completion-helper-necessary gh || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient gh || return\n\neval \"$(gh completion --shell=bash)\"\n"
  },
  {
    "path": "completion/available/go.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"completion for go command using gocomplete\"\n\n# bash completion for go tool\n# https://github.com/posener/complete\n\n# Test `go version` because goenv creates shim scripts that will be found in PATH\n# but do not always resolve to a working install.\nif _command_exists go && go version &> /dev/null; then\n\t# Same idea here, but no need to test a subcommand\n\tif _command_exists gocomplete && gocomplete &> /dev/null; then\n\t\t# finally, apply completion\n\t\tcomplete -C gocomplete go\n\tfi\nfi\n"
  },
  {
    "path": "completion/available/gradle.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"gradle - Java build automation tool using Groovy-based DSL\"\ngroup \"java\"\nurl \"https://gradle.org/\"\n\n# Copyright (c) 2017 Eric Wendelin\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n# the Software without restriction, including without limitation the rights to\n# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\n# of the Software, and to permit persons to whom the Software is furnished to do\n# so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n# Bash breaks words on : by default. Subproject tasks have ':'\n# Avoid inaccurate completions for subproject tasks\nCOMP_WORDBREAKS=\"${COMP_WORDBREAKS//:/}\"\n\nfunction __gradle-set-project-root-dir() {\n\tproject_root_dir=\"$(_bash-it-find-in-ancestor \"settings.gradle\" \"gradlew\")\"\n\treturn \"$?\"\n}\n\n__gradle-init-cache-dir() {\n\tcache_dir=\"$HOME/.gradle/completion\"\n\tmkdir -p \"$cache_dir\"\n}\n\n__gradle-set-build-file() {\n\t# Look for default build script in the settings file (settings.gradle by default)\n\t# Otherwise, default is the file 'build.gradle' in the current directory.\n\tgradle_build_file=\"$project_root_dir/build.gradle\"\n\tif [[ -f \"$project_root_dir/settings.gradle\" ]]; then\n\t\tlocal build_file_name\n\t\tbuild_file_name=$(grep \"^rootProject\\.buildFileName\" \"$project_root_dir/settings.gradle\" \\\n\t\t\t| sed -n -e \"s/rootProject\\.buildFileName = [\\'\\\"]\\(.*\\)[\\'\\\"]/\\1/p\")\n\t\tgradle_build_file=\"$project_root_dir/${build_file_name:-build.gradle}\"\n\tfi\n}\n\n__gradle-set-cache-name() {\n\t# Cache name is constructed from the absolute path of the build file.\n\tcache_name=${gradle_build_file//\"/\"/_}\n}\n\n__gradle-set-files-checksum() {\n\t# Cache MD5 sum of all Gradle scripts and modified timestamps\n\tif _command_exists md5; then\n\t\tgradle_files_checksum=$(md5 -q -s \"$(xargs ls -o < \"$cache_dir/$cache_name\" 2> /dev/null)\")\n\telif _command_exists md5sum; then\n\t\tgradle_files_checksum=$(xargs ls -o < \"$cache_dir/$cache_name\" 2> /dev/null | md5sum | awk '{print $1}')\n\telse\n\t\techo \"Cannot generate completions as neither md5 nor md5sum exist on \\$PATH\"\n\tfi\n}\n\n__gradle-generate-script-cache() {\n\t# Invalidate cache after 3 weeks by default\n\tlocal cache_ttl_mins=${GRADLE_CACHE_TTL_MINUTES:-30240}\n\tlocal script_exclude_pattern=${GRADLE_COMPLETION_EXCLUDE_PATTERN:-\"/(build|integTest|out)/\"}\n\n\tif [[ ! $(find \"$cache_dir/$cache_name\" -mmin \"-$cache_ttl_mins\" 2> /dev/null) ]]; then\n\t\t# Cache all Gradle scripts\n\t\tlocal gradle_build_scripts\n\t\tgradle_build_scripts=$(\n\t\t\tfind \"$project_root_dir\" -type f \\\n\t\t\t\t\\( -name \"*.gradle\" -o -name \"*.gradle.kts\" \\) 2> /dev/null \\\n\t\t\t\t| grep -E -v \"$script_exclude_pattern\"\n\t\t)\n\t\tprintf \"%s\\n\" \"${gradle_build_scripts[@]}\" > \"$cache_dir/$cache_name\"\n\tfi\n}\n\n__gradle-long-options() {\n\tlocal args=\"--build-cache           - Enables the Gradle build cache\n--build-file            - Specifies the build file\n--configure-on-demand   - Only relevant projects are configured\n--console               - Type of console output to generate (plain auto rich)\n--continue              - Continues task execution after a task failure\n--continuous            - Continuous mode. Automatically re-run build after changes\n--daemon                - Use the Gradle Daemon\n--debug                 - Log at the debug level\n--dry-run               - Runs the build with all task actions disabled\n--exclude-task          - Specify a task to be excluded\n--full-stacktrace       - Print out the full (very verbose) stacktrace\n--gradle-user-home      - Specifies the Gradle user home directory\n--gui                   - Launches the Gradle GUI app (Deprecated)\n--help                  - Shows a help message\n--include-build         - Run the build as a composite, including the specified build\n--info                  - Set log level to INFO\n--init-script           - Specifies an initialization script\n--max-workers           - Set the maximum number of workers that Gradle may use\n--no-build-cache        - Do not use the Gradle build cache\n--no-daemon             - Do not use the Gradle Daemon\n--no-rebuild            - Do not rebuild project dependencies\n--no-scan               - Do not create a build scan\n--no-search-upwards     - Do not search in parent directories for a settings.gradle\n--offline               - Build without accessing network resources\n--parallel              - Build projects in parallel\n--profile               - Profile build time and create report\n--project-cache-dir     - Specifies the project-specific cache directory\n--project-dir           - Specifies the start directory for Gradle\n--project-prop          - Sets a project property of the root project\n--quiet                 - Log errors only\n--recompile-scripts     - Forces scripts to be recompiled, bypassing caching\n--refresh-dependencies  - Refresh the state of dependencies\n--rerun-tasks           - Specifies that any task optimization is ignored\n--scan                  - Create a build scan\n--settings-file         - Specifies the settings file\n--stacktrace            - Print out the stacktrace also for user exceptions\n--status                - Print Gradle Daemon status\n--stop                  - Stop all Gradle Daemons\n--system-prop           - Set a system property\n--version               - Prints Gradle version info\n--warn                  - Log warnings and errors only\"\n\tCOMPREPLY=()\n\twhile IFS='' read -r line; do\n\t\tCOMPREPLY+=(\"$line\")\n\tdone < <(compgen -W \"$args\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n}\n\n__gradle-properties() {\n\tlocal args=\"-Dorg.gradle.cache.reserved.mb=   - Reserve Gradle Daemon memory for operations\n-Dorg.gradle.caching=             - Set true to enable Gradle build cache\n-Dorg.gradle.daemon.debug=        - Set true to debug Gradle Daemon\n-Dorg.gradle.daemon.idletimeout=  - Kill Gradle Daemon after # idle millis\n-Dorg.gradle.debug=               - Set true to debug Gradle Client\n-Dorg.gradle.jvmargs=             - Set JVM arguments\n-Dorg.gradle.java.home=           - Set JDK home dir\n-Dorg.gradle.logging.level=       - Set default Gradle log level (quiet warn lifecycle info debug)\n-Dorg.gradle.parallel=            - Set true to enable parallel project builds (incubating)\n-Dorg.gradle.parallel.intra=      - Set true to enable intra-project parallel builds (incubating)\n-Dorg.gradle.workers.max=         - Set the number of workers Gradle is allowed to use\"\n\tCOMPREPLY=()\n\twhile IFS='' read -r line; do\n\t\tCOMPREPLY+=(\"$line\")\n\tdone < <(compgen -W \"$args\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\treturn 0\n}\n\n__gradle-short-options() {\n\tlocal args=\"-?                      - Shows a help message\n-a                      - Do not rebuild project dependencies\n-b                      - Specifies the build file\n-c                      - Specifies the settings file\n-d                      - Log at the debug level\n-g                      - Specifies the Gradle user home directory\n-h                      - Shows a help message\n-i                      - Set log level to INFO\n-m                      - Runs the build with all task actions disabled\n-p                      - Specifies the start directory for Gradle\n-q                      - Log errors only\n-s                      - Print out the stacktrace also for user exceptions\n-t                      - Continuous mode. Automatically re-run build after changes\n-u                      - Do not search in parent directories for a settings.gradle\n-v                      - Prints Gradle version info\n-w                      - Log warnings and errors only\n-x                      - Specify a task to be excluded\n-D                      - Set a system property\n-I                      - Specifies an initialization script\n-P                      - Sets a project property of the root project\n-S                      - Print out the full (very verbose) stacktrace\"\n\tCOMPREPLY=()\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$args\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n}\n\n__gradle-notify-tasks-cache-build() {\n\t# Notify user of cache rebuild\n\techo -e \" (Building completion cache. Please wait)\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\c\"\n\t__gradle-generate-tasks-cache\n\t# Remove \"please wait\" message by writing a bunch of spaces then moving back to the left\n\techo -e \"                                         \\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\b\\c\"\n}\n\n__gradle-generate-tasks-cache() {\n\t__gradle-set-files-checksum\n\n\t# Use Gradle wrapper when it exists.\n\tlocal gradle_cmd=\"gradle\"\n\tif [[ -x \"$project_root_dir/gradlew\" ]]; then\n\t\tgradle_cmd=\"$project_root_dir/gradlew\"\n\tfi\n\n\t# Run gradle to retrieve possible tasks and cache.\n\t# Reuse Gradle Daemon if IDLE but don't start a new one.\n\tlocal gradle_tasks_output\n\tif \"$gradle_cmd\" --status 2> /dev/null | grep -q IDLE; then\n\t\tgradle_tasks_output=\"$(\"$gradle_cmd\" -b \"$gradle_build_file\" --daemon -q tasks --all)\"\n\telse\n\t\tgradle_tasks_output=\"$(\"$gradle_cmd\" -b \"$gradle_build_file\" --no-daemon -q tasks --all)\"\n\tfi\n\tlocal output_line\n\tlocal task_description\n\tlocal -a gradle_all_tasks=()\n\tlocal -a root_tasks=()\n\tlocal -a subproject_tasks=()\n\tfor output_line in $gradle_tasks_output; do\n\t\tif [[ $output_line =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then\n\t\t\ttask_name=\"${BASH_REMATCH[1]}\"\n\t\t\ttask_description=\"${BASH_REMATCH[3]}\"\n\t\t\tgradle_all_tasks+=(\"$task_name  - $task_description\")\n\t\t\t# Completion for subproject tasks with ':' prefix\n\t\t\tif [[ $task_name =~ ^([[:alnum:][:punct:]]+):([[:alnum:]]+) ]]; then\n\t\t\t\tgradle_all_tasks+=(\":$task_name  - $task_description\")\n\t\t\t\tsubproject_tasks+=(\"${BASH_REMATCH[2]}\")\n\t\t\telse\n\t\t\t\troot_tasks+=(\"$task_name\")\n\t\t\tfi\n\t\tfi\n\tdone\n\n\t# subproject tasks can be referenced implicitly from root project\n\tif [[ $GRADLE_COMPLETION_UNQUALIFIED_TASKS == \"true\" ]]; then\n\t\tlocal -a implicit_tasks\n\t\twhile IFS='' read -r line; do\n\t\t\timplicit_tasks+=(\"$line\")\n\t\tdone < <(comm -23 <(printf \"%s\\n\" \"${subproject_tasks[@]}\" | sort) \\\n\t\t\t<(printf \"%s\\n\" \"${root_tasks[@]}\" | sort))\n\t\tfor task in \"${implicit_tasks[@]}\"; do\n\t\t\tgradle_all_tasks+=(\"$task\")\n\t\tdone\n\tfi\n\n\tprintf \"%s\\n\" \"${gradle_all_tasks[@]}\" > \"$cache_dir/$gradle_files_checksum\"\n\techo \"$gradle_files_checksum\" > \"$cache_dir/$cache_name.md5\"\n}\n\n__gradle-completion-init() {\n\tlocal cache_dir cache_name gradle_build_file gradle_files_checksum project_root_dir\n\n\tlocal OLDIFS=\"$IFS\"\n\tlocal IFS=$'\\n'\n\n\t__gradle-init-cache-dir\n\t__gradle-set-project-root-dir\n\t__gradle-set-build-file\n\tif [[ -f $gradle_build_file ]]; then\n\t\t__gradle-set-cache-name\n\t\t__gradle-generate-script-cache\n\t\t__gradle-set-files-checksum\n\t\t__gradle-notify-tasks-cache-build\n\tfi\n\n\tIFS=\"$OLDIFS\"\n\n\treturn 0\n}\n\n_gradle() {\n\tlocal cache_dir cache_name gradle_build_file gradle_files_checksum project_root_dir\n\tlocal cur=${COMP_WORDS[COMP_CWORD]}\n\t# Set bash internal field separator to '\\n'\n\t# This allows us to provide descriptions for options and tasks\n\tlocal OLDIFS=\"$IFS\"\n\tlocal IFS=$'\\n'\n\n\tif [[ ${cur} == --* ]]; then\n\t\t__gradle-long-options\n\telif [[ ${cur} == -D* ]]; then\n\t\t__gradle-properties\n\telif [[ ${cur} == -* ]]; then\n\t\t__gradle-short-options\n\telse\n\t\t__gradle-init-cache-dir\n\t\t__gradle-set-project-root-dir\n\t\t__gradle-set-build-file\n\t\tif [[ -f $gradle_build_file ]]; then\n\t\t\t__gradle-set-cache-name\n\t\t\t__gradle-generate-script-cache\n\t\t\t__gradle-set-files-checksum\n\n\t\t\t# The cache key is md5 sum of all gradle scripts, so it's valid if it exists.\n\t\t\tif [[ -f \"$cache_dir/$cache_name.md5\" ]]; then\n\t\t\t\tlocal cached_checksum\n\t\t\t\tcached_checksum=\"$(cat \"$cache_dir/$cache_name.md5\")\"\n\t\t\t\tlocal -a cached_tasks\n\t\t\t\tif [[ -z $cur ]]; then\n\t\t\t\t\twhile IFS='' read -r line; do\n\t\t\t\t\t\tcached_tasks+=(\"$line\")\n\t\t\t\t\tdone < \"$cache_dir/$cached_checksum\"\n\t\t\t\telse\n\t\t\t\t\twhile IFS='' read -r line; do\n\t\t\t\t\t\tcached_tasks+=(\"$line\")\n\t\t\t\t\tdone < <(grep \"^$cur\" \"$cache_dir/$cached_checksum\")\n\t\t\t\tfi\n\t\t\t\twhile IFS='' read -r line; do\n\t\t\t\t\tCOMPREPLY+=(\"$line\")\n\t\t\t\tdone < <(compgen -W \"${cached_tasks[*]}\" -- \"$cur\")\n\t\t\telse\n\t\t\t\t__gradle-notify-tasks-cache-build\n\t\t\tfi\n\n\t\t\t# Regenerate tasks cache in the background\n\t\t\tif [[ $gradle_files_checksum != \"$(cat \"$cache_dir/$cache_name.md5\")\" ||\n\t\t\t! -f \"$cache_dir/$gradle_files_checksum\" ]]; then\n\t\t\t\t(__gradle-generate-tasks-cache &> /dev/null &)\n\t\t\tfi\n\t\telse\n\t\t\t# Default tasks available outside Gradle projects\n\t\t\tlocal args=\"buildEnvironment     - Displays all buildscript dependencies declared in root project.\ncomponents           - Displays the components produced by root project.\ndependencies         - Displays all dependencies declared in root project.\ndependencyInsight    - Displays the insight into a specific dependency in root project.\ndependentComponents  - Displays the dependent components of components in root project.\nhelp                 - Displays a help message.\ninit                 - Initializes a new Gradle build.\nmodel                - Displays the configuration model of root project.\nprojects             - Displays the sub-projects of root project.\nproperties           - Displays the properties of root project.\ntasks                - Displays the tasks runnable from root project.\nwrapper              - Generates Gradle wrapper files.\"\n\t\t\tCOMPREPLY=()\n\t\t\twhile IFS='' read -r line; do\n\t\t\t\tCOMPREPLY+=(\"$line\")\n\t\t\tdone < <(compgen -W \"${args}\" -- \"${cur}\")\n\t\tfi\n\tfi\n\n\tIFS=\"$OLDIFS\"\n\n\t# Remove description (\"[:space:]\" and after) if only one possibility\n\tif [[ ${#COMPREPLY[*]} -eq 1 ]]; then\n\t\tCOMPREPLY=(\"${COMPREPLY[0]%%  *}\")\n\tfi\n\n\treturn 0\n}\ncomplete -F _gradle gradle\ncomplete -F _gradle gradle.bat\ncomplete -F _gradle gradlew\ncomplete -F _gradle gradlew.bat\ncomplete -F _gradle ./gradlew\ncomplete -F _gradle ./gradlew.bat\n\nif hash gw 2> /dev/null || alias gw > /dev/null 2>&1; then\n\tcomplete -F _gradle gw\nfi\n"
  },
  {
    "path": "completion/available/grunt.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"grunt - JavaScript task runner for automation\"\ngroup \"javascript\"\nurl \"https://gruntjs.com/\"\n\n# grunt-cli\n# http://gruntjs.com/\n#\n# Copyright jQuery Foundation and other contributors, https://jquery.org/\n\n# This software consists of voluntary contributions made by many\n# individuals. For exact contribution history, see the revision history\n# available at https://github.com/gruntjs/grunt .\n\n# The following license applies to all parts of this software except as\n# documented below:\n\n# ====\n\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n# Usage:\n#\n# To enable bash <tab> completion for grunt, add the following line (minus the\n# leading #, which is the bash comment character) to your ~/.bashrc file:\n#\n# eval \"$(grunt --completion=bash)\"\n\n# Search the current directory and all parent directories for a gruntfile.\nfunction _grunt_gruntfile() {\n\tlocal curpath=\"$PWD\"\n\twhile [[ \"$curpath\" ]]; do\n\t\tfor gruntfile in \"$curpath/\"{G,g}runtfile.{js,coffee}; do\n\t\t\tif [[ -e \"$gruntfile\" ]]; then\n\t\t\t\techo \"$gruntfile\"\n\t\t\t\treturn\n\t\t\tfi\n\t\tdone\n\t\tcurpath=\"${curpath%/*}\"\n\tdone\n\treturn 1\n}\n\n# Enable bash autocompletion.\nfunction _grunt_completions() {\n\tlocal cur gruntfile gruntinfo opts compls line\n\t# The currently-being-completed word.\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\t# The current gruntfile, if it exists.\n\tgruntfile=\"$(_grunt_gruntfile)\"\n\t# The current grunt version, available tasks, options, etc.\n\tgruntinfo=\"$(grunt --version --verbose 2> /dev/null)\"\n\t# Options and tasks.\n\topts=\"$(echo \"$gruntinfo\" | awk '/Available options: / {$1=$2=\"\"; print $0}')\"\n\tcompls=\"$(echo \"$gruntinfo\" | awk '/Available tasks: / {$1=$2=\"\"; print $0}')\"\n\t# Only add -- or - options if the user has started typing -\n\t[[ \"$cur\" == -* ]] && compls=\"$compls $opts\"\n\t# Tell complete what stuff to show.\n\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$compls\" -- \"$cur\")\n}\n\ncomplete -o default -F _grunt_completions grunt\n"
  },
  {
    "path": "completion/available/gulp.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"gulp - JavaScript build system and task automation tool\"\ngroup \"javascript\"\nurl \"https://gulpjs.com/\"\n\n# Borrowed from grunt-cli\n# http://gruntjs.com/\n#\n# Copyright jQuery Foundation and other contributors, https://jquery.org/\n\n# This software consists of voluntary contributions made by many\n# individuals. For exact contribution history, see the revision history\n# available at https://github.com/gruntjs/grunt .\n\n# The following license applies to all parts of this software except as\n# documented below:\n\n# ====\n\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n# Usage:\n#\n# To enable bash <tab> completion for gulp, add the following line (minus the\n# leading #, which is the bash comment character) to your ~/.bashrc file:\n#\n# eval \"$(gulp --completion=bash)\"\n# Enable bash autocompletion.\nfunction _gulp_completions() {\n\t# The currently-being-completed word.\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\t#Grab tasks\n\tlocal line compls\n\tcompls=$(gulp --tasks-simple)\n\t# Tell complete what stuff to show.\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$compls\" -- \"$cur\")\n}\ncomplete -o default -F _gulp_completions gulp\n"
  },
  {
    "path": "completion/available/helm.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"helm (Kubernetes Package Manager) completion\"\n\n# Make sure helm is installed\n_bash-it-completion-helper-necessary helm || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient helm || return\n\neval \"$(helm completion bash)\"\n"
  },
  {
    "path": "completion/available/homesick.completion.bash",
    "content": "# shellcheck shell=bash\n_log_warning 'Bash completion for \"homesick\" is now deprecated, as it used unlicensed code.\nPlease disable this completion and use the instructions from \"homesick\" bash completion developers instead.'\n_disable-completion \"homesick\"\n"
  },
  {
    "path": "completion/available/hub.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2154,SC2120\n\ncite \"about-completion\"\nabout-completion \"hub - GitHub command-line wrapper extending git with GitHub features\"\ngroup \"version-control\"\nurl \"https://hub.github.com/\"\n\n# hub tab-completion script for bash.\n# This script complements the completion script that ships with git.\n\n# Copyright (c) 2009 Chris Wanstrath\n\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n# If there is no git tab completion, but we have the _completion loader try to load it\nif ! _is_function _git && _is_function _completion_loader; then\n\t_completion_loader git\nfi\n\n# Check that git tab completion is available and we haven't already set up completion\nif _is_function _git && ! _is_function __git_list_all_commands_without_hub; then\n\t# Duplicate and rename the 'list_all_commands' function\n\teval \"$(declare -f __git_list_all_commands \\\n\t\t| sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')\"\n\n\t# Wrap the 'list_all_commands' function with extra hub commands\n\t__git_list_all_commands() {\n\t\tcat <<- EOF\n\t\t\talias\n\t\t\tpull-request\n\t\t\tpr\n\t\t\tissue\n\t\t\trelease\n\t\t\tfork\n\t\t\tcreate\n\t\t\tdelete\n\t\t\tbrowse\n\t\t\tcompare\n\t\t\tci-status\n\t\t\tsync\n\t\tEOF\n\t\t__git_list_all_commands_without_hub\n\t}\n\n\t# Ensure cached commands are cleared\n\t__git_all_commands=\"\"\n\n\t##########################\n\t# hub command completions\n\t##########################\n\n\t# hub alias [-s] [SHELL]\n\t_git_alias() {\n\t\tlocal i c=2 s=-s sh shells=\"bash zsh sh ksh csh fish\"\n\t\twhile [[ $c -lt $cword ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t-s)\n\t\t\t\t\tunset s\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tfor sh in $shells; do\n\t\t\t\t\t\tif [[ \"$sh\" = \"$i\" ]]; then\n\t\t\t\t\t\t\tunset shells\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\tfi\n\t\t\t\t\tdone\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c++))\n\t\tdone\n\t\t__gitcomp \"$s $shells\"\n\t}\n\n\t# hub browse [-u] [--|[USER/]REPOSITORY] [SUBPAGE]\n\t_git_browse() {\n\t\tlocal i c=2 u=-u repo subpage subpages_\n\t\tsubpages_=\"commits issues tree wiki pulls branches stargazers\n      contributors network network/ graphs graphs/\"\n\t\t#local subpages_network=\"members\"\n\t\t#local subpages_graphs=\"commit-activity code-frequency punch-card\"\n\t\twhile [[ $c -lt $cword ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t-u)\n\t\t\t\t\tunset u\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tif [[ -z \"$repo\" ]]; then\n\t\t\t\t\t\trepo=$i\n\t\t\t\t\telse\n\t\t\t\t\t\tsubpage=$i\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c++))\n\t\tdone\n\t\tif [[ -z \"$repo\" ]]; then\n\t\t\t__gitcomp \"$u -- $(__hub_github_repos '\\p')\"\n\t\telif [[ -z \"$subpage\" ]]; then\n\t\t\tcase \"$cur\" in\n\t\t\t\t*/*)\n\t\t\t\t\tlocal pfx=\"${cur%/*}\" cur_=\"${cur#*/}\"\n\t\t\t\t\tlocal subpages_var=\"subpages_$pfx\"\n\t\t\t\t\t__gitcomp \"${!subpages_var}\" \"$pfx/\" \"$cur_\"\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\t__gitcomp \"$u ${subpages_}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\telse\n\t\t\t__gitcomp \"$u\"\n\t\tfi\n\t}\n\n\t# hub compare [-u] [USER[/REPOSITORY]] [[START...]END]\n\t_git_compare() {\n\t\tlocal i c=$((cword - 1)) u=-u user remote owner repo arg_repo rev\n\t\twhile [[ $c -gt 1 ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t-u)\n\t\t\t\t\tunset u\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tif [[ -z \"$rev\" ]]; then\n\t\t\t\t\t\t# Even though the logic below is able to complete both user/repo\n\t\t\t\t\t\t# and revision in the right place, when there is only one argument\n\t\t\t\t\t\t# (other than -u) in the command, that argument will be taken as\n\t\t\t\t\t\t# revision. For example:\n\t\t\t\t\t\t# $ hub compare -u upstream\n\t\t\t\t\t\t# > https://github.com/USER/REPO/compare/upstream\n\t\t\t\t\t\tif __hub_github_repos '\\p' | grep -Eqx \"^$i(/[^/]+)?\"; then\n\t\t\t\t\t\t\targ_repo=$i\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trev=$i\n\t\t\t\t\t\tfi\n\t\t\t\t\telif [[ -z \"$arg_repo\" ]]; then\n\t\t\t\t\t\targ_repo=$i\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c--))\n\t\tdone\n\n\t\t# Here we want to find out the git remote name of user/repo, in order to\n\t\t# generate an appropriate revision list\n\t\tif [[ -z \"$arg_repo\" ]]; then\n\t\t\tuser=$(__hub_github_user)\n\t\t\tif [[ -z \"$user\" ]]; then\n\t\t\t\tfor i in $(__hub_github_repos); do\n\t\t\t\t\tremote=${i%%:*}\n\t\t\t\t\trepo=${i#*:}\n\t\t\t\t\tif [[ \"$remote\" = origin ]]; then\n\t\t\t\t\t\tbreak\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\telse\n\t\t\t\tfor i in $(__hub_github_repos); do\n\t\t\t\t\tremote=${i%%:*}\n\t\t\t\t\trepo=${i#*:}\n\t\t\t\t\towner=${repo%%/*}\n\t\t\t\t\tif [[ \"$user\" = \"$owner\" ]]; then\n\t\t\t\t\t\tbreak\n\t\t\t\t\tfi\n\t\t\t\tdone\n\t\t\tfi\n\t\telse\n\t\t\tfor i in $(__hub_github_repos); do\n\t\t\t\tremote=${i%%:*}\n\t\t\t\trepo=${i#*:}\n\t\t\t\towner=${repo%%/*}\n\t\t\t\tcase \"$arg_repo\" in\n\t\t\t\t\t\"$repo\" | \"$owner\")\n\t\t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\tfi\n\n\t\tlocal pfx cur_=\"$cur\"\n\t\tcase \"$cur_\" in\n\t\t\t*..*)\n\t\t\t\tpfx=\"${cur_%%..*}...\"\n\t\t\t\tcur_=\"${cur_##*..}\"\n\t\t\t\t__gitcomp_nl \"$(__hub_revlist \"$remote\")\" \"$pfx\" \"$cur_\"\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tif [[ -z \"${arg_repo}${rev}\" ]]; then\n\t\t\t\t\t__gitcomp \"$u $(__hub_github_repos '\\o\\n\\p') $(__hub_revlist \"$remote\")\"\n\t\t\t\telif [[ -z \"$rev\" ]]; then\n\t\t\t\t\t__gitcomp \"$u $(__hub_revlist \"$remote\")\"\n\t\t\t\telse\n\t\t\t\t\t__gitcomp \"$u\"\n\t\t\t\tfi\n\t\t\t\t;;\n\t\tesac\n\t}\n\n\t# hub create [NAME] [-p] [-d DESCRIPTION] [-h HOMEPAGE]\n\t_git_create() {\n\t\tlocal i c=2 name repo flags=\"-p -d -h\"\n\t\twhile [[ $c -lt $cword ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t-d | -h)\n\t\t\t\t\t((c++))\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\t;;\n\t\t\t\t-p)\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tname=$i\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c++))\n\t\tdone\n\t\tif [[ -z \"$name\" ]]; then\n\t\t\trepo=\"$(basename \"${PWD}\")\"\n\t\tfi\n\t\tcase \"$prev\" in\n\t\t\t-d | -h)\n\t\t\t\tCOMPREPLY=()\n\t\t\t\t;;\n\t\t\t-p | *)\n\t\t\t\t__gitcomp \"$repo $flags\"\n\t\t\t\t;;\n\t\tesac\n\t}\n\n\t# hub fork [--no-remote] [--remote-name REMOTE] [--org ORGANIZATION]\n\t_git_fork() {\n\t\tlocal i c=2 flags=\"--no-remote --remote-name --org\"\n\t\twhile [[ $c -lt $cword ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t--org)\n\t\t\t\t\t((c++))\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\t;;\n\t\t\t\t--remote-name)\n\t\t\t\t\t((c++))\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\tflags=${flags/--no-remote/}\n\t\t\t\t\t;;\n\t\t\t\t--no-remote)\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\tflags=${flags/--remote-name/}\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c++))\n\t\tdone\n\t\tcase \"$prev\" in\n\t\t\t--remote-name | --org)\n\t\t\t\tCOMPREPLY=()\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\t__gitcomp \"$flags\"\n\t\t\t\t;;\n\t\tesac\n\t}\n\n\t# hub pull-request [-f] [-m <MESSAGE>|-F <FILE>|-i <ISSUE>|<ISSUE-URL>] [-b <BASE>] [-h <HEAD>] [-a <USER>] [-M <MILESTONE>] [-l <LABELS>]\n\t_git_pull_request() {\n\t\tlocal i c=2 flags=\"-f -m -F -i -b -h -a -M -l\"\n\t\twhile [[ $c -lt $cword ]]; do\n\t\t\ti=\"${words[c]}\"\n\t\t\tcase \"$i\" in\n\t\t\t\t-m | -F | -i | -b | -h | -a | -M | -l)\n\t\t\t\t\t((c++))\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\t;;\n\t\t\t\t-f)\n\t\t\t\t\tflags=${flags/$i/}\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t((c++))\n\t\tdone\n\t\tcase \"$prev\" in\n\t\t\t-i)\n\t\t\t\tCOMPREPLY=()\n\t\t\t\t;;\n\t\t\t-b | -h | -a | -M | -l)\n\t\t\t\t# (Doesn't seem to need this...)\n\t\t\t\t# Uncomment the following line when 'owner/repo:[TAB]' misbehaved\n\t\t\t\t#_get_comp_words_by_ref -n : cur\n\t\t\t\t__gitcomp_nl \"$(__hub_heads)\"\n\t\t\t\t# __ltrim_colon_completions \"$cur\"\n\t\t\t\t;;\n\t\t\t-F)\n\t\t\t\tCOMPREPLY=(\"$cur\"*)\n\t\t\t\t;;\n\t\t\t-f | *)\n\t\t\t\t__gitcomp \"$flags\"\n\t\t\t\t;;\n\t\tesac\n\t}\n\n\t###################\n\t# Helper functions\n\t###################\n\n\t# __hub_github_user [HOST]\n\t# Return $GITHUB_USER or the default github user defined in hub config\n\t# HOST - Host to be looked-up in hub config. Default is \"github.com\"\n\t__hub_github_user() {\n\t\tif [[ -n \"$GITHUB_USER\" ]]; then\n\t\t\techo \"$GITHUB_USER\"\n\t\t\treturn\n\t\tfi\n\t\tlocal line h k v host=${1:-github.com} config=${HUB_CONFIG:-~/.config/hub}\n\t\tif [[ -f \"$config\" ]]; then\n\t\t\twhile read -r line; do\n\t\t\t\tif [ \"$line\" = \"---\" ]; then\n\t\t\t\t\tcontinue\n\t\t\t\tfi\n\t\t\t\tk=${line%%:*}\n\t\t\t\tv=${line#*:}\n\t\t\t\tif [[ -z \"$v\" ]]; then\n\t\t\t\t\tif [[ \"$h\" = \"$host\" ]]; then\n\t\t\t\t\t\tbreak\n\t\t\t\t\tfi\n\t\t\t\t\th=$k\n\t\t\t\t\tcontinue\n\t\t\t\tfi\n\t\t\t\tk=${k#* }\n\t\t\t\tv=${v#* }\n\t\t\t\tif [[ \"$h\" = \"$host\" ]] && [[ \"$k\" = \"user\" ]]; then\n\t\t\t\t\techo \"$v\"\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\t\t\tdone < \"$config\"\n\t\tfi\n\t}\n\n\t# __hub_github_repos [FORMAT]\n\t# List all github hosted repository\n\t# FORMAT - Format string contains multiple of these:\n\t#   \\m  remote\n\t#   \\p  owner/repo\n\t#   \\o  owner\n\t#   escaped characters (\\n, \\t ...etc) work\n\t# If omitted, prints all github repos in the format of \"remote:owner/repo\"\n\t__hub_github_repos() {\n\t\tlocal format=$1\n\t\tif [[ -z \"$(__gitdir)\" ]]; then\n\t\t\treturn\n\t\tfi\n\t\tif [[ -z \"$format\" ]]; then\n\t\t\tformat='\\1:\\2'\n\t\telse\n\t\t\tformat=${format//\\m/\\1}\n\t\t\tformat=${format//\\p/\\2}\n\t\t\tformat=${format//\\o/\\3}\n\t\tfi\n\t\tcommand git config --get-regexp 'remote\\.[^.]*\\.url' \\\n\t\t\t| grep -E ' ((https?|git)://|git@)github\\.com[:/][^:/]+/[^/]+$' \\\n\t\t\t| sed -E 's#^remote\\.([^.]+)\\.url +.+[:/](([^/]+)/[^.]+)(\\.git)?$#'\"$format\"'#'\n\t}\n\n\t# __hub_heads\n\t# List all local \"branch\", and remote \"owner/repo:branch\"\n\t__hub_heads() {\n\t\tlocal i remote repo branch dir\n\t\tdir=$(__gitdir)\n\t\tif [[ -d \"$dir\" ]]; then\n\t\t\tcommand git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n\t\t\t\t\"refs/heads/\"\n\t\t\tfor i in $(__hub_github_repos); do\n\t\t\t\tremote=${i%%:*}\n\t\t\t\trepo=${i#*:}\n\t\t\t\tcommand git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n\t\t\t\t\t\"refs/remotes/${remote}/\" | while read -r branch; do\n\t\t\t\t\techo \"${repo}:${branch#\"${remote}\"/}\"\n\t\t\t\tdone\n\t\t\tdone\n\t\tfi\n\t}\n\n\t# __hub_revlist [REMOTE]\n\t# List all tags, and branches under REMOTE, without the \"remote/\" prefix\n\t# REMOTE - Remote name to search branches from. Default is \"origin\"\n\t__hub_revlist() {\n\t\tlocal i remote=${1:-origin} dir\n\t\tdir=$(__gitdir)\n\t\tif [[ -d \"$dir\" ]]; then\n\t\t\tcommand git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n\t\t\t\t\"refs/remotes/${remote}/\" | while read -r i; do\n\t\t\t\techo \"${i#\"${remote}\"/}\"\n\t\t\tdone\n\t\t\tcommand git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n\t\t\t\t\"refs/tags/\"\n\t\tfi\n\t}\n\n\t# Enable completion for hub even when not using the alias\n\tcomplete -o bashdefault -o default -o nospace -F _git hub 2> /dev/null \\\n\t\t|| complete -o default -o nospace -F _git hub\nfi\n"
  },
  {
    "path": "completion/available/invoke.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"invoke - Python task execution tool and library\"\ngroup \"python\"\nurl \"https://www.pyinvoke.org/\"\n\n# Invoke (pyinvoke.org) tab-completion script to be sourced with Bash shell.\n\n# Copyright (c) 2020 Jeff Forcier.\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n\n#     * Redistributions of source code must retain the above copyright notice,\n#       this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright notice,\n#       this list of conditions and the following disclaimer in the documentation\n#       and/or other materials provided with the distribution.\n\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n# https://github.com/pyinvoke/invoke/blob/master/completion/bash\n\n_complete_invoke() {\n\tlocal candidates line\n\n\t# COMP_WORDS contains the entire command string up til now (including\n\t# program name).\n\t# We hand it to Invoke so it can figure out the current context: spit back\n\t# core options, task names, the current task's options, or some combo.\n\tcandidates=$(invoke --complete -- \"${COMP_WORDS[@]}\")\n\n\t# `compgen -W` takes list of valid options & a partial word & spits back\n\t# possible matches. Necessary for any partial word completions (vs\n\t# completions performed when no partial words are present).\n\t#\n\t# $2 is the current word or token being tabbed on, either empty string or a\n\t# partial word, and thus wants to be compgen'd to arrive at some subset of\n\t# our candidate list which actually matches.\n\t#\n\t# COMPREPLY is the list of valid completions handed back to `complete`.\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${candidates}\" -- \"$2\")\n}\n\n# Tell shell builtin to use the above for completing 'inv'/'invoke':\n# * -F: use given function name to generate completions.\n# * -o default: when function generates no results, use filenames.\n# * positional args: program names to complete for.\ncomplete -F _complete_invoke -o default invoke inv\n"
  },
  {
    "path": "completion/available/jboss5.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"jboss5 completion\"\n# shellcheck disable=SC1090\nsource \"${BASH_IT}\"/vendor/github.com/rparree/jboss-bash-completion/jboss5\n"
  },
  {
    "path": "completion/available/jboss7.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"jboss7 completion\"\n# shellcheck disable=SC1090\nsource \"${BASH_IT}\"/vendor/github.com/rparree/jboss-bash-completion/jboss7\n"
  },
  {
    "path": "completion/available/jungle.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"jungle(AWS cli tool) completion\"\n\n# Make sure jungle is installed\n_bash-it-completion-helper-necessary jungle || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient jungle || return\n\neval \"$(_JUNGLE_COMPLETE=source jungle)\"\n"
  },
  {
    "path": "completion/available/kind.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure kind is installed\n_bash-it-completion-helper-necessary kind || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient kind || return\n\neval \"$(kind completion bash)\"\n"
  },
  {
    "path": "completion/available/knife.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Published originally as public domain code at https://github.com/wk8/knife-bash-autocomplete\n\n##############\n### CONFIG ###\n##############\n### feel free to change those constants\n# the dir where to store the cache (must be writable and readable by the current user)\n# must be an absolute path\n_KNIFE_AUTOCOMPLETE_CACHE_DIR=\"$HOME/.knife_autocomplete_cache\"\n# the maximum # of _seconds_ after which a cache will be considered stale\n# (a cache is refreshed whenever it is used! this is only for caches that might not have been used for a long time)\n# WARNING: keep that value > 100\n_KNIFE_AUTOCOMPLETE_MAX_CACHE_AGE=86400\n\n###############################################\n### END OF CONFIG - DON'T CHANGE CODE BELOW ###\n###############################################\n\n### init\n_KAC_CACHE_TMP_DIR=\"$_KNIFE_AUTOCOMPLETE_CACHE_DIR/tmp\"\n# make sure the cache dir exists\nmkdir -p \"$_KAC_CACHE_TMP_DIR\"\n\n##############################\n### Cache helper functions ###\n##############################\n\n# GNU or BSD stat?\nstat -c %Y /dev/null > /dev/null 2>&1 && _KAC_STAT_COMMAND=\"stat -c %Y\" || _KAC_STAT_COMMAND=\"stat -f %m\"\n\n# returns 0 iff the file whose path is given as 1st argument\n# exists and has last been modified in the last $2 seconds\n# returns 1 otherwise\n_KAC_is_file_newer_than() {\n\t[ -f \"$1\" ] || return 1\n\t[ $(($(date +%s) - $($_KAC_STAT_COMMAND \"$1\"))) -gt \"$2\" ] && return 1 || return 0\n}\n\n# helper function for _KAC_get_and_regen_cache, see doc below\n_KAC_regen_cache() {\n\tlocal CACHE_NAME=$1\n\tlocal CACHE_PATH=\"$_KNIFE_AUTOCOMPLETE_CACHE_DIR/$CACHE_NAME\"\n\t# shellcheck disable=SC2155\n\tlocal TMP_FILE=$(mktemp \"$_KAC_CACHE_TMP_DIR/$CACHE_NAME.XXXX\")\n\tshift 1\n\t# discard the temp file if it's empty AND the previous command didn't exit successfully, but still mark the cache as updated\n\tif ! \"$@\" > \"$TMP_FILE\" 2> /dev/null; then\n\t\t[[ $(wc -l \"$TMP_FILE\") == 0 ]] && rm -f \"$TMP_FILE\" && touch \"$CACHE_PATH\" && return 1\n\telse\n\t\tmv -f \"$TMP_FILE\" \"$CACHE_PATH\"\n\tfi\n}\n\n# cached files can't have spaces in their names\n_KAC_get_cache_name_from_command() {\n\techo \"${@// /_SPACE_}\"\n}\n\n# the reverse operation from the function above\n_KAC_get_command_from_cache_name() {\n\techo \"${@//_SPACE_/ }\"\n}\n\n# given a command as argument, it fetches the cache for that command if it can find it\n# otherwise it waits for the cache to be generated\n# in either case, it regenerates the cache, and sets the _KAC_CACHE_PATH env variable\n# for obvious reason, do NOT call that in a sub-shell (in particular, no piping)\n# shellcheck disable=SC2155\n_KAC_get_and_regen_cache() {\n\t# the cache name can't have space in it\n\tlocal CACHE_NAME=$(_KAC_get_cache_name_from_command \"$@\")\n\tlocal REGEN_CMD=\"_KAC_regen_cache $CACHE_NAME $*\"\n\t_KAC_CACHE_PATH=\"$_KNIFE_AUTOCOMPLETE_CACHE_DIR/$CACHE_NAME\"\n\t# no need to wait for the regen if the file already exists\n\tif [[ -f \"$_KAC_CACHE_PATH\" ]]; then\n\t\t($REGEN_CMD &)\n\telse\n\t\t$REGEN_CMD\n\tfi\n}\n\n# performs two things: first, deletes all obsolete temp files\n# then refreshes stale caches that haven't been called in a long time\n_KAC_clean_cache() {\n\tlocal FILE CMD\n\t# delete all obsolete temp files, could be lingering there for any kind of crash in the caching process\n\tfor FILE in \"$_KAC_CACHE_TMP_DIR\"/*; do\n\t\t_KAC_is_file_newer_than \"$FILE\" \"$_KNIFE_AUTOCOMPLETE_MAX_CACHE_AGE\" || rm -f \"$FILE\"\n\tdone\n\t# refresh really stale caches\n\tfind \"$_KNIFE_AUTOCOMPLETE_CACHE_DIR\" -maxdepth 1 -type f -not -name '.*' \\\n\t\t| while read -r FILE; do\n\t\t\t_KAC_is_file_newer_than \"$FILE\" \"$_KNIFE_AUTOCOMPLETE_MAX_CACHE_AGE\" && continue\n\t\t\t# first let's get the original command\n\t\t\tCMD=$(_KAC_get_command_from_cache_name \"$(basename \"$FILE\")\")\n\t\t\t# then regen the cache\n\t\t\t_KAC_get_and_regen_cache \"$CMD\" > /dev/null\n\t\tdone\n}\n\n# perform a cache cleaning when loading this file\n# On big systems this could baloon up to a 30 second run or more, so not enabling by default.\n[[ -n \"${KNIFE_CACHE_CLEAN}\" ]] && _KAC_clean_cache\n\n#####################################\n### End of cache helper functions ###\n#####################################\n\n# returns all the possible knife sub-commands\n_KAC_knife_commands() {\n\tknife --help | grep -E \"^knife\" | sed -E 's/ \\(options\\)//g'\n}\n\n# rebuilds the knife base command currently being completed, and assigns it to $_KAC_CURRENT_COMMAND\n# additionnally, returns 1 iff the current base command is not complete, 0 otherwise\n# also sets $_KAC_CURRENT_COMMAND_NB_WORDS if the base command is complete\n_KAC_get_current_base_command() {\n\tlocal PREVIOUS=\"knife\"\n\tlocal I=1\n\tlocal CURRENT\n\twhile [[ \"${I}\" -le \"${COMP_CWORD}\" ]]; do\n\t\t# command words are all lower-case\n\t\techo \"${COMP_WORDS[$I]}\" | grep -E \"^[a-z]+$\" > /dev/null || break\n\t\tCURRENT=\"$PREVIOUS ${COMP_WORDS[$I]}\"\n\t\tgrep -E \"^$CURRENT\" \"$_KAC_CACHE_PATH\" > /dev/null || break\n\t\tPREVIOUS=$CURRENT\n\t\tI=$((I + 1))\n\tdone\n\t_KAC_CURRENT_COMMAND=$PREVIOUS\n\t[[ \"${I}\" -le \"${COMP_CWORD}\" ]] && _KAC_CURRENT_COMMAND_NB_WORDS=\"${I}\"\n}\n\n# searches the position of the currently completed argument in the current base command\n# (i.e. handles \"plural\" arguments such as knife cookbook upload cookbook1 cookbook2 and so on...)\n# assumes the current base command is complete\n# shellcheck disable=SC2155\n_KAC_get_current_arg_position() {\n\tlocal CURRENT_ARG_POS=$((_KAC_CURRENT_COMMAND_NB_WORDS + 1))\n\tlocal COMPLETE_COMMAND=$(grep -E \"^$_KAC_CURRENT_COMMAND\" \"$_KAC_CACHE_PATH\")\n\tlocal CURRENT_ARG\n\twhile [ \"$CURRENT_ARG_POS\" -le \"$COMP_CWORD\" ]; do\n\t\tCURRENT_ARG=$(echo \"$COMPLETE_COMMAND\" | cut -d ' ' -f \"$CURRENT_ARG_POS\")\n\t\t# we break if the current arg is a \"plural\" arg\n\t\techo \"$CURRENT_ARG\" | grep -E \"^\\\\[[^]]+(\\\\.\\\\.\\\\.\\\\]|$)\" > /dev/null && break\n\t\tCURRENT_ARG_POS=$((CURRENT_ARG_POS + 1))\n\tdone\n\techo \"$CURRENT_ARG_POS\"\n}\n\n# the actual auto-complete function\n_knife() {\n\t_KAC_get_and_regen_cache _KAC_knife_commands\n\tlocal RAW_LIST ITEM REGEN_CMD ARG_POSITION\n\t# shellcheck disable=SC2034\n\tCOMREPLY=()\n\t# get correct command & arg pos\n\t_KAC_get_current_base_command && ARG_POSITION=$(_KAC_get_current_arg_position) || ARG_POSITION=$((COMP_CWORD + 1))\n\tRAW_LIST=$(grep -E \"^${_KAC_CURRENT_COMMAND}\" \"${_KAC_CACHE_PATH}\" | cut -d ' ' -f \"${ARG_POSITION}\" | uniq)\n\n\t# we need to process that raw list a bit, most notably for placeholders\n\t# NOTE: I chose to explicitely fetch & cache _certain_ informations for the server (cookbooks & node names, etc)\n\t# as opposed to a generic approach by trying to find a 'list' knife command corresponding to the\n\t# current base command - that might limit my script in some situation, but that way I'm sure it caches only\n\t# not-sensitive stuff (a generic approach could be pretty bad e.g. with the knife-rackspace plugin)\n\tLIST=\"\"\n\tfor ITEM in $RAW_LIST; do\n\t\t# always relevant if only lower-case chars : continuation of the base command\n\t\techo \"$ITEM\" | grep -E \"^[a-z]+$\" > /dev/null && LIST=\"$LIST $ITEM\" && continue\n\t\tcase \"$ITEM\" in\n\t\t\t*COOKBOOK*)\n\t\t\t\t# special case for cookbooks : from site or local\n\t\t\t\t[[ ${COMP_WORDS[2]} == 'site' ]] && REGEN_CMD=\"knife cookbook site list\" || REGEN_CMD=\"knife cookbook list\"\n\t\t\t\t_KAC_get_and_regen_cache \"$REGEN_CMD\"\n\t\t\t\tLIST=\"$LIST $(cut -d ' ' -f 1 < \"$_KAC_CACHE_PATH\")\"\n\t\t\t\tcontinue\n\t\t\t\t;;\n\t\t\t*ITEM*)\n\t\t\t\t# data bag item : another special case\n\t\t\t\tlocal DATA_BAG_NAME=${COMP_WORDS[$((COMP_CWORD - 1))]}\n\t\t\t\tREGEN_CMD=\"knife data bag show $DATA_BAG_NAME\"\n\t\t\t\t;;\n\t\t\t*INDEX*)\n\t\t\t\t# see doc @ http://docs.opscode.com/knife_search.html\n\t\t\t\tLIST=\"$LIST client environment node role\"\n\t\t\t\tREGEN_CMD=\"knife data bag list\"\n\t\t\t\t;;\n\t\t\t*BAG*) REGEN_CMD=\"knife data bag list\" ;;\n\t\t\t*CLIENT*) REGEN_CMD=\"knife client list\" ;;\n\t\t\t*NODE*) REGEN_CMD=\"knife node list\" ;;\n\t\t\t*ENVIRONMENT*) REGEN_CMD=\"knife environment list\" ;;\n\t\t\t*ROLE*) REGEN_CMD=\"knife role list\" ;;\n\t\t\t*USER*) REGEN_CMD=\"knife user list\" ;;\n\t\t\t# not a generic argument we support...\n\t\t\t*) continue ;;\n\t\tesac\n\t\t_KAC_get_and_regen_cache \"$REGEN_CMD\"\n\t\tLIST=\"$LIST $(cat \"$_KAC_CACHE_PATH\")\"\n\tdone\n\t# shellcheck disable=SC2207,SC2086\n\tCOMPREPLY=($(compgen -W \"${LIST}\" -- ${COMP_WORDS[COMP_CWORD]}))\n}\n\ncomplete -F _knife knife\n"
  },
  {
    "path": "completion/available/kontena.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure kontena is installed\n_bash-it-completion-helper-necessary kontena || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient kontena || return\n\n# shellcheck disable=SC1090\nsource \"$(kontena whoami --bash-completion-path)\"\n"
  },
  {
    "path": "completion/available/kubectl.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"kubectl (Kubernetes CLI) completion\"\n\n# Make sure kubectl is installed\n_bash-it-completion-helper-necessary kubectl || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient kubectl || return\n\neval \"$(kubectl completion bash)\"\n"
  },
  {
    "path": "completion/available/laravel.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"laravel - PHP web application framework installer and command-line tool\"\ngroup \"php\"\nurl \"https://laravel.com/\"\n\n# Make sure laravel is installed\n_bash-it-completion-helper-necessary laravel || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient laravel || return\n\nfunction __laravel_completion() {\n\tlocal OPTS=('-h' '--help' '-q' '--quiet' '--ansi' '--no-ansi' '-n' '--no-interaction' '-v' '-vv' '-vvv' '--verbose' 'help' 'list' 'new')\n\tlocal _opt_\n\tCOMPREPLY=()\n\tfor _opt_ in \"${OPTS[@]}\"; do\n\t\tif [[ \"$_opt_\" == \"$2\"* ]]; then\n\t\t\tCOMPREPLY+=(\"$_opt_\")\n\t\tfi\n\tdone\n}\n\ncomplete -F __laravel_completion laravel\n"
  },
  {
    "path": "completion/available/lerna.completion.bash",
    "content": "# shellcheck shell=bash\ncite \"about-completion\"\nabout-completion \"lerna(javascript project manager tool) completion\"\ngroup \"javascript\"\nurl \"https://lerna.js.org/\"\n\nfunction __lerna_completion() {\n\tlocal cur compls\n\n\t# The currently-being-completed word.\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\n\t# Options\n\tcompls=\"add bootstrap changed clean create diff exec \\\n\timport init link list publish run version    \\\n\t--loglevel --concurrency --reject-cycles    \\\n\t--progress --sort --no-sort --help          \\\n\t--version\"\n\n\t# Tell complete what stuff to show.\n\t# shellcheck disable=2207\n\tCOMPREPLY=($(compgen -W \"$compls\" -- \"$cur\"))\n}\ncomplete -o default -F __lerna_completion lerna\n"
  },
  {
    "path": "completion/available/makefile.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Bash completion for Makefile\n# Loosely adapted from http://stackoverflow.com/a/38415982/1472048\n\nfunction _makecomplete() {\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tlocal files=() targets=() line f\n\tCOMPREPLY=()\n\n\t# https://www.gnu.org/software/make/manual/html_node/Makefile-Names.html\n\tfor f in 'GNUmakefile' 'makefile' 'Makefile'; do\n\t\t[[ -f \"$f\" ]] && files+=(\"$f\")\n\tdone\n\n\t[[ \"${#files[@]}\" -eq 0 ]] && return 0\n\n\t# collect all targets\n\tfor f in \"${files[@]}\"; do\n\t\twhile IFS='' read -r line; do\n\t\t\ttargets+=(\"$line\")\n\t\tdone < <(grep -oE '^[a-zA-Z0-9_-]+:([^=]|$)' \"$f\" | cut -d':' -f1)\n\tdone\n\n\t[[ \"${#targets[@]}\" -eq 0 ]] && return 0\n\n\t# use the targets for completion\n\twhile IFS='' read -r line; do\n\t\tCOMPREPLY+=(\"$line\")\n\tdone < <(compgen -W \"$(tr ' ' '\\n' <<< \"${targets[@]}\" | sort -u)\" -- \"${cur}\")\n\n\treturn 0\n}\n\ncomplete -o nospace -F _makecomplete make\ncomplete -o nospace -F _makecomplete gnumake\n"
  },
  {
    "path": "completion/available/maven.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC2207\n\ncite \"about-completion\"\nabout-completion \"maven - Java project build and dependency tool\"\ngroup \"java\"\nurl \"https://maven.apache.org/\"\n\n# Bash Maven completion\n\n_mvn() {\n\tlocal cmds cur colonprefixes\n\tcmds=\"clean validate compile test package integration-test   \\\n      verify install deploy test-compile site generate-sources  \\\n      process-sources generate-resources process-resources      \\\n      eclipse:eclipse eclipse:add-maven-repo eclipse:clean      \\\n      idea:idea -DartifactId= -DgroupId= -Dmaven.test.skip=true \\\n      -Declipse.workspace= -DarchetypeArtifactId=               \\\n      netbeans-freeform:generate-netbeans-project               \\\n      tomcat:run tomcat:run-war tomcat:deploy jboss-as:deploy   \\\n      versions:display-dependency-updates                       \\\n      versions:display-plugin-updates dependency:analyze        \\\n      dependency:analyze-dep-mgt dependency:resolve             \\\n      dependency:sources dependency:tree release:prepare        \\\n      release:rollback release:perform --batch-mode\"\n\n\tCOMPREPLY=()\n\tcur=${COMP_WORDS[COMP_CWORD]}\n\t# Work-around bash_completion issue where bash interprets a colon\n\t# as a separator.\n\t# Work-around borrowed from the darcs work-around for the same\n\t# issue.\n\tcolonprefixes=${cur%\"${cur##*:}\"}\n\tCOMPREPLY=($(compgen -W \"$cmds\" -- \"$cur\"))\n\tlocal i=${#COMPREPLY[*]}\n\twhile [ \"$((--i))\" -ge 0 ]; do\n\t\tCOMPREPLY[i]=${COMPREPLY[i]#\"$colonprefixes\"}\n\tdone\n\n\treturn 0\n} \\\n\t&& complete -F _mvn mvn\n"
  },
  {
    "path": "completion/available/minikube.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"minikube (Local Kubernetes) completion\"\n\n# Make sure minikube is installed\n_bash-it-completion-helper-necessary minikube || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient minikube || return\n\neval \"$(minikube completion bash)\"\n"
  },
  {
    "path": "completion/available/minishift.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure minishift is installed\n_bash-it-completion-helper-necessary minishift || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient minishift || return\n\n# shellcheck disable=SC1090\nsource <(minishift completion bash)\n"
  },
  {
    "path": "completion/available/ng.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"ng - Angular CLI for scaffolding and managing Angular applications\"\ngroup \"javascript\"\nurl \"https://angular.io/cli\"\n\n# Make sure ng is installed\n_bash-it-completion-helper-necessary ng || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient ng || return\n\n# No longer supported, please see https://github.com/angular/angular-cli/issues/11043\n# Fix courtesy of https://stackoverflow.com/questions/50194674/ng-completion-no-longer-exists\n# source <(ng completion --bash)\n\n_ng_bash_completion_candidates=(\"add\" \"build\" \"config\" \"doc\" \"e2e\" \"generate\" \"help\" \"lint\" \"new\" \"run\" \"serve\" \"test\" \"update\" \"version\" \"xi18n\")\ncomplete -W \"${_ng_bash_completion_candidates[*]}\" ng\nunset \"${!_ng_bash_completion@}\"\n"
  },
  {
    "path": "completion/available/ngrok.completion.bash",
    "content": "# shellcheck shell=bash\n\n__ngrok_completion() {\n\t# shellcheck disable=SC2155\n\tlocal prev=$(_get_pword)\n\t# shellcheck disable=SC2155\n\tlocal curr=$(_get_cword)\n\n\tlocal BASE_NO_CONF=\"--log --log-format --log-level --help\"\n\tlocal BASE=\"--config $BASE_NO_CONF\"\n\tlocal DEFAULT=\"$BASE --authtoken --region\"\n\n\tcase $prev in\n\t\tauthtoken)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$BASE\" -- \"$curr\"))\n\t\t\t;;\n\t\thttp)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$DEFAULT --auth --bind-tls --host-header --hostname --inspect --subdomain\" -- \"$curr\"))\n\t\t\t;;\n\t\tstart)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$DEFAULT --all --none\" -- \"$curr\"))\n\t\t\t;;\n\t\ttcp)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$DEFAULT --remote-addr\" -- \"$curr\"))\n\t\t\t;;\n\t\ttls)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$DEFAULT --client-cas --crt --hostname --key --subdomain\" -- \"$curr\"))\n\t\t\t;;\n\t\tupdate)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"$BASE_NO_CONF --channel\" -- \"$curr\"))\n\t\t\t;;\n\t\tngrok)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"authtoken credits http start tcp tls update version help\" -- \"$curr\"))\n\t\t\t;;\n\t\t*) ;;\n\n\tesac\n}\n\ncomplete -F __ngrok_completion ngrok\n"
  },
  {
    "path": "completion/available/notify-send.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure notify-send is installed\n_bash-it-completion-helper-necessary notify-send || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient notify-send || return\n\nfunction _notify-send() {\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\tcase $prev in\n\t\t-u | --urgency)\n\t\t\tCOMPREPLY=(\"low\" \"normal\" \"critical\")\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=(\"-?\" \"--help\" \"-u\" \"--urgency\" \"-t\" \"--expire-time\" \"-a\" \"--app-name\" \"-i\" \"--icon\" \"-c\" \"--category\" \"-h\" \"--hint\" \"-v\" \"--version\")\n\t\t\t;;\n\tesac\n}\n\ncomplete -F _notify-send -X '!&*' notify-send\n"
  },
  {
    "path": "completion/available/npm.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"npm (Node Package Manager) completion\"\n\n# Make sure npm is installed\n_bash-it-completion-helper-necessary npm || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient npm || return\n\neval \"$(npm completion)\"\n"
  },
  {
    "path": "completion/available/nvm.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"nvm (Node Version Manager) completion\"\n\nif [[ -n \"${NVM_DIR:-}\" && -s \"${NVM_DIR}/bash_completion\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"${NVM_DIR}/bash_completion\"\nfi\n"
  },
  {
    "path": "completion/available/openshift.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure oc is installed\n_bash-it-completion-helper-necessary oc || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient oc || return\n\n# shellcheck disable=SC1090\nsource <(oc completion bash)\n"
  },
  {
    "path": "completion/available/packer.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"packer completion\"\n\n# Make sure packer is installed\n_bash-it-completion-helper-necessary packer || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient packer || return\n\ncomplete -C packer packer\n"
  },
  {
    "path": "completion/available/pew.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1090\n\n# Make sure pew is installed\n_bash-it-completion-helper-necessary pew || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient pew || return\n\n# shellcheck disable=SC1090\nsource \"$(pew shell_config)\"\n"
  },
  {
    "path": "completion/available/pip.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"pip - Python package installer and dependency manager\"\ngroup \"python\"\nurl \"https://pip.pypa.io/\"\n\n# https://pip.pypa.io/en/stable/user_guide/#command-completion\n# Of course, you should first install pip, say on Debian:\n# sudo apt-get install python-pip\n# If the pip package is installed within virtual environments, say, python managed by pyenv,\n# you should first initialize the corresponding environment.\n# So that pip is in the system's path.\n_command_exists pip || return\n\nfunction __bash_it_complete_pip() {\n\tif _command_exists _pip_completion; then\n\t\tcomplete -o default -F _pip_completion pip\n\t\t_pip_completion \"$@\"\n\telse\n\t\teval \"$(pip completion --bash)\"\n\t\t_pip_completion \"$@\"\n\tfi\n}\ncomplete -o default -F __bash_it_complete_pip pip\n"
  },
  {
    "path": "completion/available/pip3.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"pip3 - Python 3 package installer and dependency manager\"\ngroup \"python\"\nurl \"https://pip.pypa.io/\"\n\n# https://pip.pypa.io/en/stable/user_guide/#command-completion\n# Of course, you should first install pip, say on Debian:\n# sudo apt-get install python3-pip\n# If the pip package is installed within virtual environments, say, python managed by pyenv,\n# you should first initialize the corresponding environment.\n# So that pip3 is in the system's path.\n_command_exists pip3 || return\n\nfunction __bash_it_complete_pip3() {\n\tif _command_exists _pip_completion; then\n\t\tcomplete -o default -F _pip_completion pip3\n\t\t_pip_completion \"$@\"\n\telse\n\t\teval \"$(pip3 completion --bash)\"\n\t\t_pip_completion \"$@\"\n\tfi\n}\ncomplete -o default -F __bash_it_complete_pip3 pip3\n"
  },
  {
    "path": "completion/available/pipenv.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"pipenv - Python development workflow tool combining pip and virtualenv\"\ngroup \"python\"\nurl \"https://pipenv.pypa.io/\"\n\n# Make sure pipenv is installed\n_bash-it-completion-helper-necessary pipenv || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient pipenv || return\n\neval \"$(_PIPENV_COMPLETE=bash_source pipenv)\"\n"
  },
  {
    "path": "completion/available/pipx.completion.bash",
    "content": "# shellcheck shell=bash\n# pipx completion\n\nif _command_exists register-python-argcomplete && _command_exists pipx; then\n\teval \"$(register-python-argcomplete pipx)\"\nfi\n"
  },
  {
    "path": "completion/available/projects.completion.bash",
    "content": "# shellcheck shell=bash\n# Ensure that we log to doctor so the user can address these issues\n_is_function _init_completion \\\n\t|| _log_error '_init_completion not found. Ensure bash-completion 2.0 or newer is installed and configured properly.'\n_is_function _rl_enabled \\\n\t|| _log_error '_rl_enabled not found. Ensure bash-completion 2.0 or newer is installed and configured properly.'\n\n_pj() {\n\t_is_function _init_completion || return\n\t_is_function _rl_enabled || return\n\t[ -n \"$BASH_IT_PROJECT_PATHS\" ] || return\n\tshift\n\t[ \"$1\" == \"open\" ] && shift\n\n\t# shellcheck disable=SC2034\n\tlocal cur prev words cword # these are set by the call to _init_completion\n\t_init_completion || return\n\n\tlocal IFS=$'\\n' i j k\n\n\tcompopt -o filenames\n\n\tlocal -r mark_dirs=$(_rl_enabled mark-directories && echo y)\n\tlocal -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)\n\n\tfor i in ${BASH_IT_PROJECT_PATHS//:/$'\\n'}; do\n\t\t# create an array of matched subdirs\n\t\tk=\"${#COMPREPLY[@]}\"\n\t\tfor j in $(compgen -d \"$i/$cur\"); do\n\t\t\tif [[ ($mark_symdirs && -L $j || $mark_dirs && ! -L $j) && ! -d ${j#\"$i\"/} ]]; then\n\t\t\t\tj+=\"/\"\n\t\t\tfi\n\t\t\tCOMPREPLY[k++]=${j#\"$i\"/}\n\t\tdone\n\tdone\n\n\tif [[ ${#COMPREPLY[@]} -eq 1 ]]; then\n\t\ti=${COMPREPLY[0]}\n\t\tif [[ \"$i\" == \"$cur\" && $i != \"*/\" ]]; then\n\t\t\tCOMPREPLY[0]=\"${i}/\"\n\t\tfi\n\tfi\n\n\treturn 0\n}\n\ncomplete -F _pj -o nospace pj\ncomplete -F _pj -o nospace pjo\n"
  },
  {
    "path": "completion/available/rake.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"rake - Ruby task automation and build tool\"\ngroup \"ruby\"\nurl \"https://ruby.github.io/rake/\"\n\n# Bash completion support for Rake, Ruby Make.\n\nexport COMP_WORDBREAKS=${COMP_WORDBREAKS/\\:/}\n\n_rakecomplete() {\n\tif [ -f Rakefile ]; then\n\t\t#shellcheck disable=SC2012\n\t\trecent=$(ls -t -- .rake_tasks~ Rakefile **/*.rake 2> /dev/null | head -n 1)\n\t\tif [[ $recent != '.rake_tasks~' ]]; then\n\t\t\trake --silent --tasks | cut -d \" \" -f 2 > .rake_tasks~\n\t\tfi\n\t\tlocal line\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$(cat .rake_tasks~)\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\treturn 0\n\tfi\n}\n\ncomplete -o default -o nospace -F _rakecomplete rake\n"
  },
  {
    "path": "completion/available/rustup.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"rustup (Rust toolchain installer) completion\"\n\n# Make sure rustup is installed\n_bash-it-completion-helper-necessary rustup || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient rustup || return\n\neval \"$(rustup completions bash)\"\n"
  },
  {
    "path": "completion/available/rvm.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"Bash completion support for  RVM.\"\n# Source: https://rvm.io/workflow/completion\n\nif [[ -n \"${rvm_path:-}\" && -s \"${rvm_path}/scripts/completion\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"${rvm_path}/scripts/completion\"\nfi\n"
  },
  {
    "path": "completion/available/salt.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2207\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# Copyright (c) 2020 SaltStack Team\n\n# Original Author:\n# written by David Pravec\n#   - feel free to /msg alekibango on IRC if you want to talk about this file\n\n# TODO: check if --config|-c was used and use configured config file for queries\n# TODO: solve somehow completion for  salt -G pythonversion:[tab]\n#       (not sure what to do with lists)\n# TODO: --range[tab] --   how?\n# TODO: --compound[tab] -- how?\n# TODO: use history to extract some words, esp. if ${cur} is empty\n# TODO: TEST EVERYTHING a lot\n# TODO: cache results of some functions?  where? how long?\n# TODO: is it ok to use '--timeout 2' ?\n\n# shellcheck disable=SC2120\n_salt_get_grains() {\n\tif [ \"$1\" = 'local' ]; then\n\t\tsalt-call --out=txt -- grains.ls | sed 's/^.*\\[//' | tr -d \",']\" | sed 's:\\([a-z0-9]\\) :\\1\\: :g'\n\telse\n\t\tsalt '*' --timeout 2 --out=txt -- grains.ls | sed 's/^.*\\[//' | tr -d \",']\" | sed 's:\\([a-z0-9]\\) :\\1\\: :g'\n\tfi\n}\n\n_salt_get_grain_values() {\n\tif [ \"$1\" = 'local' ]; then\n\t\tsalt-call --out=txt -- grains.item \"$1\" | sed 's/^\\S*:\\s//' | grep -v '^\\s*$'\n\telse\n\t\tsalt '*' --timeout 2 --out=txt -- grains.item \"$1\" | sed 's/^\\S*:\\s//' | grep -v '^\\s*$'\n\tfi\n}\n\n_salt() {\n\tlocal cur prev opts _salt_grains _salt_coms pprev ppprev\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tif [ \"${COMP_CWORD}\" -gt 2 ]; then\n\t\tpprev=\"${COMP_WORDS[COMP_CWORD - 2]}\"\n\tfi\n\tif [ \"${COMP_CWORD}\" -gt 3 ]; then\n\t\tppprev=\"${COMP_WORDS[COMP_CWORD - 3]}\"\n\tfi\n\n\topts=\"-h --help -d --doc --documentation --version --versions-report -c \\\n          --config-dir= -v --verbose -t --timeout= -s --static -b --batch= \\\n          --batch-size= -E --pcre -L --list -G --grain --grain-pcre -N \\\n          --nodegroup -R --range -C --compound -I --pillar \\\n          --return= -a --auth= --eauth= --extended-auth= -T --make-token -S \\\n          --ipcidr --out=pprint --out=yaml --out=overstatestage --out=json \\\n          --out=raw --out=highstate --out=key --out=txt --no-color --out-indent= \"\n\n\tif [[ \"${cur}\" == -* ]]; then\n\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\treturn 0\n\tfi\n\n\t# 2 special cases for filling up grain values\n\tcase \"${pprev}\" in\n\t\t-G | --grain | --grain-pcre)\n\t\t\tif [ \"${cur}\" = \":\" ]; then\n\t\t\t\tCOMPREPLY=($(compgen -W \"$(_salt_get_grain_values \"${prev}\")\"))\n\t\t\t\treturn 0\n\t\t\tfi\n\t\t\t;;\n\tesac\n\tcase \"${ppprev}\" in\n\t\t-G | --grain | --grain-pcre)\n\t\t\tif [ \"${prev}\" = \":\" ]; then\n\t\t\t\tCOMPREPLY=($(compgen -W \"$(_salt_get_grain_values \"${pprev}\")\" -- \"${cur}\"))\n\t\t\t\treturn 0\n\t\t\tfi\n\t\t\t;;\n\tesac\n\n\tif [ \"${cur}\" = \"=\" ] && [[ \"${prev}\" == --* ]]; then\n\t\tcur=\"\"\n\tfi\n\tif [ \"${prev}\" = \"=\" ] && [[ \"${pprev}\" == --* ]]; then\n\t\tprev=\"${pprev}\"\n\tfi\n\n\tcase \"${prev}\" in\n\n\t\t-c | --config)\n\t\t\tCOMPREPLY=($(compgen -f -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tsalt)\n\t\t\tCOMPREPLY=($(compgen -W \"\\'*\\' ${opts} $(salt-key --no-color -l acc)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-E | --pcre)\n\t\t\tCOMPREPLY=($(compgen -W \"$(salt-key --no-color -l acc)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-G | --grain | --grain-pcre)\n\t\t\tCOMPREPLY=($(compgen -W \"$(_salt_get_grains)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-C | --compound)\n\t\t\tCOMPREPLY=() # TODO: finish this one? how?\n\t\t\treturn 0\n\t\t\t;;\n\t\t-t | --timeout)\n\t\t\tCOMPREPLY=($(compgen -W \"1 2 3 4 5 6 7 8 9 10 15 20 30 40 60 90 120 180\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-b | --batch | --batch-size)\n\t\t\tCOMPREPLY=($(compgen -W \"1 2 3 4 5 6 7 8 9 10 15 20 30 40 50 60 70 80 90 100 120 150 200\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-N | --nodegroup)\n\t\t\tMASTER_CONFIG='/etc/salt/master'\n\t\t\tCOMPREPLY=($(compgen -W \"$(awk -F ':' 'BEGIN {print_line = 0};  /^nodegroups/ {print_line = 1;getline } print_line && /^  */ {print $1} /^[^ ]/ {print_line = 0}' < ${MASTER_CONFIG})\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t_salt_coms=\"$(salt '*' --timeout 2 --out=txt -- sys.list_functions | sed 's/^.*\\[//' | tr -d \",']\")\"\n\tall=\"${opts} ${_salt_coms}\"\n\tCOMPREPLY=($(compgen -W \"${all}\" -- \"${cur}\"))\n\n\treturn 0\n}\n\ncomplete -F _salt salt\n\n_saltkey() {\n\tlocal cur prev opts prev pprev\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\topts=\"-c --config-dir= -h --help --version --versions-report -q --quiet \\\n          -y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \\\n          -l --list= -L --list-all -a --accept= -A --accept-all \\\n          -r --reject= -R --reject-all -p --print= -P --print-all \\\n          -d --delete= -D --delete-all -f --finger= -F --finger-all \\\n          --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n          --out=highstate --out=key --out=txt --no-color --out-indent= \"\n\tif [ \"${COMP_CWORD}\" -gt 2 ]; then\n\t\tpprev=\"${COMP_WORDS[COMP_CWORD - 2]}\"\n\tfi\n\tif [ \"${COMP_CWORD}\" -gt 3 ]; then\n\t\tppprev=\"${COMP_WORDS[COMP_CWORD - 3]}\"\n\tfi\n\tif [[ \"${cur}\" == -* ]]; then\n\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\treturn 0\n\tfi\n\n\tif [ \"${cur}\" = \"=\" ] && [[ \"${prev}\" == --* ]]; then\n\t\tcur=\"\"\n\tfi\n\tif [ \"${prev}\" = \"=\" ] && [[ \"${pprev}\" == --* ]]; then\n\t\tprev=\"${pprev}\"\n\tfi\n\n\tcase \"${prev}\" in\n\t\t-a | --accept)\n\t\t\tCOMPREPLY=($(compgen -W \"$(\n\t\t\t\tsalt-key -l un --no-color\n\t\t\t\tsalt-key -l rej --no-color\n\t\t\t)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-r | --reject)\n\t\t\tCOMPREPLY=($(compgen -W \"$(salt-key -l acc --no-color)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-d | --delete)\n\t\t\tCOMPREPLY=($(compgen -W \"$(\n\t\t\t\tsalt-key -l acc --no-color\n\t\t\t\tsalt-key -l un --no-color\n\t\t\t\tsalt-key -l rej --no-color\n\t\t\t)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-c | --config)\n\t\t\tCOMPREPLY=($(compgen -f -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t--keysize)\n\t\t\tCOMPREPLY=($(compgen -W \"2048 3072 4096 5120 6144\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t--gen-keys)\n\t\t\treturn 0\n\t\t\t;;\n\t\t--gen-keys-dir)\n\t\t\tCOMPREPLY=($(compgen -d -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-p | --print)\n\t\t\tCOMPREPLY=($(compgen -W \"$(\n\t\t\t\tsalt-key -l acc --no-color\n\t\t\t\tsalt-key -l un --no-color\n\t\t\t\tsalt-key -l rej --no-color\n\t\t\t)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-l | --list)\n\t\t\tCOMPREPLY=($(compgen -W \"pre un acc accepted unaccepted rej rejected all\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t--accept-all)\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\tCOMPREPLY=($(compgen -W \"${opts} \" -- \"${cur}\"))\n\treturn 0\n}\n\ncomplete -F _saltkey salt-key\n\n_saltcall() {\n\tlocal cur prev opts _salt_coms pprev ppprev\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\topts=\"-h --help -d --doc --documentation --version --versions-report \\\n          -m --module-dirs= -g --grains --return= --local -c --config-dir= -l --log-level= \\\n          --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n          --out=highstate --out=key --out=txt --no-color --out-indent= \"\n\tif [ \"${COMP_CWORD}\" -gt 2 ]; then\n\t\tpprev=\"${COMP_WORDS[COMP_CWORD - 2]}\"\n\tfi\n\tif [ \"${COMP_CWORD}\" -gt 3 ]; then\n\t\tppprev=\"${COMP_WORDS[COMP_CWORD - 3]}\"\n\tfi\n\tif [[ \"${cur}\" == -* ]]; then\n\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\treturn 0\n\tfi\n\n\tif [ \"${cur}\" = \"=\" ] && [[ \"${prev}\" == --* ]]; then\n\t\tcur=\"\"\n\tfi\n\tif [ \"${prev}\" = \"=\" ] && [[ \"${pprev}\" == --* ]]; then\n\t\tprev=\"${pprev}\"\n\tfi\n\n\tcase ${prev} in\n\t\t-m | --module-dirs)\n\t\t\tCOMPREPLY=($(compgen -d \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-l | --log-level)\n\t\t\tCOMPREPLY=($(compgen -W \"info none garbage trace warning error debug\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-g | grains)\n\t\t\treturn 0\n\t\t\t;;\n\t\tsalt-call)\n\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t_salt_coms=\"$(salt-call --out=txt -- sys.list_functions | sed 's/^.*\\[//' | tr -d \",']\")\"\n\tCOMPREPLY=($(compgen -W \"${opts} ${_salt_coms}\" -- \"${cur}\"))\n\treturn 0\n}\n\ncomplete -F _saltcall salt-call\n\n_saltcp() {\n\tlocal cur prev opts prefpart helper filt pprev ppprev\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\topts=\"-t --timeout= -s --static -b --batch= --batch-size= \\\n          -h --help --version --versions-report -c --config-dir= \\\n          -E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \\\n          -R --range -C --compound -I --pillar \\\n          --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \\\n          --out=highstate --out=key --out=txt --no-color --out-indent= \"\n\tif [[ \"${cur}\" == -* ]]; then\n\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\treturn 0\n\tfi\n\n\tif [ \"${cur}\" = \"=\" ] && [[ \"${prev}\" == --* ]]; then\n\t\tcur=\"\"\n\tfi\n\tif [ \"${prev}\" = \"=\" ] && [[ \"${pprev}\" == --* ]]; then\n\t\tprev=${pprev}\n\tfi\n\n\tcase ${prev} in\n\t\tsalt-cp)\n\t\t\tCOMPREPLY=($(compgen -W \"${opts} $(salt-key -l acc --no-color)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-t | --timeout)\n\t\t\t# those numbers are just a hint\n\t\t\tCOMPREPLY=($(compgen -W \"2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-E | --pcre)\n\t\t\tCOMPREPLY=($(compgen -W \"$(salt-key -l acc --no-color)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t-L | --list)\n\t\t\t# IMPROVEMENTS ARE WELCOME\n\t\t\tprefpart=\"${cur%,*},\"\n\t\t\t# shellcheck disable=SC2001\n\t\t\tfilt=\"^\\($(echo \"${cur}\" | sed 's:,:\\\\|:g')\\)$\"\n\t\t\thelper=($(salt-key -l acc --no-color | grep -v \"${filt}\" | sed \"s/^/${prefpart}/\"))\n\t\t\tCOMPREPLY=($(compgen -W \"${helper[*]}\" -- \"${cur}\"))\n\n\t\t\treturn 0\n\t\t\t;;\n\t\t-G | --grain | --grain-pcre)\n\t\t\tCOMPREPLY=($(compgen -W \"$(_salt_get_grains)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t\t# FIXME\n\t\t-R | --range)\n\t\t\t# FIXME ??\n\t\t\treturn 0\n\t\t\t;;\n\t\t-C | --compound)\n\t\t\t# FIXME ??\n\t\t\treturn 0\n\t\t\t;;\n\t\t-c | --config)\n\t\t\tCOMPREPLY=($(compgen -f -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t# default is using opts:\n\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n}\n\ncomplete -F _saltcp salt-cp\n"
  },
  {
    "path": "completion/available/sdkman.completion.bash",
    "content": "# shellcheck shell=bash\n\nfunction _sdkman_complete() {\n\tlocal CANDIDATES\n\tlocal CANDIDATE_VERSIONS\n\tlocal SDKMAN_CANDIDATES_CSV=\"${SDKMAN_CANDIDATES_CSV:-}\"\n\n\tCOMPREPLY=()\n\n\tlocal line\n\tif [ \"$COMP_CWORD\" -eq 1 ]; then\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"install uninstall rm list ls use default home env current upgrade ug version broadcast help offline selfupdate update flush\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\telif [ \"$COMP_CWORD\" -eq 2 ]; then\n\t\tcase \"${COMP_WORDS[COMP_CWORD - 1]}\" in\n\t\t\t\"install\" | \"i\" | \"uninstall\" | \"rm\" | \"list\" | \"ls\" | \"use\" | \"u\" | \"default\" | \"d\" | \"home\" | \"h\" | \"current\" | \"c\" | \"upgrade\" | \"ug\")\n\t\t\t\tCANDIDATES=\"${SDKMAN_CANDIDATES_CSV//,/${IFS:0:1}}\"\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$CANDIDATES\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t\"env\")\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"init\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t\"offline\")\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"enable disable\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t\"selfupdate\")\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"force\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t\"flush\")\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"archives tmp broadcast version\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t*) ;;\n\n\t\tesac\n\telif [ \"$COMP_CWORD\" -eq 3 ]; then\n\t\tcase \"${COMP_WORDS[COMP_CWORD - 2]}\" in\n\t\t\t\"uninstall\" | \"rm\" | \"use\" | \"u\" | \"default\" | \"d\" | \"home\" | \"h\")\n\t\t\t\t_sdkman_candidate_local_versions \"${COMP_WORDS[COMP_CWORD - 1]}\"\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$CANDIDATE_VERSIONS\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t\"install\" | \"i\")\n\t\t\t\t_sdkman_candidate_all_versions \"${COMP_WORDS[COMP_CWORD - 1]}\"\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$CANDIDATE_VERSIONS\" -- \"${COMP_WORDS[COMP_CWORD]}\")\n\t\t\t\t;;\n\t\t\t*) ;;\n\n\t\tesac\n\tfi\n\n\treturn 0\n}\n\nfunction _sdkman_candidate_local_versions() {\n\n\tCANDIDATE_VERSIONS=$(__sdkman_cleanup_local_versions \"$1\")\n\n}\n\nfunction _sdkman_candidate_all_versions() {\n\n\tcandidate=\"$1\"\n\tCANDIDATE_LOCAL_VERSIONS=$(__sdkman_cleanup_local_versions \"$candidate\")\n\tif [[ \"${SDKMAN_OFFLINE_MODE:-false}\" == \"true\" ]]; then\n\t\tCANDIDATE_VERSIONS=$CANDIDATE_LOCAL_VERSIONS\n\telse\n\t\t# sdkman has a specific output format for Java candidate since\n\t\t# there are multiple vendors and builds.\n\t\tif [ \"$candidate\" = \"java\" ]; then\n\t\t\tCANDIDATE_ONLINE_VERSIONS=\"$(__sdkman_list_versions \"$candidate\" | grep \" \" | grep \"\\.\" | cut -c 62-)\"\n\t\telse\n\t\t\tCANDIDATE_ONLINE_VERSIONS=\"$(__sdkman_list_versions \"$candidate\" | grep \" \" | grep \"\\.\" | cut -c 6-)\"\n\t\tfi\n\t\t# the last grep is used to filter out sdkman flags, such as:\n\t\t# \"+\" - local version\n\t\t# \"*\" - installed\n\t\t# \">\" - currently in use\n\t\tCANDIDATE_VERSIONS=\"$(echo \"$CANDIDATE_ONLINE_VERSIONS $CANDIDATE_LOCAL_VERSIONS\" | tr ' ' '\\n' | grep -v -e '^[[:space:]|\\*|\\>|\\+]*$' | sort -u) \"\n\tfi\n\n}\n\nfunction __sdkman_cleanup_local_versions() {\n\n\t__sdkman_build_version_csv \"$1\" | tr ',' ' '\n\n}\n\ncomplete -F _sdkman_complete sdk\n"
  },
  {
    "path": "completion/available/sqlmap.completion.bash",
    "content": "# shellcheck shell=bash\n\n# ---------------------------------------------------------------------------+\n#                                                                            |\n# Thanks to Alexander Korznikov                                              |\n# http://www.korznikov.com/2014/12/bash-tab-completion-for-awesome-tool.html |\n#                                                                            |\n# ---------------------------------------------------------------------------+\n\n_command_exists sqlmap || return\n\nfunction _sqlmap() {\n\tlocal cur prev line\n\n\tCOMPREPLY=()\n\tcur=\"$(_get_cword)\"\n\tprev=\"$(_get_pword)\"\n\n\tcase $prev in\n\n\t\t# List directory content\n\t\t--tamper)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${tamper:-}\" -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--output-dir | -t | -l | -m | -r | --load-cookies | --proxy-file | --sql-file | --shared-lib | --file-write)\n\t\t\t_filedir\n\t\t\treturn 0\n\t\t\t;;\n\t\t-c)\n\t\t\t_filedir ini\n\t\t\treturn 0\n\t\t\t;;\n\t\t--method)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'GET POST PUT' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--auth-type)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'Basic Digest NTLM PKI' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--tor-type)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'HTTP SOCKS4 SOCKS5' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t-v)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W '1 2 3 4 5 6' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--dbms)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'mysql mssql access postgres' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--level | --crawl)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W '1 2 3 4 5' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--risk)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W '0 1 2 3' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t--technique)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'B E U S T Q' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t-s)\n\t\t\t_filedir sqlite\n\t\t\treturn 0\n\t\t\t;;\n\t\t--dump-format)\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W 'CSV HTML SQLITE' -- \"$cur\")\n\t\t\treturn 0\n\t\t\t;;\n\t\t-x)\n\t\t\t_filedir xml\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\tif [[ \"$cur\" == * ]]; then\n\t\tCOMPREPLY=()\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(\n\t\t\tcompgen -W '-h --help -hh --version -v -d -u --url -l -x -m -r -g -c --method \\\n\t\t\t--data --param-del --cookie --cookie-del --load-cookies \\\n\t\t\t--drop-set-cookie --user-agent --random-agent --host --referer \\\n\t\t\t--headers --auth-type --auth-cred --auth-private --ignore-401 \\\n\t\t\t--proxy --proxy-cred --proxy-file --ignore-proxy --tor --tor-port \\\n\t\t\t--tor-type --check-tor --delay --timeout --retries --randomize \\\n\t\t\t--safe-url --safe-freq --skip-urlencode --csrf-token --csrf-url \\\n\t\t\t--force-ssl --hpp --eval -o --predict-output --keep-alive \\\n\t\t\t--null-connection --threads -p  --skip --dbms --dbms-cred \\\n\t\t\t--os --invalid-bignum --invalid-logical --invalid-string \\\n\t\t\t--no-cast --no-escape --prefix --suffix --tamper --level \\\n\t\t\t--risk --string --not-string --regexp --code --text-only \\\n\t\t\t--titles --technique --time-sec --union-cols --union-char \\\n\t\t\t--union-from --dns-domain --second-order -f --fingerprint \\\n\t\t\t-a --all -b --banner --current-user --current-db --hostname \\\n\t\t\t--is-dba --users --passwords --privileges --roles --dbs --tables \\\n\t\t\t--columns --schema --count --dump --dump-all --search --comments \\\n\t\t\t-D -T -C -X -U --exclude-sysdbs --where --start --stop \\\n\t\t\t--first --last --sql-query --sql-shell --sql-file --common-tables \\\n\t\t\t--common-columns --udf-inject --shared-lib --file-read --file-write \\\n\t\t\t--file-dest --os-cmd --os-shell --os-pwn --os-smbrelay --os-bof \\\n\t\t\t--priv-esc --msf-path --tmp-path --reg-read --reg-add --reg-del \\\n\t\t\t--reg-key --reg-value --reg-data --reg-type -s -t --batch \\\n\t\t\t--charset --crawl --csv-del --dump-format --eta --flush-session \\\n\t\t\t--forms --fresh-queries --hex --output-dir --parse-errors \\\n\t\t\t--pivot-column --save --scope --test-filter --update \\\n\t\t\t-z --alert --answers --beep --check-waf --cleanup \\\n\t\t\t--dependencies --disable-coloring --gpage --identify-waf \\\n\t\t\t--mobile --page-rank --purge-output --smart \\\n\t\t\t--sqlmap-shell --wizard' -- \"$cur\"\n\t\t)\n\t\t# this removes any options from the list of completions that have\n\t\t# already been specified somewhere on the command line, as long as\n\t\t# these options can only be used once (in a word, \"options\", in\n\t\t# opposition to \"tests\" and \"actions\", as in the find(1) manpage).\n\t\tonlyonce=' -h --help -hh --version -v -d -u --url -l -x -m -r -g -c \\\n\t\t\t--drop-set-cookie --random-agent \\\n\t\t\t--ignore-401 \\\n\t\t\t--ignore-proxy --tor \\\n\t\t\t--check-tor \\\n\t\t\t--skip-urlencode \\\n\t\t\t--force-ssl --hpp -o --predict-output --keep-alive \\\n\t\t\t--null-connection -p \\\n\t\t\t--invalid-bignum --invalid-logical --invalid-string \\\n\t\t\t--no-cast --no-escape \\\n\t\t\t--text-only \\\n\t\t\t--titles \\\n\t\t\t-f --fingerprint \\\n\t\t\t-a --all -b --banner --current-user --current-db --hostname \\\n\t\t\t--is-dba --users --passwords --privileges --roles --dbs --tables \\\n\t\t\t--columns --schema --count --dump --dump-all --search --comments \\\n\t\t\t-D -T -C -X -U --exclude-sysdbs \\\n\t\t\t--sql-shell --common-tables \\\n\t\t\t--common-columns --udf-inject \\\n\t\t\t--os-shell --os-pwn --os-smbrelay --os-bof \\\n\t\t\t--priv-esc --reg-read --reg-add --reg-del \\\n\t\t\t-s -t --batch \\\n\t\t\t--eta --flush-session \\\n\t\t\t--forms --fresh-queries --hex --parse-errors \\\n\t\t\t--save --update \\\n\t\t\t-z --beep --check-waf --cleanup \\\n\t\t\t--dependencies --disable-coloring --identify-waf \\\n\t\t\t--mobile --page-rank --purge-output --smart \\\n\t\t\t--sqlmap-shell --wizard '\n\n\t\tIFS=\" \" read -r -a COMPREPLY <<< \"$( (\n\t\t\twhile read -r -d ' ' i; do\n\t\t\t\t[[ -z \"$i\" || \"${onlyonce/ ${i%% *} / }\" == \"$onlyonce\" ]] && continue\n\t\t\t\t# flatten array with spaces on either side,\n\t\t\t\t# otherwise we cannot grep on word boundaries of\n\t\t\t\t# first and last word\n\t\t\t\tCOMPREPLYSTR=\" ${COMPREPLY[*]} \"\n\t\t\t\t# remove word from list of completions\n\t\t\t\tIFS=\" \" read -r -a COMPREPLY <<< \"${COMPREPLYSTR/ ${i%% *} / }\"\n\t\t\tdone\n\t\t\tprintf '%s ' \"${COMPREPLY[@]}\"\n\t\t) <<< \"${COMP_WORDS[@]}\")\"\n\n\t\t#else\n\t\t#_filedir bat\n\tfi\n}\n\ncomplete -F _sqlmap sqlmap\n"
  },
  {
    "path": "completion/available/ssh.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"ssh - secure shell remote login and command execution\"\ngroup \"networking\"\nurl \"https://www.openssh.com/\"\n\n# Bash completion support for ssh.\n\n# Remove : and @ from COMP_WORDBREAKS to support user@host completion\nexport COMP_WORDBREAKS=${COMP_WORDBREAKS//[:@]/}\n\n_sshcomplete() {\n\tlocal line CURRENT_PROMPT=\"${COMP_WORDS[COMP_CWORD]}\"\n\tif [[ ${CURRENT_PROMPT} == *@* ]]; then\n\t\tlocal OPTIONS=\"-P ${CURRENT_PROMPT/@*/}@ -- ${CURRENT_PROMPT/*@/}\"\n\telse\n\t\tlocal OPTIONS=\" -- ${CURRENT_PROMPT}\"\n\tfi\n\n\t# parse all defined hosts from .ssh/config and files included there\n\tfor fl in \"$HOME/.ssh/config\" \\\n\t\t$(grep \"^\\s*Include\" \"$HOME/.ssh/config\" \\\n\t\t\t| awk '{for (i=2; i<=NF; i++) print $i}' \\\n\t\t\t| sed -Ee \"s|^([^/~])|$HOME/.ssh/\\1|\" -e \"s|^~/|$HOME/|\"); do\n\t\tif [ -r \"$fl\" ]; then\n\t\t\t#shellcheck disable=SC2086\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$(grep -i ^Host \"$fl\" | grep -v '[*!]' | awk '{for (i=2; i<=NF; i++) print $i}')\" ${OPTIONS})\n\t\tfi\n\tdone\n\n\t# parse all hosts found in .ssh/known_hosts\n\tif [ -r \"$HOME/.ssh/known_hosts\" ] && grep -v -q -e '^ ssh-rsa' \"$HOME/.ssh/known_hosts\"; then\n\t\t#shellcheck disable=SC2086\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$(awk '{print $1}' \"$HOME/.ssh/known_hosts\" | grep -v ^\\| | cut -d, -f 1 | sed -e 's/\\[//g' | sed -e 's/\\]//g' | cut -d: -f1 | grep -v ssh-rsa)\" ${OPTIONS})\n\tfi\n\n\t# parse hosts defined in /etc/hosts\n\tif [ -r /etc/hosts ]; then\n\t\t#shellcheck disable=SC2086\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"$(grep -v '^[[:space:]]*$' /etc/hosts | grep -v '^#' | awk '{for (i=2; i<=NF; i++) print $i}')\" ${OPTIONS})\n\tfi\n\n\treturn 0\n}\n\ncomplete -o default -o nospace -F _sshcomplete ssh scp slogin sftp\n"
  },
  {
    "path": "completion/available/svn.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"svn - Apache Subversion version control system\"\ngroup \"version-control\"\nurl \"https://subversion.apache.org/\"\n\n# Locate and load completions for `svn`.\n\n# Make sure svn is installed\n_bash-it-completion-helper-necessary svn || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient svn || return\n\n_svn_bash_completion_xcrun_svn=\nif _command_exists xcrun; then\n\t_svn_bash_completion_xcrun_svn=\"$(xcrun --find svn)\"\nfi\n_svn_bash_completion_paths=(\n\t# Standard locations\n\t\"${SVN_EXE%/*}/../etc/bash_completion.d/subversion\"\n\t# MacOS non-system locations\n\t\"${_svn_bash_completion_xcrun_svn%/bin/svn}/etc/bash_completion.d/subversion\"\n)\n\n# Load the first completion file found\n_svn_bash_completion_found=false\nfor _comp_path in \"${_svn_bash_completion_paths[@]}\"; do\n\tif [[ -r \"$_comp_path\" ]]; then\n\t\t_svn_bash_completion_found=true\n\t\t# shellcheck disable=SC1090 # don't follow\n\t\tsource \"$_comp_path\"\n\t\tbreak\n\tfi\ndone\n\n# Cleanup\nif [[ \"${_svn_bash_completion_found}\" == false ]]; then\n\t_log_warning \"no completion files found - please try enabling the 'system' completion instead.\"\nfi\nunset \"${!_svn_bash_completion@}\"\n"
  },
  {
    "path": "completion/available/system.completion.bash",
    "content": "# shellcheck shell=bash\n#\n# Loads the system's Bash completion modules.\n# If Homebrew is installed (OS X), it's Bash completion modules are loaded.\n\n# Load before other completions\n# BASH_IT_LOAD_PRIORITY: 325\n\n# Bash-completion is too large and complex to expect to handle unbound variables throughout the whole codebase.\nif shopt -qo nounset; then\n\t__bash_it_restore_nounset=true\n\tshopt -uo nounset\nelse\n\t__bash_it_restore_nounset=false\nfi\n\n# shellcheck disable=SC1090 disable=SC1091\nif [[ -r \"${BASH_COMPLETION:-}\" ]]; then\n\tsource \"${BASH_COMPLETION}\"\nelif [[ -r /etc/bash_completion ]]; then\n\tsource /etc/bash_completion\n# Some distribution makes use of a profile.d script to import completion.\nelif [[ -r /etc/profile.d/bash_completion.sh ]]; then\n\tsource /etc/profile.d/bash_completion.sh\nelif _bash_it_homebrew_check; then\n\t: \"${BASH_COMPLETION_COMPAT_DIR:=${BASH_IT_HOMEBREW_PREFIX}/etc/bash_completion.d}\"\n\tcase \"${BASH_VERSION}\" in\n\t\t1* | 2* | 3.0* | 3.1*)\n\t\t\t_log_warning \"Cannot load completion due to version of shell. Are you using Bash 3.2+?\"\n\t\t\t;;\n\t\t3.2* | 4.0* | 4.1*)\n\t\t\t# Import version 1.x of bash-completion, if installed.\n\t\t\tBASH_COMPLETION=\"${BASH_IT_HOMEBREW_PREFIX}/opt/bash-completion@1/etc/bash_completion\"\n\t\t\tif [[ -r \"$BASH_COMPLETION\" ]]; then\n\t\t\t\tsource \"$BASH_COMPLETION\"\n\t\t\telse\n\t\t\t\tunset BASH_COMPLETION\n\t\t\tfi\n\t\t\t;;\n\t\t4.2* | 5* | *)\n\t\t\t# homebrew/versions/bash-completion2 (required for projects.completion.bash) is installed to this path\n\t\t\tif [[ -r \"${BASH_IT_HOMEBREW_PREFIX}/opt/bash-completion@2/etc/profile.d/bash_completion.sh\" ]]; then\n\t\t\t\tsource \"${BASH_IT_HOMEBREW_PREFIX}/opt/bash-completion@2/etc/profile.d/bash_completion.sh\"\n\t\t\tfi\n\t\t\t;;\n\tesac\nfi\n\nif [[ ${__bash_it_restore_nounset:-false} == \"true\" ]]; then\n\tshopt -so nounset\nfi\nunset __bash_it_restore_nounset\n"
  },
  {
    "path": "completion/available/terraform.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"terraform/tofu completion\"\n\n# Note, this is not using the _bash-it-completion-helper-necessary function\n# because it's a multiple choice case, and will therefore produce more\n# sensible log messages.\n\n# Check if at least one of the binaries is available (OR logic)\nif ! _binary_exists terraform && ! _binary_exists tofu; then\n\t_log_warning \"Without 'terraform' or 'tofu' installed, this completion won't be too useful.\"\n\treturn 1\nfi\n\n# Handle terraform completion if available and not already managed\nif _binary_exists terraform; then\n\t_bash-it-completion-helper-sufficient terraform || {\n\t\t# Terraform completes itself\n\t\tcomplete -C terraform terraform\n\t}\nfi\n\n# Handle tofu completion if available and not already managed\nif _binary_exists tofu; then\n\t_bash-it-completion-helper-sufficient tofu || {\n\t\t# OpenTofu completes itself\n\t\tcomplete -C tofu tofu\n\t}\nfi\n"
  },
  {
    "path": "completion/available/test_kitchen.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2120,SC2207\n__kitchen_instance_list() {\n\t# cache to .kitchen.list.yml\n\tif [[ .kitchen.yml -nt .kitchen.list.yml || .kitchen.local.yml -nt .kitchen.list.yml ]]; then\n\t\t# update list if config has updated\n\t\tkitchen list --bare > .kitchen.list.yml\n\tfi\n\tcat .kitchen.list.yml\n}\n\n__kitchen_options() {\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tCOMPREPLY=()\n\n\tcase $prev in\n\t\tconverge | create | destroy | diagnose | list | login | setup | test | verify)\n\t\t\tCOMPREPLY=($(compgen -W \"$(__kitchen_instance_list)\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tdriver)\n\t\t\tCOMPREPLY=($(compgen -W \"create discover help\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -W \"console converge create destroy driver help init list login setup test verify version\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n}\ncomplete -F __kitchen_options kitchen\n"
  },
  {
    "path": "completion/available/tmux.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2120,SC2207\n# A future refactor can fix this better.\n\ncite \"about-completion\"\nabout-completion \"tmux - terminal multiplexer for managing multiple shell sessions\"\ngroup \"terminal\"\nurl \"https://github.com/tmux/tmux\"\n\n# tmux completion\n# See: http://www.debian-administration.org/articles/317 for how to write more.\n# Usage: Put \"source bash_completion_tmux.sh\" into your .bashrc\n\n_tmux_expand() {\n\t[[ \"$cur\" != \"${cur%\\\\}\" ]] && cur=\"$cur\\\\\"\n\tif [[ \"$cur\" == \\~*/* ]]; then\n\t\teval \"cur=$cur\"\n\telse\n\t\tif [[ \"$cur\" == \\~* ]]; then\n\t\t\tcur=${cur#\\~}\n\t\t\tCOMPREPLY=($(compgen -P '~' -u \"$cur\"))\n\t\t\treturn ${#COMPREPLY[@]}\n\t\tfi\n\tfi\n}\n\n_tmux_filedir() {\n\tlocal IFS='\n'\n\t_tmux_expand || return 0\n\tif [[ \"$1\" = -d ]]; then\n\t\tCOMPREPLY=(\"${COMPREPLY[@]}\" $(compgen -d -- \"$cur\"))\n\t\treturn 0\n\tfi\n\tCOMPREPLY=(\"${COMPREPLY[@]}\" $(eval \"compgen -f -- \\\"$cur\\\"\"))\n}\n\nfunction _tmux_complete_client() {\n\tlocal IFS=$'\\n'\n\tlocal cur=\"${1}\"\n\tCOMPREPLY+=($(compgen -W \"$(tmux -q list-clients 2> /dev/null | cut -f 1 -d ':')\" -- \"${cur}\"))\n}\nfunction _tmux_complete_session() {\n\tlocal IFS=$'\\n'\n\tlocal cur=\"${1}\"\n\tCOMPREPLY+=($(compgen -W \"$(tmux -q list-sessions 2> /dev/null | cut -f 1 -d ':')\" -- \"${cur}\"))\n}\nfunction _tmux_complete_window() {\n\tlocal IFS=$'\\n'\n\tlocal cur=\"${1}\"\n\tlocal session_name sessions\n\tsession_name=\"$(echo \"${cur}\" | sed 's/\\\\//g' | cut -d ':' -f 1)\"\n\n\tsessions=\"$(tmux -q list-sessions 2> /dev/null | sed -re 's/([^:]+:).*$/\\1/')\"\n\tif [[ -n \"${session_name}\" ]]; then\n\t\tsessions=\"${sessions}\n        $(tmux -q list-windows -t \"${session_name}\" 2> /dev/null | sed -re 's/^([^:]+):.*$/'\"${session_name}\"':\\1/')\"\n\tfi\n\tcur=${cur/:/\\\\\\\\:}\n\tsessions=${sessions/:/\\\\\\\\:}\n\tCOMPREPLY+=($(compgen -W \"${sessions}\" -- \"${cur}\"))\n}\n\n_tmux() {\n\tlocal cur prev\n\tlocal i cmd cmd_index option option_index\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\tif [[ \"${prev}\" == -f ]]; then\n\t\t_tmux_filedir\n\telse\n\t\t# Search for the command\n\t\tlocal skip_next=0\n\t\tfor ((i = 1; i <= COMP_CWORD; i++)); do\n\t\t\tif [[ ${skip_next} -eq 1 ]]; then\n\t\t\t\t#echo \"Skipping\"\n\t\t\t\tskip_next=0\n\t\t\telif [[ ${COMP_WORDS[i]} != -* ]]; then\n\t\t\t\tcmd=\"${COMP_WORDS[i]}\"\n\t\t\t\tcmd_index=${i}\n\t\t\t\tbreak\n\t\t\telif [[ ${COMP_WORDS[i]} == -f ]]; then\n\t\t\t\tskip_next=1\n\t\t\tfi\n\t\tdone\n\n\t\t# Search for the last option command\n\t\tskip_next=0\n\t\tfor ((i = 1; i <= COMP_CWORD; i++)); do\n\t\t\tif [[ ${skip_next} -eq 1 ]]; then\n\t\t\t\t#echo \"Skipping\"\n\t\t\t\tskip_next=0\n\t\t\telif [[ ${COMP_WORDS[i]} == -* ]]; then\n\t\t\t\toption=\"${COMP_WORDS[i]}\"\n\t\t\t\toption_index=${i}\n\t\t\t\tif [[ ${COMP_WORDS[i]} == -- ]]; then\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\t\t\telif [[ ${COMP_WORDS[i]} == -f ]]; then\n\t\t\t\tskip_next=1\n\t\t\tfi\n\t\tdone\n\n\t\tif [[ $COMP_CWORD -le $cmd_index ]]; then\n\t\t\t# The user has not specified a command yet\n\t\t\tCOMPREPLY=(\"${COMPREPLY[@]:-}\" $(compgen -W \"$(tmux start-server \\; list-commands | cut -d' ' -f1)\" -- \"${cur}\"))\n\t\telse\n\t\t\tcase ${cmd} in\n\t\t\t\tattach-session | attach)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t -d\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tdetach-client | detach)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_client \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tlock-client | lockc)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_client \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tlock-session | locks)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t -d\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tnew-session | new)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t-c) _tmux_filedir -d ;;\n\t\t\t\t\t\t-[n | d | s]) options=\"-d -n -s -t --\" ;;\n\t\t\t\t\t\t*)\n\t\t\t\t\t\t\tif [[ ${COMP_WORDS[option_index]} == -- ]]; then\n\t\t\t\t\t\t\t\t_command_offset \"${option_index}\"\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\toptions=\"-d -n -s -t -c --\"\n\t\t\t\t\t\t\tfi\n\t\t\t\t\t\t\t;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\trefresh-client | refresh)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_client \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\trename-session | rename)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tsource-file | source) _tmux_filedir ;;\n\t\t\t\thas-session | has | kill-session)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tsuspend-client | suspendc)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-t) _tmux_complete_client \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\t\tswitch-client | switchc)\n\t\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\t-c) _tmux_complete_client \"${cur}\" ;;\n\t\t\t\t\t\t-t) _tmux_complete_session \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-l -n -p -c -t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\n\t\t\t\tsend-keys | send)\n\t\t\t\t\tcase \"$option\" in\n\t\t\t\t\t\t-t) _tmux_complete_window \"${cur}\" ;;\n\t\t\t\t\t\t*) options=\"-t\" ;;\n\t\t\t\t\tesac\n\t\t\t\t\t;;\n\t\t\tesac # case ${cmd}\n\t\tfi    # command specified\n\tfi     # not -f\n\n\tif [[ -n \"${options}\" ]]; then\n\t\tCOMPREPLY=(\"${COMPREPLY[@]:-}\" $(compgen -W \"${options}\" -- \"${cur}\"))\n\tfi\n\n\treturn 0\n\n}\ncomplete -F _tmux tmux\n\n# END tmux completion\n"
  },
  {
    "path": "completion/available/todo.completion.bash",
    "content": "# shellcheck shell=bash\n_log_warning 'Bash completion for \"todo.txt-cli\" is now deprecated, as it used code with incompatible license.\nPlease disable this completion and use the instructions from \"todo.txt-cli\" developers instead.'\n_disable-completion \"todo\"\n"
  },
  {
    "path": "completion/available/travis.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1090\n\n# Make sure travis is installed\n_bash-it-completion-helper-necessary travis || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient travis || return\n\nif [[ -s \"${_travis_bash_completion_script:=${TRAVIS_CONFIG_PATH:-${HOME}/.travis}/travis.sh}\" ]]; then\n\t# shellcheck disable=SC1090\n\tsource \"${_travis_bash_completion_script}\"\nfi\nunset \"${!_travis_bash_completion@}\"\n"
  },
  {
    "path": "completion/available/vagrant.completion.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-completion\"\nabout-completion \"vagrant - tool for building and managing virtualized development environments\"\ngroup \"virtualization\"\nurl \"https://www.vagrantup.com\"\n\n# (The MIT License)\n#\n# Copyright (c) 2014 Kura\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the 'Software'), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n__pwdln() {\n\tpwdmod=\"${PWD}/\"\n\titr=0\n\tuntil [[ -z \"$pwdmod\" ]]; do\n\t\titr=$((itr + 1))\n\t\tpwdmod=\"${pwdmod#*/}\"\n\tdone\n\techo -n $((itr - 1))\n}\n\n__vagrantinvestigate() {\n\tif [ -f \"${PWD}/.vagrant\" ] || [ -d \"${PWD}/.vagrant\" ]; then\n\t\techo \"${PWD}/.vagrant\"\n\t\treturn 0\n\telse\n\t\tpwdmod2=\"${PWD}\"\n\t\tfor ((i = 2; i <= $(__pwdln); i++)); do\n\t\t\tpwdmod2=\"${pwdmod2%/*}\"\n\t\t\tif [ -f \"${pwdmod2}/.vagrant\" ] || [ -d \"${pwdmod2}/.vagrant\" ]; then\n\t\t\t\techo \"${pwdmod2}/.vagrant\"\n\t\t\t\treturn 0\n\t\t\tfi\n\t\tdone\n\tfi\n\treturn 1\n}\n\n_vagrant() {\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tcommands=\"box cloud destroy global-status halt help hostmanager init login package plugin port powershell provision push rdp reload resume scp snapshot ssh ssh-config status suspend up upload validate vbguest version winrm winrm-config\"\n\n\tif ((COMP_CWORD == 1)); then\n\t\tCOMPREPLY=()\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${commands}\" -- \"${cur}\")\n\t\treturn 0\n\tfi\n\n\tif ((COMP_CWORD == 2)); then\n\t\tcase \"$prev\" in\n\t\t\t\"init\")\n\t\t\t\tlocal box_list\n\t\t\t\tbox_list=$(find \"$HOME/.vagrant.d/boxes\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sed -e 's/-VAGRANTSLASH-/\\//')\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${box_list}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"up\")\n\t\t\t\tvagrant_state_file=$(__vagrantinvestigate) || return 1\n\t\t\t\tif [[ -d $vagrant_state_file ]]; then\n\t\t\t\t\tvm_list=$(find \"$vagrant_state_file/machines\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\;)\n\t\t\t\tfi\n\t\t\t\tlocal up_commands=\"--no-provision\"\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${up_commands} ${vm_list}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"ssh\" | \"provision\" | \"reload\" | \"halt\" | \"suspend\" | \"resume\" | \"ssh-config\")\n\t\t\t\tvagrant_state_file=$(__vagrantinvestigate) || return 1\n\t\t\t\tif [[ -f $vagrant_state_file ]]; then\n\t\t\t\t\trunning_vm_list=$(grep 'active' \"$vagrant_state_file\" | sed -e 's/\"active\"://' | tr ',' '\\n' | cut -d '\"' -f 2 | tr '\\n' ' ')\n\t\t\t\telse\n\t\t\t\t\trunning_vm_list=$(find \"$vagrant_state_file\" -type f -name \"id\" | awk -F\"/\" '{print $(NF-2)}')\n\t\t\t\tfi\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${running_vm_list}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"box\")\n\t\t\t\tbox_commands=\"add list outdated prune remove repackage update\"\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${box_commands}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"plugin\")\n\t\t\t\tplugin_commands=\"expunge install license list repair uninstall update\"\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${plugin_commands}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"help\")\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${commands}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t\"snapshot\")\n\t\t\t\tsnapshot_commands=\"delete list pop push restore save\"\n\t\t\t\tCOMPREPLY=()\n\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${snapshot_commands}\" -- \"${cur}\")\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t*) ;;\n\t\tesac\n\tfi\n\n\tif ((COMP_CWORD == 3)); then\n\t\taction=\"${COMP_WORDS[COMP_CWORD - 2]}\"\n\t\tcase \"$action\" in\n\t\t\t\"up\")\n\t\t\t\tif [ \"$prev\" == \"--no-provision\" ]; then\n\t\t\t\t\tCOMPREPLY=()\n\t\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${vm_list}\" -- \"${cur}\")\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t\"box\")\n\t\t\t\tcase \"$prev\" in\n\t\t\t\t\t\"remove\" | \"repackage\")\n\t\t\t\t\t\tlocal box_list\n\t\t\t\t\t\tbox_list=$(find \"$HOME/.vagrant.d/boxes\" -mindepth 1 -maxdepth 1 -type d -exec basename {} \\; | sed -e 's/-VAGRANTSLASH-/\\//')\n\t\t\t\t\t\tCOMPREPLY=()\n\t\t\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${box_list}\" -- \"${cur}\")\n\t\t\t\t\t\treturn 0\n\t\t\t\t\t\t;;\n\t\t\t\t\t*) ;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\t\"snapshot\")\n\t\t\t\tif [ \"$prev\" == \"restore\" ]; then\n\t\t\t\t\tCOMPREPLY=()\n\t\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${vm_list}\" -- \"${cur}\")\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\t;;\n\t\tesac\n\tfi\n\n\tif ((COMP_CWORD == 4)); then\n\t\taction=\"${COMP_WORDS[COMP_CWORD - 3]}\"\n\t\tprev=\"${COMP_WORDS[COMP_CWORD - 2]}\"\n\t\tcase \"$action\" in\n\t\t\t\"snapshot\")\n\t\t\t\tif [ \"$prev\" == \"restore\" ]; then\n\t\t\t\t\tlocal snapshot_list\n\t\t\t\t\tsnapshot_list=\"$(vagrant snapshot list \"${cur}\" 2> /dev/null | awk '{ORS=\" \"} /==>/ {next} {print}')\"\n\t\t\t\t\tCOMPREPLY=()\n\t\t\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${snapshot_list}\" -- \"${cur}\")\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t*) ;;\n\t\tesac\n\tfi\n}\ncomplete -F _vagrant vagrant\n"
  },
  {
    "path": "completion/available/vault.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"vault completion\"\n\n# Make sure vault is installed\n_bash-it-completion-helper-necessary vault || return\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient vault || return\n\ncomplete -C vault vault\n"
  },
  {
    "path": "completion/available/virsh.completion.bash",
    "content": "# shellcheck shell=bash\n_log_warning 'Bash completion for \"virsh\" is now deprecated, as it used code with incompatible license.\nPlease disable this completion and use the instructions from \"virsh\" developers instead.'\n_disable-completion \"virsh\"\n"
  },
  {
    "path": "completion/available/virtualbox.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2120,SC2207\n\ncite \"about-completion\"\nabout-completion \"virtualbox - Oracle VM VirtualBox virtualization software\"\ngroup \"virtualization\"\nurl \"https://www.virtualbox.org/\"\n\n_vboxmanage_realopts() {\n\tvboxmanage | grep -i vboxmanage | cut -d' ' -f2 | grep '\\[' | tr -s '\\[\\|\\]\\n' ' '\n\techo \" \"\n}\n\n__vboxmanage_startvm() {\n\tRUNNING=$(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '\"')\n\tTOTAL=$(vboxmanage list vms | cut -d' ' -f1 | tr -d '\"')\n\n\tAVAILABLE=\"\"\n\tfor VM in $TOTAL; do\n\t\tMATCH=0\n\t\tfor RUN in $RUNNING \"x\"; do\n\t\t\tif [ \"$VM\" == \"$RUN\" ]; then\n\t\t\t\tMATCH=1\n\t\t\tfi\n\t\tdone\n\t\t((MATCH == 0)) && AVAILABLE=\"$AVAILABLE $VM \"\n\tdone\n\techo \"$AVAILABLE\"\n}\n\n__vboxmanage_list() {\n\tINPUT=$(vboxmanage list | tr -s '\\[\\]\\|\\n' ' ' | cut -d' ' -f4-)\n\n\tPRUNED=\"\"\n\tif [ \"$1\" == \"long\" ]; then\n\t\tfor WORD in $INPUT; do\n\t\t\t[ \"$WORD\" == \"-l\" ] && continue\n\t\t\t[ \"$WORD\" == \"--long\" ] && continue\n\n\t\t\tPRUNED=\"$PRUNED $WORD\"\n\t\tdone\n\telse\n\t\tPRUNED=$INPUT\n\tfi\n\n\techo \"$PRUNED\"\n}\n\n__vboxmanage_list_vms() {\n\tVMS=\"\"\n\tif [ \"$1\" == \"\" ]; then\n\t\tSEPARATOR=\" \"\n\telse\n\t\tSEPARATOR=$1\n\tfi\n\n\tfor VM in $(vboxmanage list vms | cut -d' ' -f1 | tr -d '\"'); do\n\t\t[ \"$VMS\" != \"\" ] && VMS=\"${VMS}${SEPARATOR}\"\n\t\tVMS=\"${VMS}${VM}\"\n\tdone\n\n\techo \"$VMS\"\n}\n\n__vboxmanage_list_runningvms() {\n\tVMS=\"\"\n\tif [ \"$1\" == \"\" ]; then\n\t\tSEPARATOR=\" \"\n\telse\n\t\tSEPARATOR=$1\n\tfi\n\n\tfor VM in $(vboxmanage list runningvms | cut -d' ' -f1 | tr -d '\"'); do\n\t\t[ \"$VMS\" != \"\" ] && VMS=\"${VMS}${SEPARATOR}\"\n\t\tVMS=\"${VMS}${VM}\"\n\tdone\n\n\techo \"$VMS\"\n\n}\n\n__vboxmanage_controlvm() {\n\techo \"pause resume reset poweroff savestate acpipowerbutton\"\n\techo \"acpisleepbutton keyboardputscancode guestmemoryballoon\"\n\techo \"gueststatisticsinterval usbattach usbdetach vrde vrdeport\"\n\techo \"vrdeproperty vrdevideochannelquality setvideomodehint\"\n\techo \"screenshotpng setcredentials teleport plugcpu unplugcpu\"\n\techo \"cpuexecutioncap\"\n\n\t# setlinkstate<1-N>\n\t# nic<1-N> null|nat|bridged|intnet|hostonly|generic\n\t#                                      [<devicename>] |\n\t# nictrace<1-N> on|off\n\t#   nictracefile<1-N> <filename>\n\t#   nicproperty<1-N> name=[value]\n\t#   natpf<1-N> [<rulename>],tcp|udp,[<hostip>],\n\t#                 <hostport>,[<guestip>],<guestport>\n\t#   natpf<1-N> delete <rulename>\n\n}\n\n__vboxmanage_default() {\n\trealopts=$(_vboxmanage_realopts)\n\topts=$realopts$(vboxmanage | grep -i vboxmanage | cut -d' ' -f2 | grep -v '\\[' | sort | uniq)\n\tpruned=\"\"\n\n\t# echo \"\"\n\t# echo \"DEBUG: cur: $cur, prev: $prev\"\n\t# echo \"DEBUG: default: |$p1|$p2|$p3|$p4|\"\n\tcase ${cur} in\n\t\t-*)\n\t\t\techo \"$opts\"\n\t\t\t# COMPREPLY=($(compgen -W \"${opts}\" -- ${cur}))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\tfor WORD in $opts; do\n\t\tMATCH=0\n\t\tfor OPT in \"${COMP_WORDS[@]}\"; do\n\t\t\t# opts=$(echo \"${opts}\" | grep -v $OPT);\n\t\t\tif [ \"$OPT\" == \"$WORD\" ]; then\n\t\t\t\tMATCH=1\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\tif [ \"$OPT\" == \"-v\" ] && [ \"$WORD\" == \"--version\" ]; then\n\t\t\t\tMATCH=1\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\tif [ \"$OPT\" == \"--version\" ] && [ \"$WORD\" == \"-v\" ]; then\n\t\t\t\tMATCH=1\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\tif [ \"$OPT\" == \"-q\" ] && [ \"$WORD\" == \"--nologo\" ]; then\n\t\t\t\tMATCH=1\n\t\t\t\tbreak\n\t\t\tfi\n\t\t\tif [ \"$OPT\" == \"--nologo\" ] && [ \"$WORD\" == \"-q\" ]; then\n\t\t\t\tMATCH=1\n\t\t\t\tbreak\n\t\t\tfi\n\t\tdone\n\t\t((MATCH == 1)) && continue\n\t\tpruned=\"$pruned $WORD\"\n\n\tdone\n\n\t# COMPREPLY=($(compgen -W \"${pruned}\" -- \"${cur}\"))\n\techo \"$pruned\"\n\treturn 0\n}\n\n_vboxmanage() {\n\t# vboxmanage | grep -i vboxmanage | cut -d' ' -f2 | sort | uniq\n\tlocal cur opts\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\t# echo \"cur: |$cur|\"\n\t# echo \"prev: |$prev|\"\n\n\t# In case current is complete command\n\tcase $cur in\n\t\tstartvm | list | controlvm)\n\t\t\tCOMPREPLY=($(compgen -W \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\tcase $prev in\n\t\t-v | --version)\n\t\t\treturn 0\n\t\t\t;;\n\n\t\t-l | --long)\n\t\t\topts=$(__vboxmanage_list \"long\")\n\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tstartvm | list)\n\t\t\topts=$(__vboxmanage_\"$prev\")\n\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\t--type)\n\t\t\tCOMPREPLY=($(compgen -W \"gui headless\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tgui | headless)\n\t\t\t# Done. no more completion possible\n\t\t\treturn 0\n\t\t\t;;\n\t\tvboxmanage | -q | --nologo)\n\t\t\t# echo \"Got vboxmanage\"\n\t\t\topts=$(__vboxmanage_default)\n\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\t\tcontrolvm)\n\t\t\topts=$(__vboxmanage_list_vms)\n\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\tfor VM in $(__vboxmanage_list_vms); do\n\t\tif [ \"$VM\" == \"$prev\" ]; then\n\t\t\tpprev=${COMP_WORDS[COMP_CWORD - 2]}\n\t\t\t# echo \"previous: $pprev\"\n\t\t\tcase $pprev in\n\t\t\t\tstartvm)\n\t\t\t\t\topts=\"--type\"\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\t\tcontrolvm)\n\t\t\t\t\topts=$(__vboxmanage_controlvm)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${opts}\" -- \"${cur}\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tfi\n\tdone\n\n\t# echo \"Got to end withoug completion\"\n}\ncomplete -F _vboxmanage vboxmanage\n"
  },
  {
    "path": "completion/available/vuejs.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure vue is installed\n_bash-it-completion-helper-necessary vue || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient vue || return\n\nfunction _vuejs() {\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\tcase $prev in\n\t\tcreate)\n\t\t\tCOMPREPLY=(\"-p\" \"-d\" \"-i\" \"-m\" \"-r\" \"-g\" \"-n\" \"-f\" \"-c\" \"-x\" \"-b\"\n\t\t\t\t\"-h\" \"--help\" \"--preset\" \"--default\" \"--inilinePreset\"\n\t\t\t\t\"--packageManager\" \"--registry\" \"--git\" \"--no-git\" \"--force\"\n\t\t\t\t\"--merge\" \"--clone\" \"--proxy\" \"--bare\" \"\" \"--skipGetStarted\")\n\t\t\t;;\n\t\tadd | invoke)\n\t\t\tCOMPREPLY=(\"--registry\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tinspect)\n\t\t\tCOMPREPLY=(\"-v\" \"--help\" \"--verbose\" \"--mode\" \"--rule\" \"--plugin\"\n\t\t\t\t\"--plugins\" \"--rules\")\n\t\t\t;;\n\t\tserve)\n\t\t\tCOMPREPLY=(\"-o\" \"-h\" \"--help\" \"--open\" \"-c\" \"--copy\" \"-p\" \"--port\")\n\t\t\t;;\n\t\tbuild)\n\t\t\tCOMPREPLY=(\"-t\" \"--target\" \"-n\" \"--name\" \"-d\" \"--dest\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tui)\n\t\t\tCOMPREPLY=(\"-H\" \"--host\" \"-p\" \"--port\" \"-D\" \"--dev\" \"--quiet\"\n\t\t\t\t\"--headless\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tinit)\n\t\t\tCOMPREPLY=(\"-c\" \"--clone\" \"--offline\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tconfig)\n\t\t\tCOMPREPLY=(\"-g\" \"--get\" \"-s\" \"--set\" \"-d\" \"--delete\" \"-e\" \"--edit\"\n\t\t\t\t\"--json\" \"-h\" \"--help\")\n\t\t\t;;\n\t\toutdated)\n\t\t\tCOMPREPLY=(\"--next\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tupgrade)\n\t\t\tCOMPREPLY=(\"-t\" \"--to\" \"-f\" \"--from\" \"-r\" \"--registry\" \"--all\"\n\t\t\t\t\"--next\" \"-h\" \"--help\")\n\t\t\t;;\n\t\tmigrate)\n\t\t\tCOMPREPLY=(\"-f\" \"--from\" \"-h\" \"--help\")\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=(\"-h\" \"--help\" \"-v\" \"--version\" \"create\" \"add\" \"invoke\"\n\t\t\t\t\"inspect\" \"serve\" \"build\" \"ui\" \"init\" \"config\" \"outdated\"\n\t\t\t\t\"upgrade\" \"migrate\" \"info\")\n\t\t\t;;\n\tesac\n}\n\ncomplete -F _vuejs -X '!&*' vue\n"
  },
  {
    "path": "completion/available/wpscan.completion.bash",
    "content": "# shellcheck shell=bash\n\n# Make sure wpscan is installed\n_bash-it-completion-helper-necessary wpscan || :\n\n# Don't handle completion if it's already managed\n_bash-it-completion-helper-sufficient wpscan || return\n\nfunction __wpscan() {\n\tlocal _opt_\n\tlocal OPTS=('--help' '--hh' '--version' '--url' '--ignore-main-redirect' '--verbose' '--output' '--format' '--detection-mode' '--scope' '--headers' '--user-agent' '--vhost' '--random-user-agent' '--user-agents-list' '--http-auth' '--max-threads' '--throttle' '--request-timeout' '--connect-timeout' '--disable-tlc-checks' '--proxy' '--proxy-auth' '--cookie-string' '--cookie-jar' '--cache-ttl' '--clear-cache' '--server' '--cache-dir' '--update' '--no-update' '--wp-content-dir' '--wp-plugins-dir' '--wp-version-detection' '--main-theme-detection' '--enumerate' '--exclude-content-based' '--plugins-list' '--plugins-detection' '--plugins-version-all' '--plugins-version-detection' '--themes-list' '--themes-detection' '--themes-version-all' '--themes-version-detection' '--timthumbs-list' '--timthumbs-detection' '--config-backups-list' '--config-backups-detection' '--db-exports-list' '--db-exports-detection' '--medias-detection' '--users-list' '--users-detection' '--passwords' '--usernames' '--multicall-max-passwords' '--password-attack' '--stealthy')\n\tCOMPREPLY=()\n\tfor _opt_ in \"${OPTS[@]}\"; do\n\t\tif [[ \"$_opt_\" == \"$2\"* ]]; then\n\t\t\tCOMPREPLY+=(\"$_opt_\")\n\t\tfi\n\tdone\n}\n\ncomplete -F __wpscan wpscan\n"
  },
  {
    "path": "completion/available/yarn.completion.bash",
    "content": "# shellcheck shell=bash\nabout-completion \"yarn cli completions\"\n\n# shellcheck disable=SC1090 source=../../vendor/github.com/dsifford/yarn-completion/yarn\nsource \"${BASH_IT}/vendor/github.com/dsifford/yarn-completion/yarn\"\n"
  },
  {
    "path": "custom/example.bash",
    "content": "# shellcheck shell=bash\n#\n# This is an example file. Don't use this for your custom scripts. Instead, create another file within the\n# custom directory.\n"
  },
  {
    "path": "docs/Makefile",
    "content": "# Minimal makefile for Sphinx documentation\n\n\n# You can set these variables from the command line, and also\n# from the environment for the first two.\nSPHINXOPTS    ?=\nSPHINXBUILD   ?= sphinx-build\nSOURCEDIR     = .\nBUILDDIR      = _build\n\n# Put it first so that \"make\" without argument is like \"make help\".\nhelp:\n\t@$(SPHINXBUILD) -M help \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n\n.PHONY: help Makefile\n\n# Catch-all target: route all unknown targets to Sphinx using the new\n# \"make mode\" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).\n%: Makefile\n\t@$(SPHINXBUILD) -M $@ \"$(SOURCEDIR)\" \"$(BUILDDIR)\" $(SPHINXOPTS) $(O)\n"
  },
  {
    "path": "docs/README.md",
    "content": "![logo](https://github.com/Bash-it/media/raw/master/media/Bash-it.png)\n\n![Build Status](../../../workflows/CI/badge.svg?event=push)\n![Docs Status](https://readthedocs.org/projects/bash-it/badge/)\n![License](https://img.shields.io/github/license/Bash-it/bash-it)\n![shell](https://img.shields.io/badge/Shell-Bash-blue)\n\n**Bash-it** is a collection of community Bash commands and scripts for Bash.\n(And a shameless ripoff of [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) :smiley:)\n97% of the code is compatible with bash 3.2+ but we are geared also toward power users,\nand one or two of the more complex plugins may need bash 5 features to run. If you\nhappen to be \"stuck\" on an older version of bash, we have code in place to prevent you\nfrom running those modules and getting errors. It's a short list though, and none of the core code.\n\nIncludes autocompletion, themes, aliases, custom functions, a few stolen pieces from Steve Losh, and more.\n\nBash-it provides a solid framework for using, developing and maintaining shell scripts and custom commands for your daily work.\nIf you're using the _Bourne Again Shell_ (Bash) regularly and have been looking for an easy way on how to keep all of these nice little scripts and aliases under control, then Bash-it is for you!\nStop polluting your `~/bin` directory and your `.bashrc` file, fork/clone Bash-it and start hacking away.\n\n- [Main Page](https://bash-it.readthedocs.io/en/latest)\n- [Contributing](#contributing)\n- [Installation](#installation)\n  - [Install Options](https://bash-it.readthedocs.io/en/latest/installation/#install-options)\n  - [via Docker](https://bash-it.readthedocs.io/en/latest/installation/#install-using-docker)\n  - [Updating](https://bash-it.readthedocs.io/en/latest/installation/#updating)\n- [Help](https://bash-it.readthedocs.io/en/latest/misc/#help-screens)\n- [Diagnostics](#diagnostics)\n- [Search](https://bash-it.readthedocs.io/en/latest/commands/search)\n  - [Syntax](https://bash-it.readthedocs.io/en/latest/commands/search/#syntax)\n  - [Searching with Negations](\n  https://bash-it.readthedocs.io/en/latest/commands/search/#searching-with-negations)\n  - [Using Search to Enable or Disable Components](https://bash-it.readthedocs.io/en/latest/commands/search/#using-search-to-enable-or-disable-components)\n  - [Disabling ASCII Color](https://bash-it.readthedocs.io/en/latest/commands/search/#disabling-ascii-color)\n- [Custom scripts, aliases, themes, and functions](\n  https://bash-it.readthedocs.io/en/latest/custom)\n- [Themes](https://bash-it.readthedocs.io/en/latest/themes)\n- [Uninstalling](https://bash-it.readthedocs.io/en/latest/uninstalling)\n- [Misc](https://bash-it.readthedocs.io/en/latest/misc)\n- [Help Out](https://bash-it.readthedocs.io/en/latest/#help-out)\n- [Contributors](#contributors)\n\n## Installation\n\n1) Check out a clone of this repo to a location of your choice, such as\n   ``git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it``\n2) Run ``~/.bash_it/install.sh``\n\nThat's it! :smiley:\n\nYou can check out more components of Bash-it, and customize it to your desire.\nFor more information, see detailed instructions [here](https://bash-it.readthedocs.io/en/latest/installation/).\n\n### custom configuration file location\n\nBy default the instller modifies/creates the actual ``~/.bashrc`` is updated.\nIf this is undesirable, you can create another file, by run the installer:\n```bash\nBASH_IT_CONFIG_FILE=path/to/my/custom/location.bash ~/.bash_it/install.sh\n```\n\n## Diagnostics\n\nIf you're experiencing issues with Bash-it or need to report a bug, use the built-in diagnostics tool:\n\n```bash\nbash-it doctor\n```\n\nThis command provides a comprehensive summary including:\n- Environment information (OS, Bash version)\n- Bash-it version and update status\n- Configuration file locations and how Bash-it is loaded\n- List of enabled components (aliases, plugins, completions)\n\n**When reporting bugs**, please include the full output of `bash-it doctor` in your issue report.\n\nThe doctor command can also help you update Bash-it - if you're behind the latest version and it's safe to update, you'll be prompted to merge the latest changes.\n\n## Contributing\n\nPlease take a look at the [Contribution Guidelines](https://bash-it.readthedocs.io/en/latest/contributing) before reporting a bug or providing a new feature.\n\n**When reporting bugs**, always run `bash-it doctor` and include its output in your issue report to help maintainers diagnose the problem quickly.\n\nThe [Development Guidelines](https://bash-it.readthedocs.io/en/latest/development) have more information on some of the internal workings of Bash-it,\nplease feel free to read through this page if you're interested in how Bash-it loads its components.\n\n## Contributors\n\n[List of contributors](https://github.com/Bash-it/bash-it/contributors)\n\n## License\n\nBash-it is licensed under the [MIT License](https://github.com/Bash-it/bash-it/blob/master/LICENSE).\n"
  },
  {
    "path": "docs/TODO_COMPOSURE_METADATA.md",
    "content": "# TODO: Completions Needing Composure Metadata\n\nThe following completion files need `cite \"about-completion\"` and `about-completion` metadata added.\nPlease add appropriate descriptions following this format:\n\n```bash\ncite \"about-completion\"\nabout-completion \"tool-name - brief description of what the tool does\"\ngroup \"category\"  # optional: python, ruby, javascript, deployment, etc.\n```\n\n## Completions Without Metadata\n\n- **awless** - TODO: Research AWS CLI alternative tool\n- **crystal** - TODO: Crystal programming language\n- **defaults** - TODO: macOS defaults command-line utility\n- **dmidecode** - TODO: DMI table decoder for system hardware information\n- **drush** - TODO: Drupal shell command-line tool\n- **export** - Deprecated (covered by system completion)\n- **git_flow** - TODO: Git branching model helpers\n- **git_flow_avh** - TODO: AVH Edition of git-flow\n- **homesick** - TODO: Dotfiles management tool\n- **kind** - TODO: Kubernetes IN Docker tool\n- **knife** - TODO: Chef configuration management tool\n- **kontena** - TODO: Container orchestration platform\n- **makefile** - TODO: GNU Make build automation\n- **minishift** - TODO: Local OpenShift cluster tool\n- **ngrok** - TODO: Secure tunneling to localhost\n- **notify-send** - TODO: Desktop notification tool\n- **openshift** - TODO: Red Hat's Kubernetes platform\n- **pew** - TODO: Python environment wrapper\n- **pipx** - TODO: Python application installer in isolated environments\n- **projects** - TODO: Bash-it project management\n- **salt** - TODO: SaltStack configuration management\n- **sdkman** - TODO: Software Development Kit Manager\n- **sqlmap** - TODO: SQL injection and database takeover tool\n- **system** - TODO: System-level bash completions\n- **test_kitchen** - TODO: Infrastructure testing framework\n- **todo** - TODO: todo.txt-cli task management\n- **travis** - TODO: Travis CI command-line client\n- **virsh** - TODO: Virtualization shell for libvirt\n- **vuejs** - TODO: Vue.js JavaScript framework CLI\n- **wpscan** - TODO: WordPress security scanner\n\n## Guidelines\n\n1. Keep descriptions concise (one line)\n2. Focus on what the tool does, not \"tab completion for...\"\n3. Add `group` field when the category is clear (e.g., python, javascript, deployment)\n4. Research unfamiliar tools before adding metadata\n"
  },
  {
    "path": "docs/_static/.keep",
    "content": ""
  },
  {
    "path": "docs/_templates/.keep",
    "content": ""
  },
  {
    "path": "docs/commands/doctor.rst",
    "content": ".. _doctor:\n\nBash-it doctor\n^^^^^^^^^^^^^^\n\nIf you encounter problems with any part of Bash-it, run the following command:\n\n.. code-block:: bash\n\n   bash-it doctor\n\nThis will reload your bash profile and print out logs of various parts in Bash-it.\nNote that this command at default will print all logs, including debug logs.\nYou can call it like this:\n\n.. code-block:: bash\n\n   bash-it doctor [errors/warnings/all]\n\nIn order to get wanted verbosity.\n"
  },
  {
    "path": "docs/commands/index.rst",
    "content": ".. _commands:\n\nBash-it Commands\n================\n\n**Bash-it** boasts a wide range of available commands.\nYou should be familiar with them in order to fully utilize Bash-it.\n\n.. toctree::\n   :maxdepth: 1\n\n   update\n   search\n   reload\n   doctor\n   profile\n"
  },
  {
    "path": "docs/commands/profile.rst",
    "content": ".. _profile:\n\nBash-it Profile\n---------------\n\nHave you ever wanted to port your *Bash-it* configuration into another machine?\n\nIf you did, then ``bash-it profile`` is for you!\n\nThis command can save and load custom *\"profile\"* files, that can be later\nused to load and recreate your configuration, in any machine you would like |:smile:|\n\nWhen porting your configuration into a new machine, you just need to save your current profile, copy the resulting *\"profile\"* file, and load it in the other machine.\n\nExample\n^^^^^^^\n\n.. code-block:: bash\n\n     # Saves your current profile\n     bash-it profile save my_profile\n     # Load the default profile, which is the one used in the default installation.\n     bash-it profile load default\n\n     # Do whatever you want:\n     # Disable stuff\n     bash-it disable ...\n     # Enable stuff\n     bash-it enable ...\n     # If you want to get back into your original configuration, you can do it easily\n     bash-it profile load my_profile\n"
  },
  {
    "path": "docs/commands/reload.rst",
    "content": ".. _reload:\n\nBash-it reload\n^^^^^^^^^^^^^^\n\nBash-it creates a ``reload`` alias that makes it convenient to reload\nyour Bash profile when you make changes.\n\nAdditionally, if you export ``BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE`` as a non-null value,\nBash-it will automatically reload itself after activating or deactivating plugins, aliases, or completions.\n\n.. warning::\n  When changing theme, do not use ``bash-it reload``. Instead, use :ref:`restart`.\n\n.. _restart:\n\nBash-it restart\n^^^^^^^^^^^^^^^\n\nSimilar to :ref:`reload`, ``bash-it restart`` can be used to restart your shell.\nInstead of reloading your Bash profile, this command re-runs Bash (using exec).\n\nThis is stronger than simple reload, and is similar to the effect of closing and reopening your terminal.\n"
  },
  {
    "path": "docs/commands/search.rst",
    "content": ".. _searching:\n\nBash-it search\n--------------\n\nIf you need to quickly find out which of the plugins, aliases or completions are available for a specific framework, programming language, or an environment, you can *search* for multiple terms related to the commands you use frequently.\nSearch will find and print out modules with the name or description matching the terms provided.\n\nSyntax\n^^^^^^\n\n.. code-block:: bash\n\n     bash-it search term1 [[-]term2] [[-]term3]....\n\nAs an example, a ruby developer might want to enable everything related to the commands such as ``ruby``\\ , ``rake``\\ , ``gem``\\ , ``bundler``\\ , and ``rails``.\nSearch command helps you find related modules so that you can decide which of them you'd like to use:\n\n.. code-block:: bash\n\n   ❯ bash-it search ruby rake gem bundle irb rails\n         aliases:  bundler rails\n         plugins:  chruby chruby-auto ruby\n     completions:  bundler gem rake\n\nCurrently enabled modules will be shown in green.\n\nSearching with Negations\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can prefix a search term with a \"-\" to exclude it from the results.\nIn the above example, if we wanted to hide ``chruby`` and ``chruby-auto``\\ ,\nwe could change the command as follows:\n\n.. code-block:: bash\n\n   ❯ bash-it search ruby rake gem bundle irb rails -chruby\n         aliases:  bundler rails\n         plugins:  ruby\n     completions:  bundler gem rake\n\nUsing Search to Enable or Disable Components\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nBy adding a ``--enable`` or ``--disable`` to the search command, you can automatically enable all modules that come up as a result of a search query.\nThis could be quite handy if you like to enable a bunch of components related to the same topic.\n\nDisabling ASCII Color\n^^^^^^^^^^^^^^^^^^^^^\n\nTo remove non-printing non-ASCII characters responsible for the coloring of the search output, you can set environment variable ``NO_COLOR``.\nEnabled components will then be shown with a checkmark:\n\n.. code-block:: bash\n\n   ❯ NO_COLOR=1 bash-it search ruby rake gem bundle irb rails -chruby\n         aliases  =>   ✓bundler ✓rails\n         plugins  =>   ✓ruby\n     completions  =>   bundler gem rake\n"
  },
  {
    "path": "docs/commands/update.rst",
    "content": ".. _update:\n\nBash-it update\n^^^^^^^^^^^^^^\n\nTo update Bash-it to the latest stable version, simply run:\n\n.. code-block:: bash\n\n   bash-it update stable\n\nIf you want to update to the latest dev version (directly from master), run:\n\n.. code-block:: bash\n\n   bash-it update dev\n\nIf you want to update automatically and unattended, you can add the optional\n``-s/--silent`` flag, for example:\n\n.. code-block:: bash\n\n   bash-it update dev --silent\n\n.. _migrate:\n\nBash-it migrate\n^^^^^^^^^^^^^^^\n\nIf you are using an older version of Bash-it, it's possible that some functionality has changed, or that the internal structure of how Bash-it organizes its functionality has been updated.\nFor these cases, we provide a ``migrate`` command:\n\n.. code-block:: bash\n\n   bash-it migrate\n\nThis command will automatically migrate the Bash-it structure to the latest version.\nThe ``migrate`` command is run automatically if you run the ``update``\\ , ``enable`` or ``disable`` commands.\n"
  },
  {
    "path": "docs/conf.py",
    "content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\n# import os\n# import sys\n# sys.path.insert(0, os.path.abspath('.'))\n\n# -- Project information -----------------------------------------------------\n\nproject = 'Bash-it'\ncopyright = '2020, Bash-it Team'\nauthor = 'Bash-it Team'\n\n# The full version, including alpha/beta/rc tags\nrelease = ''\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    'sphinx_rtd_theme',\n    'sphinxemoji.sphinxemoji',\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', \"venv\"]\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = 'sphinx_rtd_theme'\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n"
  },
  {
    "path": "docs/contributing.rst",
    "content": ".. _contributing:\n\nContribution Guidelines\n=======================\n\nWhen contributing a new feature, a bug fix, a new theme, or any other change to Bash-it, please consider the following guidelines.\nMost of this is common sense, but please try to stick to the conventions listed here.\n\nIssues\n------\n\n\n* When reporting a bug or requesting a new feature, consider providing a Pull Request that fixes the issue or can be used as a starting point for the new feature.\n  Don't be afraid, most things aren't that complex...\n\nPull Requests\n-------------\n\n\n* Fork the Bash-it repo, create a new feature branch from *master* and apply your changes there.\n  Create a *Pull Request* from your feature branch against Bash-it's *master* branch.\n* Limit each Pull Request to one feature.\n  Don't bundle multiple features/changes (e.g. a new *Theme* and a fix to an existing plugin) into a single Pull Request - create one PR for the theme, and a separate PR for the fix.\n* For complex changes, try to *squash* your changes into a single commit before\n  pushing code. Once you've pushed your code and opened a PR, please refrain\n  from force-pushing changes to the PR branch – remember, Bash-it is a\n  distributed project and your branch may be in use already.\n* When in doubt, open a PR with too many commits. Bash-it is a learning project\n  for everyone involved. Showing your work provides a great history for folks\n  to learn what works and what didn't.\n\nCode Style\n----------\n\n\n* When adding new files, be sure to add them into `clean_files.txt`, which is a growing list of linted files in the project.\n* When changing existing files, consider also adding them into `clean_files.txt` and fixing the linting errors that arise. See :ref:`linting_your_changes` for more information.\n* Indentation is using tabs, not spaces. Most of the code is indented with 2 spaces, some with 4 spaced tabs. Please try to stick to tabs.\n  If you're using an editor that supports `EditorConfig <http://EditorConfig.org>`_\\ , the editor should automatically use the settings defined in Bash-it's `.editorconfig file <.editorconfig>`_.\n* Prefer to invoke commands directly using the ``command`` shell builtin. This way, your code\n  will always execute the command you wanted and not an alias/function that overrides the name of the command. (For example, use ``command rm`` instead of ``rm``)\n* When creating new functions, please use a dash (\"-\") to separate the words of the function's name, e.g. ``my-new-function``.\n  Don't use underscores, e.g. ``my_new_function``.\n* Internal functions that aren't to be used by the end user should start with an underscore, e.g. ``_my-new-internal-function``.\n* Use the provided meta functions to document your code, e.g. ``about-plugin``\\ , ``about``\\ , ``group``\\ , ``param``\\ , ``example``.\n  This will make it easier for other people to use your new functionality.\n  Take a look at the existing code for an example (e.g. `the base plugin <plugins/available/base.plugin.bash>`_\\ ).\n* When adding files, please use the existing file naming conventions, e.g. plugin files need to end in ``.plugin.bash``.\n  This is important for the installation functionality.\n* When using the ``$BASH_IT`` variable, please always enclose it in double quotes to ensure that the code also works when\n  Bash-it is installed in a directory that contains spaces in its name: ``for f in \"${BASH_IT}/plugins/available\"/*.bash ; do echo \"$f\" ; done``\n* Bash-it supports Bash 3.2 and higher. Please don't use features only available in Bash 4, such as associative arrays.\n* That said, if you have a really cool plugin or feature to contribute and it absolutely too slow or hard to implement\n  without bash4 or higher, please see plugins/available/pack.plugin.bash for an example how to self disable and log the reason\n  so bash 3.2 users are not stuck with errors that don't need to handle.\n\nUnit Tests\n----------\n\nWhen adding features or making changes/fixes, please run our growing unit test suite to ensure that you did not break existing functionality.\nThe test suite does not cover all aspects of Bash-it, but please run it anyway to verify that you did not introduce any regression issues.\n\nAny code pushed to GitHub as part of a Pull Request will automatically trigger a continuous integration build on `GitHub Actions <https://github.com/Bash-it/bash-it/actions>`_\\ , where the test suite is run on both Linux and macOS.\nThe Pull Request will then show the result of the CI build, indicating whether all tests ran fine, or whether there were issues.\nPlease pay attention to this, Pull Requests with build issues will not be merged.\n\nAdding new functionality or changing existing functionality is a good opportunity to increase Bash-it's test coverage.\nWhen you're changing the Bash-it codebase, please consider adding some unit tests that cover the new or changed functionality.\nIdeally, when fixing a bug, a matching unit test that verifies that the bug is no longer present, is added at the same time.\n\nTo run the test suite, simply execute the following in the directory where you cloned Bash-it:\n\n.. code-block:: bash\n\n   test/run\n\nThis command will ensure that the `Bats Test Framework <https://github.com/bats-core/bats-core>`_ is available in the local ``test_lib`` directory (Bats is included as a Git submodule) and then run the test suite found in the `test <test>`_ folder.\nThe test script will execute each test in turn, and will print a status for each test case.\n\nWhen adding new test cases, please take a look at the existing test cases for examples.\n\nThe following libraries are used to help with the tests:\n\n\n* Test Framework: https://github.com/bats-core/bats-core\n* Support library for Bats-Assert: https://github.com/bats-core/bats-support\n* General ``assert`` functions: https://github.com/bats-core/bats-assert\n* File ``assert`` functions: https://github.com/bats-core/bats-file\n\nWhen verifying test results, please try to use the ``assert`` functions found in these libraries.\n\nFeatures\n--------\n\n\n* When adding new completions or plugins, please don't simply copy existing tools into the Bash-it codebase, try to load/integrate the tools instead.\n  An example is using ``nvm``\\ : Instead of copying the existing ``nvm`` script into Bash-it, the ``nvm.plugin.bash`` file tries to load an existing installation of ``nvm``.\n  This means an additional step for the user (installing ``nvm`` from its own repo, or through a package manager),\n  but it will also ensure that ``nvm`` can be upgraded in an easy way.\n\n.. _contributing_theme:\n\nThemes\n------\n\n\n* When adding a new theme, please include a screenshot and a short description about what makes this theme unique in the Pull Request's description field.\n  Please do not add theme screenshots to the main PR itself, as they will add unnecessary bloat to the main branch in the repo.\n  The project's docs has a `Themes page <https://github.com/Bash-it/bash-it/blob/master/docs/themes-list/index.rst>`_ where you should add a screenshot, see how :ref:`here<add_screenshot>`.\n* Ideally, you should add a ``<theme_name>.rst`` file describing the theme and its configuration options to ``docs/themes-list`` folder.\n\n.. _add_screenshot:\n\nAdding a Screenshot\n-------------------\n\nIn order to add a new screenshot, use the ``gh-pages`` branch.\nAdd your new screenshot to the ``docs/images`` folder, and open a PR.\nIn the `Themes page <https://github.com/Bash-it/bash-it/blob/master/docs/themes-list/index.rst>`_, see the other screenshots to know what kind of link you should use.\n"
  },
  {
    "path": "docs/custom.rst",
    "content": ".. _custom:\n\nCustom Content\n--------------\n\nFor custom scripts, and aliases, just create the following files (they'll be ignored by the git repo):\n\n\n* ``aliases/custom.aliases.bash``\n* ``completion/custom.completion.bash``\n* ``lib/custom.bash``\n* ``plugins/custom.plugins.bash``\n* ``custom/themes/<custom theme name>/<custom theme name>.theme.bash``\n\nAnything in the custom directory will be ignored, with the exception of ``custom/example.bash``.\n\nAlternately, if you would like to keep your custom scripts under version control, you can set ``BASH_IT_CUSTOM`` in your ``~/.bashrc`` to another location outside of the ``$BASH_IT`` folder.\nIn this case, any ``*.bash`` file under every directory below ``BASH_IT_CUSTOM`` folder will be used.\n"
  },
  {
    "path": "docs/development.rst",
    "content": ".. _development:\n\nBash-it Development\n===================\n\nThis page summarizes a couple of rules to keep in mind when developing features or making changes in Bash-it.\n\nTesting\n-------\n\nMake sure to read the :ref:`testing docs<test>`.\n\nDebugging and Logging\n---------------------\n\nGeneral Logging\n^^^^^^^^^^^^^^^\n\nWhile developing feature or making changes in general, you can log error/warning/debug\nusing ``_log_error`` ``_log_warning`` and ``_log_debug``. This will help you solve problems quicker\nand also propagate important notes to other users of Bash-it.\nYou can see the logs by using ``bash-it doctor`` command to reload and see the logs.\nAlternatively, you can set ``BASH_IT_LOG_LEVEL`` to ``BASH_IT_LOG_LEVEL_ERROR``\\ , ``BASH_IT_LOG_LEVEL_WARNING`` or ``BASH_IT_LOG_LEVEL_ALL``.\n\nLog Prefix/Context\n^^^^^^^^^^^^^^^^^^\n\nYou can define ``BASH_IT_LOG_PREFIX`` in your files in order to a have a constant prefix before your logs.\nNote that we prefer to uses \"tags\" based logging, i.e ``plugins: git: DEBUG: Loading git plugin``.\n\nLoad Order\n----------\n\nGeneral Load Order\n^^^^^^^^^^^^^^^^^^\n\nThe main ``bash_it.sh`` script loads the frameworks individual components in the following order:\n\n\n\n\n* ``vendor/github.com/erichs/composure/composure.sh``\n* ``lib/log.bash``\n* ``vendor/init.d/*.bash``\n* Files in ``lib`` with the exception of ``appearance.bash`` - this means that ``log.bash`` is loaded again here (possible improvement?)\n* Enabled ``aliases``\n* Enabled ``plugins``\n* Enabled ``completions``\n* ``themes/colors.theme.bash``\n* ``themes/base.theme.bash``\n* ``lib/appearance.bash``\\ , which loads the selected theme\n* Custom ``aliases``\n* Custom ``plugins``\n* Custom ``completions``\n* Additional custom files from either ``$BASH_IT/custom`` or ``$BASH_IT_CUSTOM``\n\nThis order is subject to change.\n\nIndividual Component Load Order\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFor ``aliases``\\ , ``plugins`` and ``completions``\\ , the following rules are applied that influence the load order:\n\n\n* There is a global ``enabled`` directory, which the enabled components are linked into. Enabled plugins are symlinked from ``$BASH_IT/plugins/available`` to ``$BASH_IT/enabled`` for example. All component types are linked into the same common ``$BASH_IT/enabled`` directory.\n* Within the common ``enabled`` directories, the files are loaded in alphabetical order, which is based on the item's load priority (see next item).\n* When enabling a component, a *load priority* is assigned to the file. The following default priorities are used:\n\n  * Aliases: 150\n  * Plugins: 250\n  * Completions: 350\n\n* When symlinking a component into the ``enabled`` directory, the load priority is used as a prefix for the linked name, separated with three dashes from the name of the component. The ``node.plugin.bash`` would be symlinked to ``250---node.plugin.bash`` for example.\n*\n  Each file can override the default load priority by specifying a new value. To do this, the file needs to include a comment in the following form. This example would cause the ``node.plugin.bash`` (if included in that file) to be linked to ``225---node.plugin.bash``\\ :\n\n  .. code-block:: bash\n\n     # BASH_IT_LOAD_PRIORITY: 225\n\nHaving the order based on a numeric priority in a common directory allows for more flexibility. While in general, aliases are loaded first (since their default priority is 150), it's possible to load some aliases after the plugins, or some plugins after completions by setting the items' load priority. This is more flexible than a fixed type-based order or a strict alphabetical order based on name.\n\nThese items are subject to change. When making changes to the internal functionality, this page needs to be updated as well.\n\nWorking with vendored libs\n--------------------------\n\nVendored libs are external libraries, meaning source code not maintained by Bash-it\ndevelopers.\nThey are ``git subtrees`` curated in the ``vendor/`` folder. To ease the work with git\nvendored libs as subtrees we use the `git-vendor <https://github.com/Tyrben/git-vendor>`_ tool.\nThe `original repo <https://github.com/brettlangdon/git-vendor>`_ for git vendor is\nunmaintained so for now we are recommending Tyrben's fork.\n\nFor more information on ``git vendor`` there are a short `usage description <https://github.com/Tyrben/git-vendor#usage>`_ \nin the repositories ``README`` file and a website for the original repository has a `manual page <https://brettlangdon.github.io/git-vendor/>`_ which is also included in both\nrepositories.\n\nTo support a flexible loading of external libraries, a file unique to the vendored\nlibrary must be placed in ``vendor/init.d/`` with the ``.bash`` extension.\n\nRebasing a feature branch with an added/updated vendored library\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf your feature branch with a newly added/updated vendored lib has fallen behind master\nyou might need to rebase it before creating a PR. However rebasing with dangling\nsubtree commits can cause problems.\nThe following rebase strategy will pause the rebase at the point where you added a \nsubtree and let you add it again before continuing the rebasing.\n\n::\n\n    [feature/branch] $ git rebase --rebase-merges --strategy subtree master\n    fatal: refusing to merge unrelated histories\n    Could not apply 0d6a56b... Add-preexec-from-https-github-com-rcaloras-bash-preexec-0-4-1- # Add \"preexec\" from \"https://github.com/rcaloras/bash-preexec@0.4.1\"\n    [feature/branch] $ git vendor add preexec https://github.com/rcaloras/bash-preexec 0.4.1\n    ...\n    [feature/branch] $ git rebase --continue\n\nIf rebasing makes you a little uneasy (as it probably should). You can always test in\nanother branch.\n\n::\n\n    [feater/branch] $ git checkout -b feature/branch-test-rebase\n    [feater/branch-test-rebase] $ git rebase --rebase-merges --strategy subtree master\n    ...\n\nAfterwards you can make sure the rebase was successful by running ``git vendor list``\nto see if your library is still recognized as a vendored lib\n\n::\n\n    [feature/branch] $ git vendor list\n    preexec@0.4.1:\n        name:   preexec\n        dir:    vendor/github.com/rcaloras/bash-preexec\n        repo:   https://github.com/rcaloras/bash-preexec\n        ref:    0.4.1\n        commit: 8fe585c5cf377a3830b895fe26e694b020d8db1a\n    [feature/branch] $\n\n\nPlugin Disable Callbacks\n------------------------\n\nPlugins can define a function that will be called when the plugin is being disabled.\nThe callback name should be ``{PLUGIN_NAME}_on_disable``\\ , you can see ``gitstatus`` for usage example.\n\nLibrary Finalization Callback\n-----------------------------\n\nSpecifically for Bash-it library code, e.g. in the `lib` subdirectory, a hook is available to run some code at the very end of the main loader script after all other code has been loaded. For example, `lib/theme` uses `_bash_it_library_finalize_hook+=('_bash_it_appearance_scm_init')` to add a function to be called after all plugins have been loaded.\n\nUsing the pre-commit hook\n-------------------------\n\nNote the file .pre-commit-config.yaml at the top of the repo.\nThis file configures the behavior of the a pre-commit hook based on `the Pre-Commit framework <https://pre-commit.com/>`_. Please see the site about\ninstalling it (with pip, brew or other tools) then run ``pre-commit install`` in the repo's root to activate the hook.\nFor the full use of the tool, you may need to install also other third-party tools, such as\n`shellcheck <https://github.com/koalaman/shellcheck/>`_ and `shfmt <https://github.com/mvdan/sh>`_.\n\n\n.. _linting_your_changes:\n\nLinting Your Changes\n--------------------\n\nIn order to properly lint your changes, you should use our linting script,\nby simply running ``./lint_clean_files.sh``. This script iterates over all marked-as-clean\nfiles, and runs the pre-commit hook on them.\n\nPlease note that most of the files in the project are currently not linted,\nas we want to make the linting process easier.\nIn order to add your changed/added files to the linting process,\nplease add your files to ``clean_files.txt``. This way ``lint_clean_files.sh``\nwill know to pick them up and lint them.\n\nThank you for helping clean up Bash-it, and making it a nicer and better project |:heart:|\n"
  },
  {
    "path": "docs/help_screens.rst",
    "content": ".. _help_screens:\n\nHelp Screens\n^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   bash-it show aliases        # shows installed and available aliases\n   bash-it show completions    # shows installed and available completions\n   bash-it show plugins        # shows installed and available plugins\n   bash-it help aliases        # shows help for installed aliases\n   bash-it help completions    # shows help for installed completions\n   bash-it help plugins        # shows help for installed plugins\n"
  },
  {
    "path": "docs/index.rst",
    "content": "\nWelcome to Bash-it's documentation!\n===================================\n\n**Bash-it** is a collection of community Bash commands and scripts for Bash 3.2+.\n(And a shameless ripoff of `oh-my-zsh <https://github.com/robbyrussell/oh-my-zsh>`_)\n\nIncludes autocompletion, themes, aliases, custom functions, a few stolen pieces from Steve Losh, and more.\n\nBash-it provides a solid framework for using, developing and maintaining shell scripts and custom commands for your daily work.\nIf you're using the *Bourne Again Shell* (Bash) regularly and have been looking for an easy way on how to keep all of these nice little scripts and aliases under control, then Bash-it is for you!  \nStop polluting your ``~/bin`` directory and your ``.bashrc`` file, fork/clone Bash-it and start hacking away.\n\n.. toctree::\n   :maxdepth: 1\n\n   contributing\n   development\n   test\n   installation\n   commands/index\n   custom\n   themes\n   themes-list/index\n   vcs_user\n   misc\n   troubleshooting\n   uninstalling\n\n\nHelp out\n--------\n\nWe think everyone has their own custom scripts accumulated over time.\nAnd so, following in the footsteps of oh-my-zsh, Bash-it is a framework for easily customizing your Bash shell.\nEveryone's got a custom toolbox, so let's start making them even better, **as a community!**\n\nSend us a pull request and we'll merge it as long as it looks good.\nIf you change an existing command, please give an explanation why.\nThat will help a lot when we merge your changes in.\n\nPlease take a look at the :ref:`Contribution Guidelines <contributing>` before reporting a bug or providing a new feature.\n\nThanks, and happing bashing!\n"
  },
  {
    "path": "docs/installation.rst",
    "content": ".. _installation:\n\nInstallation\n------------\n\n\n#. Check out a clone of this repo to a location of your choice, such as\n   ``git clone --depth=1 https://github.com/Bash-it/bash-it.git ~/.bash_it``\n#. Run ``~/.bash_it/install.sh`` (it automatically backs up your ``~/.bashrc``\\ )\n#. Edit your modified config (\\ ``~/.bashrc``\\ ) file in order to customize Bash-it.\n#. Check out available aliases, completions, and plugins and enable the ones you want to use (see the next section for more details).\n\nInstall Options\n^^^^^^^^^^^^^^^\n\nThe install script can take the following options:\n\n\n* ``--interactive``\\ : Asks the user which aliases, completions and plugins to enable.\n* ``--silent``\\ : Ask nothing and install using default settings.\n* ``--no-modify-config``\\ : Do not modify the existing config file (\\ ``~/.bashrc``\\ ).\n* ``--append-to-config``\\ : Back up existing config file and append bash-it templates at the end.\n\nWhen run without the ``--interactive`` switch, Bash-it only enables a sane default set of functionality to keep your shell clean and to avoid issues with missing dependencies.\nFeel free to enable the tools you want to use after the installation.\n\nWhen you run without the ``--no-modify-config`` switch, the Bash-it installer automatically modifies/replaces your existing config file.\nUse the ``--no-modify-config`` switch to avoid unwanted modifications, e.g. if your Bash config file already contains the code that loads Bash-it.\n\n**NOTE**\\ : Keep in mind how Bash loads its configuration files,\n``.bash_profile`` for login shells and ``.bashrc`` for interactive shells, to ensure that Bash-it is loaded correctly.\nA good \"practice\" is sourcing ``.bashrc`` into ``.bash_profile`` to keep things working in all the scenarios.\nTo achieve this, you can add this snippet in your ``.bash_profile``\\ :\n\n.. code-block::\n\n   if [[ $- == *\"i\"* && -f ~/.bashrc ]]; then\n     source ~/.bashrc\n   fi\n\nRefer to the official `Bash documentation <https://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files>`_ to get more info.\n\nInstall using Docker\n^^^^^^^^^^^^^^^^^^^^\n\nYou can try Bash-it in an isolated environment without changing any local files via a `Docker <https://www.docker.com/>`_ Container.\n(Bash Shell v4.4 with Bash-it, `bats <https://github.com/sstephenson/bats>`_\\ ,and bash-completion based on `Alpine Linux <https://alpinelinux.org/>`_\\ ).\n\n``docker pull ellerbrock/bash-it``\n\nHave a look at our `bash-it-docker repository <https://github.com/Bash-it/bash-it-docker>`_ for further information.\n\nUpdating\n^^^^^^^^\n\nSee :ref:`update command <update>`.\n"
  },
  {
    "path": "docs/make.bat",
    "content": "@ECHO OFF\r\n\r\npushd %~dp0\r\n\r\nREM Command file for Sphinx documentation\r\n\r\nif \"%SPHINXBUILD%\" == \"\" (\r\n\tset SPHINXBUILD=sphinx-build\r\n)\r\nset SOURCEDIR=.\r\nset BUILDDIR=_build\r\n\r\nif \"%1\" == \"\" goto help\r\n\r\n%SPHINXBUILD% >NUL 2>NUL\r\nif errorlevel 9009 (\r\n\techo.\r\n\techo.The 'sphinx-build' command was not found. Make sure you have Sphinx\r\n\techo.installed, then set the SPHINXBUILD environment variable to point\r\n\techo.to the full path of the 'sphinx-build' executable. Alternatively you\r\n\techo.may add the Sphinx directory to PATH.\r\n\techo.\r\n\techo.If you don't have Sphinx installed, grab it from\r\n\techo.http://sphinx-doc.org/\r\n\texit /b 1\r\n)\r\n\r\n%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\ngoto end\r\n\r\n:help\r\n%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%\r\n\r\n:end\r\npopd\r\n"
  },
  {
    "path": "docs/misc.rst",
    "content": ".. _misc:\n\nMisc\n----\n\n.. toctree::\n   :maxdepth: 2\n\n   help_screens\n   proxy_support\n"
  },
  {
    "path": "docs/plans/bash-it-issues-comprehensive-analysis.md",
    "content": "# Bash-it Open Issues - Comprehensive Analysis & Action Plan\n**Analysis Date**: 2025-10-05\n**Last Updated**: 2025-10-07\n**Total Open Issues**: 32 → 27 (5 fixed)\n**Analyzed By**: Claude Code\n\n---\n\n## Executive Summary\n\nOut of 32 open issues:\n- **5 Quick Wins** - ✅ **ALL FIXED** (2025-10-07)\n- **6 Require Your Decision** - 3 implemented, 3 still need input\n- **18 Stale/Redundant** - Old issues (>2 years) that need closure decisions\n- **3 Long-term Roadmap** - Strategic features for future planning\n\n**Recent Progress**: 5 issues fixed in 1 day with PRs #2349, #2350, #2351, #2352, #2353\n**Critical Finding**: 78% of issues are stale (>2 years old). Recommend aggressive issue gardening to improve project health.\n\n---\n\n## 1. QUICK WINS - ✅ ALL COMPLETED (5/5 issues)\n\n### ✅ Issue #2317: Auto-infer remote name\n**Status**: ✨ **FIXED** - PR #2345 created 2025-10-05\n- Simple helper function to detect git remote name\n- No more hardcoded \"origin\" assumption\n- **Action**: None needed\n\n### ⚡ Issue #2314: Interactive install fails for todo aliases\n**Effort**: 5 minutes\n**Status**: TODO - Still needs fixing\n**Fix**: Rename `todo.txt-cli.aliases.bash` → `todo.aliases.bash`\n- Clear bug, clear solution already identified in issue\n- Just a file rename to match naming convention\n- **Action**: Can be fixed next\n\n### ✅ Issue #2296: down4me function broken\n**Status**: ✨ **FIXED** - PR #2350 created 2025-10-07\n- Fixed URL malformation when passing full URLs with protocols\n- Strips http:// and https:// from input\n- Uses `command` prefix to bypass aliases\n- **Action**: None needed\n\n### ✅ Issue #2260: SSH completion removes @ symbol\n**Status**: ✨ **FIXED** - PR #2351 created 2025-10-07\n- Removed @ from COMP_WORDBREAKS to preserve user@host format\n- Now correctly completes ssh root@server instead of ssh rootserver\n- **Action**: None needed\n\n### ✅ Issue #2238: Uninstall script deletes bashrc incorrectly\n**Status**: ✨ **FIXED** - PR #2352 created 2025-10-07\n- Now backs up current config before restoring old backup\n- Saves to ~/.bashrc.pre-uninstall.bak (or ~/.bash_profile.pre-uninstall.bak)\n- Users can review and merge changes if needed\n- **Action**: None needed\n\n---\n\n## 2. DECISION REQUIRED - Need Your Input (6 issues)\n\n### ✅ Issue #2248: Add Laravel Artisan completion\n**Status**: ✨ **IMPLEMENTED** - PR #2349 created 2025-10-07\n- Added dynamic completion for Laravel artisan commands\n- Works with both `artisan` and `art` aliases\n- Only activates when artisan file exists in directory\n- **Action**: None needed\n\n### 🤔 Issue #2245: Add tmux -c completion\n**Decision Needed**: Accept feature or close?\n- Small enhancement to tmux completion\n- **Question**: Accept incremental tmux improvements?\n- **Recommendation**: Accept if clean PR submitted\n- **Your Call**: Yes/No?\n\n### ✅ Issue #2216: Show node version only in package.json directories\n**Status**: ✨ **IMPLEMENTED** - PR #2353 created 2025-10-07\n- Added NODE_VERSION_CHECK_PROJECT environment variable (default: false)\n- When enabled, only shows node version in directories with package.json\n- Fully backwards compatible (disabled by default)\n- **Action**: None needed\n\n### 🤔 Issue #2214: Do you need maintainers?\n**Decision Needed**: Project governance\n- Open question about adding maintainers\n- **Action**: You need to respond about maintainer status/needs\n- **Your Call**: Are you looking for co-maintainers?\n\n### 🤔 Issue #1819: Package bash-it with package manager\n**Decision Needed**: Distribution strategy\n- Request to get bash-it into Homebrew, apt, etc.\n- **Major effort** but would improve adoption\n- **Question**: Is packaging worth the maintenance burden?\n- **Your Call**: Worth pursuing or close?\n\n### 🤔 Issue #825: Aliases shadowing program names\n**Decision Needed**: Philosophy on aliases\n- Some aliases override common commands (e.g., `ll`)\n- **Question**: Should bash-it be more conservative with alias names?\n- **Recommendation**: Document clearly, let users choose\n- **Your Call**: Change default alias behavior or close?\n\n---\n\n## 3. STALE/REDUNDANT - Need Closure Decisions (18 issues)\n\nThese are all >2 years old with minimal activity. **Recommend closing most** with option to reopen if someone volunteers.\n\n### 🗑️ Ancient Issues (>4 years old) - Recommend CLOSE\n\n#### Issue #517 (2015): Plugin load times\n- Created 9 years ago\n- Generic performance concern, no specific action items\n- **Recommendation**: Close - performance is acceptable now\n\n#### Issue #825 (2016): Aliases shadowing programs\n- Already listed above in \"Decision Required\"\n\n#### Issue #922 (2017): Support for enhancd\n- 7 years old, labeled \"seems abandoned\"\n- External tool integration request\n- **Recommendation**: Close - no activity, unclear if still needed\n\n#### Issue #1053 (2017): Evaluate kcov code coverage\n- 7 years old, technical improvement\n- **Recommendation**: Close - we use BATS now, coverage not critical\n\n#### Issue #1207 (2018): Prompt wrap-around glitches\n- 6 years old, prompt theme visual bugs\n- **Recommendation**: Close - likely fixed in modern terminals, needs repro\n\n### 🗑️ Old Issues (2-4 years) - Recommend CLOSE unless someone volunteers\n\n#### Issue #1640 (2020): Cleanup \"base\" and \"general\"\n- Vague organizational request\n- **Recommendation**: Close - or convert to specific actionable issue\n\n#### Issue #1680 (2020): Add documentation for all commands\n- Massive undertaking, no volunteers\n- **Recommendation**: Close - accept incremental doc improvements instead\n\n#### Issue #1693 (2020): todo plugin doesn't use $TODO variable\n- Related to #2314 (todo aliases)\n- **Recommendation**: Close as duplicate or fix alongside #2314\n\n#### Issue #1696 (2020): Help us clean up Bash-it!\n- Meta tracking issue for cleanup\n- **Recommendation**: KEEP OPEN - useful for coordinating cleanup efforts\n- **Action**: Update with current status (pre-commit hooks working!)\n\n#### Issue #1818 (2021): Moving external libraries to vendor/\n- Technical debt cleanup\n- **Recommendation**: Close - already done, verify and close\n\n#### Issue #1943 (2021): Performance of bash-preexec DEBUG trap\n- Performance concern about DEBUG trap\n- **Recommendation**: Close - needs reproduction, likely non-issue\n\n#### Issue #2080 (2022): Structure all aliases\n- Organizational improvement\n- **Recommendation**: Close - too vague, accept specific alias improvements\n\n#### Issue #2084 (2022): Platform dependent config file selection\n- Question about macOS vs Linux config differences\n- **Recommendation**: Close - working as designed, or needs specific fix proposal\n\n#### Issue #2149 (2022): pyenv plugin breaks over SSH\n- SSH + pyenv interaction issue\n- **Recommendation**: Close - needs reproduction, likely user config issue\n\n#### Issue #2150 (2022): Help information for preview command\n- Documentation request\n- **Recommendation**: Close - command is self-explanatory, or add quick docs\n\n#### Issue #2174 (2022): System alias breaks completion\n- Completion conflict with user's system alias\n- **Recommendation**: Investigate - might be legit bug or user config issue\n\n#### Issue #2184 (2022): Show plugin source URI\n- Feature request for plugin metadata\n- **Recommendation**: Close - not worth complexity, plugins are in repo\n\n#### Issue #2197 (2023): bash-it preview not working\n- Preview command bug\n- **Recommendation**: Close - needs reproduction on current version\n\n#### Issue #2202 (2023): Why does install add shebang to bash_profile?\n- Question about install behavior\n- **Recommendation**: Answer and close - likely incorrect assumption\n\n### 🕐 Recent but inactive (1-2 years) - Investigate before closing\n\n#### Issue #2254 (2024): Syntax error in alias_completion\n- Bash syntax error in generated completion file\n- **Recommendation**: Try to reproduce, fix or close\n\n#### Issue #2264 (2024): Alias completion doesn't complete\n- Already listed in Quick Wins above\n\n#### Issue #2297 (2025): Powerline multiline SSH padlock miscalculation\n- Recent bug (Mar 2025), active (Sept update)\n- **Recommendation**: KEEP OPEN - legitimate bug, needs fix\n\n---\n\n## 4. LONG-TERM ROADMAP (3 issues)\n\n### 📋 Issue #1696: Help us clean up Bash-it!\n**Status**: Active coordination issue\n- Good place to track pre-commit cleanup progress\n- **Action**: Keep open, update regularly with progress\n- **Next Steps**:\n  - List remaining files not in `clean_files.txt`\n  - Create \"good first issue\" labels for individual files\n\n### 📋 Issue #1819: Package Bash-it with package managers\n**Status**: Requires decision (see Decision Required section)\n- Would significantly improve installation experience\n- **Effort**: Epic (months)\n- **Benefit**: High - easier adoption\n- **Dependencies**: Need CI/CD, release process, semantic versioning\n\n### 📋 Issue #1053: Code coverage with kcov\n**Status**: Low priority technical improvement\n- Would be nice to have coverage metrics\n- **Effort**: Medium (weeks)\n- **Benefit**: Low - we have tests, coverage is nice-to-have\n\n---\n\n## 5. WORK PLAN TO REDUCE TECH DEBT\n\n### Phase 1: Immediate Wins ✅ COMPLETED (2025-10-07)\n**All fixed without user input:**\n\n1. ✅ Fix #2317 - Auto-detect git remote (PR #2345 - 2025-10-05)\n2. ✅ Fix #2248 - Laravel artisan completion (PR #2349 - 2025-10-07)\n3. ✅ Fix #2296 - down4me function URL malformation (PR #2350 - 2025-10-07)\n4. ✅ Fix #2260 - SSH completion @ symbol (PR #2351 - 2025-10-07)\n5. ✅ Fix #2238 - Improve uninstall script (PR #2352 - 2025-10-07)\n6. ✅ Fix #2216 - Node version conditional display (PR #2353 - 2025-10-07)\n\n**Remaining:**\n- ⚡ Fix #2314 - Rename todo alias file (5 min)\n\n**Total Completed**: 6 PRs, 5 issues can be closed once PRs merge\n\n### Phase 2: Issue Gardening (Next Week)\n**Need your approval, then I execute:**\n\n1. Close stale issues (18 issues) with polite message:\n   - \"Closing due to age/inactivity. Please reopen with reproduction on latest version if still relevant.\"\n2. Update #1696 (cleanup tracking) with current status\n3. Label issues needing decisions with \"needs-decision\"\n4. Label quick wins with \"good-first-issue\"\n\n**Total Time**: 2 hours, 18 issues closed, improved issue hygiene\n\n### Phase 3: Strategic Decisions (This Month)\n**You decide, I can implement:**\n\n1. **Decision**: Accept framework-specific completions? (#2248 Laravel)\n2. **Decision**: Smart plugin behavior? (#2216 nvm auto-detect)\n3. **Decision**: Need co-maintainers? (#2214)\n4. **Decision**: Pursue packaging? (#1819)\n5. **Decision**: Conservative aliases? (#825)\n\n**Outcome**: Clear project direction, updated CLAUDE.md with decisions\n\n### Phase 4: Continued Cleanup (Ongoing)\n**Sustaining momentum:**\n\n1. Continue `clean_files.txt` expansion\n   - Current: ~50 files clean\n   - Goal: All files pass pre-commit hooks\n2. Add tests for bugs as they're fixed\n3. Improve documentation incrementally\n4. Monthly issue triage (close stale, label new)\n\n---\n\n## 6. RECOMMENDATIONS\n\n### Critical Actions\n1. ✅ **Fix Quick Wins** - 5 issues, 4 hours work, big impact\n2. 🧹 **Close Stale Issues** - Improve project health, reduce noise\n3. 🎯 **Make Strategic Decisions** - Give project clear direction\n\n### Nice to Have\n4. 📦 **Consider Packaging** - Would improve adoption significantly\n5. 📚 **Incremental Docs** - Fix docs as you touch code\n6. 🧪 **Coverage Tracking** - Low priority, would be nice\n\n### Don't Do\n- ❌ Don't try to fix all old issues - most are stale\n- ❌ Don't accept vague feature requests - require specific proposals\n- ❌ Don't feel bad closing old issues - it's healthy\n\n---\n\n## 7. WHAT I CAN DO WITHOUT YOUR HELP\n\n### Completed (2025-10-07)\n- [x] Fix #2317 - git remote auto-detect (PR #2345)\n- [x] Fix #2248 - Laravel artisan completion (PR #2349)\n- [x] Fix #2296 - down4me function (PR #2350)\n- [x] Fix #2260 - SSH completion (PR #2351)\n- [x] Fix #2238 - uninstall script (PR #2352)\n- [x] Fix #2216 - node version conditional display (PR #2353)\n\n### This Week\n- [ ] Fix #2314 - todo alias rename\n- [ ] Draft issue closure messages for stale issues\n- [ ] Update #1696 with cleanup progress\n- [ ] Identify next 10 files for `clean_files.txt`\n\n### Ongoing\n- [ ] Continue pre-commit cleanup (add files to clean_files.txt)\n- [ ] Write tests for bugs I fix\n- [ ] Improve docs as I work\n\n---\n\n## 8. WHAT I NEED FROM YOU\n\n### Decisions Needed\n1. **Close stale issues?** - Should I close the 18 stale issues (>2 years old)?\n2. **Framework completions?** (#2248) - Accept Laravel/Artisan completion?\n3. **Smart plugins?** (#2216) - Should nvm only show in Node projects?\n4. **Maintainer status?** (#2214) - Are you seeking co-maintainers?\n5. **Packaging?** (#1819) - Worth pursuing package manager distribution?\n6. **Alias philosophy?** (#825) - Stay aggressive or be more conservative?\n\n### Approval Needed\n- Approve me to start making PRs for Quick Wins\n- Approve mass closure of stale issues (with template message)\n\n---\n\n## 9. PROPOSED ISSUE CLOSURE TEMPLATE\n\nFor stale issues, I recommend this message:\n\n```markdown\nClosing this issue due to inactivity (2+ years old).\n\nIf this is still relevant, please:\n1. Test with latest bash-it version\n2. Provide reproduction steps\n3. Reopen or create new issue with updated details\n\nThanks for your contribution to bash-it! 🎉\n```\n\n---\n\n## 10. SUCCESS METRICS\n\n### Short Term (1 month)\n- [ ] 5+ Quick Win PRs merged\n- [ ] 18 stale issues closed\n- [ ] Open issue count < 15\n- [ ] All open issues labeled and categorized\n\n### Medium Term (3 months)\n- [ ] 100+ files in `clean_files.txt` (currently ~50)\n- [ ] All quick wins fixed\n- [ ] Strategic decisions made and documented\n- [ ] Issue response time < 1 week\n\n### Long Term (6 months)\n- [ ] All files pass pre-commit hooks\n- [ ] < 10 open issues at any time\n- [ ] Clear contribution guidelines\n- [ ] Possibly: Package manager distribution\n\n---\n\n## APPENDIX: Issue Reference\n\n### Quick Wins (6)\n- #2317 ✅ Auto-detect git remote (PR #2345)\n- #2248 ✅ Laravel artisan completion (PR #2349)\n- #2296 ✅ down4me broken (PR #2350)\n- #2260 ✅ SSH completion @ issue (PR #2351)\n- #2238 ✅ Uninstall script issue (PR #2352)\n- #2216 ✅ Smart nvm plugin (PR #2353)\n- #2314 ⚡ Todo alias install failure (TODO)\n\n### Decision Required (3 remaining)\n- #2245 tmux completion\n- #2214 Need maintainers?\n- #1819 Package managers\n- #825 Alias philosophy\n\n### Stale/Close (18)\n- #517, #825, #922, #1053, #1207 (Ancient >4yr)\n- #1640, #1680, #1693, #1818, #1943, #2080, #2084, #2149, #2150, #2174, #2184, #2197, #2202 (Old 2-4yr)\n- #2254 (Recent but needs repro)\n\n### Keep Open (3)\n- #1696 Cleanup tracking issue\n- #2297 Powerline bug (recent, active)\n- Any issues with recent activity or clear action items\n"
  },
  {
    "path": "docs/plans/bash-it-quick-reference.md",
    "content": "# Bash-it Issue Analysis - Quick Reference\n**Date**: 2025-10-05\n**Updated**: 2025-10-07\n\n## TL;DR\n\n📊 **32 open issues** → **27 remaining** (5 fixed!)\n\n### ✅ Completed (2025-10-07)\n1. ✅ Fix #2317 - git remote detection (PR #2345)\n2. ✅ Fix #2248 - Laravel artisan completion (PR #2349)\n3. ✅ Fix #2296 - down4me function (PR #2350)\n4. ✅ Fix #2260 - SSH completion (PR #2351)\n5. ✅ Fix #2238 - uninstall script (PR #2352)\n6. ✅ Fix #2216 - node version conditional (PR #2353)\n\n### What's Left\n- Fix #2314 - todo alias rename (5 min)\n\n**Progress**: 6 PRs created, 5 issues closed (pending PR merge)\n\n### What I Need From You\n\n#### Decision 1: Close Stale Issues?\nClose 18 issues that are 2+ years old with no activity?\n- ✅ **Recommend YES** - Improves project health\n- Template message: \"Closing due to inactivity. Reopen if still relevant.\"\n\n#### Decision 2: Framework Completions?\n~~Accept Laravel/Artisan completions (#2248)?~~\n- ✅ **DONE** - Implemented in PR #2349\n\n#### Decision 3: Smart Plugins?\n~~Should nvm plugin auto-detect Node projects (#2216)?~~\n- ✅ **DONE** - Implemented in PR #2353 (opt-in via NODE_VERSION_CHECK_PROJECT)\n\n#### Decision 4: Need Co-Maintainers?\nResponse to #2214 about project governance?\n- ⚖️ **Your call** - Want help maintaining?\n\n#### Decision 5: Package Managers?\nWorth effort to get into Homebrew (#1819)?\n- ⚖️ **Recommend YES** - Big UX improvement, modest effort\n\n#### Decision 6: Alias Philosophy?\nBe more conservative with aliases like `ll`? (#825)\n- ⚖️ **Recommend NO** - Keep current, improve docs\n\n---\n\n## Issue Breakdown\n\n### ✅ Fixed (6 completed)\n- #2317: git remote (PR #2345)\n- #2248: Laravel completion (PR #2349)\n- #2296: down4me (PR #2350)\n- #2260: SSH completion (PR #2351)\n- #2238: uninstall script (PR #2352)\n- #2216: Smart nvm (PR #2353)\n\n### ⚡ Quick Fix Remaining (1)\n- #2314: todo alias rename\n\n### 🤔 Need Your Decision (4)\n- #2245: tmux completion\n- #2214: Maintainers\n- #1819: Packaging\n- #825: Alias philosophy\n\n### 🗑️ Recommend Closing (18)\nAll are 2+ years old with no activity:\n- #517, #922, #1053, #1207 (Ancient >4yr)\n- #1640, #1680, #1693, #1818, #1943, #2080, #2084, #2149, #2150, #2174, #2184, #2197, #2202 (Old 2-4yr)\n- #2254 (Needs repro)\n\n### 📌 Keep Open (3)\n- #1696: Cleanup tracking issue (still active)\n- #2297: Powerline bug (recent, active)\n- Any new issues with activity\n\n---\n\n## Recommended Action Plan\n\n### This Week\n1. I fix 5 quick win bugs\n2. You review and approve stale issue closure\n3. You make strategic decisions\n\n### Next Week  \n1. Close stale issues\n2. Start pre-commit cleanup\n3. Label remaining issues\n\n### This Month\n1. Continue code cleanup\n2. Improve documentation\n3. Monthly issue triage\n\n---\n\n## Files Created\n\n1. `/tmp/bash-it-issues-comprehensive-analysis.md` - Full detailed analysis\n2. `/tmp/bash-it-roadmap-2025.md` - 6-month technical debt reduction plan\n3. `/tmp/bash-it-quick-reference.md` - This file (TL;DR version)\n4. `/tmp/bash-it-open-issues.json` - Raw issue data\n\n---\n\n## Key Metrics\n\n| Metric | Original | Now (2025-10-07) | After Phase 2 | Target |\n|--------|----------|------------------|---------------|--------|\n| Open Issues | 32 | 27 | 9 | <10 |\n| Stale Issues | 25 | 25 | 0 | 0 |\n| Quick Wins Done | 0 | 6 | 7 | 7 |\n| Clean Files | ~50 | ~50 | ~100 | 400+ |\n| PRs Created | 0 | 6 | 6+ | Ongoing |\n\n---\n\n## Next Action\n\n**Status Update (2025-10-07)**:\n- ✅ 6 Quick Win PRs created and ready for review\n- ✅ Issues #2248 and #2216 implemented (were in \"Decision\" category)\n- ⚡ 1 more quick fix remaining (#2314)\n\n**Remaining Decisions**:\n1. Approve stale issue closure?\n2. Make strategic decisions (#2214, #1819, #825, #2245)?\n3. Review and merge PRs #2345, #2349, #2350, #2351, #2352, #2353\n"
  },
  {
    "path": "docs/plans/bash-it-roadmap-2025.md",
    "content": "# Bash-it Technical Debt Reduction Roadmap 2025\n**Created**: 2025-10-05\n**Last Updated**: 2025-10-07\n**Owner**: Maintainers\n**Goal**: Reduce open issues from 32 to <10, improve code quality to 100% pre-commit clean\n\n---\n\n## Current State Assessment\n\n### Health Metrics (2025-10-07 Update)\n- 📊 **Open Issues**: 32 → **27** (5 closed pending PR merge)\n- 🧹 **Clean Files**: ~50 files in `clean_files.txt`\n- ✅ **Pre-commit Coverage**: ~15% of codebase\n- ⏰ **Stale Issues**: 78% (>2 years old) - **25 remaining**\n- 🐛 **Active Bugs**: ~~5~~ **1** fixable quickly (4 fixed!)\n- 🎯 **Issue Response Time**: Variable (some years old)\n- 🚀 **PRs Created**: **6** in 2 days\n\n### Technical Debt Categories\n1. **Code Quality**: Many files don't pass shellcheck/shfmt\n2. **Issue Backlog**: 25 stale issues creating noise\n3. **Documentation**: Inconsistent, incomplete\n4. **Testing**: Good BATS coverage, but could expand\n5. **Distribution**: Manual install only, no package managers\n\n---\n\n## Phase 1: Quick Wins Sprint ✅ COMPLETED (2025-10-07)\n**Goal**: Fix bugs, close issues, build momentum\n**Effort**: 2 days, 6 PRs created\n\n### Tasks\n- [x] #2317: Auto-detect git remote (PR #2345 - 2025-10-05)\n- [x] #2248: Laravel artisan completion (PR #2349 - 2025-10-07)\n- [x] #2296: Fix down4me function (PR #2350 - 2025-10-07)\n- [x] #2260: Fix SSH completion @ removal (PR #2351 - 2025-10-07)\n- [x] #2238: Improve uninstall script (PR #2352 - 2025-10-07)\n- [x] #2216: Node version conditional display (PR #2353 - 2025-10-07)\n- [ ] #2314: Rename todo alias file (TODO - 5 min)\n\n### Success Criteria\n- ✅ 6 PRs created (awaiting review/merge)\n- ✅ 5 issues can be closed (pending PR merge)\n- ⏳ Tests included where applicable\n- ✅ Clean git history, all linting passed\n\n### Deliverables\n- Working fixes for real user problems\n- Test coverage for fixed bugs\n- Updated documentation where needed\n- Template for future quick-win sprints\n\n---\n\n## Phase 2: Issue Garden Cleanup (Week 3-4)\n**Goal**: Reduce noise, improve project health\n**Effort**: ~4 hours\n\n### Strategy: Aggressive Stale Issue Closure\nClose issues that are:\n- >2 years old with no recent activity\n- Vague feature requests with no volunteers\n- Questions that were never answered\n- Fixed but not closed\n- No longer relevant\n\n### Execution Plan\n1. **Week 3**: Draft closure messages for each issue\n2. **Get maintainer approval** on closure list\n3. **Week 4**: Close issues with polite template message\n4. **Add labels**: \"stale-closed\", \"reopen-if-relevant\"\n\n### Issues to Close (18 total)\n**Ancient** (>4 years, likely irrelevant):\n- #517: Plugin load times (2015)\n- #922: Support for enhancd (2017)\n- #1053: Evaluate kcov coverage (2017)\n- #1207: Prompt wrap-around (2018)\n\n**Old** (2-4 years, no activity):\n- #1640: Cleanup base/general\n- #1680: Document all commands\n- #1693: todo plugin $TODO variable\n- #1818: Move libs to vendor\n- #1943: preexec performance\n- #2080: Structure aliases\n- #2084: Platform config question\n- #2149: pyenv over SSH\n- #2150: Preview help\n- #2174: System alias breaks completion\n- #2184: Show plugin source URI\n- #2197: Preview not working\n- #2202: Install shebang question\n\n**Recent but stale** (needs repro):\n- #2254: Syntax error in completion\n\n### Success Criteria\n- ✅ Open issues reduced from 32 to <15\n- ✅ All remaining issues labeled appropriately\n- ✅ Clear \"why closed\" rationale for each\n- ✅ Template for future issue gardening\n\n---\n\n## Phase 3: Strategic Decisions (Month 2)\n**Goal**: Establish clear project direction\n**Effort**: Discussion + documentation\n\n### Decisions Required\n\n#### 1. Framework-Specific Completions (#2248, #2245)\n**Question**: Accept framework-specific completions (Laravel, etc.)?\n**Options**:\n- A) Accept all quality completions (grow features)\n- B) Only popular/maintained frameworks (selective)\n- C) Reject (keep bash-it focused)\n\n**Recommendation**: Option B - Selective acceptance\n- Require: Good tests, maintained upstream, popular (>10k stars)\n- Reject: Niche frameworks, unmaintained, poor code quality\n\n#### 2. Smart Plugin Behavior (#2216)\n**Question**: Should plugins auto-detect context (e.g., nvm only in Node projects)?\n**Options**:\n- A) Add smart detection (better UX, more complexity)\n- B) Keep simple (user configures, less magic)\n\n**Recommendation**: Option B - Keep simple\n- Document how users can add conditional logic themselves\n- Avoid complexity in core plugins\n\n#### 3. Maintainer/Governance (#2214)\n**Question**: Need co-maintainers? How to govern?\n**Options**:\n- A) Seek co-maintainers (share workload)\n- B) Stay solo (full control)\n- C) Create contributor tiers (core + trusted)\n\n**Recommendation**: Option C - Tiered contributors\n- Core maintainer(s): Can merge to master\n- Trusted contributors: Can label, triage issues\n- Contributors: Submit PRs\n\n#### 4. Package Manager Distribution (#1819)\n**Question**: Worth effort to get into Homebrew, apt, etc.?\n**Options**:\n- A) Full packaging effort (Homebrew, apt, yum)\n- B) Homebrew only (most requested)\n- C) Git install only (current)\n\n**Recommendation**: Option B - Homebrew first\n- Create Homebrew formula (2-4 hours work)\n- Improves adoption significantly\n- Low maintenance once set up\n- Defer other package managers until demand proven\n\n#### 5. Alias Philosophy (#825)\n**Question**: How aggressive with default aliases?\n**Options**:\n- A) Very conservative (no common command shadowing)\n- B) Current approach (some shadowing, documented)\n- C) More aggressive (convenience > safety)\n\n**Recommendation**: Option B - Current + better docs\n- Keep current aliases (many users depend on them)\n- Add BIG WARNING in docs about ll, la, etc.\n- Add `bash-it doctor --check-conflicts` command\n- Let users decide (enable/disable)\n\n### Outcome\n- All decisions documented in CLAUDE.md\n- Issues closed or converted to tracked work\n- Clear contributor guidelines\n\n---\n\n## Phase 4: Pre-commit Expansion (Month 2-3)\n**Goal**: Get 80%+ of files passing pre-commit hooks\n**Effort**: ~20 hours spread over 6 weeks\n\n### Current State\n- `clean_files.txt` has ~50 entries\n- Remaining: ~450 bash files need cleanup\n- Pre-commit hooks: shellcheck, shfmt, trailing whitespace, etc.\n\n### Strategy: Chip Away Weekly\n- **Weekly goal**: Add 10 files to `clean_files.txt`\n- **Prioritize**: Most-used files first (lib/, install.sh, bash_it.sh)\n- **Batch fixes**: Group similar files (all themes, all plugins of type X)\n\n### Target Files (Priority Order)\n1. **Core** (Week 1-2):\n   - bash_it.sh\n   - scripts/reloader.bash\n   - All files in lib/\n   \n2. **Install/Uninstall** (Week 3):\n   - install.sh (partially done)\n   - uninstall.sh\n\n3. **Popular Plugins** (Week 4-5):\n   - plugins/available/base.plugin.bash\n   - plugins/available/git.plugin.bash\n   - plugins/available/docker.plugin.bash\n   - plugins/available/nvm.plugin.bash\n\n4. **Themes** (Week 6-7):\n   - Focus on most popular themes first\n   - bobby, powerline, atomic, etc.\n\n5. **Completions** (Week 8-9):\n   - System completions\n   - Popular tool completions\n\n6. **Aliases** (Week 10+):\n   - Lower priority (users can disable)\n   - Fix as time permits\n\n### Success Criteria\n- ✅ 80% of files in `clean_files.txt`\n- ✅ All core files (lib/, scripts/) clean\n- ✅ Install scripts clean\n- ✅ Top 10 plugins/themes clean\n\n---\n\n## Phase 5: Documentation Refresh (Month 3-4)\n**Goal**: Improve docs incrementally as we work\n**Effort**: ~10 hours\n\n### Key Documentation Needs\n1. **README.md**: Update with current state\n2. **CONTRIBUTING.md**: Clear guidelines for PRs\n3. **CLAUDE.md**: Document decisions, patterns\n4. **Wiki**: Troubleshooting common issues\n\n### Approach: Doc-as-you-go\n- Fix bug → Update relevant docs\n- Add feature → Update examples\n- Close stale issue → Document decision\n\n### Priority Docs\n1. Pre-commit hook usage (for contributors)\n2. Plugin development guide\n3. Theme development guide\n4. Troubleshooting guide\n5. Performance optimization guide\n\n---\n\n## Phase 6: Testing Expansion (Month 4-5)\n**Goal**: Increase test coverage for critical paths\n**Effort**: ~15 hours\n\n### Current Testing\n- BATS framework in place\n- Good coverage of core functionality\n- Some plugins/completions lack tests\n\n### Testing Priorities\n1. **Core Functions**: lib/helpers.bash functions\n2. **Bug Fixes**: Every bug fix gets a test\n3. **Plugins**: At least smoke tests for all\n4. **Completions**: Test completion generation\n\n### Success Criteria\n- ✅ All functions in lib/ have tests\n- ✅ All fixed bugs have regression tests\n- ✅ CI runs tests on every PR\n- ✅ Test coverage >70%\n\n---\n\n## Phase 7: Packaging & Distribution (Month 5-6)\n**Goal**: Get bash-it into Homebrew (if decision approved)\n**Effort**: ~8 hours initial + ongoing maintenance\n\n### Homebrew Formula Steps\n1. Create formula in homebrew-core\n2. Define installation steps\n3. Add update mechanism\n4. Add uninstall support\n5. Submit PR to Homebrew\n\n### Requirements\n- Semantic versioning (start tagging releases)\n- Stable release process\n- Update mechanism (bash-it update needs to work)\n- CI to test formula\n\n### Success Criteria\n- ✅ Homebrew formula accepted\n- ✅ Users can `brew install bash-it`\n- ✅ Formula auto-updates with releases\n- ✅ Documented in README\n\n---\n\n## Success Metrics & KPIs\n\n### Issue Health\n| Metric | Current | 1 Month | 3 Months | 6 Months |\n|--------|---------|---------|----------|----------|\n| Open Issues | 32 | <15 | <10 | <10 |\n| Stale Issues | 25 | 0 | 0 | 0 |\n| Response Time | Variable | <1 week | <3 days | <3 days |\n| Issues with Labels | 50% | 100% | 100% | 100% |\n\n### Code Quality\n| Metric | Current | 1 Month | 3 Months | 6 Months |\n|--------|---------|---------|----------|----------|\n| Clean Files | 50 | 100 | 250 | 400+ |\n| Pre-commit Coverage | 15% | 30% | 60% | 80%+ |\n| Shellcheck Pass | ~15% | ~30% | ~60% | 80%+ |\n| Test Coverage | Good | Good | Better | 70%+ |\n\n### Project Health\n| Metric | Current | 1 Month | 3 Months | 6 Months |\n|--------|---------|---------|----------|----------|\n| Documentation | Fair | Good | Good | Excellent |\n| Contributor Guidelines | Basic | Clear | Clear | Comprehensive |\n| Distribution | Git only | Git only | Git only | + Homebrew |\n| Active Contributors | Few | Growing | Growing | Community |\n\n---\n\n## Risk Management\n\n### Risks & Mitigations\n\n#### Risk: Closing issues angers contributors\n**Mitigation**: \n- Polite closure messages\n- Clear \"reopen if relevant\" policy\n- Respond promptly to reopens\n\n#### Risk: Pre-commit slows down contributors\n**Mitigation**:\n- Clear docs on running pre-commit\n- Auto-fix where possible (shfmt -w)\n- Allow incremental improvement\n\n#### Risk: Feature decisions split community\n**Mitigation**:\n- Be transparent about reasoning\n- Accept feedback, be willing to reverse\n- Plugins are optional - defaults matter less\n\n#### Risk: Packaging creates maintenance burden\n**Mitigation**:\n- Start with Homebrew only\n- Automate release process\n- Only pursue if demand is real\n\n---\n\n## Timeline Summary\n\n```\nMonth 1: Quick Wins + Issue Cleanup\n  Week 1-2: Fix 5 bugs\n  Week 3-4: Close 18 stale issues\n\nMonth 2: Decisions + Pre-commit Start\n  Week 5-6: Make strategic decisions\n  Week 7-8: Clean core files\n\nMonth 3: Pre-commit Expansion\n  Week 9-12: Add 40+ files to clean_files.txt\n\nMonth 4: Documentation + Testing\n  Week 13-16: Improve docs, add tests\n\nMonth 5-6: Polish + Optional Packaging\n  Week 17-20: Continue cleanup\n  Week 21-24: Homebrew formula (if approved)\n```\n\n---\n\n## Resource Requirements\n\n### Time Investment\n- **Maintainer**: 2-4 hours/week decision-making, review\n- **Contributor(s)**: 4-8 hours/week implementation\n- **Total**: ~6-12 hours/week for 6 months\n\n### Skills Needed\n- Bash scripting (existing)\n- Testing with BATS (existing)\n- Git workflow (existing)\n- GitHub Actions (light, for packaging)\n- Homebrew packaging (learn, ~4 hours)\n\n---\n\n## Next Steps\n\n1. **Review this roadmap** with maintainer(s)\n2. **Approve Phase 1** Quick Wins sprint\n3. **Decide on stale issue closure** approach\n4. **Make strategic decisions** (Phase 3)\n5. **Start executing** week by week\n\n---\n\n## Questions for Maintainer\n\n1. Approve Quick Wins sprint? (5 bug fixes)\n2. Approve stale issue closure? (18 issues)\n3. Which strategic decisions need discussion?\n4. What's the priority: features vs. cleanup?\n5. Interest in co-maintainers/trusted contributors?\n6. Should I start Phase 1 immediately?\n"
  },
  {
    "path": "docs/proxy_support.rst",
    "content": ".. _proxy_support:\n\nProxy Support\n^^^^^^^^^^^^^\n\nIf you are working in a corporate environment where you have to go through a proxy server for internet access,\nthen you know how painful it is to configure the OS proxy variables in the shell,\nespecially if you are switching between environments, e.g. office (with proxy) and home (without proxy).\n\nThe Bash shell (and many shell tools) use the following variables to define the proxy to use:\n\n\n* ``HTTP_PROXY`` (and ``http_proxy``\\ ): Defines the proxy server for HTTP requests\n* ``HTTPS_PROXY`` (and ``https_proxy``\\ ): Defines the proxy server for HTTPS requests\n* ``ALL_PROXY`` (and ``all_proxy``\\ ): Used by some tools for the same purpose as above\n* ``NO_PROXY`` (and ``no_proxy``\\ ): Comma-separated list of hostnames that don't have to go through the proxy\n\nBash-it's ``proxy`` plugin allows to enable and disable these variables with a simple command.\nTo start using the ``proxy`` plugin, run the following:\n\n.. code-block:: bash\n\n   bash-it enable plugin proxy\n\nBash-it also provides support for enabling/disabling proxy settings for various shell tools.\nThe following backends are currently supported (in addition to the shell's environment variables): Git, SVN, npm, ssh.\nThe ``proxy`` plugin changes the configuration files of these tools to enable or disable the proxy settings.\n\nBash-it uses the following variables to set the shell's proxy settings when you call ``enable-proxy``.\nThese variables are best defined in a custom script in Bash-it's custom script folder (\\ ``$BASH_IT/custom``\\ ), e.g. ``$BASH_IT/custom/proxy.env.bash``\n\n\n* ``BASH_IT_HTTP_PROXY`` and `BASH_IT_HTTPS_PROXY`: Define the proxy URL to be used, e.g. 'http://localhost:1234'\n* ``BASH_IT_NO_PROXY``\\ : A comma-separated list of proxy exclusions, e.g. ``127.0.0.1,localhost``\n\nOnce you have defined these variables (and have run ``reload`` to load the changes), you can use the following commands to enable or disable the proxy settings in your current shell:\n\n\n* ``enable-proxy``\\ : This sets the shell's proxy environment variables and configures proxy support in your SVN, npm, and SSH configuration files.\n* ``disable-proxy``\\ : This unsets the shell's proxy environment variables and disables proxy support in your SVN, npm, and SSH configuration files.\n\nThere are many more proxy commands, e.g. for changing the local Git project's proxy settings.\nRun ``glossary proxy`` to show the available proxy functions with a short description.\n"
  },
  {
    "path": "docs/requirements.txt",
    "content": "sphinx==4.5.0\nsphinx-rtd-theme==0.5.0\nsphinxemoji==0.1.8\ndocutils==0.17.1\n"
  },
  {
    "path": "docs/test.rst",
    "content": ".. _test:\n\nTesting Bash-it\n===============\n\nOverview\n--------\n\nThe Bash-it unit tests leverage the `Bats unit test framework for Bash <https://github.com/bats-core/bats-core>`_.\nThere is no need to install Bats explicitly, the test run script will automatically download and install Bats and its dependencies.\n\nWhen making changes to Bash-it, the tests are automatically executed in a test build environment on `Travis CI <https://travis-ci.com>`_.\n\nTest Execution\n--------------\n\nTo execute the unit tests, please run the ``run`` script:\n\n.. code-block:: bash\n\n   # If you are in the `test` directory:\n   ./run\n\n   # If you are in the root `.bash_it` directory:\n   test/run\n\nThe ``run`` script will automatically install if it is not already present, and will then run all tests found under the ``test`` directory, including subdirectories.\n\nTo run only a subset of the tests, you can provide the name of the test subdirectory that you want to run, e.g. like this for the tests in the ``test/themes`` directory:\n\n.. code-block:: bash\n\n   # If you are in the root `.bash_it` directory:\n   test/run test/themes\n\nBy default, the tests run in single-threaded mode.\nIf you want to speed up the test execution, you can install the `GNU ``parallel`` tool <https://www.gnu.org/software/parallel/>`_\\ , which is supported by Bats.\nWhen using ``parallel``\\ , the ``test/run`` script will use a number of threads in parallel, depending on the available CPU cores of your system.\nThis can speed up test execution significantly.\n\nWriting Tests\n-------------\n\nWhen adding or modifying tests, please stick to the format and conventions of the existing test cases.\nThe ``test_helper.bash`` script provides a couple of reusable helper functions that you should use when writing a test case,\nfor example for setting up an isolated test environment.\n"
  },
  {
    "path": "docs/themes-list/atomic.rst",
    "content": ".. _atomic:\n\nAtomic theme\n============\n\nThe Best ColorFull terminal prompt theme inspired by a number of themes and based on the theme of @MunifTanjim :ref:`brainy <brainy>`.\n\nSupported on all operating systems.\n\nIn constant maintenance and improvement\n\n\n.. image:: https://raw.githubusercontent.com/lfelipe1501/lfelipe-projects/master/AtomicTheme.gif\n   :target: https://raw.githubusercontent.com/lfelipe1501/lfelipe-projects/master/AtomicTheme.gif\n   :alt: Atomic-Theme\n\n\nInstall Theme\n-------------\n\nManually\n^^^^^^^^\n\nYou can install the theme manually by following these steps:\nEdit your modified config ``~/.bashrc`` file in order to customize Bash-it, set ``BASH_IT_THEME`` to the theme name ``atomic``.\n\nExamples:\n\n.. code-block:: bash\n\n   # Use the \"atomic\" theme\n   export BASH_IT_THEME=\"atomic\"\n\nAutomatically via terminal\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n#. You can install the theme automatically using the ``sed`` command from your Linux or OSX Terminal.\n#. For installation on windows you should use `\\ ``Git-Bash`` <https://git-for-windows.github.io/>`_ or make sure the terminal emulator you use (ej: cygwin, mintty, etc) has the ``sed`` command installed.\n\nCommand to execute For Windows and Linux:\n\n.. code-block:: bash\n\n   # Set the \"atomic\" theme replacing the theme you are using of bash-it\n   sed -i 's/'\"$BASH_IT_THEME\"'/atomic/g' ~/.bashrc\n\nCommand to execute for macOS:\n\n.. code-block:: bash\n\n   # Set the \"atomic\" theme replacing the theme you are using of bash-it\n   sed -i '' 's/'\"$BASH_IT_THEME\"'/atomic/g' ~/.bashrc\n\nFeatures\n--------\n\nPrompt Segments\n^^^^^^^^^^^^^^^\n\n\n* Username & Hostname\n* Current Directory\n* SCM Information\n* Battery Charge\n* Clock\n* `Todo.txt <https://github.com/ginatrapani/todo.txt-cli>`_ status\n* Ruby Environment\n* Python Environment\n* Exit Code\n\nOthers\n^^^^^^\n\n\n* Indicator for cached ``sudo`` credential\n* Indicator for abort (ctrl + C) the current task and regain user control\n* ``atomic`` command for showing/hiding various prompt segments on-the-fly\n\nConfiguration\n-------------\n\nVarious prompt segments can be shown/hidden or modified according to your choice. There are two ways for doing that:\n\n\n#. On-the-fly using ``atomic`` command\n#. Theme Environment Variables\n\nOn-the-fly using ``atomic`` command\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis theme provides a command for showing/hiding prompt segments.\n\n``atomic show <segment>``\n\n``atomic hide <segment>``\n\nTab-completion for this command is enabled by default.\n\nConfiguration specified by this command will only be applied to current and subsequent child shells.\n\nTheme Environment Variables\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis is used for permanent settings that apply to all terminal sessions. You have to define the value of specific theme variables in your ``bashrc`` (or equivalent) file.\n\nThe name of the variables are listed below along with their default values.\n\nUser Information\n~~~~~~~~~~~~~~~~\n\nIndicator for cached ``sudo`` credential (see ``sudo`` manpage for more information):\n\n``THEME_SHOW_SUDO=true``\n\nSCM Information\n~~~~~~~~~~~~~~~\n\nInformation about SCM repository status:\n\n``THEME_SHOW_SCM=true``\n\nRuby Environment\n~~~~~~~~~~~~~~~~\n\nRuby environment version information:\n\n``THEME_SHOW_RUBY=false``\n\nPython Environment\n~~~~~~~~~~~~~~~~~~\n\nPython environment version information:\n\n``THEME_SHOW_PYTHON=false``\n\nToDo.txt status\n~~~~~~~~~~~~~~~\n\n`Todo.txt <https://github.com/ginatrapani/todo.txt-cli>`_ status:\n\n``THEME_SHOW_TODO=false``\n\nClock\n~~~~~\n\n``THEME_SHOW_CLOCK=true``\n\n``THEME_CLOCK_COLOR=$bold_cyan``\n\nFormat of the clock (see ``date`` manpage for more information):\n\n``THEME_CLOCK_FORMAT=\"%H:%M:%S\"``\n\nBattery Charge\n~~~~~~~~~~~~~~\n\nBattery charge percentage:\n\n``THEME_SHOW_BATTERY=false``\n\nExit Code\n~~~~~~~~~\n\nExit code of the last command:\n\n``THEME_SHOW_EXITCODE=true``\n\nPrompt Segments Order\n---------------------\n\nCurrently available prompt segments are:\n\n\n* battery\n* char\n* clock\n* dir\n* exitcode\n* python\n* ruby\n* scm\n* todo\n* user_info\n\nThree environment variables can be defined to rearrange the segments order. The default values are:\n\n``___ATOMIC_TOP_LEFT=\"user_info dir scm\"``\n\n``___ATOMIC_TOP_RIGHT=\"exitcode python ruby todo clock battery\"``\n\n``___ATOMIC_BOTTOM=\"char\"``\n\nDevelopment by\n^^^^^^^^^^^^^^\n\nDeveloper / Author: `Luis Felipe Sánchez <https://github.com/lfelipe1501>`_\n\nThis work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.\n"
  },
  {
    "path": "docs/themes-list/barbuk.rst",
    "content": ".. _barbuk:\n\nBarbUk theme\n============\n\nA minimal theme with a clean git prompt\n\nProvided Information\n--------------------\n\n* Current git remote tool logo (support: github, gitlab, bitbucket)\n* Current path (red when user is root)\n* Current git info\n* Last command exit code (only shown when the exit code is greater than 0)\n* user@hostname for ssh connection\n\nDefault configuration\n^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   BARBUK_PROMPT=\"git-uptream-remote-logo ssh path scm python_venv ruby node terraform cloud duration exit\"\n\nYou can override BARBUK_PROMPT to display only the desired information.\n\navailable block:\n\n* git-uptream-remote-logo\n* ssh\n* path\n* scm\n* python_venv\n* ruby\n* node\n* uv\n* bun\n* pre_commit\n* terraform\n* cloud\n* mysql\n* docker\n* ansible\n* duration\n* exit\n\nFonts and glyphs\n----------------\n\nA font with SCM glyphs is required to display the default tool/host logos.\nYou can use a font from https://www.nerdfonts.com/ or patch your own font with the tool\nprovided by https://github.com/ryanoasis/nerd-fonts.\n\nYou can also override the default variables if you want to use different glyphs or standard ASCII characters.\n\nDefault theme glyphs\n^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   BARBUK_GITLAB_CHAR='  '\n   BARBUK_BITBUCKET_CHAR='  '\n   BARBUK_GITHUB_CHAR='  '\n   BARBUK_ARCHLINUX_CHAR:='  '\n   BARBUK_CODEBERG_CHAR:='  '\n   BARBUK_GIT_DEFAULT_CHAR='  '\n   BARBUK_GIT_BRANCH_ICON=''\n   BARBUK_CURRENT_USER_PREFFIX='  '\n   BARBUK_HG_CHAR='☿ '\n   BARBUK_SVN_CHAR='⑆ '\n   BARBUK_EXIT_CODE_ICON=' '\n   BARBUK_PYTHON_VENV_CHAR=' '\n   BARBUK_UV_CHAR:='🐍'\n   BARBUK_COMMAND_DURATION_ICON='  '\n   BARBUK_RUBY_CHAR=' '\n   BARBUK_NODE_CHAR=' '\n   BARBUK_BUN_CHAR:='🍞 '\n   BARBUK_TERRAFORM_CHAR=\"❲t❳ \"\n   BARBUK_AWS_PROFILE_CHAR=\" aws \"\n   BARBUK_SCALEWAY_PROFILE_CHAR=\" scw \"\n   BARBUK_GCLOUD_CHAR=\" gcp \"\n   BARBUK_DOCKER_CHAR:=\" \"\n   BARBUK_MYSQL_CHAR:=\" \"\n   BARBUK_MARIADB_CHAR:=\" \"\n   BARBUK_ANSIBLE_CHAR:=\" \"\n\nCustomize glyphs\n^^^^^^^^^^^^^^^^\n\nDefine your custom glyphs before sourcing bash-it:\n\n.. code-block:: bash\n\n   export BARBUK_GITHUB_CHAR='•'\n   source \"$BASH_IT\"/bash_it.sh\n\nSSH prompt\n----------\n\nUsage\n^^^^^\n\nWhen using a ssh session, the theme will display ``user@hostname``.\nYou can disable this information with ``BARBUK_SSH_INFO``.\n\nThe hostname is displayed in the FQDN format by default. You\ncan use the short hostname format with ``BARBUK_HOST_INFO``.\n\n.. code-block:: bash\n\n   # short or long\n   export BARBUK_HOST_INFO=short\n   # true or false\n   export BARBUK_SSH_INFO=false\n   source \"$BASH_IT\"/bash_it.sh\n\nKeep theme with sudoer\n^^^^^^^^^^^^^^^^^^^^^^\n\nIf you want the theme to persist using ``sudo -s`` in a ssh session, you need to configure sudo to keep the ``HOME`` and ``SSH_CONNECTION`` environment variables.\n\n``HOME`` contains the path to the home directory of the current user. Keeping it will allow to use your user dotfiles when elevating privileges.\n\nKeeping ``SSH_CONNECTION`` env is necessary for ssh detection in the theme.\n\nPlease refer to the following documentation for more information:\n\n\n* `sudo manual <https://www.sudo.ws/man/1.8.13/sudoers.man.html>`_ for ``env_keep`` configuration\n* `openssh manual <https://linux.die.net/man/1/ssh>`_ for information about ``SSH_CONNECTION`` environment\n\n.. code-block:: bash\n\n   cat << EOF > /etc/sudoers.d/keepenv\n   Defaults env_keep += HOME\n   Defaults env_keep += SSH_CONNECTION\n   EOF\n   chmod 400 /etc/sudoers.d/keepenv\n\nCommand duration\n----------------\n\nSee :ref:`Command duration <command_duration>`.\n\nExamples\n--------\n\nClean\n^^^^^\n\n.. code-block:: bash\n\n    ~ ❯\n\nGit\n^^^\n\n.. code-block:: bash\n\n      ~/.dotfiles on  master ⤏  origin ↑2 •7 ✗ ❯\n\nSsh\n^^^\n\n.. code-block:: bash\n\n   user@hostname in  ~/bash-it on  master ✓ ❯\n\nPython venv\n^^^^^^^^^^^\n\n.. code-block:: bash\n\n     flask ~/test on  master ✓ ❯\n\nCommand duration\n^^^^^^^^^^^^^^^^\n\n.. code-block:: bash\n\n   # sleep 3s\n   user@hostname in  ~/bash-it on  master ✓  3.2s ❯\n"
  },
  {
    "path": "docs/themes-list/bira.rst",
    "content": ".. _bira:\n\nBira Theme\n==========\n\nThis is a port of Oh My Zsh's `'Bira' <https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/bira.zsh-theme>`_ theme. It looks the same as the original, except for the following changes:\n\n\n* Exit code of last command is not shown\n* More informative git prompt (if you want to keep it minimal, please read: :ref:`git_prompt`)\n* Position and colour of virtualenv prompt\n* No ruby version prompt\n"
  },
  {
    "path": "docs/themes-list/brainy.rst",
    "content": ".. _brainy:\n\nBrainy theme\n============\n\nSimple colorful terminal prompt theme (inspired by a number of themes).\n\nFeatures\n--------\n\nPrompt Segments\n^^^^^^^^^^^^^^^\n\n\n* Username & Hostname\n* Current Directory\n* SCM Information\n* Battery Charge\n* Clock\n* `Todo.txt <https://github.com/ginatrapani/todo.txt-cli>`_ status\n* Ruby Environment\n* Python Environment\n* Exit Code\n\nOthers\n^^^^^^\n\n\n* Indicator for cached ``sudo`` credential\n* Indicator for ssh login\n* ``brainy`` command for showing/hiding various prompt segments on-the-fly\n\nConfiguration\n-------------\n\nVarious prompt segments can be shown/hidden or modified according to your choice. There are two ways for doing that:\n\n\n#. On-the-fly using ``brainy`` command\n#. Theme Environment Variables\n\nOn-the-fly using ``brainy`` command\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis theme provides a command for showing/hiding prompt segments.\n\n``brainy show <segment>``\n\n``brainy hide <segment>``\n\nTab-completion for this command is enabled by default.\n\nConfiguration specified by this command will only be applied to current and subsequent child shells.\n\nTheme Environment Variables\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThis is used for permanent settings that apply to all terminal sessions. You have to define the value of specific theme variables in your ``bashrc`` (or equivalent) file.\n\nThe name of the variables are listed below along with their default values.\n\nUser Information\n~~~~~~~~~~~~~~~~\n\nIndicator for cached ``sudo`` credential (see ``sudo`` manpage for more information):\n\n``THEME_SHOW_SUDO=true``\n\nSCM Information\n~~~~~~~~~~~~~~~\n\nInformation about SCM repository status:\n\n``THEME_SHOW_SCM=true``\n\nRuby Environment\n~~~~~~~~~~~~~~~~\n\nRuby environment version information:\n\n``THEME_SHOW_RUBY=false``\n\nPython Environment\n~~~~~~~~~~~~~~~~~~\n\nPython environment version information:\n\n``THEME_SHOW_PYTHON=false``\n\nToDo.txt status\n~~~~~~~~~~~~~~~\n\n`Todo.txt <https://github.com/ginatrapani/todo.txt-cli>`_ status:\n\n``THEME_SHOW_TODO=false``\n\nClock\n~~~~~\n\n``THEME_SHOW_CLOCK=true``\n\n``THEME_CLOCK_COLOR=$bold_cyan``\n\nFormat of the clock (see ``date`` manpage for more information):\n\n``THEME_CLOCK_FORMAT=\"%H:%M:%S\"``\n\nBattery Charge\n~~~~~~~~~~~~~~\n\nBattery charge percentage:\n\n``THEME_SHOW_BATTERY=false``\n\nExit Code\n~~~~~~~~~\n\nExit code of the last command:\n\n``THEME_SHOW_EXITCODE=true``\n\nPrompt Segments Order\n---------------------\n\nCurrently available prompt segments are:\n\n\n* battery\n* char\n* clock\n* dir\n* exitcode\n* python\n* ruby\n* scm\n* todo\n* user_info\n\nThree environment variables can be defined to rearrange the segments order. The default values are:\n\n``___BRAINY_TOP_LEFT=\"user_info dir scm\"``\n\n``___BRAINY_TOP_RIGHT=\"python ruby todo clock battery\"``\n\n``___BRAINY_BOTTOM=\"exitcode char\"``\n"
  },
  {
    "path": "docs/themes-list/codeword.rst",
    "content": ".. _codeword:\n\nCodeword Theme\n==============\n\nSingle line PS1 theme w/realtime history among windows.\nMinimal theme overrides from bash_it base theming\n\n``user@host:path[virt-env][scm] $``\n---------------------------------------\n\nBreakdown of the segments:\n\n\n* **user@host:path** - *convienient for LAN based ``ssh`` and ``scp`` tasks*\n* [\\ **virtualenv**\\ ] - *only appears when activated*\n* [\\ **scm**\\ ] - *only appears when activated*\n* **marker** - *$ or # depending on current user*\n\nExamples\n^^^^^^^^\n\n.. code-block:: bash\n\n   user@example.lan:~ $ cd /tmp/foo/bar/baz\n   user@example.lan:/tmp/foo/bar/baz $ cd $HOME/workspace\n   user@example.lan:~/workspace $ cd sampleRepo/\n   user@example.lan:~/workspace/sampleRepo [± |master ↑1 ↓3 {1} S:2 ?:1 ✗|] $\n"
  },
  {
    "path": "docs/themes-list/easy.rst",
    "content": ".. _easy:\n\nEasy Theme\n==========\n\nA simple theme\n\nExamples\n--------\n\n.. code-block:: bash\n\n    user@hostname ~/.bash_it\n    [ master ✓ ] ❯\n"
  },
  {
    "path": "docs/themes-list/index.rst",
    "content": ".. _list_of_themes:\n\nList of Themes\n==============\n\nBelow is a list of most of the themes (with screenshots) and their documentation that `bash-it <https://github.com/Bash-it/bash-it/>`_ ships with.\n\n.. note::\n  Not all themes have documentation!\n\n.. toctree::\n   :maxdepth: 1\n   :caption: Documentation of Themes\n   :glob:\n\n   *\n\nAlphabetical Screenshots List\n-----------------------------\n\nBakke\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/bakke-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/bakke-black.jpg\n   :alt: Bakke\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/bakke-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/bakke-white.jpg\n   :alt: Bakke\n\n\n----\n\nBarbUk\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/BarbUk-black.png\n   :target: https://bash-it.github.io/bash-it/docs/images/BarbUk-black.png\n   :alt: BarbUk\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/BarbUk-white.png\n   :target: https://bash-it.github.io/bash-it/docs/images/BarbUk-white.png\n   :alt: BarbUk\n\n\n----\n\nBobby\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/bobby-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/bobby-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/bobby-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/bobby-white.jpg\n   :alt:\n\n\n----\n\nBrunton\n^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/brunton-black.png\n   :target: https://bash-it.github.io/bash-it/docs/images/brunton-black.png\n   :alt:\n\n\n----\n\nCandy\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/candy-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/candy-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/candy-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/candy-white.jpg\n   :alt:\n\n\n----\n\nClean\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/clean-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/clean-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/clean-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/clean-white.jpg\n   :alt:\n\n\n----\n\nDemula\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/demula-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/demula-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/demula-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/demula-white.jpg\n   :alt:\n\n\n----\n\nDOS\n^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/dos-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/dos-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/dos-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/dos-white.jpg\n   :alt:\n\n\n----\n\nDoubleTime\n^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime-white.jpg\n   :alt:\n\n\n----\n\nDoubleTime Multiline\n^^^^^^^^^^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline-white.jpg\n   :alt:\n\n\n----\n\nDoubletime Multiline Python Only\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline_pyonly-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline_pyonly-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline_pyonly-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/doubletime_multiline_pyonly-white.jpg\n   :alt:\n\n\n----\n\nEasy\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/easy-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/easy-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/easy-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/easy-white.jpg\n   :alt:\n\n\n----\n\nEnvy\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/envy-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/envy-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/envy-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/envy-white.jpg\n   :alt:\n\n\n----\n\nInretio\n^^^^^^^\n\n\n.. image:: https://raw.githubusercontent.com/inretio/bash-it/gh-pages/docs/images/inretio-black.png\n   :target: https://raw.githubusercontent.com/inretio/bash-it/gh-pages/docs/images/inretio-black.png\n   :alt: Inretio theme in dark color scheme\n\n\n.. image:: https://raw.githubusercontent.com/inretio/bash-it/gh-pages/docs/images/inretio-white.png\n   :target: https://raw.githubusercontent.com/inretio/bash-it/gh-pages/docs/images/inretio-white.png\n   :alt: Inretio theme in light color scheme\n\n----\n\nIterate\n^^^^^^^\n\nResponsively wraps prompt based on terminal width.\n\n\n.. image:: https://cloud.githubusercontent.com/assets/1319655/2923152/3a763194-d70e-11e3-9e52-3740de9bbb9b.png\n   :target: https://cloud.githubusercontent.com/assets/1319655/2923152/3a763194-d70e-11e3-9e52-3740de9bbb9b.png\n   :alt:\n\n\n.. image:: https://cloud.githubusercontent.com/assets/1319655/2923143/14b8e0d2-d70e-11e3-9706-f5341fff8e5c.png\n   :target: https://cloud.githubusercontent.com/assets/1319655/2923143/14b8e0d2-d70e-11e3-9706-f5341fff8e5c.png\n   :alt:\n\n\n----\n\nMr Briggs\n^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/mbriggs-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/mbriggs-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/mbriggs-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/mbriggs-white.jpg\n   :alt:\n\n\n----\n\nMinimal\n^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/minimal-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/minimal-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/minimal-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/minimal-white.jpg\n   :alt:\n\n\n----\n\nModern\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/modern-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/modern-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/modern-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/modern-white.jpg\n   :alt:\n\n\n----\n\nModern T\n^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/modern-t-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/modern-t-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/modern-t-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/modern-t-white.jpg\n   :alt:\n\n\n----\n\nMetal\n^^^^^\n\n\n.. image:: https://raw.githubusercontent.com/jrab66/bash-it/7cc82b518d6286fc68c8477d809ce9f417501976/themes/metal/metalthemeblack.png\n   :target: https://raw.githubusercontent.com/jrab66/bash-it/7cc82b518d6286fc68c8477d809ce9f417501976/themes/metal/metalthemeblack.png\n   :alt:\n\n\n----\n\nn0Qorg\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/n0qorg-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/n0qorg-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/n0qorg-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/n0qorg-white.jpg\n   :alt:\n\n\n----\n\n.. _nwinkler_image:\n\nNWinkler\n^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/nwinkler-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/nwinkler-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/nwinkler-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/nwinkler-white.jpg\n   :alt:\n\n\n----\n\n.. _oh_my_posh_image:\n\nOh-My-Posh\n^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png\n   :target: https://bash-it.github.io/bash-it/docs/images/oh-my-posh.png\n   :alt:\n\n\n----\n\nPete\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/pete-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/pete-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/pete-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/pete-white.jpg\n   :alt:\n\n\n----\n\nPowerline\n^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-white.jpg\n   :alt:\n\n\n----\n\nPowerline Naked\n^^^^^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-naked-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-naked-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-naked-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-naked-white.jpg\n   :alt:\n\n\n----\n\nPowerline Plain\n^^^^^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-plain-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-plain-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/powerline-plain-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/powerline-plain-white.jpg\n   :alt:\n\n\n----\n\nPure\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/pure-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/pure-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/pure-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/pure-white.jpg\n   :alt:\n\n\n----\n\nRainbowBrite\n^^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/rainbowbrite-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/rainbowbrite-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/rainbowbrite-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/rainbowbrite-white.jpg\n   :alt:\n\n\n----\n\nR Jorgenson\n^^^^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/rjorgenson-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/rjorgenson-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/rjorgenson-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/rjorgenson-white.jpg\n   :alt:\n\n\n----\n\nSexy\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/sexy-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/sexy-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/sexy-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/sexy-white.jpg\n   :alt:\n\n\n----\n\nSimple\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/simple-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/simple-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/simple-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/simple-white.jpg\n   :alt:\n\n\n----\n\nSirUp\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/sirup-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/sirup-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/sirup-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/sirup-white.jpg\n   :alt:\n\n\n----\n\nStandard\n^^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/standard-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/standard-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/standard-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/standard-white.jpg\n   :alt:\n\n\n----\n\nTonka\n^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/tonka-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/tonka-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/tonka-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/tonka-white.jpg\n   :alt:\n\n\n----\n\nTylenol\n^^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/tylenol-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/tylenol-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/tylenol-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/tylenol-white.jpg\n   :alt:\n\n\n----\n\nZitron\n^^^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/zitron-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/zitron-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/zitron-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/zitron-white.jpg\n   :alt:\n\n\n----\n\nZork\n^^^^\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/zork-black.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/zork-black.jpg\n   :alt:\n\n\n.. image:: https://bash-it.github.io/bash-it/docs/images/zork-white.jpg\n   :target: https://bash-it.github.io/bash-it/docs/images/zork-white.jpg\n   :alt:\n"
  },
  {
    "path": "docs/themes-list/inretio.rst",
    "content": ".. _inretio:\n\nInretio Theme\n=============\n\nSimple theme showing date and time, username and hostname, current folder, Git details and as a bonus - virtual environment along with Python version available in it.\n\nInspired by existing themes:\n- metal\n- bobby\n\nExamples\n--------\n\nIn Git-tracked folder:\n\n.. code-block:: bash\n\n    ┌──[2024-03-20 12:05:07] 🐧 gytis 💻 gytis-legion  📂 bash-it on 🌵 theme-inretio ⌀1 ✗ \n    └> ls\n    aliases     clean_files.txt  custom  hooks       lib      lint_clean_files.sh  profiles  template  test_lib  uninstall.sh\n    bash_it.sh  completion       docs    install.sh  LICENSE  plugins              scripts   test      themes    vendor\n\n\nIn Python virtual environment:\n\n.. code-block:: bash\n\n    ┌──[2024-03-20 12:07:32] 🐧 gytis 💻 gytis-legion 🐍 3.12.2 on [general] 📂 general\n    └> ls\n    bin  include  lib  lib64  pyvenv.cfg  share\n"
  },
  {
    "path": "docs/themes-list/nwinkler_random_colors.rst",
    "content": ".. _nwinkler_random_color:\n\nNwinkler Random Color Theme\n===========================\n\nDescription\n-----------\n\nThe *Nwinkler Random Color* Theme is based on the :ref:`Nwinkler Theme <nwinkler_image>` , but it randomizes the colors for:\n\n\n* time\n* username\n* hostname\n* path\n\nThe random colors are chosen the first time this theme is used and saved to the ``~/.nwinkler_random_colors`` file. So, the next time you connect to the same machine, you will get the same colors.\n\nTo force new random colors to be selected, run the command:\n\n.. code-block:: sh\n\n   randomize_nwinkler\n\nScreenshot\n----------\n\nHere it is in action:\n\n\n.. image:: nwinkler_random_colors.png\n   :target: nwinkler_random_colors.png\n   :alt: alt text\n\n\nUsage Scenario\n--------------\n\nThis theme is especially useful when connecting to many different machines and switching between them often. Yes, the hostname *is* present in the prompt. But I argue that it's a lot faster to get a \"feel\" of what machine you are currently on because of the custom colors on that machine's prompt than by reading the hostname.\n"
  },
  {
    "path": "docs/themes-list/oh-my-posh.rst",
    "content": ".. _oh-my-posh:\n\nOh-My-Posh Theme\n================\n\nThe oh-my-posh ״theme״ is really a plug to a whole other system\nof managing your prompt. To use it please start here:\n`Oh-My-Posh homepage <https://ohmyposh.dev/>`_\n\nIt is beyond the scope of bash-it to install and manage oh-my-posh,\nthis theme is here just to make sure your OMP setup doesn't clash\nwith other bash-it themes. Once installed, OMP will load a default\nOMP theme (jandedobbeleer), which you can then customize or override.\n\nNote: Nerd Fonts are highly recommended, as most of the themes are graphic candies.\n"
  },
  {
    "path": "docs/themes-list/powerline-base.rst",
    "content": ".. _powerline_base:\n\nBase Powerline Theme Information\n================================\n\nThis page explains base powerline theme information, shared between\nall powerline themes.\n\n**IMPORTANT:** This theme requires that `a font with the Powerline symbols <https://github.com/powerline/fonts>`_ needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator.\n\n**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where ``sudo`` usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your ``~/.bashrc`` to disable the Powerline theme's ``sudo`` check. This will apply to all ``powerline*`` themes.\n\nProvided Information\n--------------------\n\n\n* Current path\n* Current username and hostname\n* Current time\n* Current shell level\n* Current dirstack level (\\ ``pushd`` / ``popd``\\ )\n* Current history number\n* Current command number\n* An indicator when connected by SSH\n* An indicator when ``sudo`` has the credentials cached (see the ``sudo`` manpage for more info about this)\n* An indicator when the current shell is inside the Vim editor\n* Battery charging status (depends on the battery library)\n* SCM Repository status (e.g. Git, SVN)\n* The current Kubernetes environment\n* The current Python environment (Virtualenv, venv, and Conda are supported) in use\n* The current Ruby environment (rvm and rbenv are supported) in use\n* Last command exit code (only shown when the exit code is greater than 0)\n\nConfiguration\n-------------\n\nThis theme is pretty configurable, all the configuration is done by setting environment variables.\n\nUser Information\n^^^^^^^^^^^^^^^^\n\nBy default, the username and hostname are shown, but you can change this behavior by setting the value of the following variable:\n\n.. code-block:: bash\n\n   export POWERLINE_PROMPT_USER_INFO_MODE=\"sudo\"\n\n\nFor now, the only supported value is ``sudo``\\ , which hides the username and hostname, and shows an indicator when ``sudo`` has the credentials cached. Other values have no effect at this time.\n\nClock Format\n^^^^^^^^^^^^\n\nYou can change the format using the following variable:\n\n.. code-block:: bash\n\n   export THEME_CLOCK_FORMAT=\"%H:%M:%S\"\n\n\nThe time/date is printed by the ``date`` command, so refer to its man page to change the format.\n\nSegment Order\n^^^^^^^^^^^^^\n\nThe contents of the prompt can be \"reordered\", all the \"segments\" (every piece of information) can take any place. The currently available segments are:\n\n\n* ``aws_profile`` - Show the current value of the ``AWS_PROFILE`` environment variable\n* ``battery`` - Battery information (you'll need to enable the ``battery`` plugin)\n* ``clock`` - Current time in ``HH:MM:SS`` format\n* ``cwd`` - Current working directory including full folder hierarchy (c.f. ``wd``\\ )\n* ``duration`` - Duration of the last command. See :ref:`Command duration <command_duration>` for details.\n* ``gcloud`` - Current gcloud active account\n* ``hostname`` - Host name of machine\n* ``in_toolbox`` - Show identifier if running inside a `toolbox <https://github.com/containers/toolbox>`_\n* ``in_vim`` - Show identifier if running in ``:terminal`` from vim\n* ``k8s_context`` - Show current kubernetes context\n* ``k8s_namespace`` - Show current kubernetes namespace\n* ``last_status`` - Exit status of last run command\n* ``python_venv`` - Python virtual environment information (\\ ``virtualenv``\\ , ``venv``\n  and ``conda`` supported)\n* ``ruby`` - Current ruby version if using ``rvm``\n* ``node`` - Current node version (``nvm`` is the default strategy; set ``NODE_VERSION_STRATEGY`` to ``node`` to use ``node --version``)\n* ``scm`` - Version control information, ``git``\n* ``terraform`` - Current terraform workspace\n* ``user_info`` - Current user\n* ``wd`` - Working directory, like ``cwd`` but doesn't show the full folder\n  hierarchy, only the directory you're currently in.\n* ``shlvl`` - Show the current shell level (based on ``SHLVL`` environment variable), but only if you are not in root shell\n* ``dirstack`` - Show the current dirstack level (based on ``DIRSTACK`` environment variable), but only if the stack is not empty\n* ``history_number`` - Show current history number\n* ``command_number`` - Show current command number\n\nA variable can be defined to set the order of the prompt segments:\n\n.. code-block::\n\n   POWERLINE_PROMPT=\"user_info scm python_venv ruby cwd\"\n\n\nThe example values above are the current default values, but if you want to remove anything from the prompt, simply remove the \"string\" that represents the segment from the variable.\n\n.. _powerline_compact_settings:\n\nCompact Settings\n^^^^^^^^^^^^^^^^\n\nYou can configure various aspects of the prompt to use less whitespace. Supported variables are:\n\n.. list-table::\n   :header-rows: 1\n\n   * - Variable\n     - Description\n   * - POWERLINE_COMPACT_BEFORE_SEPARATOR\n     - Removes the leading space before each separator\n   * - POWERLINE_COMPACT_AFTER_SEPARATOR\n     - Removes the trailing space after each separator\n   * - POWERLINE_COMPACT_BEFOR_FIRST_SEGMENT\n     - Removes the leading space on the first segment\n   * - POWERLINE_COMPACT_AFTER_LAST_SEGMENT\n     - Removes the trailing space on the last segment\n   * - POWERLINE_COMPACT_PROMPT\n     - Removes the space after the prompt character\n   * - POWERLINE_COMPACT\n     - Enable all Compact settings (you can still override individual settings)\n\n\nThe default value for all settings is ``0`` (disabled). Use ``1`` to enable.\n"
  },
  {
    "path": "docs/themes-list/powerline-multiline.rst",
    "content": ".. _powerline_multiline:\n\nPowerline Multiline Theme\n=========================\n\nA colorful multiline theme, where the first line shows information about your shell session (divided into two parts, left and right), and the second one is where the shell commands are introduced.\n\nSee :ref:`powerline_base` for general information about the powerline theme.\n\nSoft Separators\n^^^^^^^^^^^^^^^\n\nAdjacent segments having the same background color will use a less-pronouced (i.e. soft) separator between them.\n\nPadding\n^^^^^^^\n\nTo get the length of the left and right segments right, a *padding* value is used.\nIn most cases, the default value (\\ *2*\\ ) works fine, but on some operating systems, this needs to be adjusted.\nOne example is *macOS High Sierra*\\ , where the default padding causes the right segment to extend to the next line.\nOn macOS High Sierra, the padding value needs to be changed to *3* to make the theme look right.\nThis can be done by setting the ``POWERLINE_PADDING`` variable before Bash-it is loaded, e.g. in your ``~/.bashrc`` file:\n\n.. code-block:: bash\n\n   export POWERLINE_PADDING=3\n\n\nMultiline Mode Right Prompt\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFor the purposes of the :ref:`Compact <powerline_compact_settings>` settings, the segments within the **Right Prompt** are considered to run \"right-to-left\", i.e.:\n\n\n* The **right-most** segment is considered to be the ``\"first\"`` segment, while the **left-most** segment is considered to be the ``\"last\"``\n* The space to the **right** of the separator character is considered to be ``\"before\"``\\ , while the space to the **left** is considered to be ``\"after\"``\n"
  },
  {
    "path": "docs/themes-list/powerline-naked.rst",
    "content": ".. _powerline_naked:\n\nPowerline Naked Theme\n=====================\n\nA colorful theme, where shows a lot information about your shell session.\nThe naked powerline theme provides a cleaner shell with less background colors.\n\nSee :ref:`powerline_base` for general information about the powerline theme.\n"
  },
  {
    "path": "docs/themes-list/powerline-plain.rst",
    "content": ".. _powerline_plain:\n\nPowerline Plain Theme\n=====================\n\nA colorful theme, where shows a lot information about your shell session.\nThe plain powerline theme provides a simpler shell with less information.\n\nSee :ref:`powerline_base` for general information about the powerline theme.\n\nSoft Separators\n^^^^^^^^^^^^^^^\n\nAdjacent segments having the same background color will use a less-pronouced (i.e. soft) separator between them.\n"
  },
  {
    "path": "docs/themes-list/powerline.rst",
    "content": ".. _powerline:\n\nPowerline Theme\n===============\n\nA colorful theme, where shows a lot information about your shell session.\n\nSee :ref:`powerline_base` for general information about the powerline theme.\n\nSoft Separators\n^^^^^^^^^^^^^^^\n\nAdjacent segments having the same background color will use a less-pronouced (i.e. soft) separator between them.\n"
  },
  {
    "path": "docs/themes-list/radek.rst",
    "content": ".. _radek:\n\nRadek Theme\n===========\n\nA colorful theme for Python developers.\nIt does not have any requirements.\n\nProvided Information\n--------------------\n\n\n* Current username and hostname\n* Current path\n* Git repository status\n* Current Python environment (venv, Conda )\n* Current Python version\n\nExamples\n--------\n\n.. code-block:: bash\n\n   [radek@photon][~/src/nokia2/cbis] ±[master → origin ↑1 {1}✓][venv-cbis][py-3.7.5]\n   →\n"
  },
  {
    "path": "docs/themes-list/redline.rst",
    "content": ".. _redline:\n\nRedline Theme\n=============\n\nchanged up the powerline base a little.\n\nIt plays nicest with  this font: `DroidSansMonoForPowerline <https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/DroidSansMono>`_\n\nRead the :ref:`powerline theme documentation <powerline>`\n\nadded\n-----\n\n\n* hostname\n* distro logo\n\nchanged\n-------\n\n\n* sudo credential check\n* required font\n* some icons\n\nWorks real good like with:\n\n.. code-block:: bash\n\n   ## set the theme\n   export BASH_IT_THEME='redline'\n\n   # Set this to false to turn off version control status checking within the prompt for all themes\n   export SCM_CHECK=true\n\n   ## Set Xterm/screen/Tmux title with only a short hostname.\n   export SHORT_HOSTNAME=$(hostname -s)\n\n   ## enable sudo prompt\n   export POWERLINE_PROMPT_USER_INFO_MODE=\"sudo\"\n\n   ## prompt part string\n   export POWERLINE_PROMPT=\"python_venv user_info hostname cwd scm\"\n\nenable your distro logo with\n----------------------------\n\n.. code-block:: bash\n\n   export POWERLINE_PROMPT_DISTRO_LOGO=\"yes\"\n\n\n.. image:: redline.png\n   :target: redline.png?raw=true\n   :alt: screenshot\n"
  },
  {
    "path": "docs/themes.rst",
    "content": ".. _themes:\n\nThemes\n------\n\nThere are over 50+ Bash-it themes to pick from in ``$BASH_IT/themes``.\nThe default theme is ``bobby``.\nSet ``BASH_IT_THEME`` to the theme name you want, or if you've developed your own custom theme outside of ``$BASH_IT/themes``\\ ,\npoint the ``BASH_IT_THEME`` variable directly to the theme file.\nTo disable theming completely, leave the variable empty.\n\nExamples:\n\n.. code-block:: bash\n\n   # Use the \"powerline-multiline\" theme\n   export BASH_IT_THEME=\"powerline-multiline\"\n\n   # Use a theme outside of the Bash-it folder\n   export BASH_IT_THEME=\"/home/foo/my_theme/my_theme.theme.bash\"\n\n   # Disable theming\n   export BASH_IT_THEME=\"\"\n\nYou can easily preview the themes in your own shell using ``bash-it preview``.\n\nIf you've created your own custom prompts, we'd love it if you shared them with everyone else! Just submit a Pull Request.\nYou can see theme screenshots on `wiki/Themes <https://github.com/Bash-it/bash-it/wiki/Themes>`_.\n\n**NOTE**\\ : Bash-it and some themes use UTF-8 characters, so to avoid strange behavior in your terminal, set your locale to ``LC_ALL=en_US.UTF-8`` or the equivalent to your language if it isn't American English.\n\nList of Themes\n^^^^^^^^^^^^^^\n\nSee :ref:`here <list_of_themes>`.\n\nTheme Switches & Variables\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. _command_duration:\n\nCommand duration\n================\n\nPrints last command duration\n\nUsage\n#####\n\nCommand duration can be enabled by exporting ``BASH_IT_COMMAND_DURATION``:\n\n.. code-block:: bash\n\n   export BASH_IT_COMMAND_DURATION=true\n\nThe default configuration display last command duration for command lasting one second or more,\nwith deciseconds precision.\n\nYou can customize the minimum time in seconds before command duration is displayed or the precison in your ``.bashrc``:\n\n.. code-block:: bash\n\n   export COMMAND_DURATION_MIN_SECONDS=5\n   export COMMAND_DURATION_PRECISION=2\n\nClock Related\n=============\n\nfunction: ``clock_char``\n########################\n\nPrints a character indicating clock.\n\n\n* ``THEME_SHOW_CLOCK_CHAR`` : **true**\\ /false\n\n* ``THEME_CLOCK_CHAR`` : \"\\ **⌚**\\ \"\n\n* ``THEME_CLOCK_CHAR_COLOR`` : \"\\ **$normal**\\ \"\n\nfunction: ``clock_prompt``\n##########################\n\nPrints the clock prompt (date, time).\n\n\n* ``THEME_SHOW_CLOCK`` : **true**\\ /false\n\n* ``THEME_CLOCK_COLOR`` :  \"\\ **$normal**\\ \"\n\n* ``THEME_CLOCK_FORMAT`` : \"\\ **%H:%M:%S**\\ \"\n\nContributing a new theme\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nSee the :ref:`instructions <contributing_theme>`.\n"
  },
  {
    "path": "docs/troubleshooting.rst",
    "content": ".. _troubleshooting:\n\nTroubleshooting Guide\n=====================\n\nTable of Contents\n-----------------\n\n* `I'm stuck in the LightDM login screen after setting up bash-it. <im-stuck-in-the-lightdm-login-screen-after-setting-up-bash-it>`_\n\n* `I'm getting strange line break and wrapping behaviour on macOS. <im-getting-strange-line-break-and-wrapping-behaviour-on-macos>`_\n\nI'm stuck in the LightDM login screen after setting up bash-it\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Possible issue**\\ : `#672 <https://github.com/Bash-it/bash-it/issues/672>`_\n\n**Solution**\\ : Check `this comment <https://github.com/Bash-it/bash-it/issues/672#issuecomment-257870653>`_ for detailed information about the cause and solution for this issue.\n\nI'm getting strange line break and wrapping behaviour on macOS\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n**Possible issue**\\ : `#1614 <https://github.com/Bash-it/bash-it/issues/1614>`_\n\n**Solution**\\ : Bash-it requires Bash 4.?? or later to run correctly. Any reasonably current Linux distribution should have shipped with a compatible version of Bash. However, macOS users must upgrade from the included, obsolete Bash version 3. While some functionality might work with Bash 3, there is no guarantee that everything will work perfectly. Thus, we recommend using `Homebrew <https://brew.sh/>`_ to ensure Bash is up to date:\n\nx86 Mac\n^^^^^^^\n\n  .. code-block:: bash\n\n     brew install bash\n     sudo sh -c 'echo /usr/local/bin/bash >> /etc/shells'\n     chsh -s /usr/local/bin/bash\n\nM1 Mac\n^^^^^^\n\nHomebrew's default installation location on M1 is ``/opt/homebrew/bin/``:\n\n  .. code-block:: bash\n\n     brew install bash\n     sudo sh -c 'echo /opt/homebrew/bin/bash >> /etc/shells'\n     chsh -s /opt/homebrew/bin/bash\n"
  },
  {
    "path": "docs/uninstalling.rst",
    "content": ".. _uninstalling:\n\nUninstalling\n------------\n\nTo uninstall Bash-it, run the ``uninstall.sh`` script found in the ``$BASH_IT`` directory:\n\n.. code-block::\n\n   cd $BASH_IT\n   ./uninstall.sh\n\nThis will restore your previous Bash profile.\nAfter the uninstall script finishes, remove the Bash-it directory from your machine (\\ ``rm -rf $BASH_IT``\\ ) and start a new shell.\n"
  },
  {
    "path": "docs/vcs_user.rst",
    "content": ".. _vcs_user:\n\nPrompt Version Control Information\n==================================\n\nBash-it provides prompt :ref:`themes` with the ability to check and display version control information for the current directory.\nThe information is retrieved for each directory and can slow down the navigation of projects with a large number of files and folders.\nTurn version control checking off to prevent slow directory navigation within large projects.\n\nControlling Flags\n^^^^^^^^^^^^^^^^^\n\nBash-it provides a flag (\\ ``SCM_CHECK``\\ ) within the ``~/.bashrc`` file that turns off/on version control information checking and display within all themes.\nVersion control checking is on by default unless explicitly turned off.\n\nSet ``SCM_CHECK`` to 'false' to **turn off** version control checks for all themes:\n\n\n* ``export SCM_CHECK=false``\n\nSet ``SCM_CHECK`` to 'true' (the default value) to **turn on** version control checks for all themes:\n\n\n* ``export SCM_CHECK=true``\n\n**NOTE:**\nIt is possible for themes to ignore the ``SCM_CHECK`` flag and query specific version control information directly.\nFor example, themes that use functions like ``git_prompt_vars`` skip the ``SCM_CHECK`` flag to retrieve and display git prompt information.\nIf you turned version control checking off and you still see version control information within your prompt, then functions like ``git_prompt_vars`` are most likely the reason why.\n\n.. _git_prompt:\n\nGit prompt\n^^^^^^^^^^\n\nBash-it has some nice features related to Git, continue reading to know more about these features.\n\nRepository info in the prompt\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nBash-it can show some information about Git repositories in the shell prompt: the current branch, tag or commit you are at, how many commits the local branch is ahead or behind from the remote branch, and if you have changes stashed.\n\nAdditionally, you can view the status of your working copy and get the count of *staged*\\ , *unstaged* and *untracked* files.\nThis feature is controlled through the flag ``SCM_GIT_SHOW_DETAILS`` as follows:\n\nSet ``SCM_GIT_SHOW_DETAILS`` to 'true' (the default value) to **show** the working copy details in your prompt:\n\n\n* ``export SCM_GIT_SHOW_DETAILS=true``\n\nSet ``SCM_GIT_SHOW_DETAILS`` to 'false' to **don't show** it:\n\n\n* ``export SCM_GIT_SHOW_DETAILS=false``\n\n**NOTE:** If using ``SCM_GIT_SHOW_MINIMAL_INFO=true``\\ , then the value of ``SCM_GIT_SHOW_DETAILS`` is ignored.\n\nRemotes and remote branches\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIn some git workflows, you must work with various remotes, for this reason, Bash-it can provide some useful information about your remotes and your remote branches, for example, the remote on you are working, or if your local branch is tracking a remote branch.\n\nYou can control this feature with the flag ``SCM_GIT_SHOW_REMOTE_INFO`` as follows:\n\nSet ``SCM_GIT_SHOW_REMOTE_INFO`` to 'auto' (the default value) to activate it only when more than one remote is configured in the current repo:\n\n\n* ``export SCM_GIT_SHOW_REMOTE_INFO=auto``\n\nSet ``SCM_GIT_SHOW_REMOTE_INFO`` to 'true' to always activate the feature:\n\n\n* ``export SCM_GIT_SHOW_REMOTE_INFO=true``\n\nSet ``SCM_GIT_SHOW_REMOTE_INFO`` to 'false' to **disable the feature**\\ :\n\n\n* ``export SCM_GIT_SHOW_REMOTE_INFO=false``\n\n**NOTE:** If using ``SCM_GIT_SHOW_MINIMAL_INFO=true``\\ , then the value of ``SCM_GIT_SHOW_REMOTE_INFO`` is ignored.\n\nUntracked files\n^^^^^^^^^^^^^^^\n\nBy default, the ``git status`` command shows information about *untracked* files.\nThis behavior can be controlled through command-line flags or git configuration files.\nFor big repositories, ignoring *untracked* files can make git faster.\nBash-it uses ``git status`` to gather the repo information it shows in the prompt, so in some circumstances, it can be useful to instruct Bash-it to ignore these files.\nYou can control this behavior with the flag ``SCM_GIT_IGNORE_UNTRACKED``\\ :\n\nSet ``SCM_GIT_IGNORE_UNTRACKED`` to 'false' (the default value) to get information about *untracked* files:\n\n\n* ``export SCM_GIT_IGNORE_UNTRACKED=false``\n\nSet ``SCM_GIT_IGNORE_UNTRACKED`` to 'true' to **ignore** *untracked* files:\n\n\n* ``export SCM_GIT_IGNORE_UNTRACKED=true``\n\nAlso, with this flag to false, Bash-it will not show the repository as dirty when the repo has *untracked* files, and will not display the count of *untracked* files.\n\n**NOTE:** If you set in git configuration file the option to ignore *untracked* files, this flag has no effect, and Bash-it will ignore *untracked* files always.\n\nStash item count\n^^^^^^^^^^^^^^^^\n\nWhen ``SCM_GIT_SHOW_DETAILS`` is enabled, you can get the count of *stashed* items. This feature can be useful when a user has a lot of stash items.\nThis feature is controlled through the flag ``SCM_GIT_SHOW_STASH_INFO`` as follows:\n\nSet ``SCM_GIT_SHOW_STASH_INFO`` to 'true' (the default value) to **show** the count of stashed items:\n\n\n* ``export SCM_GIT_SHOW_STASH_INFO=true``\n\nSet ``SCM_GIT_SHOW_STASH_INFO`` to 'false' to **don't show** it:\n\n\n* ``export SCM_GIT_SHOW_STASH_INFO=false``\n\nAhead/Behind Count\n^^^^^^^^^^^^^^^^^^\n\nWhen displaying information regarding whether or not the local branch is ahead or behind its remote counterpart, you can opt to display the number of commits ahead/behind.\nThis is useful if you only care whether or not you are ahead or behind and do not care how far ahead/behind you are.\n\nSet ``SCM_GIT_SHOW_COMMIT_COUNT`` to 'true' (the default value) to **show** the count of commits ahead/behind:\n\n\n* ``export SCM_GIT_SHOW_COMMIT_COUNT=true``\n\nSet ``SCM_GIT_SHOW_COMMIT_COUNT`` to 'false' to **don't show** it:\n\n\n* ``export SCM_GIT_SHOW_COMMIT_COUNT=false``\n\nGit user\n^^^^^^^^\n\nIn some environments, it is useful to know the value of the current git user, which is used to mark all new commits.\nFor example, any organization that uses the practice of pair programming will typically author each commit with `combined names of the two authors <https://github.com/pivotal/git_scripts>`_.\nWhen another pair uses the same pairing station, the authors are changed at the beginning of the session.\n\nTo get up and running with this technique, run ``gem install pivotal_git_scripts``\\ , and then edit your ``~/.pairs`` file, according to the specification on the `gem's homepage <https://github.com/pivotal/git_scripts>`_.\nAfter that, you should be able to run ``git pair kg as`` to set the author to, eg. \"Konstantin Gredeskoul and Alex Saxby\", assuming they've been added to the ``~/.pairs`` file.\nPlease see gem's documentation for more information.\n\nTo enable the display of the current pair in the prompt, you must set ``SCM_GIT_SHOW_CURRENT_USER`` to ``true``.\nOnce set, the ``SCM_CURRENT_USER`` variable will be automatically populated with the initials of the git author(s).\nIt will also be included in the default git prompt.\nEven if you do not have ``git pair`` installed, as long as your ``user.name`` is set, your initials will be computed from your name and shown in the prompt.\n\nYou can control the prefix and the suffix of this component using the two variables:\n\n\n* ``export SCM_THEME_CURRENT_USER_PREFFIX=' ☺︎ '``\n\nAnd\n\n\n* ``export SCM_THEME_CURRENT_USER_SUFFIX=' ☺︎ '``\n\n**NOTE:** If using ``SCM_GIT_SHOW_MINIMAL_INFO=true``\\ , then the value of ``SCM_GIT_SHOW_CURRENT_USER`` is ignored.\n\nGit show minimal status info\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo speed up the prompt while still getting minimal git status information displayed such as the value of ``HEAD`` and whether there are any dirty objects, you can set:\n\n.. code-block::\n\n   export SCM_GIT_SHOW_MINIMAL_INFO=true\n\nIgnore repo status\n^^^^^^^^^^^^^^^^^^\n\nWhen working in repos with a large codebase, Bash-it can slow down your prompt when checking the repo status.\nTo avoid it, there is an option you can set via Git config to disable checking repo status in Bash-it.\n\nTo disable checking the status in the current repo:\n\n.. code-block::\n\n   $ git config --add bash-it.hide-status 1\n\nBut if you would like to disable it globally, and stop checking the status for all of your repos:\n\n.. code-block::\n\n   $ git config --global --add bash-it.hide-status 1\n\nSetting this flag globally has the same effect as ``SCM_CHECK=true``\\ , but only for Git repos.\n\nSpeed up git status calculations\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAs an alternative to ignoring repo status entirely, you can try out the ``gitstatus`` plugin.\nThis plugin speeds up all ``git status`` calculations by up to 10x times!\n\n**NOTE**\\ : You will need to clone ``gitstatus`` repo from `here <https://github.com/romkatv/gitstatus>`_.\n"
  },
  {
    "path": "hooks/check-clean-files-txt.sh",
    "content": "#!/usr/bin/env bash\n\nfile=$1\n# Should only be run on clean_files.txt\nif [ \"$file\" != \"clean_files.txt\" ]; then\n\techo \"Please run this script on clean_files.txt only!\"\n\texit 1\nfi\n\nfunction compare_lines() {\n\tprev=\"\"\n\tlocal line\n\twhile read -r line; do\n\t\t# Skip unimportant lines\n\t\t[[ $line =~ \"#\" ]] && continue\n\t\t[[ $line == \"\" ]] && continue\n\t\t# Actual check\n\t\tif [[ $prev > $line ]]; then\n\t\t\techo \"$line should be before $prev\"\n\t\t\texit 1\n\t\tfi\n\t\tprev=$line\n\tdone <<< \"$1\"\n}\n\n# We compare using the legacy way\nshopt -s compat31\n\n# Test root files\ncompare_lines \"$(grep -v \"/\" \"$file\")\"\n\n# Test root directory\ncompare_lines \"$(grep \"/$\" \"$file\")\"\n\n# Test non root directories\ncompare_lines \"$(grep \"/.\" \"$file\")\"\n\nshopt -u compat31\n# Yay, all good!\nexit 0\n"
  },
  {
    "path": "hooks/dot-bash.sh",
    "content": "#!/usr/bin/env bash\n\nexit_code=0\nfor file in \"$@\"; do\n\t# Confirm file is not executable\n\t#\n\tif [[ -x \"${file}\" ]]; then\n\t\techo \"Bash include file \\`${file}\\` should not be executable\"\n\t\texit_code=1\n\tfi\n\n\t# Confirm expected schellcheck header\n\t#\n\tLINE1=\"$(head -n 1 \"${file}\")\"\n\tSCSH=\"${file##*.}\"\n\tif [[ \"${LINE1}\" != \"# shellcheck shell=${SCSH}\" ]]; then\n\t\techo \"Bash include file \\`${file}\\` has bad/missing shellcheck header\"\n\t\texit_code=1\n\tfi\ndone\n\nexit \"${exit_code:-0}\"\n"
  },
  {
    "path": "hooks/dot-sh.sh",
    "content": "#!/usr/bin/env bash\n\nexit_code=0\nfor file in \"$@\"; do\n\t# Confirm file is executable\n\t#\n\tif [[ ! -x \"${file}\" ]]; then\n\t\techo \"Bash file \\`${file}\\` is not executable\"\n\t\texit_code=1\n\tfi\n\n\t# Confirm expected #! header\n\t#\n\tLINE1=\"$(head -n 1 \"${file}\")\"\n\tif [[ \"${LINE1}\" != \"#!/usr/bin/env bash\" ]]; then\n\t\techo \"Bash file \\`${file}\\` has bad/missing #! header\"\n\t\texit_code=1\n\tfi\ndone\n\nexit \"${exit_code:-0}\"\n"
  },
  {
    "path": "install.sh",
    "content": "#!/usr/bin/env bash\n# bash-it installer\n\n# Requires bash 3.2+ to install and run\n# Skip loading if bash version is too old\nif [[ \"${BASH_VERSINFO[0]-}\" -lt 3 ]] || [[ \"${BASH_VERSINFO[0]-}\" -eq 3 && \"${BASH_VERSINFO[1]}\" -lt 2 ]]; then\n\techo \"sorry, but the minimum version of BASH supported by bash_it is 3.2, consider upgrading?\" >&2\n\treturn 1\nfi\n\n# Show how to use this installer\nfunction _bash-it-install-help() {\n\techo -e \"\\n$0 : Install bash-it\"\n\techo -e \"Usage:\\n$0 [arguments] \\n\"\n\techo \"Arguments:\"\n\techo \"--help (-h): Display this help message\"\n\techo \"--silent (-s): Install default settings without prompting for input\"\n\techo \"--interactive (-i): Interactively choose plugins\"\n\techo \"--no-modify-config (-n): Do not modify existing config file\"\n\techo \"--append-to-config (-a): Keep existing config file and append bash-it templates at the end\"\n\techo \"--overwrite-backup (-f): Overwrite existing backup\"\n}\n\n# Interactively enable several things\nfunction _bash-it-install-enable() {\n\tlocal file_type single_type enable_func file_name just_the_name RESP\n\tfile_type=$1\n\tsingle_type=$(echo \"$file_type\" | sed -e \"s/aliases$/alias/g\" | sed -e \"s/plugins$/plugin/g\")\n\tenable_func=\"_enable-$single_type\"\n\tfor path in \"${BASH_IT?}/${file_type}/available/\"[^_]*; do\n\t\tfile_name=\"${path##*/}\"\n\t\twhile true; do\n\t\t\tjust_the_name=\"${file_name%\".${file_type}.bash\"}\"\n\t\t\tread -r -e -n 1 -p \"Would you like to enable the $just_the_name $file_type? [y/N] \" RESP\n\t\t\tcase $RESP in\n\t\t\t\t[yY])\n\t\t\t\t\t\"$enable_func\" \"$just_the_name\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN] | \"\")\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo -e \"${echo_orange:-}Please choose y or n.${echo_normal:-}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\tdone\n}\n\n# Ensure .bashrc is sourced from profile files on macOS/BSD/Solaris\nfunction _bash-it-install-ensure-bashrc-sourcing() {\n\t# Only needed on platforms where login shells don't source .bashrc\n\tcase \"$(uname -s)\" in\n\t\tDarwin | SunOS | Illumos | *BSD) ;;\n\t\t*) return 0 ;; # Not needed on Linux\n\tesac\n\n\t# Find which profile file exists\n\tlocal profile_file\n\tif [[ -f \"$HOME/.bash_profile\" ]]; then\n\t\tprofile_file=\"$HOME/.bash_profile\"\n\telif [[ -f \"$HOME/.profile\" ]]; then\n\t\tprofile_file=\"$HOME/.profile\"\n\telse\n\t\t# No profile file exists, create .bash_profile\n\t\tprofile_file=\"$HOME/.bash_profile\"\n\t\techo -e \"${echo_yellow:-}Creating $profile_file to source .bashrc${echo_normal:-}\"\n\tfi\n\n\t# Check if already sourced (reuse helper from doctor)\n\tif _bash-it-doctor-check-profile-sourcing-grep \"$profile_file\" 2> /dev/null; then\n\t\treturn 0 # Already configured\n\tfi\n\n\t# Not sourced, offer to add it\n\techo \"\"\n\techo -e \"${echo_yellow:-}Warning: .bashrc is not sourced from $profile_file${echo_normal:-}\"\n\techo \"On macOS/BSD/Solaris, login shells won't load bash-it without this.\"\n\techo \"\"\n\n\tlocal RESP\n\tif [[ -z \"${silent:-}\" ]]; then\n\t\tread -r -e -n 1 -p \"Would you like to add .bashrc sourcing to $profile_file? [Y/n] \" RESP\n\t\tcase $RESP in\n\t\t\t[nN])\n\t\t\t\techo \"\"\n\t\t\t\techo -e \"${echo_orange:-}Skipping. You can add this manually later:${echo_normal:-}\"\n\t\t\t\techo \"\"\n\t\t\t\techo \"    if [ -n \\\"\\${BASH_VERSION-}\\\" ]; then\"\n\t\t\t\techo \"        if [ -f \\\"\\$HOME/.bashrc\\\" ]; then\"\n\t\t\t\techo \"            . \\\"\\$HOME/.bashrc\\\"\"\n\t\t\t\techo \"        fi\"\n\t\t\t\techo \"    fi\"\n\t\t\t\techo \"\"\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\tesac\n\tfi\n\n\t# Backup profile file if it exists\n\tif [[ -f \"$profile_file\" ]]; then\n\t\tlocal backup_file\n\t\tbackup_file=\"${profile_file}.bak.$(date +%Y%m%d_%H%M%S)\"\n\t\tcommand cp \"$profile_file\" \"$backup_file\"\n\t\techo -e \"${echo_green:-}Backed up $profile_file to $backup_file${echo_normal:-}\"\n\tfi\n\n\t# Add the sourcing snippet\n\tcat >> \"$profile_file\" << 'EOF'\n\n# Source .bashrc if running bash\nif [ -n \"${BASH_VERSION-}\" ]; then\n\tif [ -f \"$HOME/.bashrc\" ]; then\n\t\t. \"$HOME/.bashrc\"\n\tfi\nfi\nEOF\n\n\techo -e \"${echo_green:-}✓ Added .bashrc sourcing to $profile_file${echo_normal:-}\"\n\techo \"\"\n}\n\n# Back up existing profile\nfunction _bash-it-install-backup-config() {\n\ttest -w \"${HOME?}/${CONFIG_FILE?}\" \\\n\t\t&& cp -aL \"${HOME?}/${CONFIG_FILE?}\" \"${HOME?}/${CONFIG_FILE?}.bak\" \\\n\t\t&& echo -e \"${echo_green:-}Your original ${CONFIG_FILE?} has been backed up to ${CONFIG_FILE?}.bak${echo_normal:-}\"\n}\n\n# Back up existing profile and create new one for bash-it\nfunction _bash-it-install-backup-new() {\n\t_bash-it-install-backup-config\n\tsed \"s|{{BASH_IT}}|${BASH_IT?}|\" \"${BASH_IT?}/template/bashrc.template.bash\" > \"${HOME?}/${CONFIG_FILE?}\"\n\techo -e \"${echo_green:-}Copied the template ${CONFIG_FILE?} into ~/${CONFIG_FILE?}, edit this file to customize bash-it${echo_normal:-}\"\n}\n\n# Back up existing profile and append bash-it templates at the end\nfunction _bash-it-install-backup-append() {\n\t_bash-it-install-backup-config\n\t(sed \"s|{{BASH_IT}}|${BASH_IT?}|\" \"${BASH_IT?}/template/bashrc.template.bash\" | tail -n +2) >> \"${HOME?}/${CONFIG_FILE?}\"\n\techo -e \"${echo_green:-}Bash-it template has been added to your ${CONFIG_FILE?}${echo_normal:-}\"\n}\n\nfunction _bash-it-install-backup-check() {\n\tif ! [[ -e \"${HOME?}/$BACKUP_FILE\" ]]; then\n\t\treturn\n\tfi\n\techo -e \"${echo_yellow:-}Backup file already exists. Make sure to backup your .bashrc before running this installation.${echo_normal:-}\" >&2\n\n\tif [[ -z \"${overwrite_backup:-}\" ]]; then\n\t\twhile [[ -z \"${silent:-}\" ]]; do\n\t\t\tread -e -n 1 -r -p \"Would you like to overwrite the existing backup? This will delete your existing backup file ($HOME/$BACKUP_FILE) [y/N] \" RESP\n\t\t\tcase $RESP in\n\t\t\t\t[yY])\n\t\t\t\t\toverwrite_backup=true\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN] | \"\")\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo -e \"${echo_orange:-}Please choose y or n.${echo_normal:-}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\tfi\n\tif [[ -z \"${overwrite_backup:-}\" ]]; then\n\t\techo -e \"${echo_orange:-}Installation aborted. Please come back soon!${echo_normal:-}\"\n\t\tif [[ -n \"${silent:-}\" ]]; then\n\t\t\techo -e \"${echo_orange:-}Use \\\"-f\\\" flag to force overwrite of backup.${echo_normal:-}\"\n\t\tfi\n\t\texit 1\n\telse\n\t\techo -e \"${echo_green:-}Overwriting backup...${echo_normal:-}\"\n\tfi\n}\n\nfunction _bash-it-install-modify-config() {\n\t_bash-it-install-backup-check\n\n\tif [[ -z \"${silent:-}\" ]]; then\n\t\twhile [[ -z \"${append_to_config:-}\" ]]; do\n\t\t\tread -e -n 1 -r -p \"Would you like to keep your $CONFIG_FILE and append bash-it templates at the end? [y/N] \" choice\n\t\t\tcase $choice in\n\t\t\t\t[yY])\n\t\t\t\t\tappend_to_config=true\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN] | \"\")\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo -e \"${echo_orange:-}Please choose y or n.${echo_normal:-}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\tfi\n\tif [[ -n \"${append_to_config:-}\" ]]; then\n\t\t# backup/append\n\t\t_bash-it-install-backup-append\n\telse\n\t\t# backup/new by default\n\t\t_bash-it-install-backup-new\n\tfi\n\t_bash-it-install-modify-profile\n}\n\nfunction _bash-it-install-modify-profile() {\n\tlocal choice profile_string=$'if [[ $- == *i* && -s ~/.bashrc ]]; then\\n\\tsource ~/.bashrc\\nfi'\n\tif [[ ! -f ~/.bash_profile ]]; then\n\t\tprintf '%s\\n' \"${profile_string}\" > ~/.bash_profile\n\telse\n\t\tprintf \"${echo_yellow:-}%s${echo_normal:-}\" \"You may need to update your ~/.bash_profile (or ~/.profile) to source your ~/.bashrc:\"\n\t\tprintf '%s\\n' \"${profile_string}\"\n\tfi\n}\n\nfor param in \"$@\"; do\n\tshift\n\tcase \"$param\" in\n\t\t\"--help\") set -- \"$@\" \"-h\" ;;\n\t\t\"--silent\") set -- \"$@\" \"-s\" ;;\n\t\t\"--interactive\") set -- \"$@\" \"-i\" ;;\n\t\t\"--no-modify-config\") set -- \"$@\" \"-n\" ;;\n\t\t\"--append-to-config\") set -- \"$@\" \"-a\" ;;\n\t\t\"--overwrite-backup\") set -- \"$@\" \"-f\" ;;\n\t\t*) set -- \"$@\" \"$param\" ;;\n\tesac\ndone\n\nOPTIND=1\nwhile getopts \"hsinaf\" opt; do\n\tcase \"$opt\" in\n\t\t\"h\")\n\t\t\t_bash-it-install-help\n\t\t\texit 0\n\t\t\t;;\n\t\t\"s\") silent=true ;;\n\t\t\"i\") interactive=true ;;\n\t\t\"n\") no_modify_config=true ;;\n\t\t\"a\") append_to_config=true ;;\n\t\t\"f\") overwrite_backup=true ;;\n\t\t\"?\")\n\t\t\t_bash-it-install-help >&2\n\t\t\texit 1\n\t\t\t;;\n\tesac\ndone\n\nshift $((OPTIND - 1))\n\nif [[ -n \"${silent:-}\" && -n \"${interactive:-}\" ]]; then\n\techo -e \"${echo_orange:-}Options --silent and --interactive are mutually exclusive. Please choose one or the other.${echo_normal:-}\"\n\texit 1\nfi\n\nif [[ -n \"${no_modify_config:-}\" && -n \"${append_to_config:-}\" ]]; then\n\techo -e \"${echo_orange:-}Options --no-modify-config and --append-to-config are mutually exclusive. Please choose one or the other.${echo_normal:-}\"\n\texit 1\nfi\n\nBASH_IT=\"$(cd \"${BASH_SOURCE%/*}\" && pwd)\"\n\nCONFIG_FILE=\".bashrc\"\n\n# overriding CONFIG_FILE:\nCONFIG_FILE=\"${BASH_IT_CONFIG_FILE:-\"${CONFIG_FILE}\"}\"\n# create subdir if CONFIG_FILE has subdirectory components\nif [[ \"${CONFIG_FILE%/*}\" != \"${CONFIG_FILE}\" ]]; then\n\tmkdir -p \"${HOME}/${CONFIG_FILE%/*}\"\nfi\n\nBACKUP_FILE=\"${CONFIG_FILE?}.bak\"\necho \"Installing bash-it\"\nif [[ -z \"${no_modify_config}\" ]]; then\n\t_bash-it-install-modify-config\nfi\n\n# Disable auto-reload in case its enabled\nexport BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=''\n# Load dependencies for enabling components\n# shellcheck source-path=SCRIPTPATH/vendor/github.com/erichs/composure\nsource \"${BASH_IT}/vendor/github.com/erichs/composure/composure.sh\"\ncite _about _param _example _group _author _version\n# shellcheck source-path=SCRIPTDIR/lib\nsource \"${BASH_IT}/lib/log.bash\"\n# shellcheck source-path=SCRIPTDIR/lib\nsource \"${BASH_IT?}/lib/utilities.bash\"\n# shellcheck source-path=SCRIPTDIR/lib\nsource \"${BASH_IT?}/lib/helpers.bash\"\n# shellcheck source-path=SCRIPTDIR/lib\nsource \"${BASH_IT?}/lib/colors.bash\"\n\nif [[ -n ${interactive:-} && -z \"${silent:-}\" ]]; then\n\tfor type in \"aliases\" \"plugins\" \"completion\"; do\n\t\techo -e \"${echo_green:-}Enabling ${type}${echo_normal:-}\"\n\t\t_bash-it-install-enable \"$type\"\n\tdone\nelse\n\techo \"\"\n\t_bash-it-profile-load \"default\"\nfi\n\n# Ensure .bashrc sourcing is set up on macOS/BSD/Solaris\n_bash-it-install-ensure-bashrc-sourcing\n\necho \"\"\necho -e \"${echo_green:-}Installation finished successfully! Enjoy bash-it!${echo_normal:-}\"\necho -e \"${echo_green:-}To start using it, open a new tab or 'source ~/${CONFIG_FILE?}'.${echo_normal:-}\"\necho \"\"\necho \"To show the available aliases/completions/plugins, type one of the following:\"\necho \"  bash-it show aliases\"\necho \"  bash-it show completions\"\necho \"  bash-it show plugins\"\necho \"\"\necho \"To avoid issues and to keep your shell lean, please enable only features you really want to use.\"\necho \"Enabling everything can lead to issues.\"\n"
  },
  {
    "path": "lib/battery.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'display info about your battery charge level'\n\nfunction ac_adapter_connected() {\n\tlocal batteries\n\tif _command_exists upower; then\n\t\tIFS=$'\\n' read -d '' -ra batteries < <(upower -e | grep -i BAT)\n\t\tupower -i \"${batteries[0]:-}\" | grep 'state' | grep -q 'charging\\|fully-charged'\n\telif _command_exists acpi; then\n\t\tacpi -a | grep -q \"on-line\"\n\telif _command_exists pmset; then\n\t\tpmset -g batt | grep -q 'AC Power'\n\telif _command_exists ioreg; then\n\t\tioreg -n AppleSmartBattery -r | grep -q '\"ExternalConnected\" = Yes'\n\telif _command_exists WMIC; then\n\t\tWMIC Path Win32_Battery Get BatteryStatus /Format:List | grep -q 'BatteryStatus=2'\n\tfi\n}\n\nfunction ac_adapter_disconnected() {\n\tlocal batteries\n\tif _command_exists upower; then\n\t\tIFS=$'\\n' read -d '' -ra batteries < <(upower -e | grep -i BAT)\n\t\tupower -i \"${batteries[0]:-}\" | grep 'state' | grep -q 'discharging'\n\telif _command_exists acpi; then\n\t\tacpi -a | grep -q \"off-line\"\n\telif _command_exists pmset; then\n\t\tpmset -g batt | grep -q 'Battery Power'\n\telif _command_exists ioreg; then\n\t\tioreg -n AppleSmartBattery -r | grep -q '\"ExternalConnected\" = No'\n\telif _command_exists WMIC; then\n\t\tWMIC Path Win32_Battery Get BatteryStatus /Format:List | grep -q 'BatteryStatus=1'\n\tfi\n}\n\nfunction battery_percentage() {\n\tabout 'displays battery charge as a percentage of full (100%)'\n\tgroup 'battery'\n\n\tlocal command_output batteries\n\n\tif _command_exists upower; then\n\t\tIFS=$'\\n' read -d '' -ra batteries < <(upower -e | grep -i BAT)\n\t\tcommand_output=\"$(upower --show-info \"${batteries[0]:-}\" | grep percentage | grep -o '[0-9]\\+' | head -1)\"\n\telif _command_exists acpi; then\n\t\tcommand_output=$(acpi -b | awk -F, '/,/{gsub(/ /, \"\", $0); gsub(/%/,\"\", $0); print $2}')\n\telif _command_exists pmset; then\n\t\tcommand_output=$(pmset -g ps | sed -n 's/.*[[:blank:]]+*\\(.*%\\).*/\\1/p' | grep -o '[0-9]\\+' | head -1)\n\telif _command_exists ioreg; then\n\t\tcommand_output=$(ioreg -n AppleSmartBattery -r | awk '$1~/Capacity/{c[$1]=$3} END{OFMT=\"%05.2f\"; max=c[\"\\\"MaxCapacity\\\"\"]; print (max>0? 100*c[\"\\\"CurrentCapacity\\\"\"]/max: \"?\")}' | grep -o '[0-9]\\+' | head -1)\n\telif _command_exists WMIC; then\n\t\tcommand_output=$(WMIC PATH Win32_Battery Get EstimatedChargeRemaining /Format:List | grep -o '[0-9]\\+' | head -1)\n\telse\n\t\tcommand_output=\"no\"\n\tfi\n\n\tif [[ \"${command_output}\" != \"no\" ]]; then\n\t\tprintf \"%02d\" \"${command_output:--1}\"\n\telse\n\t\techo \"${command_output}\"\n\tfi\n}\n\nfunction battery_charge() {\n\tabout 'graphical display of your battery charge'\n\tgroup 'battery'\n\n\t# Full char\n\tlocal f_c='▸'\n\t# Depleted char\n\tlocal d_c='▹'\n\tlocal depleted_color=\"${normal?}\"\n\tlocal full_color=\"${green?}\"\n\tlocal half_color=\"${yellow?}\"\n\tlocal danger_color=\"${red?}\"\n\t#local battery_output=\"${depleted_color}${d_c}${d_c}${d_c}${d_c}${d_c}\"\n\tlocal battery_percentage\n\tbattery_percentage=$(battery_percentage)\n\n\tcase $battery_percentage in\n\t\tno)\n\t\t\techo \"\"\n\t\t\t;;\n\t\t9*)\n\t\t\techo \"${full_color}${f_c}${f_c}${f_c}${f_c}${f_c}${normal?}\"\n\t\t\t;;\n\t\t8*)\n\t\t\techo \"${full_color}${f_c}${f_c}${f_c}${f_c}${half_color}${f_c}${normal?}\"\n\t\t\t;;\n\t\t7*)\n\t\t\techo \"${full_color}${f_c}${f_c}${f_c}${f_c}${depleted_color}${d_c}${normal?}\"\n\t\t\t;;\n\t\t6*)\n\t\t\techo \"${full_color}${f_c}${f_c}${f_c}${half_color}${f_c}${depleted_color}${d_c}${normal?}\"\n\t\t\t;;\n\t\t5*)\n\t\t\techo \"${full_color}${f_c}${f_c}${f_c}${depleted_color}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t4*)\n\t\t\techo \"${full_color}${f_c}${f_c}${half_color}${f_c}${depleted_color}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t3*)\n\t\t\techo \"${full_color}${f_c}${f_c}${depleted_color}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t2*)\n\t\t\techo \"${full_color}${f_c}${half_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t1*)\n\t\t\techo \"${full_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t05)\n\t\t\techo \"${danger_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t04)\n\t\t\techo \"${danger_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t03)\n\t\t\techo \"${danger_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t02)\n\t\t\techo \"${danger_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t0*)\n\t\t\techo \"${half_color}${f_c}${depleted_color}${d_c}${d_c}${d_c}${d_c}${normal?}\"\n\t\t\t;;\n\t\t*)\n\t\t\techo \"${danger_color}UNPLG${normal?}\"\n\t\t\t;;\n\tesac\n}\n"
  },
  {
    "path": "lib/colors.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034\n#\n# A set of pre-defined color escape codes for use in prompts and with `echo`.\n\nblack=\"\\[\\e[0;30m\\]\"\nred=\"\\[\\e[0;31m\\]\"\ngreen=\"\\[\\e[0;32m\\]\"\nyellow=\"\\[\\e[0;33m\\]\"\nblue=\"\\[\\e[0;34m\\]\"\npurple=\"\\[\\e[0;35m\\]\"\ncyan=\"\\[\\e[0;36m\\]\"\nwhite=\"\\[\\e[0;37m\\]\"\norange=\"\\[\\e[0;91m\\]\"\n\nbold_black=\"\\[\\e[30;1m\\]\"\nbold_red=\"\\[\\e[31;1m\\]\"\nbold_green=\"\\[\\e[32;1m\\]\"\nbold_yellow=\"\\[\\e[33;1m\\]\"\nbold_blue=\"\\[\\e[34;1m\\]\"\nbold_purple=\"\\[\\e[35;1m\\]\"\nbold_cyan=\"\\[\\e[36;1m\\]\"\nbold_white=\"\\[\\e[37;1m\\]\"\nbold_orange=\"\\[\\e[91;1m\\]\"\n\nunderline_black=\"\\[\\e[30;4m\\]\"\nunderline_red=\"\\[\\e[31;4m\\]\"\nunderline_green=\"\\[\\e[32;4m\\]\"\nunderline_yellow=\"\\[\\e[33;4m\\]\"\nunderline_blue=\"\\[\\e[34;4m\\]\"\nunderline_purple=\"\\[\\e[35;4m\\]\"\nunderline_cyan=\"\\[\\e[36;4m\\]\"\nunderline_white=\"\\[\\e[37;4m\\]\"\nunderline_orange=\"\\[\\e[91;4m\\]\"\n\nbackground_black=\"\\[\\e[40m\\]\"\nbackground_red=\"\\[\\e[41m\\]\"\nbackground_green=\"\\[\\e[42m\\]\"\nbackground_yellow=\"\\[\\e[43m\\]\"\nbackground_blue=\"\\[\\e[44m\\]\"\nbackground_purple=\"\\[\\e[45m\\]\"\nbackground_cyan=\"\\[\\e[46m\\]\"\nbackground_white=\"\\[\\e[47;1m\\]\"\nbackground_orange=\"\\[\\e[101m\\]\"\n\nnormal=\"\\[\\e[0m\\]\"\nreset_color=\"\\[\\e[39m\\]\"\n\n# These colors are meant to be used with `echo -e`\necho_black=\"\\033[0;30m\"\necho_red=\"\\033[0;31m\"\necho_green=\"\\033[0;32m\"\necho_yellow=\"\\033[0;33m\"\necho_blue=\"\\033[0;34m\"\necho_purple=\"\\033[0;35m\"\necho_cyan=\"\\033[0;36m\"\necho_white=\"\\033[0;37;1m\"\necho_orange=\"\\033[0;91m\"\n\necho_bold_black=\"\\033[30;1m\"\necho_bold_red=\"\\033[31;1m\"\necho_bold_green=\"\\033[32;1m\"\necho_bold_yellow=\"\\033[33;1m\"\necho_bold_blue=\"\\033[34;1m\"\necho_bold_purple=\"\\033[35;1m\"\necho_bold_cyan=\"\\033[36;1m\"\necho_bold_white=\"\\033[37;1m\"\necho_bold_orange=\"\\033[91;1m\"\n\necho_underline_black=\"\\033[30;4m\"\necho_underline_red=\"\\033[31;4m\"\necho_underline_green=\"\\033[32;4m\"\necho_underline_yellow=\"\\033[33;4m\"\necho_underline_blue=\"\\033[34;4m\"\necho_underline_purple=\"\\033[35;4m\"\necho_underline_cyan=\"\\033[36;4m\"\necho_underline_white=\"\\033[37;4m\"\necho_underline_orange=\"\\033[91;4m\"\n\necho_background_black=\"\\033[40m\"\necho_background_red=\"\\033[41m\"\necho_background_green=\"\\033[42m\"\necho_background_yellow=\"\\033[43m\"\necho_background_blue=\"\\033[44m\"\necho_background_purple=\"\\033[45m\"\necho_background_cyan=\"\\033[46m\"\necho_background_white=\"\\033[47;1m\"\necho_background_orange=\"\\033[101m\"\n\necho_normal=\"\\033[0m\"\necho_reset_color=\"\\033[39m\"\n"
  },
  {
    "path": "lib/command_duration.bash",
    "content": "# shellcheck shell=bash\n#\n# Functions for measuring and reporting how long a command takes to run.\n\n# Notice: This function used to run as a sub-shell while defining:\n# local LC_ALL=C\n#\n# DFARREL You would think LC_NUMERIC would do it, but not working in my local.\n# Note: LC_ALL='en_US.UTF-8' has been used to enforce the decimal point to be\n# a period, but the specific locale 'en_US.UTF-8' is not ensured to exist in\n# the system.  One should instead use the locale 'C', which is ensured by the\n# C and POSIX standards.\n#\n# We now use EPOCHREALTIME, while replacing any non-digit character by a period.\n#\n# Technically, one can define a locale with decimal_point being an arbitrary string.\n# For example, ps_AF uses U+066B as the decimal point.\n#\n# cf: https://github.com/Bash-it/bash-it/pull/2366#discussion_r2760681820\n#\n# Get shell duration in decimal format regardless of runtime locale.\nfunction _command_duration_current_time() {\n\tlocal current_time\n\tif [[ -n \"${EPOCHREALTIME:-}\" ]]; then\n\t\tcurrent_time=\"${EPOCHREALTIME//[!0-9]/.}\"\n\telse\n\t\tcurrent_time=\"$SECONDS\"\n\tfi\n\n\techo \"$current_time\"\n}\n\n: \"${COMMAND_DURATION_START_SECONDS:=$(_command_duration_current_time)}\"\n: \"${COMMAND_DURATION_ICON:=🕘}\"\n: \"${COMMAND_DURATION_MIN_SECONDS:=1}\"\n: \"${COMMAND_DURATION_PRECISION:=1}\"\n\nfunction _command_duration_pre_exec() {\n\tCOMMAND_DURATION_START_SECONDS=\"$(_command_duration_current_time)\"\n}\n\nfunction _command_duration_pre_cmd() {\n\tCOMMAND_DURATION_START_SECONDS=\"\"\n}\n\nfunction _dynamic_clock_icon {\n\tlocal clock_hand duration=\"$1\"\n\n\t# Clock only work for time >= 1s\n\tif ((duration < 1)); then\n\t\tduration=1\n\tfi\n\n\t# clock hand value is between 90 and 9b in hexadecimal.\n\t# so between 144 and 155 in base 10.\n\tprintf -v clock_hand '%x' $((((${duration:-${SECONDS}} - 1) % 12) + 144))\n\tprintf -v 'COMMAND_DURATION_ICON' '%b' \"\\xf0\\x9f\\x95\\x$clock_hand\"\n}\n\nfunction _command_duration() {\n\t[[ -n \"${BASH_IT_COMMAND_DURATION:-}\" ]] || return\n\t[[ -n \"${COMMAND_DURATION_START_SECONDS:-}\" ]] || return\n\n\tlocal current_time\n\tcurrent_time=\"$(_command_duration_current_time)\"\n\n\tlocal -i command_duration=0\n\tlocal -i minutes=0 seconds=0\n\tlocal microseconds=\"\"\n\n\tlocal -i command_start_seconds=${COMMAND_DURATION_START_SECONDS%.*}\n\tlocal -i current_time_seconds=${current_time%.*}\n\n\t# Calculate seconds difference\n\tcommand_duration=$((current_time_seconds - command_start_seconds))\n\n\t# Calculate microseconds if both timestamps have fractional parts\n\tif [[ \"$COMMAND_DURATION_START_SECONDS\" == *.* ]] && [[ \"$current_time\" == *.* ]] && ((COMMAND_DURATION_PRECISION > 0)); then\n\t\tlocal -i command_start_microseconds=$((10#${COMMAND_DURATION_START_SECONDS##*.}))\n\t\tlocal -i current_time_microseconds=$((10#${current_time##*.}))\n\n\t\tif ((current_time_microseconds >= command_start_microseconds)); then\n\t\t\tmicroseconds=$((current_time_microseconds - command_start_microseconds))\n\t\telse\n\t\t\t((command_duration -= 1))\n\t\t\tmicroseconds=$((1000000 + current_time_microseconds - command_start_microseconds))\n\t\tfi\n\n\t\t# Pad with leading zeros to 6 digits, then take first N digits\n\t\tprintf -v microseconds '%06d' \"$microseconds\"\n\t\tmicroseconds=\"${microseconds:0:$COMMAND_DURATION_PRECISION}\"\n\tfi\n\n\tif ((command_duration >= COMMAND_DURATION_MIN_SECONDS)); then\n\t\tminutes=$((command_duration / 60))\n\t\tseconds=$((command_duration % 60))\n\n\t\t_dynamic_clock_icon \"${command_duration}\"\n\t\tif ((minutes > 0)); then\n\t\t\tprintf \"%s %s%dm %ds\" \"${COMMAND_DURATION_ICON:-}\" \"${COMMAND_DURATION_COLOR:-}\" \"$minutes\" \"$seconds\"\n\t\telse\n\t\t\tprintf \"%s %s%ss\" \"${COMMAND_DURATION_ICON:-}\" \"${COMMAND_DURATION_COLOR:-}\" \"$seconds${microseconds:+.$microseconds}\"\n\t\tfi\n\tfi\n}\n\n_bash_it_library_finalize_hook+=(\"safe_append_preexec '_command_duration_pre_exec'\")\n_bash_it_library_finalize_hook+=(\"safe_append_prompt_command '_command_duration_pre_cmd'\")\n"
  },
  {
    "path": "lib/completion.bash",
    "content": "# shellcheck shell=bash\n# Functions for working with _Bash_'s Programmable Completion\n\n#\n##\n# Testing Completion Functions\n##\n#\n\n#\n\n#\n##\n# Generating Completion Results\n##\n#\n\n#\n\n#\n##\n# Loading _Bash It_'s Completion Plugins\n##\n\nfunction _bash-it-completion-helper-necessary() {\n\tlocal requirement _result=0\n\tfor requirement in \"$@\"; do\n\t\tif ! _binary_exists \"${requirement}\"; then\n\t\t\t_result=1\n\t\tfi\n\tdone\n\tif [[ ${_result} -gt 0 ]]; then\n\t\t_log_warning \"Without '${!#}' installed, this completion won't be too useful.\"\n\tfi\n\treturn \"${_result}\"\n}\n\nfunction _bash-it-completion-helper-sufficient() {\n\tlocal completion _result=0\n\tfor completion in \"$@\"; do\n\t\tif _completion_exists \"${completion}\"; then\n\t\t\t_result=1\n\t\tfi\n\tdone\n\tif [[ ${_result} -gt 0 ]]; then\n\t\t_log_warning \"completion already loaded - this usually means it is safe to stop using this completion.\"\n\tfi\n\treturn \"${_result}\"\n}\n"
  },
  {
    "path": "lib/helpers.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2016\n#\n# A collection of reusable functions.\n\n: \"${BASH_IT_LOAD_PRIORITY_ALIAS:=750}\"\n: \"${BASH_IT_LOAD_PRIORITY_PLUGIN:=250}\"\n: \"${BASH_IT_LOAD_PRIORITY_COMPLETION:=350}\"\nBASH_IT_LOAD_PRIORITY_SEPARATOR=\"---\"\n\n# Handle the different ways of running `sed` without generating a backup file based on provenance:\n# - GNU sed (Linux) uses `-i''`\n# - BSD sed (FreeBSD/macOS/Solaris/PlayStation) uses `-i ''`\n# To use this in Bash-it for inline replacements with `sed`, use the following syntax:\n# sed \"${BASH_IT_SED_I_PARAMETERS[@]}\" -e \"...\" file\n# shellcheck disable=SC2034 # expected for this case\nif sed --version > /dev/null 2>&1; then\n\t# GNU sed accepts \"long\" options\n\tBASH_IT_SED_I_PARAMETERS=('-i')\nelse\n\t# BSD sed errors on invalid option `-`\n\tBASH_IT_SED_I_PARAMETERS=('-i' '')\nfi\n\nfunction _bash_it_homebrew_check() {\n\tif _binary_exists 'brew'; then\n\t\t# Homebrew is installed\n\t\tif [[ \"${BASH_IT_HOMEBREW_PREFIX:-unset}\" == 'unset' ]]; then\n\t\t\t# variable isn't set\n\t\t\tBASH_IT_HOMEBREW_PREFIX=\"$(brew --prefix)\"\n\t\telse\n\t\t\ttrue # Variable is set already, don't invoke `brew`.\n\t\tfi\n\telse\n\t\t# Homebrew is not installed: clear variable.\n\t\tBASH_IT_HOMEBREW_PREFIX=\n\t\tfalse # return failure if brew not installed.\n\tfi\n}\n\nfunction _make_reload_alias() {\n\techo \"source '${BASH_IT?}/scripts/reloader.bash' '${1?}' '${2?}'\"\n}\n\n# Alias for reloading aliases\n# shellcheck disable=SC2139\nalias reload_aliases=\"$(_make_reload_alias alias aliases)\"\n\n# Alias for reloading auto-completion\n# shellcheck disable=SC2139\nalias reload_completion=\"$(_make_reload_alias completion completion)\"\n\n# Alias for reloading plugins\n# shellcheck disable=SC2139\nalias reload_plugins=\"$(_make_reload_alias plugin plugins)\"\n\nfunction bash-it() {\n\tabout 'Bash-it help and maintenance'\n\tparam '1: verb [one of: help | show | enable | disable | migrate | update | search | preview | version | reload | restart | doctor ] '\n\tparam '2: component type [one of: alias(es) | completion(s) | plugin(s) ] or search term(s)'\n\tparam '3: specific component [optional] or flags (--verbose, -v for show command)'\n\texample '$ bash-it show plugins'\n\texample '$ bash-it show plugins --verbose'\n\texample '$ bash-it help aliases'\n\texample '$ bash-it enable plugin git [tmux]...'\n\texample '$ bash-it disable alias hg [tmux]...'\n\texample '$ bash-it migrate'\n\texample '$ bash-it update'\n\texample '$ bash-it search [-|@]term1 [-|@]term2 ... [ -e/--enable ] [ -d/--disable ] [ -r/--refresh ] [ -c/--no-color ]'\n\texample '$ bash-it preview'\n\texample '$ bash-it preview essential'\n\texample '$ bash-it version'\n\texample '$ bash-it reload'\n\texample '$ bash-it restart'\n\texample '$ bash-it profile list|save|load|rm [profile_name]'\n\texample '$ bash-it doctor errors|warnings|all|summary'\n\tlocal verb=${1:-}\n\tshift\n\tlocal component=${1:-}\n\tshift\n\tlocal func\n\n\tcase \"$verb\" in\n\t\tshow)\n\t\t\tfunc=\"_bash-it-$component\"\n\t\t\t;;\n\t\tenable)\n\t\t\tfunc=\"_enable-$component\"\n\t\t\t;;\n\t\tdisable)\n\t\t\tfunc=\"_disable-$component\"\n\t\t\t;;\n\t\thelp)\n\t\t\tfunc=\"_help-$component\"\n\t\t\t;;\n\t\tdoctor)\n\t\t\tfunc=\"_bash-it-doctor-$component\"\n\t\t\t;;\n\t\tprofile)\n\t\t\tfunc=_bash-it-profile-$component\n\t\t\t;;\n\t\tsearch)\n\t\t\t_bash-it-search \"$component\" \"$@\"\n\t\t\treturn\n\t\t\t;;\n\t\tpreview)\n\t\t\t_bash-it-preview \"$component\" \"$@\"\n\t\t\treturn\n\t\t\t;;\n\t\tupdate)\n\t\t\tfunc=\"_bash-it-update-$component\"\n\t\t\t;;\n\t\tmigrate)\n\t\t\tfunc=\"_bash-it-migrate\"\n\t\t\t;;\n\t\tversion)\n\t\t\tfunc=\"_bash-it-version\"\n\t\t\t;;\n\t\trestart)\n\t\t\tfunc=\"_bash-it-restart\"\n\t\t\t;;\n\t\treload)\n\t\t\tfunc=\"_bash-it-reload\"\n\t\t\t;;\n\t\t*)\n\t\t\treference \"bash-it\"\n\t\t\treturn\n\t\t\t;;\n\tesac\n\n\t# pluralize component if necessary\n\tif ! _is_function \"$func\"; then\n\t\tif _is_function \"${func}s\"; then\n\t\t\tfunc=\"${func}s\"\n\t\telse\n\t\t\tif _is_function \"${func}es\"; then\n\t\t\t\tfunc=\"${func}es\"\n\t\t\telse\n\t\t\t\techo \"oops! $component is not a valid option!\"\n\t\t\t\treference bash-it\n\t\t\t\treturn\n\t\t\tfi\n\t\tfi\n\tfi\n\n\tif [[ \"$verb\" == \"enable\" || \"$verb\" == \"disable\" ]]; then\n\t\t# Automatically run a migration if required\n\t\t_bash-it-migrate\n\n\t\tfor arg in \"$@\"; do\n\t\t\t\"$func\" \"$arg\"\n\t\tdone\n\n\t\tif [[ -n \"${BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE:-}\" ]]; then\n\t\t\t_bash-it-reload\n\t\tfi\n\telse\n\t\t\"$func\" \"$@\"\n\tfi\n}\n\nfunction _bash-it-aliases() {\n\t_about 'summarizes available bash_it aliases'\n\t_group 'lib'\n\n\t_bash-it-describe \"aliases\" \"an\" \"alias\" \"Alias\" \"$@\"\n}\n\nfunction _bash-it-completions() {\n\t_about 'summarizes available bash_it completions'\n\t_group 'lib'\n\n\t_bash-it-describe \"completion\" \"a\" \"completion\" \"Completion\" \"$@\"\n}\n\nfunction _bash-it-plugins() {\n\t_about 'summarizes available bash_it plugins'\n\t_group 'lib'\n\n\t_bash-it-describe \"plugins\" \"a\" \"plugin\" \"Plugin\" \"$@\"\n}\n\nfunction _bash-it-update-dev() {\n\t_about 'updates Bash-it to the latest master'\n\t_group 'lib'\n\n\t_bash-it-update- dev \"$@\"\n}\n\nfunction _bash-it-update-stable() {\n\t_about 'updates Bash-it to the latest tag'\n\t_group 'lib'\n\n\t_bash-it-update- stable \"$@\"\n}\n\nfunction _bash-it_update_migrate_and_restart() {\n\t_about 'Checks out the wanted version, pops directory and restart. Does not return (because of the restart!)'\n\t_param '1: Which branch to checkout to'\n\t_param '2: Which type of version we are using'\n\tif git checkout \"${1?}\" &> /dev/null; then\n\t\techo \"Bash-it successfully updated.\"\n\t\techo \"\"\n\t\techo \"Migrating your installation to the latest ${2:-} version now...\"\n\t\t_bash-it-migrate\n\t\techo \"\"\n\t\techo \"All done, enjoy!\"\n\t\t# Don't forget to restore the original pwd (called from `_bash-it-update-`)!\n\t\tpopd > /dev/null || return\n\t\t_bash-it-restart\n\telse\n\t\techo \"Error updating Bash-it, please, check if your Bash-it installation folder (${BASH_IT}) is clean.\"\n\tfi\n}\n\nfunction _bash-it-update-() {\n\t_about 'updates Bash-it'\n\t_param '1: What kind of update to do (stable|dev)'\n\t_group 'lib'\n\n\tlocal silent word DIFF version TARGET revision status revert log_color RESP\n\tfor word in \"$@\"; do\n\t\tif [[ \"${word}\" == \"--silent\" || \"${word}\" == \"-s\" ]]; then\n\t\t\tsilent=true\n\t\tfi\n\tdone\n\n\tpushd \"${BASH_IT?}\" > /dev/null || return\n\n\tDIFF=$(git diff --name-status)\n\tif [[ -n \"$DIFF\" ]]; then\n\t\techo -e \"Local changes detected in bash-it directory. Clean '$BASH_IT' directory to proceed.\\n$DIFF\"\n\t\tpopd > /dev/null || return\n\t\treturn 1\n\tfi\n\n\tif [[ -z \"$BASH_IT_REMOTE\" ]]; then\n\t\tBASH_IT_REMOTE=$(_get-git-default-remote-name)\n\tfi\n\n\tgit fetch \"$BASH_IT_REMOTE\" --tags &> /dev/null\n\n\tif [[ -z \"$BASH_IT_DEVELOPMENT_BRANCH\" ]]; then\n\t\tBASH_IT_DEVELOPMENT_BRANCH=\"master\"\n\tfi\n\t# Defaults to stable update\n\tif [[ -z \"${1:-}\" || \"$1\" == \"stable\" ]]; then\n\t\tversion=\"stable\"\n\t\tTARGET=$(git describe --tags \"$(git rev-list --tags --max-count=1)\" 2> /dev/null)\n\n\t\tif [[ -z \"$TARGET\" ]]; then\n\t\t\techo \"Can not find tags, so can not update to latest stable version...\"\n\t\t\tpopd > /dev/null || return\n\t\t\treturn\n\t\tfi\n\telse\n\t\tversion=\"dev\"\n\t\tTARGET=\"${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}\"\n\tfi\n\n\trevision=\"HEAD..${TARGET}\"\n\tstatus=\"$(git rev-list \"${revision}\" 2> /dev/null)\"\n\n\tif [[ -z \"${status}\" && \"${version}\" == \"stable\" ]]; then\n\t\trevision=\"${TARGET}..HEAD\"\n\t\tstatus=\"$(git rev-list \"${revision}\" 2> /dev/null)\"\n\t\trevert=true\n\tfi\n\n\tif [[ -n \"${status}\" ]]; then\n\t\tif [[ -n \"${revert}\" ]]; then\n\t\t\techo \"Your version is a more recent development version ($(git log -1 --format=%h HEAD))\"\n\t\t\techo \"You can continue in order to revert and update to the latest stable version\"\n\t\t\techo \"\"\n\t\t\tlog_color=\"%Cred\"\n\t\tfi\n\n\t\tgit log --no-merges --format=\"${log_color}%h: %s (%an)\" \"${revision}\"\n\t\techo \"\"\n\n\t\tif [[ -n \"${silent}\" ]]; then\n\t\t\techo \"Updating to ${TARGET}($(git log -1 --format=%h \"${TARGET}\"))...\"\n\t\t\t_bash-it_update_migrate_and_restart \"$TARGET\" \"$version\"\n\t\telse\n\t\t\tread -r -e -n 1 -p \"Would you like to update to ${TARGET}($(git log -1 --format=%h \"${TARGET}\"))? [Y/n] \" RESP\n\t\t\tcase \"$RESP\" in\n\t\t\t\t[yY] | \"\")\n\t\t\t\t\t_bash-it_update_migrate_and_restart \"$TARGET\" \"$version\"\n\t\t\t\t\t;;\n\t\t\t\t[nN])\n\t\t\t\t\techo \"Not updating…\"\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo -e \"${echo_orange?}Please choose y or n.${echo_reset_color?}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tfi\n\telse\n\t\tif [[ \"${version}\" == \"stable\" ]]; then\n\t\t\techo \"You're on the latest stable version. If you want to check out the latest 'dev' version, please run \\\"bash-it update dev\\\"\"\n\t\telse\n\t\t\techo \"Bash-it is up to date, nothing to do!\"\n\t\tfi\n\tfi\n\tpopd > /dev/null || return\n}\n\nfunction _bash-it-migrate() {\n\t_about 'migrates Bash-it configuration from a previous format to the current one'\n\t_group 'lib'\n\n\tlocal migrated_something component_type component_name single_type file_type _bash_it_config_file disable_func enable_func\n\tmigrated_something=false\n\n\tfor file_type in \"aliases\" \"plugins\" \"completion\"; do\n\t\tfor _bash_it_config_file in \"${BASH_IT}/$file_type/enabled\"/*.bash; do\n\t\t\t[[ -f \"$_bash_it_config_file\" ]] || continue\n\n\t\t\t# Get the type of component from the extension\n\t\t\tcomponent_type=\"$(_bash-it-get-component-type-from-path \"$_bash_it_config_file\")\"\n\t\t\t# Cut off the optional \"250---\" prefix and the suffix\n\t\t\tcomponent_name=\"$(_bash-it-get-component-name-from-path \"$_bash_it_config_file\")\"\n\n\t\t\tmigrated_something=true\n\n\t\t\tsingle_type=\"${component_type/aliases/aliass}\"\n\t\t\techo \"Migrating ${single_type%s} $component_name.\"\n\n\t\t\tdisable_func=\"_disable-${single_type%s}\"\n\t\t\tenable_func=\"_enable-${single_type%s}\"\n\n\t\t\t\"$disable_func\" \"$component_name\"\n\t\t\t\"$enable_func\" \"$component_name\"\n\t\tdone\n\tdone\n\n\tif [[ -n \"${BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE:-}\" ]]; then\n\t\t_bash-it-reload\n\tfi\n\n\tif [[ \"$migrated_something\" == \"true\" ]]; then\n\t\techo \"\"\n\t\techo \"If any migration errors were reported, please try the following: reload && bash-it migrate\"\n\tfi\n}\n\nfunction _bash-it-version() {\n\t_about 'shows current Bash-it version'\n\t_group 'lib'\n\n\tlocal BASH_IT_GIT_REMOTE BASH_IT_GIT_URL current_tag BASH_IT_GIT_VERSION_INFO TARGET\n\n\tpushd \"${BASH_IT?}\" > /dev/null || return\n\n\tif [[ -z \"${BASH_IT_REMOTE:-}\" ]]; then\n\t\tBASH_IT_REMOTE=$(_get-git-default-remote-name)\n\tfi\n\n\tBASH_IT_GIT_REMOTE=\"$(git remote get-url \"$BASH_IT_REMOTE\")\"\n\tBASH_IT_GIT_URL=\"${BASH_IT_GIT_REMOTE%.git}\"\n\tif [[ \"$BASH_IT_GIT_URL\" == *\"git@\"* ]]; then\n\t\t# Fix URL in case it is ssh based URL\n\t\tBASH_IT_GIT_URL=\"${BASH_IT_GIT_URL/://}\"\n\t\tBASH_IT_GIT_URL=\"${BASH_IT_GIT_URL/git@/https://}\"\n\tfi\n\n\tcurrent_tag=\"$(git describe --exact-match --tags 2> /dev/null)\"\n\n\tif [[ -z \"$current_tag\" ]]; then\n\t\tBASH_IT_GIT_VERSION_INFO=\"$(git log --pretty=format:'%h on %aI' -n 1)\"\n\t\tTARGET=\"${BASH_IT_GIT_VERSION_INFO%% *}\"\n\t\techo \"Version type: dev\"\n\t\techo \"Current git SHA: $BASH_IT_GIT_VERSION_INFO\"\n\t\techo \"Commit info: $BASH_IT_GIT_URL/commit/$TARGET\"\n\telse\n\t\tTARGET=\"$current_tag\"\n\t\techo \"Version type: stable\"\n\t\techo \"Current tag: $current_tag\"\n\t\techo \"Tag information: $BASH_IT_GIT_URL/releases/tag/$current_tag\"\n\tfi\n\n\techo \"Compare to latest: $BASH_IT_GIT_URL/compare/$TARGET...master\"\n\n\tpopd > /dev/null || return\n}\n\nfunction _bash-it-doctor() {\n\t_about 'reloads a profile file with a BASH_IT_LOG_LEVEL set'\n\t_param '1: BASH_IT_LOG_LEVEL argument: \"errors\" \"warnings\" \"all\"'\n\t_group 'lib'\n\n\t# shellcheck disable=SC2034 # expected for this case\n\tlocal BASH_IT_LOG_LEVEL=\"${1?}\"\n\t_bash-it-reload\n}\n\nfunction _bash-it-doctor-all() {\n\t_about 'reloads a profile file with error, warning and debug logs'\n\t_group 'lib'\n\n\t_bash-it-doctor \"${BASH_IT_LOG_LEVEL_ALL?}\"\n}\n\nfunction _bash-it-doctor-warnings() {\n\t_about 'reloads a profile file with error and warning logs'\n\t_group 'lib'\n\n\t_bash-it-doctor \"${BASH_IT_LOG_LEVEL_WARNING?}\"\n}\n\nfunction _bash-it-doctor-errors() {\n\t_about 'reloads a profile file with error logs'\n\t_group 'lib'\n\n\t_bash-it-doctor \"${BASH_IT_LOG_LEVEL_ERROR?}\"\n}\n\nfunction _bash-it-doctor-check-profile-sourcing-grep() {\n\t_about 'checks if .bashrc is sourced from profile using grep'\n\t_param '1: profile file path'\n\t_group 'lib'\n\n\tlocal profile_file=\"${1}\"\n\t[[ ! -f \"$profile_file\" ]] && return 1\n\n\t# Look for common patterns that source .bashrc\n\tcommand grep -qE '(source|\\.)\\s+(~|\\$HOME|\"\\$HOME\")?/\\.bashrc|if.*BASH_VERSION.*bashrc' \"$profile_file\"\n}\n\nfunction _bash-it-doctor-check-profile-sourcing-test() {\n\t_about 'checks if .bashrc is actually sourced using brute force test'\n\t_group 'lib'\n\n\tlocal bashrc=\"$HOME/.bashrc\"\n\t[[ ! -f \"$bashrc\" ]] && return 1\n\n\tlocal backup_bashrc=\"/tmp/.bashrc_backup_$$\"\n\n\t# Move .bashrc aside\n\tcommand mv \"$bashrc\" \"$backup_bashrc\" 2> /dev/null || return 1\n\n\t# Create test .bashrc that just echoes\n\techo 'echo \"__BASHRC_WAS_SOURCED__\"' > \"$bashrc\"\n\n\t# Test in login shell, capture output\n\tlocal output\n\toutput=$(bash -l -c ':' 2>&1)\n\n\t# Restore immediately\n\tcommand mv \"$backup_bashrc\" \"$bashrc\"\n\n\t# Check if our marker appeared\n\tcommand grep -q \"__BASHRC_WAS_SOURCED__\" <<< \"$output\"\n}\n\nfunction _bash-it-doctor-check-profile-sourcing() {\n\t_about 'checks if .bashrc is sourced from login shell profile files'\n\t_group 'lib'\n\n\tlocal profile_file\n\tif [[ -f \"$HOME/.bash_profile\" ]]; then\n\t\tprofile_file=\"$HOME/.bash_profile\"\n\telif [[ -f \"$HOME/.profile\" ]]; then\n\t\tprofile_file=\"$HOME/.profile\"\n\telse\n\t\techo \"${YELLOW}No .bash_profile or .profile found${RESET}\"\n\t\techo \"Login shells may not load bash-it configuration\"\n\t\treturn\n\tfi\n\n\t# Show if it's a symlink\n\tif [[ -L \"$profile_file\" ]]; then\n\t\techo \"${YELLOW}Note:${RESET} $profile_file is a symlink to $(readlink \"$profile_file\")\"\n\tfi\n\n\t# Try grep detection first (fast and safe)\n\tif _bash-it-doctor-check-profile-sourcing-grep \"$profile_file\"; then\n\t\techo \"${GREEN}✓${RESET} .bashrc is sourced from $profile_file\"\n\t\treturn 0\n\tfi\n\n\t# Grep didn't find it, try brute force test\n\techo \"Grep detection unclear, testing if .bashrc actually loads...\"\n\tif _bash-it-doctor-check-profile-sourcing-test; then\n\t\techo \"${GREEN}✓${RESET} .bashrc is sourced (confirmed via test)\"\n\t\treturn 0\n\tfi\n\n\t# Not sourced\n\techo \"${RED}✗${RESET} .bashrc is NOT sourced from $profile_file\"\n\techo \"  ${YELLOW}Warning:${RESET} bash-it will not load in login shells (Terminal.app, SSH sessions)\"\n\techo \"  ${YELLOW}Fix:${RESET} Add the following to $profile_file:\"\n\techo \"\"\n\techo \"    if [ -n \\\"\\$BASH_VERSION\\\" ]; then\"\n\techo \"        if [ -f \\\"\\$HOME/.bashrc\\\" ]; then\"\n\techo \"            . \\\"\\$HOME/.bashrc\\\"\"\n\techo \"        fi\"\n\techo \"    fi\"\n\techo \"\"\n}\n\nfunction _bash-it-doctor-summary() {\n\t_about 'shows a comprehensive diagnostic summary for bug reports'\n\t_group 'lib'\n\n\tlocal component_type enabled_count enabled_list f component_name\n\n\t# Color definitions\n\tlocal BOLD CYAN GREEN YELLOW RESET\n\tBOLD=$(tput bold 2> /dev/null || echo \"\")\n\tCYAN=$(tput setaf 6 2> /dev/null || echo \"\")\n\tGREEN=$(tput setaf 2 2> /dev/null || echo \"\")\n\tYELLOW=$(tput setaf 3 2> /dev/null || echo \"\")\n\tRESET=$(tput sgr0 2> /dev/null || echo \"\")\n\n\techo \"${BOLD}${CYAN}Bash-it Doctor Summary${RESET}\"\n\techo \"${CYAN}======================${RESET}\"\n\techo \"\"\n\n\t# Environment Information\n\techo \"${BOLD}## Environment${RESET}\"\n\techo \"${GREEN}OS:${RESET} $(uname -s) $(uname -r)\"\n\techo \"${GREEN}Bash Version:${RESET} ${BASH_VERSION}\"\n\techo \"${GREEN}Bash-it Location:${RESET} ${BASH_IT}\"\n\n\t# Check which config file is used\n\tlocal config_file\n\tif [[ -n \"${BASH_IT_BASHRC:-}\" ]]; then\n\t\tconfig_file=\"${BASH_IT_BASHRC}\"\n\telif [[ -f \"${HOME}/.bashrc\" ]]; then\n\t\tconfig_file=\"${HOME}/.bashrc\"\n\telif [[ -f \"${HOME}/.bash_profile\" ]]; then\n\t\tconfig_file=\"${HOME}/.bash_profile\"\n\telse\n\t\tconfig_file=\"unknown\"\n\tfi\n\techo \"${GREEN}Config File:${RESET} ${config_file}\"\n\techo \"\"\n\n\t# Bash-it Version Information\n\techo \"${BOLD}## Bash-it Version${RESET}\"\n\tpushd \"${BASH_IT}\" > /dev/null 2>&1 || {\n\t\techo \"Error: Cannot access Bash-it directory\"\n\t\treturn 1\n\t}\n\n\tlocal current_commit current_tag commits_behind latest_tag commits_since_tag\n\tcurrent_commit=\"$(git rev-parse --short HEAD 2> /dev/null || echo 'unknown')\"\n\tcurrent_tag=\"$(git describe --exact-match --tags 2> /dev/null || echo 'none')\"\n\n\tif [[ -z \"${BASH_IT_REMOTE:-}\" ]]; then\n\t\tBASH_IT_REMOTE=\"origin\"\n\tfi\n\n\t# Get version info relative to tags\n\tlatest_tag=\"$(git describe --tags --abbrev=0 2> /dev/null || echo 'none')\"\n\tcommits_since_tag=\"$(git rev-list --count \"${latest_tag}..HEAD\" 2> /dev/null || echo '0')\"\n\n\tif [[ \"${current_tag}\" != \"none\" ]]; then\n\t\techo \"${GREEN}Current Version:${RESET} ${current_tag} (${current_commit})\"\n\telif [[ \"${latest_tag}\" != \"none\" && \"${commits_since_tag}\" != \"0\" ]]; then\n\t\techo \"${GREEN}Current Version:${RESET} ${latest_tag} +${commits_since_tag} (${current_commit})\"\n\telse\n\t\techo \"${GREEN}Current Commit:${RESET} ${current_commit}\"\n\tfi\n\n\t# Check how far behind we are\n\tgit fetch \"${BASH_IT_REMOTE}\" --quiet 2> /dev/null\n\tif [[ -z \"${BASH_IT_DEVELOPMENT_BRANCH:-}\" ]]; then\n\t\tBASH_IT_DEVELOPMENT_BRANCH=\"master\"\n\tfi\n\tcommits_behind=\"$(git rev-list --count HEAD..\"${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}\" 2> /dev/null || echo 'unknown')\"\n\n\tif [[ \"${commits_behind}\" == \"0\" ]]; then\n\t\techo \"${GREEN}Status:${RESET} Up to date with ${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH} ✓\"\n\telif [[ \"${commits_behind}\" != \"unknown\" ]]; then\n\t\techo \"${YELLOW}Status:${RESET} ${commits_behind} commits behind ${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}\"\n\n\t\t# Offer to update if behind and it's safe to do so\n\t\tlocal git_status untracked_files merge_base can_ff\n\t\tgit_status=\"$(git status --porcelain 2> /dev/null)\"\n\t\tuntracked_files=\"$(echo \"$git_status\" | command grep -c '^??' || true)\"\n\n\t\t# Check if we can fast-forward\n\t\tmerge_base=\"$(git merge-base HEAD \"${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}\" 2> /dev/null)\"\n\t\tcan_ff=false\n\t\tif [[ \"$(git rev-parse HEAD 2> /dev/null)\" == \"$merge_base\" ]]; then\n\t\t\tcan_ff=true\n\t\tfi\n\n\t\t# Only offer merge if:\n\t\t# 1. No modified/staged files (untracked are OK)\n\t\t# 2. Can fast-forward OR no untracked files that would conflict\n\t\tif ! echo \"$git_status\" | command grep -v '^??' -q; then\n\t\t\tif [[ \"$can_ff\" == \"true\" ]] || [[ \"$untracked_files\" == \"0\" ]]; then\n\t\t\t\techo \"\"\n\t\t\t\techo \"Would you like to update now? This will merge ${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH} into your current branch.\"\n\t\t\t\tread -r -p \"Update? [y/N] \" response\n\t\t\t\tcase \"$response\" in\n\t\t\t\t\t[yY] | [yY][eE][sS])\n\t\t\t\t\t\techo \"Updating bash-it...\"\n\t\t\t\t\t\tif git merge \"${BASH_IT_REMOTE}/${BASH_IT_DEVELOPMENT_BRANCH}\" --ff-only 2> /dev/null; then\n\t\t\t\t\t\t\techo \"✓ Successfully updated to latest version!\"\n\t\t\t\t\t\t\techo \"\"\n\t\t\t\t\t\t\techo \"Please restart your shell or run: source ~/.bashrc\"\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\techo \"✗ Fast-forward merge failed. Please run 'bash-it update' for a guided update.\"\n\t\t\t\t\t\tfi\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\techo \"Skipping update. You can update later with: bash-it update\"\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\telse\n\t\t\t\techo \"\"\n\t\t\t\techo \"Note: Cannot safely auto-update (untracked files may conflict). Use: bash-it update\"\n\t\t\tfi\n\t\telse\n\t\t\techo \"\"\n\t\t\techo \"Note: Cannot auto-update (uncommitted changes present). Use: bash-it update\"\n\t\tfi\n\tfi\n\n\tpopd > /dev/null 2>&1 || true\n\techo \"\"\n\n\t# Bash-it Loading Configuration\n\techo \"${BOLD}## Bash-it Loading${RESET}\"\n\tlocal config_files_to_check=()\n\tlocal config_file_path\n\n\t# Check all common config files\n\tfor config_file_path in \"${HOME}/.bashrc\" \"${HOME}/.bash_profile\" \"${HOME}/.profile\"; do\n\t\t[[ -f \"$config_file_path\" ]] && config_files_to_check+=(\"$config_file_path\")\n\tdone\n\n\tif [[ ${#config_files_to_check[@]} -gt 0 ]]; then\n\t\tfor config_file_path in \"${config_files_to_check[@]}\"; do\n\t\t\tif command grep -i \"bash.it\\|bash_it\" \"$config_file_path\" > /dev/null 2>&1; then\n\t\t\t\techo \"From ${config_file_path}:\"\n\t\t\t\tcommand grep -n -i \"bash.it\\|bash_it\" -B2 -A2 \"$config_file_path\" 2> /dev/null\n\t\t\t\techo \"\"\n\t\t\tfi\n\t\tdone\n\telse\n\t\techo \"No config files found (.bashrc, .bash_profile, .profile)\"\n\tfi\n\n\t# Profile Sourcing Check (macOS/Solaris/BSD)\n\techo \"${BOLD}## Profile Configuration${RESET}\"\n\tcase \"$(uname -s)\" in\n\t\tDarwin | SunOS | Illumos | *BSD)\n\t\t\t_bash-it-doctor-check-profile-sourcing\n\t\t\t;;\n\t\t*)\n\t\t\techo \"Not applicable (Linux uses .bashrc for non-login shells by default)\"\n\t\t\t;;\n\tesac\n\techo \"\"\n\n\t# Enabled Components Summary\n\techo \"${BOLD}## Enabled Components${RESET}\"\n\n\t# Process each component type\n\tfor component_type in aliases plugins completion; do\n\t\tenabled_count=0\n\t\tenabled_list=()\n\n\t\t# Get singular form for display\n\t\tlocal display_type=\"${component_type}\"\n\t\tif [[ \"$component_type\" == \"aliases\" ]]; then\n\t\t\tdisplay_type=\"Aliases\"\n\t\telif [[ \"$component_type\" == \"plugins\" ]]; then\n\t\t\tdisplay_type=\"Plugins\"\n\t\telse\n\t\t\tdisplay_type=\"Completions\"\n\t\tfi\n\n\t\t# Count and collect enabled components\n\t\tfor f in \"${BASH_IT?}/$component_type/available\"/*.*.bash; do\n\t\t\t[[ -f \"$f\" ]] || continue\n\t\t\tcomponent_name=\"$(_bash-it-get-component-name-from-path \"$f\")\"\n\t\t\tif _bash-it-component-item-is-enabled \"$f\"; then\n\t\t\t\tenabled_list+=(\"$component_name\")\n\t\t\t\t((enabled_count++))\n\t\t\tfi\n\t\tdone\n\n\t\t# Display the summary with colors\n\t\tif [[ $enabled_count -eq 0 ]]; then\n\t\t\tprintf '%s%s%s (%s): %s\\n' \"$CYAN\" \"$display_type\" \"$RESET\" \"$enabled_count\" \"${YELLOW}none${RESET}\"\n\t\telse\n\t\t\tprintf '%s%s%s (%s): %s\\n' \"$CYAN\" \"$display_type\" \"$RESET\" \"$enabled_count\" \"${enabled_list[*]}\"\n\t\tfi\n\tdone\n\techo \"\"\n\techo \"${YELLOW}Tip:${RESET} To copy this report: ${CYAN}bash-it doctor${RESET} | pbcopy (macOS) or xclip (Linux)\"\n}\n\nfunction _bash-it-doctor-() {\n\t_about 'default bash-it doctor behavior, shows component summary'\n\t_group 'lib'\n\n\t_bash-it-doctor-summary\n}\n\nfunction _bash-it-profile-save() {\n\t_about 'saves the current configuration to the \"profile\" directory'\n\t_group 'lib'\n\n\tlocal name=\"${1:-}\"\n\twhile [[ -z \"$name\" ]]; do\n\t\tread -r -e -p \"Please enter the name of the profile to save: \" name\n\t\tcase \"$name\" in\n\t\t\t\"\")\n\t\t\t\techo -e \"${echo_orange?}Please choose a name.${echo_reset_color?}\"\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tlocal profile_path=\"${BASH_IT}/profiles/${name}.bash_it\" RESP\n\tif [[ -s \"$profile_path\" ]]; then\n\t\techo -e \"${echo_yellow?}Profile '$name' already exists.${echo_reset_color?}\"\n\t\twhile true; do\n\t\t\tread -r -e -n 1 -p \"Would you like to overwrite existing profile? [y/N] \" RESP\n\t\t\tcase \"$RESP\" in\n\t\t\t\t[yY])\n\t\t\t\t\techo -e \"${echo_green?}Overwriting profile '$name'...${echo_reset_color?}\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN] | \"\")\n\t\t\t\t\techo -e \"${echo_orange?}Aborting profile save...${echo_reset_color?}\"\n\t\t\t\t\treturn 1\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo -e \"${echo_orange?}Please choose y or n.${echo_reset_color?}\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\tfi\n\n\tlocal something_exists subdirectory component_exists f enabled_file\n\techo \"# This file is auto generated by Bash-it. Do not edit manually!\" > \"$profile_path\"\n\tfor subdirectory in \"plugins\" \"completion\" \"aliases\"; do\n\t\techo \"Saving $subdirectory configuration...\"\n\t\tfor f in \"${BASH_IT}/$subdirectory/available\"/*.bash; do\n\t\t\tif _bash-it-component-item-is-enabled \"$f\"; then\n\t\t\t\tif [[ -z \"${component_exists:-}\" ]]; then\n\t\t\t\t\t# This is the first component of this type, print the header\n\t\t\t\t\tcomponent_exists=\"yes\"\n\t\t\t\t\tsomething_exists=\"yes\"\n\t\t\t\t\techo \"\" >> \"$profile_path\"\n\t\t\t\t\techo \"# $subdirectory\" >> \"$profile_path\"\n\t\t\t\tfi\n\t\t\t\tenabled_file=\"$(_bash-it-get-component-name-from-path \"$f\")\"\n\t\t\t\techo \"$subdirectory $enabled_file\" >> \"$profile_path\"\n\t\t\tfi\n\t\tdone\n\tdone\n\tif [[ -z \"${something_exists:-}\" ]]; then\n\t\techo \"It seems like no configuration was enabled..\"\n\t\techo \"Make sure to double check that this is the wanted behavior.\"\n\tfi\n\n\techo \"All done!\"\n\techo \"\"\n\techo \"Profile location: $profile_path\"\n\techo \"Load the profile by invoking \\\"bash-it profile load $name\\\"\"\n}\n\n_bash-it-profile-load-parse-profile() {\n\t_about 'Internal function used to parse the profile file'\n\t_param '1: path to the profile file'\n\t_param '2: dry run- only check integrity of the profile file'\n\t_example '$ _bash-it-profile-load-parse-profile \"profile.bash_it\" \"dry\"'\n\n\tlocal -i num=0\n\tlocal line enable_func subdirectory component to_enable bad\n\twhile read -r -a line; do\n\t\t((++num))\n\t\t# Ignore comments and empty lines\n\t\t[[ -z \"${line[*]}\" || \"${line[*]}\" =~ ^#.* ]] && continue\n\t\tenable_func=\"_enable-${line[0]}\"\n\t\tsubdirectory=${line[0]}\n\t\tcomponent=${line[1]}\n\n\t\tto_enable=(\"${BASH_IT}/$subdirectory/available/$component.${subdirectory%s}\"*.bash)\n\t\t# Ignore botched lines\n\t\tif [[ ! -e \"${to_enable[0]}\" ]]; then\n\t\t\techo -e \"${echo_orange?}Bad line(#$num) in profile, aborting load...${line[*]}${echo_reset_color?}\"\n\t\t\tbad=\"bad line\"\n\t\t\tbreak\n\t\tfi\n\t\t# Do not actually modify config on dry run\n\t\t[[ -z \"${2:-}\" ]] || continue\n\t\t# Actually enable the component\n\t\t$enable_func \"$component\"\n\tdone < \"${1?}\"\n\n\t# Make sure to propagate the error\n\t[[ -z ${bad:-} ]]\n}\n\n_bash-it-profile-list() {\n\tabout 'lists all profiles from the \"profiles\" directory'\n\t_group 'lib'\n\tlocal profile\n\n\techo \"Available profiles:\"\n\tfor profile in \"${BASH_IT}/profiles\"/*.bash_it; do\n\t\tprofile=\"${profile##*/}\"\n\t\techo \"${profile/.bash_it/}\"\n\tdone\n}\n\n_bash-it-profile-rm() {\n\tabout 'Removes a profile from the \"profiles\" directory'\n\t_group 'lib'\n\n\tlocal name=\"${1:-}\"\n\tif [[ -z $name ]]; then\n\t\techo -e \"${echo_orange?}Please specify profile name to remove...${echo_reset_color?}\"\n\t\treturn 1\n\tfi\n\n\t# Users should not be allowed to delete the default profile\n\tif [[ $name == \"default\" ]]; then\n\t\techo -e \"${echo_orange?}Can not remove the default profile...${echo_reset_color?}\"\n\t\treturn 1\n\tfi\n\n\tlocal profile_path=\"${BASH_IT}/profiles/$name.bash_it\"\n\tif [[ ! -f \"$profile_path\" ]]; then\n\t\techo -e \"${echo_orange?}Could not find profile '$name'...${echo_reset_color?}\"\n\t\treturn 1\n\tfi\n\n\tcommand rm \"$profile_path\"\n\techo \"Removed profile '$name' successfully!\"\n}\n\n_bash-it-profile-load() {\n\t_about 'loads a configuration from the \"profiles\" directory'\n\t_group 'lib'\n\n\tlocal name=\"${1:-}\"\n\tif [[ -z $name ]]; then\n\t\techo -e \"${echo_orange?}Please specify profile name to load, not changing configuration...${echo_reset_color?}\"\n\t\treturn 1\n\tfi\n\n\tlocal profile_path=\"${BASH_IT}/profiles/$name.bash_it\"\n\tif [[ ! -f \"$profile_path\" ]]; then\n\t\techo -e \"${echo_orange?}Could not find profile '$name', not changing configuration...${echo_reset_color?}\"\n\t\treturn 1\n\tfi\n\n\techo \"Trying to parse profile '$name'...\"\n\tif _bash-it-profile-load-parse-profile \"$profile_path\" \"dry\"; then\n\t\techo \"Profile '$name' parsed successfully!\"\n\t\techo \"Disabling current configuration...\"\n\t\t_disable-all\n\t\techo \"\"\n\t\techo \"Enabling configuration based on profile...\"\n\t\t_bash-it-profile-load-parse-profile \"$profile_path\"\n\t\techo \"\"\n\t\techo \"Profile '$name' enabled!\"\n\telse\n\t\tfalse # failure\n\tfi\n}\n\nfunction _bash-it-restart() {\n\t_about 'restarts the shell in order to fully reload it'\n\t_group 'lib'\n\n\texec \"${0#-}\" --rcfile \"${BASH_IT_BASHRC:-${HOME?}/.bashrc}\"\n}\n\nfunction _bash-it-reload() {\n\t_about 'reloads the shell initialization file'\n\t_group 'lib'\n\n\t# shellcheck disable=SC1090\n\tsource \"${BASH_IT_BASHRC:-${HOME?}/.bashrc}\"\n}\n\nfunction _bash-it-describe() {\n\t_about 'summarizes available bash_it components'\n\t_param '1: subdirectory'\n\t_param '2: preposition'\n\t_param '3: file_type'\n\t_param '4: column_header'\n\t_param '5+: optional flags (--verbose, -v)'\n\t_example '$ _bash-it-describe \"plugins\" \"a\" \"plugin\" \"Plugin\"'\n\t_example '$ _bash-it-describe \"plugins\" \"a\" \"plugin\" \"Plugin\" --verbose'\n\n\tlocal subdirectory preposition file_type column_header f enabled enabled_file verbose url_value\n\tsubdirectory=\"$1\"\n\tpreposition=\"$2\"\n\tfile_type=\"$3\"\n\tcolumn_header=\"$4\"\n\tshift 4\n\n\t# Check for verbose flag\n\tverbose=false\n\tfor arg in \"$@\"; do\n\t\tif [[ \"$arg\" == \"--verbose\" || \"$arg\" == \"-v\" ]]; then\n\t\t\tverbose=true\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\tif [[ \"$verbose\" == true ]]; then\n\t\tprintf \"%-20s %-10s %-40s %s\\n\" \"$column_header\" 'Enabled?' 'Description' 'URL'\n\telse\n\t\tprintf \"%-20s %-10s %s\\n\" \"$column_header\" 'Enabled?' 'Description'\n\tfi\n\n\tfor f in \"${BASH_IT?}/$subdirectory/available\"/*.*.bash; do\n\t\tenabled=''\n\t\tenabled_file=\"${f##*/}\"\n\t\tenabled_file=\"${enabled_file%.\"${file_type}\"*.bash}\"\n\t\t_bash-it-component-item-is-enabled \"${file_type}\" \"${enabled_file}\" && enabled='x'\n\n\t\tif [[ \"$verbose\" == true ]]; then\n\t\t\turl_value=\"$(metafor \"url\" < \"$f\")\"\n\t\t\t[[ -z \"$url_value\" ]] && url_value=\"-\"\n\t\t\tprintf \"%-20s %-10s %-40s %s\\n\" \"$enabled_file\" \"[${enabled:- }]\" \"$(metafor \"about-$file_type\" < \"$f\")\" \"$url_value\"\n\t\telse\n\t\t\tprintf \"%-20s %-10s %s\\n\" \"$enabled_file\" \"[${enabled:- }]\" \"$(metafor \"about-$file_type\" < \"$f\")\"\n\t\tfi\n\tdone\n\n\tprintf '\\n%s\\n' \"to enable $preposition $file_type, do:\"\n\tprintf '%s\\n' \"$ bash-it enable $file_type  <$file_type name> [$file_type name]... -or- $ bash-it enable $file_type all\"\n\tprintf '\\n%s\\n' \"to disable $preposition $file_type, do:\"\n\tprintf '%s\\n' \"$ bash-it disable $file_type <$file_type name> [$file_type name]... -or- $ bash-it disable $file_type all\"\n}\n\nfunction _on-disable-callback() {\n\t_about 'Calls the disabled plugin destructor, if present'\n\t_param '1: plugin name'\n\t_example '$ _on-disable-callback gitstatus'\n\t_group 'lib'\n\n\tlocal callback=\"${1}_on_disable\"\n\tif _command_exists \"$callback\"; then\n\t\t\"$callback\"\n\tfi\n}\n\nfunction _disable-all() {\n\t_about 'disables all bash_it components'\n\t_example '$ _disable-all'\n\t_group 'lib'\n\n\t_disable-plugin \"all\"\n\t_disable-alias \"all\"\n\t_disable-completion \"all\"\n}\n\nfunction _disable-plugin() {\n\t_about 'disables bash_it plugin'\n\t_param '1: plugin name'\n\t_example '$ disable-plugin rvm'\n\t_group 'lib'\n\n\t_disable-thing \"plugins\" \"plugin\" \"${1?}\"\n\t_on-disable-callback \"${1?}\"\n}\n\nfunction _disable-alias() {\n\t_about 'disables bash_it alias'\n\t_param '1: alias name'\n\t_example '$ disable-alias git'\n\t_group 'lib'\n\n\t_disable-thing \"aliases\" \"alias\" \"${1?}\"\n}\n\nfunction _disable-completion() {\n\t_about 'disables bash_it completion'\n\t_param '1: completion name'\n\t_example '$ disable-completion git'\n\t_group 'lib'\n\n\t_disable-thing \"completion\" \"completion\" \"${1?}\"\n}\n\nfunction _disable-thing() {\n\t_about 'disables a bash_it component'\n\t_param '1: subdirectory'\n\t_param '2: file_type'\n\t_param '3: file_entity'\n\t_example '$ _disable-thing \"plugins\" \"plugin\" \"ssh\"'\n\n\tlocal subdirectory=\"${1?}\"\n\tlocal file_type=\"${2?}\"\n\tlocal file_entity=\"${3:-}\"\n\n\tif [[ -z \"$file_entity\" ]]; then\n\t\treference \"disable-$file_type\"\n\t\treturn\n\tfi\n\n\tlocal f suffix _bash_it_config_file plugin\n\tsuffix=\"${subdirectory/plugins/plugin}\"\n\n\tif [[ \"$file_entity\" == \"all\" ]]; then\n\t\t# Disable everything that's using the old structure and everything in the global \"enabled\" directory.\n\t\tfor _bash_it_config_file in \"${BASH_IT}/$subdirectory/enabled\"/*.\"${suffix}.bash\" \"${BASH_IT}/enabled\"/*\".${suffix}.bash\"; do\n\t\t\trm -f \"$_bash_it_config_file\"\n\t\tdone\n\telse\n\t\t# Use a glob to search for both possible patterns\n\t\t# 250---node.plugin.bash\n\t\t# node.plugin.bash\n\t\t# Either one will be matched by this glob\n\t\tfor plugin in \"${BASH_IT}/enabled\"/[[:digit:]][[:digit:]][[:digit:]]\"${BASH_IT_LOAD_PRIORITY_SEPARATOR}${file_entity}.${suffix}.bash\" \"${BASH_IT}/$subdirectory/enabled/\"{[[:digit:]][[:digit:]][[:digit:]]\"${BASH_IT_LOAD_PRIORITY_SEPARATOR}${file_entity}.${suffix}.bash\",\"${file_entity}.${suffix}.bash\"}; do\n\t\t\tif [[ -e \"${plugin}\" ]]; then\n\t\t\t\trm -f \"${plugin}\"\n\t\t\t\tplugin=\n\t\t\t\tbreak\n\t\t\tfi\n\t\tdone\n\t\tif [[ -n \"${plugin}\" ]]; then\n\t\t\tprintf '%s\\n' \"sorry, $file_entity does not appear to be an enabled $file_type.\"\n\t\t\treturn\n\t\tfi\n\tfi\n\n\t_bash-it-component-cache-clean \"${file_type}\"\n\n\tif [[ \"$file_entity\" == \"all\" ]]; then\n\t\t_bash-it-component-pluralize \"$file_type\" file_type\n\t\tprintf '%s\\n' \"$file_entity ${file_type} disabled.\"\n\telse\n\t\tprintf '%s\\n' \"$file_entity disabled.\"\n\tfi\n}\n\nfunction _enable-plugin() {\n\t_about 'enables bash_it plugin'\n\t_param '1: plugin name'\n\t_example '$ enable-plugin rvm'\n\t_group 'lib'\n\n\t_enable-thing \"plugins\" \"plugin\" \"${1?}\" \"$BASH_IT_LOAD_PRIORITY_PLUGIN\"\n}\n\nfunction _enable-plugins() {\n\t_about 'alias of _enable-plugin'\n\t_enable-plugin \"$@\"\n}\n\nfunction _enable-alias() {\n\t_about 'enables bash_it alias'\n\t_param '1: alias name'\n\t_example '$ enable-alias git'\n\t_group 'lib'\n\n\t_enable-thing \"aliases\" \"alias\" \"${1?}\" \"$BASH_IT_LOAD_PRIORITY_ALIAS\"\n}\n\nfunction _enable-aliases() {\n\t_about 'alias of _enable-alias'\n\t_enable-alias \"$@\"\n}\n\nfunction _enable-completion() {\n\t_about 'enables bash_it completion'\n\t_param '1: completion name'\n\t_example '$ enable-completion git'\n\t_group 'lib'\n\n\t_enable-thing \"completion\" \"completion\" \"${1?}\" \"$BASH_IT_LOAD_PRIORITY_COMPLETION\"\n}\n\nfunction _enable-thing() {\n\tcite _about _param _example\n\t_about 'enables a bash_it component'\n\t_param '1: subdirectory'\n\t_param '2: file_type'\n\t_param '3: file_entity'\n\t_param '4: load priority'\n\t_example '$ _enable-thing \"plugins\" \"plugin\" \"ssh\" \"150\"'\n\n\tlocal subdirectory=\"${1?}\"\n\tlocal file_type=\"${2?}\"\n\tlocal file_entity=\"${3:-}\"\n\tlocal load_priority=\"${4:-500}\"\n\n\tif [[ -z \"$file_entity\" ]]; then\n\t\treference \"enable-$file_type\"\n\t\treturn\n\tfi\n\n\tlocal _bash_it_config_file to_enable to_enables enabled_plugin local_file_priority use_load_priority\n\tlocal suffix=\"${subdirectory/plugins/plugin}\"\n\n\tif [[ \"$file_entity\" == \"all\" ]]; then\n\t\tfor _bash_it_config_file in \"${BASH_IT}/$subdirectory/available\"/*.bash; do\n\t\t\tto_enable=\"${_bash_it_config_file##*/}\"\n\t\t\t_enable-thing \"$subdirectory\" \"$file_type\" \"${to_enable%.\"${file_type/alias/aliases}\".bash}\" \"$load_priority\"\n\t\tdone\n\telse\n\t\tto_enables=(\"${BASH_IT}/$subdirectory/available/$file_entity.${suffix}.bash\")\n\t\tif [[ ! -e \"${to_enables[0]}\" ]]; then\n\t\t\tprintf '%s\\n' \"sorry, $file_entity does not appear to be an available $file_type.\"\n\t\t\treturn\n\t\tfi\n\n\t\tto_enable=\"${to_enables[0]##*/}\"\n\t\t# Check for existence of the file using a wildcard, since we don't know which priority might have been used when enabling it.\n\t\tfor enabled_plugin in \"${BASH_IT}/$subdirectory/enabled\"/{[[:digit:]][[:digit:]][[:digit:]]\"${BASH_IT_LOAD_PRIORITY_SEPARATOR}${to_enable}\",\"${to_enable}\"} \"${BASH_IT}/enabled\"/[[:digit:]][[:digit:]][[:digit:]]\"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${to_enable}\"; do\n\t\t\tif [[ -e \"${enabled_plugin}\" ]]; then\n\t\t\t\tprintf '%s\\n' \"$file_entity is already enabled.\"\n\t\t\t\treturn\n\t\t\tfi\n\t\tdone\n\n\t\tmkdir -p \"${BASH_IT}/enabled\"\n\n\t\t# Load the priority from the file if it present there\n\t\tlocal_file_priority=\"$(awk -F': ' '$1 == \"# BASH_IT_LOAD_PRIORITY\" { print $2 }' \"${BASH_IT}/$subdirectory/available/$to_enable\")\"\n\t\tuse_load_priority=\"${local_file_priority:-$load_priority}\"\n\n\t\tln -s \"../$subdirectory/available/$to_enable\" \"${BASH_IT}/enabled/${use_load_priority}${BASH_IT_LOAD_PRIORITY_SEPARATOR}${to_enable}\"\n\tfi\n\n\t_bash-it-component-cache-clean \"${file_type}\"\n\n\tprintf '%s\\n' \"$file_entity enabled with priority $use_load_priority.\"\n}\n\nfunction _help-completions() {\n\t_about 'summarize all completions available in bash-it'\n\t_group 'lib'\n\n\t_bash-it-completions \"$@\"\n}\n\nfunction _help-aliases() {\n\t_about 'shows help for all aliases, or a specific alias group'\n\t_param '1: optional alias group'\n\t_example '$ alias-help'\n\t_example '$ alias-help git'\n\n\tif [[ -n \"${1:-}\" ]]; then\n\t\tcase \"$1\" in\n\t\t\tcustom)\n\t\t\t\talias_path='custom.aliases.bash'\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\talias_path=\"available/${1}.aliases.bash\"\n\t\t\t\t;;\n\t\tesac\n\t\tmetafor alias < \"${BASH_IT}/aliases/$alias_path\" | sed \"s/$/'/\"\n\telse\n\t\tlocal f\n\n\t\tfor f in \"${BASH_IT}/aliases/enabled\"/* \"${BASH_IT}/enabled\"/*.\"aliases.bash\"; do\n\t\t\t[[ -f \"$f\" ]] || continue\n\t\t\t_help-list-aliases \"$f\"\n\t\tdone\n\n\t\tif [[ -e \"${BASH_IT}/aliases/custom.aliases.bash\" ]]; then\n\t\t\t_help-list-aliases \"${BASH_IT}/aliases/custom.aliases.bash\"\n\t\tfi\n\tfi\n}\n\nfunction _help-list-aliases() {\n\tlocal file\n\tfile=\"$(_bash-it-get-component-name-from-path \"${1?}\")\"\n\tprintf '\\n\\n%s:\\n' \"${file}\"\n\t# metafor() strips trailing quotes, restore them with sed..\n\tmetafor alias < \"$1\" | sed \"s/$/'/\"\n}\n\nfunction _help-plugins() {\n\t_about 'summarize all functions defined by enabled bash-it plugins'\n\t_group 'lib'\n\n\tlocal grouplist func group about gfile defn\n\t# display a brief progress message...\n\tprintf '%s' 'please wait, building help...'\n\tgrouplist=\"$(mktemp -t grouplist.XXXXXX)\"\n\twhile read -ra func; do\n\t\tdefn=\"$(declare -f \"${func[2]}\")\"\n\t\tgroup=\"$(metafor group <<< \"$defn\")\"\n\t\tif [[ -z \"$group\" ]]; then\n\t\t\tgroup='misc'\n\t\tfi\n\t\tabout=\"$(metafor about <<< \"$defn\")\"\n\t\t_letterpress \"$about\" \"${func[2]}\" >> \"$grouplist.$group\"\n\t\techo \"$grouplist.$group\" >> \"$grouplist\"\n\tdone < <(declare -F)\n\t# clear progress message\n\tprintf '\\r%s\\n' '                              '\n\twhile IFS= read -r gfile; do\n\t\tprintf '%s\\n' \"${gfile##*.}:\"\n\t\tcat \"$gfile\"\n\t\tprintf '\\n'\n\t\trm \"$gfile\" 2> /dev/null\n\tdone < <(sort -u \"$grouplist\") | less\n\trm \"$grouplist\" 2> /dev/null\n}\n\nfunction _help-profile() {\n\t_about 'help message for profile command'\n\t_group 'lib'\n\n\techo \"Manages profiles of bash it.\"\n\techo \"Use 'bash-it profile list' to see all available profiles.\"\n\techo \"Use 'bash-it profile save foo' to save the current configuration into a profile named 'foo'.\"\n\techo \"Use 'bash-it profile load foo' to load an existing profile named 'foo'.\"\n\techo \"Use 'bash-it profile rm foo' to remove an existing profile named 'foo'.\"\n}\n\nfunction _help-update() {\n\t_about 'help message for update command'\n\t_group 'lib'\n\n\techo \"Check for a new version of Bash-it and update it.\"\n}\n\nfunction _help-migrate() {\n\t_about 'help message for migrate command'\n\t_group 'lib'\n\n\techo \"Migrates internal Bash-it structure to the latest version in case of changes.\"\n\techo \"The 'migrate' command is run automatically when calling 'update', 'enable' or 'disable'.\"\n}\n\nfunction all_groups() {\n\tabout 'displays all unique metadata groups'\n\tgroup 'lib'\n\n\tdeclare -f | metafor group | sort -u\n}\n\nfunction pathmunge() {\n\tabout 'prevent duplicate directories in your PATH variable'\n\tgroup 'helpers'\n\texample 'pathmunge /path/to/dir is equivalent to PATH=/path/to/dir:$PATH'\n\texample 'pathmunge /path/to/dir after is equivalent to PATH=$PATH:/path/to/dir'\n\n\tif [[ -d \"${1:-}\" && ! $PATH =~ (^|:)\"${1}\"($|:) ]]; then\n\t\tif [[ \"${2:-before}\" == \"after\" ]]; then\n\t\t\texport PATH=\"$PATH:${1}\"\n\t\telse\n\t\t\texport PATH=\"${1}:$PATH\"\n\t\tfi\n\tfi\n}\n\nfunction _get-git-default-remote-name() {\n\tlocal branch\n\tbranch=$(command git --git-dir=\"${BASH_IT?}/.git\" --work-tree=\"${BASH_IT?}\" branch --show-current)\n\n\tlocal remote_name=\n\tremote_name=$(command git --git-dir=\"${BASH_IT?}/.git\" --work-tree=\"${BASH_IT?}\" config --get --default '' \"branch.$branch.remote\")\n\tif [[ -n \"$remote_name\" ]]; then\n\t\tprintf '%s\\n' \"$remote_name\"\n\t\treturn\n\tfi\n\n\tremote_name=$(command git --git-dir=\"${BASH_IT?}/.git\" --work-tree=\"${BASH_IT?}\" remote -v | awk 'NR==1 { print $1 }')\n\tprintf '%s\\n' \"${remote_name:-origin}\"\n}\n\n# `_bash-it-find-in-ancestor` uses the shell's ability to run a function in\n# a subshell to simplify our search to a simple `cd ..` and `[[ -r $1 ]]`\n# without any external dependencies. Let the shell do what it's good at.\nfunction _bash-it-find-in-ancestor() (\n\t: _about 'searches parents of the current directory for any of the specified file names'\n\t: _group 'helpers'\n\t: _param '*: names of files or folders to search for'\n\t: _returns '0: prints path of closest matching ancestor directory to stdout'\n\t: _returns '1: no match found'\n\t: _returns '2: improper usage of shell builtin' # uncommon\n\t: _example '_bash-it-find-in-ancestor .git .hg'\n\t: _example '_bash-it-find-in-ancestor GNUmakefile Makefile makefile'\n\n\tlocal kin\n\t# To keep things simple, we do not search the root dir.\n\twhile [[ \"${PWD}\" != '/' ]]; do\n\t\tfor kin in \"$@\"; do\n\t\t\tif [[ -r \"${PWD}/${kin}\" ]]; then\n\t\t\t\tprintf '%s' \"${PWD}\"\n\t\t\t\treturn \"$?\"\n\t\t\tfi\n\t\tdone\n\t\tcommand cd .. || return \"$?\"\n\tdone\n\treturn 1\n)\n"
  },
  {
    "path": "lib/history.bash",
    "content": "# shellcheck shell=bash\n#\n# Functions for working with Bash's command history.\n\nfunction _bash-it-history-init() {\n\tsafe_append_preexec '_bash-it-history-auto-save'\n\tsafe_append_prompt_command '_bash-it-history-auto-load'\n}\n\nfunction _bash-it-history-auto-save() {\n\tcase $HISTCONTROL in\n\t\t*'noauto'* | *'autoload'*)\n\t\t\t: # Do nothing, as configured.\n\t\t\t;;\n\t\t*'auto'*)\n\t\t\t# Append new history from this session to the $HISTFILE\n\t\t\thistory -a\n\t\t\t;;\n\t\t*)\n\t\t\t# Append *only* if shell option `histappend` has been enabled.\n\t\t\tshopt -q histappend && history -a && return\n\t\t\t;;\n\tesac\n}\n\nfunction _bash-it-history-auto-load() {\n\tcase $HISTCONTROL in\n\t\t*'noauto'*)\n\t\t\t: # Do nothing, as configured.\n\t\t\t;;\n\t\t*'autosave'*)\n\t\t\t# Append new history from this session to the $HISTFILE\n\t\t\thistory -a\n\t\t\t;;\n\t\t*'autoloadnew'*)\n\t\t\t# Read new entries from $HISTFILE\n\t\t\thistory -n\n\t\t\t;;\n\t\t*'auto'*)\n\t\t\t# Blank in-memory history, then read entire $HISTFILE fresh from disk.\n\t\t\thistory -a && history -c && history -r\n\t\t\t;;\n\t\t*)\n\t\t\t: # Do nothing, default.\n\t\t\t;;\n\tesac\n}\n\n_bash_it_library_finalize_hook+=('_bash-it-history-init')\n"
  },
  {
    "path": "lib/log.bash",
    "content": "# shellcheck shell=bash\n#\n# A collection of logging functions.\n\n# Declare log severity levels, matching syslog numbering\n: \"${BASH_IT_LOG_LEVEL_FATAL:=1}\"\n: \"${BASH_IT_LOG_LEVEL_ERROR:=3}\"\n: \"${BASH_IT_LOG_LEVEL_WARNING:=4}\"\n: \"${BASH_IT_LOG_LEVEL_ALL:=6}\"\n: \"${BASH_IT_LOG_LEVEL_INFO:=6}\"\n: \"${BASH_IT_LOG_LEVEL_TRACE:=7}\"\nreadonly \"${!BASH_IT_LOG_LEVEL_@}\"\n\nfunction _bash-it-log-prefix-by-path() {\n\tlocal component_path=\"${1?${FUNCNAME[0]}: path specification required}\"\n\tlocal without_extension component_directory\n\tlocal component_filename component_type component_name\n\n\t# get the directory, if any\n\tcomponent_directory=\"${component_path%/*}\"\n\t# drop the directory, if any\n\tcomponent_filename=\"${component_path##*/}\"\n\t# strip the file extension\n\twithout_extension=\"${component_filename%.bash}\"\n\t# strip before the last dot\n\tcomponent_type=\"${without_extension##*.}\"\n\t# strip component type, but try not to strip other words\n\t# - aliases, completions, plugins, themes\n\tcomponent_name=\"${without_extension%.[acpt][hlo][eimu]*[ens]}\"\n\t# Finally, strip load priority prefix\n\tcomponent_name=\"${component_name##[[:digit:]][[:digit:]][[:digit:]]\"${BASH_IT_LOAD_PRIORITY_SEPARATOR:----}\"}\"\n\n\t# best-guess for files without a type\n\tif [[ \"${component_type:-${component_name}}\" == \"${component_name}\" ]]; then\n\t\tif [[ \"${component_directory}\" == *'vendor'* ]]; then\n\t\t\tcomponent_type='vendor'\n\t\telse\n\t\t\tcomponent_type=\"${component_directory##*/}\"\n\t\tfi\n\tfi\n\n\t# shellcheck disable=SC2034\n\tBASH_IT_LOG_PREFIX=\"${component_type:-lib}: $component_name\"\n}\n\nfunction _has_colors() {\n\t# Check that stdout is a terminal, and that it has at least 8 colors.\n\t[[ -t 1 && \"${CLICOLOR:=$(tput colors 2> /dev/null)}\" -ge 8 ]]\n}\n\nfunction _bash-it-log-message() {\n\t: _about 'Internal function used for logging, uses BASH_IT_LOG_PREFIX as a prefix'\n\t: _param '1: color of the message'\n\t: _param '2: log level to print before the prefix'\n\t: _param '3: message to log'\n\t: _group 'log'\n\n\tlocal prefix=\"${BASH_IT_LOG_PREFIX:-default}\"\n\tlocal color=\"${1-${echo_cyan:-}}\"\n\tlocal level=\"${2:-TRACE}\"\n\tlocal message=\"${level%: }: ${prefix%: }: ${3?}\"\n\tif _has_colors; then\n\t\tprintf '%b%s%b\\n' \"${color}\" \"${message}\" \"${echo_normal:-}\"\n\telse\n\t\tprintf '%s\\n' \"${message}\"\n\tfi\n}\n\nfunction _log_debug() {\n\t: _about 'log a debug message by echoing to the screen. needs BASH_IT_LOG_LEVEL >= BASH_IT_LOG_LEVEL_INFO'\n\t: _param '1: message to log'\n\t: _example '$ _log_debug \"Loading plugin git...\"'\n\t: _group 'log'\n\n\tif [[ \"${BASH_IT_LOG_LEVEL:-0}\" -ge \"${BASH_IT_LOG_LEVEL_INFO?}\" ]]; then\n\t\t_bash-it-log-message \"${echo_green:-}\" \"DEBUG: \" \"$1\"\n\tfi\n}\n\nfunction _log_warning() {\n\t: _about 'log a message by echoing to the screen. needs BASH_IT_LOG_LEVEL >= BASH_IT_LOG_LEVEL_WARNING'\n\t: _param '1: message to log'\n\t: _example '$ _log_warning \"git binary not found, disabling git plugin...\"'\n\t: _group 'log'\n\n\tif [[ \"${BASH_IT_LOG_LEVEL:-0}\" -ge \"${BASH_IT_LOG_LEVEL_WARNING?}\" ]]; then\n\t\t_bash-it-log-message \"${echo_yellow:-}\" \" WARN: \" \"$1\"\n\tfi\n}\n\nfunction _log_error() {\n\t: _about 'log a message by echoing to the screen. needs BASH_IT_LOG_LEVEL >= BASH_IT_LOG_LEVEL_ERROR'\n\t: _param '1: message to log'\n\t: _example '$ _log_error \"Failed to load git plugin...\"'\n\t: _group 'log'\n\n\tif [[ \"${BASH_IT_LOG_LEVEL:-0}\" -ge \"${BASH_IT_LOG_LEVEL_ERROR?}\" ]]; then\n\t\t_bash-it-log-message \"${echo_red:-}\" \"ERROR: \" \"$1\"\n\tfi\n}\n"
  },
  {
    "path": "lib/preexec.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034\n#\n# Load the `bash-preexec.sh` library, and define helper functions\n\n## Prepare, load, fix, and install `bash-preexec.sh`\n\n# Disable `$PROMPT_COMMAND` modification for now.\n__bp_delay_install=\"delayed\"\n\n# shellcheck source-path=SCRIPTDIR/../vendor/github.com/rcaloras/bash-preexec\nsource \"${BASH_IT?}/vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\"\n\n# Block damanaging user's `$HISTCONTROL`\nfunction __bp_adjust_histcontrol() { :; }\n\n# Don't fail on readonly variables\nfunction __bp_require_not_readonly() { :; }\n\n# For performance, testing, and to avoid unexpected behavior: disable DEBUG traps in subshells.\n# See bash-it/bash-it#1040 and rcaloras/bash-preexec#26\n: \"${__bp_enable_subshells:=}\" # blank\n\n# Modify `$PROMPT_COMMAND` in finalize hook\n_bash_it_library_finalize_hook+=('__bp_install_after_session_init')\n\n## Helper functions\nfunction __check_precmd_conflict() {\n\tlocal f\n\t__bp_trim_whitespace f \"${1?}\"\n\t_bash-it-array-contains-element \"${f}\" \"${precmd_functions[@]}\"\n}\n\nfunction __check_preexec_conflict() {\n\tlocal f\n\t__bp_trim_whitespace f \"${1?}\"\n\t_bash-it-array-contains-element \"${f}\" \"${preexec_functions[@]}\"\n}\n\nfunction safe_append_prompt_command() {\n\tlocal prompt_re prompt_er f\n\n\tif [[ \"${bash_preexec_imported:-${__bp_imported:-missing}}\" == \"defined\" ]]; then\n\t\t# We are using bash-preexec\n\t\t__bp_trim_whitespace f \"${1?}\"\n\t\tif ! __check_precmd_conflict \"${f}\"; then\n\t\t\tprecmd_functions+=(\"${f}\")\n\t\tfi\n\telse\n\t\t# Match on word-boundaries\n\t\tprompt_re='(^|[^[:alnum:]_])'\n\t\tprompt_er='([^[:alnum:]_]|$)'\n\t\tif [[ ${PROMPT_COMMAND} =~ ${prompt_re}\"${1}\"${prompt_er} ]]; then\n\t\t\treturn\n\t\telif [[ -z ${PROMPT_COMMAND} ]]; then\n\t\t\tPROMPT_COMMAND=\"${1}\"\n\t\telse\n\t\t\tPROMPT_COMMAND=\"${1};${PROMPT_COMMAND}\"\n\t\tfi\n\tfi\n}\n\nfunction safe_append_preexec() {\n\tlocal prompt_re f\n\n\tif [[ \"${bash_preexec_imported:-${__bp_imported:-missing}}\" == \"defined\" ]]; then\n\t\t# We are using bash-preexec\n\t\t__bp_trim_whitespace f \"${1?}\"\n\t\tif ! __check_preexec_conflict \"${f}\"; then\n\t\t\tpreexec_functions+=(\"${f}\")\n\t\tfi\n\telse\n\t\t_log_error \"${FUNCNAME[0]}: can't append to preexec hook because _bash-preexec.sh_ hasn't been loaded\"\n\tfi\n}\n"
  },
  {
    "path": "lib/preview.bash",
    "content": "# shellcheck shell=bash\n#\n# Displays the prompt from each _Bash It_ theme.\n\nfunction _bash-it-preview() {\n\tlocal BASH_IT_THEME BASH_IT_LOG_LEVEL\n\tlocal themes IFS=$'\\n' cur\n\n\tif [[ $# -gt '0' ]]; then\n\t\tthemes=(\"$@\")\n\telse\n\t\tthemes=(\"${BASH_IT?}/themes\"/*/*.theme.bash)\n\t\tthemes=(\"${themes[@]##*/}\")\n\t\tthemes=(\"${themes[@]%.theme.bash}\")\n\tfi\n\n\tif [[ ${COMP_CWORD:-} -gt '0' ]]; then\n\t\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\t\tread -d '' -ra COMPREPLY < <(compgen -W \"all${IFS}${themes[*]}\" -- \"${cur}\")\n\t\treturn\n\tfi\n\tprintf '\\n\\n\\t%s\\n\\n' \"Previewing Bash-it Themes\"\n\n\t# shellcheck disable=SC2034\n\tfor BASH_IT_THEME in \"${themes[@]}\"; do\n\t\tBASH_IT_LOG_LEVEL=0\n\t\tbash --init-file \"${BASH_IT?}/bash_it.sh\" -i <<< '_bash-it-flash-term \"${#BASH_IT_THEME}\" \"${BASH_IT_THEME}\"'\n\tdone\n}\n\nif [[ -n \"${BASH_PREVIEW:-}\" ]]; then\n\t_bash-it-preview \"${BASH_PREVIEW}\" \"$@\"\n\tunset BASH_PREVIEW #Prevent infinite looping\nfi\n"
  },
  {
    "path": "lib/search.bash",
    "content": "# shellcheck shell=bash\n#\n# Search by Konstantin Gredeskoul «github.com/kigster»\n#———————————————————————————————————————————————————————————————————————————————\n# This function returns list of aliases, plugins and completions in bash-it,\n# whose name or description matches one of the search terms provided as arguments.\n#\n# Usage:\n#    ❯ bash-it search [-|@]term1 [-|@]term2 ... \\\n#       [ --enable   | -e ] \\\n#       [ --disable  | -d ] \\\n#       [ --no-color | -c ] \\\n#       [ --refresh  | -r ] \\\n#       [ --help     | -h ]\n#\n#    Single dash, as in \"-chruby\", indicates a negative search term.\n#    Double dash indicates a command that is to be applied to the search result.\n#    At the moment only --help, --enable and --disable are supported.\n#    An '@' sign indicates an exact (not partial) match.\n#\n# Examples:\n#    ❯ bash-it search ruby rbenv rvm gem rake\n#          aliases:  bundler\n#          plugins:  chruby chruby-auto ruby rbenv rvm ruby\n#      completions:  rvm gem rake\n#\n#    ❯ bash-it search ruby rbenv rvm gem rake -chruby\n#          aliases:  bundler\n#          plugins:  ruby rbenv rvm ruby\n#      completions:  rvm gem rake\n#\n# Examples of enabling or disabling results of the search:\n#\n#    ❯ bash-it search ruby\n#          aliases:  bundler\n#          plugins:  chruby chruby-auto ruby\n#\n#    ❯ bash-it search ruby -chruby --enable\n#          aliases:  bundler\n#          plugins:  ruby\n#\n# Examples of using exact match:\n\n#    ❯ bash-it search @git @ruby\n#          aliases:  git\n#          plugins:  git ruby\n#      completions:  git\n#\n\nfunction _bash-it-search() {\n\t_about 'searches for given terms amongst bash-it plugins, aliases and completions'\n\t_param '1: term1'\n\t_param '2: [ term2 ]...'\n\t_example '$ _bash-it-search @git ruby -rvm rake bundler'\n\n\tlocal component\n\tlocal BASH_IT_SEARCH_USE_COLOR=\"${BASH_IT_SEARCH_USE_COLOR:=true}\"\n\tlocal -a BASH_IT_COMPONENTS=('aliases' 'plugins' 'completions')\n\n\tif [[ $# -eq 0 ]]; then\n\t\t_bash-it-search-help\n\t\treturn 0\n\tfi\n\n\tlocal -a args=()\n\tfor word in \"$@\"; do\n\t\tcase \"${word}\" in\n\t\t\t'-h' | '--help')\n\t\t\t\t_bash-it-search-help\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\t\t'-r' | '--refresh')\n\t\t\t\t_bash-it-component-cache-clean\n\t\t\t\t;;\n\t\t\t'-c' | '--no-color')\n\t\t\t\tBASH_IT_SEARCH_USE_COLOR=false\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\targs+=(\"${word}\")\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tif [[ ${#args} -gt 0 ]]; then\n\t\tfor component in \"${BASH_IT_COMPONENTS[@]}\"; do\n\t\t\t_bash-it-search-component \"${component}\" \"${args[@]}\"\n\t\tdone\n\tfi\n\n\treturn 0\n}\n\nfunction _bash-it-search-help() {\n\tprintf '%b' \"${echo_normal-}\n${echo_underline_yellow-}USAGE${echo_normal-}\n\n   bash-it search [-|@]term1 [-|@]term2 ... \\\\\n     [ --enable   | -e ] \\\\\n     [ --disable  | -d ] \\\\\n     [ --no-color | -c ] \\\\\n     [ --refresh  | -r ] \\\\\n     [ --help     | -h ]\n\n${echo_underline_yellow-}DESCRIPTION${echo_normal-}\n\n   Use ${echo_bold_green-}search${echo_normal-} bash-it command to search for a list of terms or term negations\n   across all components: aliases, completions and plugins. Components that are\n   enabled are shown in green (or with a check box if --no-color option is used).\n\n   In addition to simply finding the right component, you can use the results\n   of the search to enable or disable all components that the search returns.\n\n   When search is used to enable/disable components it becomes clear that\n   you must be able to perform not just a partial match, but an exact match,\n   as well as be able to exclude some components.\n\n      * To exclude a component (or all components matching a substring) use\n        a search term with minus as a prefix, eg '-flow'\n\n      * To perform an exact match, use character '@' in front of the term,\n        eg. '@git' would only match aliases, plugins and completions named 'git'.\n\n${echo_underline_yellow-}FLAGS${echo_normal-}\n   --enable   | -e    ${echo_purple-}Enable all matching componenents.${echo_normal-}\n   --disable  | -d    ${echo_purple-}Disable all matching componenents.${echo_normal-}\n   --help     | -h    ${echo_purple-}Print this help.${echo_normal-}\n   --refresh  | -r    ${echo_purple-}Force a refresh of the search cache.${echo_normal-}\n   --no-color | -c    ${echo_purple-}Disable color output and use monochrome text.${echo_normal-}\n\n${echo_underline_yellow-}EXAMPLES${echo_normal-}\n\n   For example, ${echo_bold_green-}bash-it search git${echo_normal-} would match any alias, completion\n   or plugin that has the word 'git' in either the module name or\n   it's description. You should see something like this when you run this\n   command:\n\n         ${echo_bold_green-}❯ bash-it search git${echo_bold_blue-}\n               ${echo_bold_yellow-}aliases:  ${echo_bold_green-}git ${echo_normal-}gitsvn\n               ${echo_bold_yellow-}plugins:  ${echo_normal-}autojump ${echo_bold_green-}git ${echo_normal-}git-subrepo jgitflow jump\n           ${echo_bold_yellow-}completions:  ${echo_bold_green-}git ${echo_normal-}git_flow git_flow_avh${echo_normal-}\n\n   You can exclude some terms by prefixing a term with a minus, eg:\n\n         ${echo_bold_green-}❯ bash-it search git -flow -svn${echo_bold_blue-}\n               ${echo_bold_yellow-}aliases:  ${echo_normal-}git\n               ${echo_bold_yellow-}plugins:  ${echo_normal-}autojump git git-subrepo jump\n           ${echo_bold_yellow-}completions:  ${echo_normal-}git${echo_normal-}\n\n   Finally, if you prefix a term with '@' symbol, that indicates an exact\n   match. Note, that we also pass the '--enable' flag, which would ensure\n   that all matches are automatically enabled. The example is below:\n\n         ${echo_bold_green-}❯ bash-it search @git --enable${echo_bold_blue-}\n               ${echo_bold_yellow-}aliases:  ${echo_normal-}git\n               ${echo_bold_yellow-}plugins:  ${echo_normal-}git\n           ${echo_bold_yellow-}completions:  ${echo_normal-}git${echo_normal-}\n\n${echo_underline_yellow-}SUMMARY${echo_normal-}\n\n   Take advantage of the search functionality to discover what Bash-It can do\n   for you. Try searching for partial term matches, mix and match with the\n   negative terms, or specify an exact matches of any number of terms. Once\n   you created the search command that returns ONLY the modules you need,\n   simply append '--enable' or '--disable' at the end to activate/deactivate\n   each module.\n\n\"\n}\n\nfunction _bash-it-is-partial-match() {\n\tlocal component=\"${1?${FUNCNAME[0]}: component type must be specified}\"\n\tlocal term=\"${2:-}\"\n\t_bash-it-component-help \"${component}\" | _bash-it-egrep -i -q -- \"${term}\"\n}\n\nfunction _bash-it-component-term-matches-negation() {\n\tlocal match=\"$1\"\n\tshift\n\tlocal negative\n\tfor negative in \"$@\"; do\n\t\t[[ \"${match}\" =~ ${negative} ]] && return 0\n\tdone\n\n\treturn 1\n}\n\nfunction _bash-it-search-component() {\n\t_about 'searches for given terms amongst a given component'\n\t_param '1: component type, one of: [ aliases | plugins | completions ]'\n\t_param '2: term1 term2 @term3'\n\t_param '3: [-]term4 [-]term5 ...'\n\t_example '$ _bash-it-search-component aliases @git rake bundler -chruby'\n\n\tlocal component=\"${1?${FUNCNAME[0]}: component type must be specified}\"\n\tshift\n\n\t# if one of the search terms is --enable or --disable, we will apply\n\t# this action to the matches further  ` down.\n\tlocal component_singular action action_func\n\tlocal -a search_commands=('enable' 'disable')\n\tfor search_command in \"${search_commands[@]}\"; do\n\t\tif _bash-it-array-contains-element \"--${search_command}\" \"$@\"; then\n\t\t\tcomponent_singular=\"${component/es/}\"           # aliases -> alias\n\t\t\tcomponent_singular=\"${component_singular/ns/n}\" # plugins -> plugin\n\n\t\t\taction=\"${search_command}\"\n\t\t\taction_func=\"_${action}-${component_singular}\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\tlocal -a terms=(\"$@\") # passed on the command line\n\n\tlocal -a exact_terms=()    # terms that should be included only if they match exactly\n\tlocal -a partial_terms=()  # terms that should be included if they match partially\n\tlocal -a negative_terms=() # negated partial terms that should be excluded\n\n\tlocal term line\n\n\tlocal -a component_list=()\n\twhile IFS='' read -r line; do\n\t\tcomponent_list+=(\"$line\")\n\tdone < <(_bash-it-component-list \"${component}\")\n\n\tfor term in \"${terms[@]}\"; do\n\t\tlocal search_term=\"${term:1}\"\n\t\tif [[ \"${term:0:2}\" == \"--\" ]]; then\n\t\t\tcontinue\n\t\telif [[ \"${term:0:1}\" == \"-\" ]]; then\n\t\t\tnegative_terms+=(\"${search_term}\")\n\t\telif [[ \"${term:0:1}\" == \"@\" ]]; then\n\t\t\tif _bash-it-array-contains-element \"${search_term}\" \"${component_list[@]:-}\"; then\n\t\t\t\texact_terms+=(\"${search_term}\")\n\t\t\tfi\n\t\telse\n\t\t\twhile IFS='' read -r line; do\n\t\t\t\tpartial_terms+=(\"$line\")\n\t\t\tdone < <(_bash-it-component-list-matching \"${component}\" \"${term}\")\n\n\t\tfi\n\tdone\n\n\tlocal -a total_matches=()\n\twhile IFS='' read -r line; do\n\t\ttotal_matches+=(\"$line\")\n\tdone < <(_bash-it-array-dedup \"${exact_terms[@]:-}\" \"${partial_terms[@]:-}\")\n\n\tlocal -a matches=()\n\tfor match in \"${total_matches[@]}\"; do\n\t\tlocal -i include_match=1\n\t\tif [[ ${#negative_terms[@]} -gt 0 ]]; then\n\t\t\t_bash-it-component-term-matches-negation \"${match}\" \"${negative_terms[@]:-}\" && include_match=0\n\t\tfi\n\t\t((include_match)) && matches+=(\"${match}\")\n\tdone\n\n\t_bash-it-search-result \"${component}\" \"${action:-}\" \"${action_func:-}\" \"${matches[@]:-}\"\n}\n\nfunction _bash-it-search-result() {\n\tlocal component=\"${1?${FUNCNAME[0]}: component type must be specified}\"\n\tshift\n\tlocal action=\"${1:-}\"\n\tshift\n\tlocal action_func=\"${1:-}\"\n\tshift\n\n\tlocal color_component color_enable color_disable color_off\n\tlocal match_color compatible_action suffix opposite_suffix\n\tlocal color_sep=':' line match matched temp\n\tlocal -i modified=0 enabled=0 len\n\tlocal -a matches=()\n\n\t# Discard any empty arguments\n\twhile IFS='' read -r line; do\n\t\t[[ -n \"${line}\" ]] && matches+=(\"$line\")\n\tdone < <(_bash-it-array-dedup \"${@}\")\n\n\tif [[ \"${BASH_IT_SEARCH_USE_COLOR}\" == \"true\" ]]; then\n\t\tcolor_component='\\e[1;34m'\n\t\tcolor_enable='\\e[1;32m'\n\t\tsuffix_enable=''\n\t\tsuffix_disable=''\n\t\tcolor_disable='\\e[0;0m'\n\t\tcolor_off='\\e[0;0m'\n\telse\n\t\tcolor_component=''\n\t\tsuffix_enable=' ✓ ︎'\n\t\tsuffix_disable='  '\n\t\tcolor_enable=''\n\t\tcolor_disable=''\n\t\tcolor_off=''\n\tfi\n\n\tif [[ \"${#matches[@]}\" -gt 0 ]]; then\n\t\tprintf \"${color_component}%13s${color_sep}${color_off} \" \"${component}\"\n\n\t\tfor match in \"${matches[@]}\"; do\n\t\t\tenabled=0\n\t\t\t_bash-it-component-item-is-enabled \"${component}\" \"${match}\" && enabled=1\n\n\t\t\tif ((enabled)); then\n\t\t\t\tmatch_color=\"${color_enable}\"\n\t\t\t\tsuffix=\"${suffix_enable}\"\n\t\t\t\topposite_suffix=\"${suffix_disable}\"\n\t\t\t\tcompatible_action=\"disable\"\n\t\t\telse\n\t\t\t\tmatch_color=\"${color_disable}\"\n\t\t\t\tsuffix=\"${suffix_disable}\"\n\t\t\t\topposite_suffix=\"${suffix_enable}\"\n\t\t\t\tcompatible_action=\"enable\"\n\t\t\tfi\n\n\t\t\tmatched=\"${match}${suffix}\"\n\t\t\tlen=\"${#matched}\"\n\n\t\t\tprintf '%b' \"${match_color}${matched}\" # print current state\n\t\t\tif [[ \"${action}\" == \"${compatible_action}\" ]]; then\n\t\t\t\tif [[ \"${action}\" == \"enable\" && \"${BASH_IT_SEARCH_USE_COLOR}\" == \"true\" ]]; then\n\t\t\t\t\t_bash-it-flash-term \"${len}\" \"${matched}\"\n\t\t\t\telse\n\t\t\t\t\t_bash-it-erase-term \"${len}\" \"${matched}\"\n\t\t\t\tfi\n\t\t\t\tmodified=1\n\t\t\t\t# shellcheck disable=SC2034 # no idea if `$result` is ever used\n\t\t\t\tresult=$(\"${action_func}\" \"${match}\")\n\t\t\t\ttemp=\"color_${compatible_action}\"\n\t\t\t\tmatch_color=\"${!temp}\"\n\t\t\t\t_bash-it-rewind \"${len}\"\n\t\t\t\tprintf '%b' \"${match_color}${match}${opposite_suffix}\"\n\t\t\tfi\n\n\t\t\tprintf '%b' \"${color_off} \"\n\t\tdone\n\n\t\t((modified)) && _bash-it-component-cache-clean \"${component}\"\n\t\tprintf \"\\n\"\n\tfi\n}\n\nfunction _bash-it-rewind() {\n\tlocal -i len=\"${1:-0}\"\n\tprintf '%b' \"\\033[${len}D\"\n}\n\nfunction _bash-it-flash-term() {\n\tlocal -i len=\"${1:-0}\" # redundant\n\tlocal term=\"${2:-}\"\n\t# as currently implemented, `$match` has already been printed to screen the first time\n\tlocal delay=0.2\n\tlocal color\n\t[[ \"${#term}\" -gt 0 ]] && len=\"${#term}\"\n\n\tfor color in \"${echo_black-}\" \"${echo_bold_blue-}\" \"${echo_bold_yellow-}\" \"${echo_bold_red-}\" \"${echo_bold_green-}\" \"${echo_normal-}\"; do\n\t\tsleep \"${delay}\"\n\t\t_bash-it-rewind \"${len}\"\n\t\tprintf '%b' \"${color}${term}\"\n\tdone\n}\n\nfunction _bash-it-erase-term() {\n\tlocal -i len=\"${1:-0}\" i\n\tlocal delay=0.05\n\tlocal term=\"${2:-}\" # calculate length ourselves\n\t[[ \"${#term}\" -gt 0 ]] && len=\"${#term}\"\n\n\t_bash-it-rewind \"${len}\"\n\t# white-out the already-printed term by printing blanks\n\tfor ((i = 0; i <= len; i++)); do\n\t\tprintf \"%.*s\" \"$i\" \" \"\n\t\tsleep \"${delay}\"\n\tdone\n}\n"
  },
  {
    "path": "lib/utilities.bash",
    "content": "# shellcheck shell=bash\n#\n# A collection of reusable functions.\n\n###########################################################################\n# Generic utilies\n###########################################################################\n\nfunction _bash-it-get-component-name-from-path() {\n\tlocal filename\n\t# filename without path\n\tfilename=\"${1##*/}\"\n\t# filename without path or priority\n\tfilename=\"${filename##*\"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}\"}\"\n\t# filename without path, priority or extension\n\techo \"${filename%.*.bash}\"\n}\n\nfunction _bash-it-get-component-type-from-path() {\n\tlocal filename\n\t# filename without path\n\tfilename=\"${1##*/}\"\n\t# filename without extension\n\tfilename=\"${filename%.bash}\"\n\t# extension without priority or name\n\tfilename=\"${filename##*.}\"\n\techo \"${filename}\"\n}\n\n# This function searches an array for an exact match against the term passed\n# as the first argument to the function. This function exits as soon as\n# a match is found.\n#\n# Returns:\n#   0 when a match is found, otherwise 1.\n#\n# Examples:\n#   $ declare -a fruits=(apple orange pear mandarin)\n#\n#   $ _bash-it-array-contains-element apple \"@{fruits[@]}\" && echo 'contains apple'\n#   contains apple\n#\n#   $ if _bash-it-array-contains-element pear \"${fruits[@]}\"; then\n#       echo \"contains pear!\"\n#     fi\n#   contains pear!\n#\n#\nfunction _bash-it-array-contains-element() {\n\tlocal e element=\"${1?}\"\n\tshift\n\tfor e in \"$@\"; do\n\t\t[[ \"$e\" == \"${element}\" ]] && return 0\n\tdone\n\treturn 1\n}\n\n# Dedupe an array (without embedded newlines).\nfunction _bash-it-array-dedup() {\n\tprintf '%s\\n' \"$@\" | sort -u\n}\n\n# Runs `grep` with *just* the provided arguments\nfunction _bash-it-grep() {\n\t: \"${BASH_IT_GREP:=$(type -P grep)}\"\n\t\"${BASH_IT_GREP:-/usr/bin/grep}\" \"$@\"\n}\n\n# Runs `grep` with fixed-string expressions (-F)\nfunction _bash-it-fgrep() {\n\t: \"${BASH_IT_GREP:=$(type -P grep)}\"\n\t\"${BASH_IT_GREP:-/usr/bin/grep}\" -F \"$@\"\n}\n\n# Runs `grep` with extended regular expressions (-E)\nfunction _bash-it-egrep() {\n\t: \"${BASH_IT_GREP:=$(type -P grep)}\"\n\t\"${BASH_IT_GREP:-/usr/bin/grep}\" -E \"$@\"\n}\n\nfunction _command_exists() {\n\t: _about 'checks for existence of a command'\n\t: _param '1: command to check'\n\t: _example '$ _command_exists ls && echo exists'\n\t: _group 'lib'\n\n\ttype -t \"${1?}\" > /dev/null\n}\n\nfunction _binary_exists() {\n\t: _about 'checks for existence of a binary'\n\t: _param '1: binary to check'\n\t: _example '$ _binary_exists ls && echo exists'\n\t: _group 'lib'\n\n\ttype -P \"${1?}\" > /dev/null\n}\n\nfunction _completion_exists() {\n\t: _about 'checks for existence of a completion'\n\t: _param '1: command to check'\n\t: _example '$ _completion_exists gh && echo exists'\n\t: _group 'lib'\n\n\tcomplete -p \"${1?}\" &> /dev/null\n}\n\nfunction _is_function() {\n\t: _about 'sets $? to true if parameter is the name of a function'\n\t: _param '1: name of alleged function'\n\t: _example '$ _is_function ls && echo exists'\n\t: _group 'lib'\n\n\tdeclare -F \"${1?}\" > /dev/null\n}\n\n###########################################################################\n# Component-specific functions (component is either an alias, a plugin, or a\n# completion).\n###########################################################################\n\nfunction _bash-it-component-help() {\n\tlocal component file func\n\t_bash-it-component-pluralize \"${1}\" component\n\t_bash-it-component-cache-file \"${component}\" file\n\tif [[ ! -s \"${file?}\" || -z \"$(find \"${file}\" -mmin -300)\" ]]; then\n\t\tfunc=\"_bash-it-${component?}\"\n\t\t\"${func}\" | _bash-it-egrep '\\[[x ]\\]' >| \"${file}\"\n\tfi\n\tcat \"${file}\"\n}\n\nfunction _bash-it-component-cache-file() {\n\tlocal _component_to_cache _file_path _result=\"${2:-${FUNCNAME[0]//-/_}}\"\n\t_bash-it-component-pluralize \"${1?${FUNCNAME[0]}: component name required}\" _component_to_cache\n\t_file_path=\"${XDG_CACHE_HOME:-${HOME?}/.cache}/bash/${_component_to_cache?}\"\n\t[[ -f \"${_file_path}\" ]] || mkdir -p \"${_file_path%/*}\"\n\tprintf -v \"${_result?}\" '%s' \"${_file_path}\"\n}\n\nfunction _bash-it-component-singularize() {\n\tlocal _result=\"${2:-${FUNCNAME[0]//-/_}}\"\n\tlocal _component_to_single=\"${1?${FUNCNAME[0]}: component name required}\"\n\tlocal -i len=\"$((${#_component_to_single} - 2))\"\n\tif [[ \"${_component_to_single:${len}:2}\" == 'ns' ]]; then\n\t\t_component_to_single=\"${_component_to_single%s}\"\n\telif [[ \"${_component_to_single}\" == \"aliases\" ]]; then\n\t\t_component_to_single=\"${_component_to_single%es}\"\n\tfi\n\tprintf -v \"${_result?}\" '%s' \"${_component_to_single}\"\n}\n\nfunction _bash-it-component-pluralize() {\n\tlocal _result=\"${2:-${FUNCNAME[0]//-/_}}\"\n\tlocal _component_to_plural=\"${1?${FUNCNAME[0]}: component name required}\"\n\tlocal -i len=\"$((${#_component_to_plural} - 1))\"\n\t# pluralize component name for consistency\n\tif [[ \"${_component_to_plural:${len}:1}\" != 's' ]]; then\n\t\t_component_to_plural=\"${_component_to_plural}s\"\n\telif [[ \"${_component_to_plural}\" == \"alias\" ]]; then\n\t\t_component_to_plural=\"${_component_to_plural}es\"\n\tfi\n\tprintf -v \"${_result?}\" '%s' \"${_component_to_plural}\"\n}\n\nfunction _bash-it-component-cache-clean() {\n\tlocal component=\"${1:-}\"\n\tlocal cache\n\tlocal -a components=('aliases' 'plugins' 'completions')\n\tif [[ -z \"${component}\" ]]; then\n\t\tfor component in \"${components[@]}\"; do\n\t\t\t_bash-it-component-cache-clean \"${component}\"\n\t\tdone\n\telse\n\t\t_bash-it-component-cache-file \"${component}\" cache\n\t\t: >| \"${cache:?}\"\n\tfi\n}\n\n# Returns an array of items within each compoenent.\nfunction _bash-it-component-list() {\n\tlocal IFS=$'\\n' component=\"$1\"\n\t_bash-it-component-help \"${component}\" | awk '{print $1}' | sort -u\n}\n\nfunction _bash-it-component-list-matching() {\n\tlocal component=\"$1\"\n\tshift\n\tlocal term=\"$1\"\n\t_bash-it-component-help \"${component}\" | _bash-it-egrep -- \"${term}\" | awk '{print $1}' | sort -u\n}\n\nfunction _bash-it-component-list-enabled() {\n\tlocal IFS=$'\\n' component=\"$1\"\n\t_bash-it-component-help \"${component}\" | _bash-it-fgrep '[x]' | awk '{print $1}' | sort -u\n}\n\nfunction _bash-it-component-list-disabled() {\n\tlocal IFS=$'\\n' component=\"$1\"\n\t_bash-it-component-help \"${component}\" | _bash-it-fgrep -v '[x]' | awk '{print $1}' | sort -u\n}\n\n# Checks if a given item is enabled for a particular component/file-type.\n#\n# Returns:\n#    0 if an item of the component is enabled, 1 otherwise.\n#\n# Examples:\n#    _bash-it-component-item-is-enabled alias git && echo \"git alias is enabled\"\nfunction _bash-it-component-item-is-enabled() {\n\tlocal component_type item_name each_file\n\n\tif [[ -f \"${1?}\" ]]; then\n\t\titem_name=\"$(_bash-it-get-component-name-from-path \"${1}\")\"\n\t\tcomponent_type=\"$(_bash-it-get-component-type-from-path \"${1}\")\"\n\telse\n\t\tcomponent_type=\"${1}\" item_name=\"${2?}\"\n\tfi\n\n\tfor each_file in \"${BASH_IT?}/enabled\"/*\"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}\"*.\"bash\" \\\n\t\t\"${BASH_IT}/${component_type}\"*/\"enabled/${item_name}.${component_type}\"*.\"bash\" \\\n\t\t\"${BASH_IT}/${component_type}\"*/\"enabled\"/*\"${BASH_IT_LOAD_PRIORITY_SEPARATOR?}${item_name}.${component_type}\"*.\"bash\"; do\n\t\tif [[ -f \"${each_file}\" ]]; then\n\t\t\treturn 0\n\t\tfi\n\tdone\n\n\treturn 1\n}\n\n# Checks if a given item is disabled for a particular component/file-type.\n#\n# Returns:\n#    0 if an item of the component is enabled, 1 otherwise.\n#\n# Examples:\n#    _bash-it-component-item-is-disabled alias git && echo \"git aliases are disabled\"\nfunction _bash-it-component-item-is-disabled() {\n\t! _bash-it-component-item-is-enabled \"$@\"\n}\n"
  },
  {
    "path": "lint_clean_files.sh",
    "content": "#!/usr/bin/env bash\n\n# Pull list of checkable files from clean_files.txt\n#  - Folder references are allowed\n#  - Empty lines are ignored\n#  - Comment lines (#) are ignored\n#\n# shellcheck disable=SC2002  # Prefer 'cat' for cleaner script\nFILES=()\nwhile IFS='' read -r line; do FILES+=(\"$line\"); done < <(\n\tcat clean_files.txt \\\n\t\t| grep -E -v '^\\s*$' \\\n\t\t| grep -E -v '^\\s*#' \\\n\t\t| xargs -I{} find \"{}\" -type f\n)\n\n# We clear the BASH_IT variable to help the shellcheck checker\n# identify source includes within our scripts that require a\n# 'source' directive.  For more information, see:\n#\n#    \"Shellcheck SC1090 - Can't follow non-constant source\"\n#     https://www.shellcheck.net/wiki/SC1090\n#\nBASH_IT='' pre-commit run --files \"${FILES[@]}\"\n"
  },
  {
    "path": "plugins/available/alias-completion.plugin.bash",
    "content": "# shellcheck shell=bash\n\ncite \"about-plugin\"\nabout-plugin \"Compatibility stub - redirects to aliases completion (DEPRECATED)\"\ngroup \"bash-it\"\nurl \"https://github.com/Bash-it/bash-it\"\n\n# stub for renamed file\n\n_enable-completion aliases && _disable-plugin alias-completion\n# shellcheck disable=SC1091\nsource \"${BASH_IT?}/completion/available/aliases.completion.bash\"\n"
  },
  {
    "path": "plugins/available/autojump.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Autojump configuration, see https://github.com/wting/autojump for more details'\nurl \"https://github.com/wting/autojump\"\n\n# Only supports the Homebrew variant, Debian and Arch at the moment.\n# Feel free to provide a PR to support other install locations\n# shellcheck disable=SC1090\nif _bash_it_homebrew_check && [[ -s \"${BASH_IT_HOMEBREW_PREFIX}/etc/profile.d/autojump.sh\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"${BASH_IT_HOMEBREW_PREFIX}/etc/profile.d/autojump.sh\"\nelif _command_exists dpkg && dpkg -s autojump &> /dev/null; then\n\tsource \"$(dpkg-query -S autojump.sh | cut -d' ' -f2)\"\nelif _command_exists pacman && pacman -Q autojump &> /dev/null; then\n\tsource \"$(pacman -Ql autojump | grep autojump.sh | cut -d' ' -f2)\"\nfi\n"
  },
  {
    "path": "plugins/available/aws.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'AWS helper functions'\nurl \"https://aws.amazon.com/\"\n\nAWS_CONFIG_FILE=\"${AWS_CONFIG_FILE:-$HOME/.aws/config}\"\nAWS_SHARED_CREDENTIALS_FILE=\"${AWS_SHARED_CREDENTIALS_FILE:-$HOME/.aws/credentials}\"\n\nfunction awskeys {\n\tabout 'helper function for AWS credentials file'\n\tgroup 'aws'\n\n\tif [[ ! -f \"${AWS_SHARED_CREDENTIALS_FILE}\" ]]; then\n\t\techo \"AWS credentials file not found\"\n\t\treturn 1\n\tfi\n\n\tif [[ $# -eq 1 ]] && [[ \"$1\" = \"list\" ]]; then\n\t\t__awskeys_list \"$2\"\n\telif [[ $# -eq 1 ]] && [[ \"$1\" = \"unset\" ]]; then\n\t\t__awskeys_unset \"$2\"\n\telif [[ $# -eq 2 ]] && [[ \"$1\" = \"show\" ]]; then\n\t\t__awskeys_show \"$2\"\n\telif [[ $# -eq 2 ]] && [[ \"$1\" = \"export\" ]]; then\n\t\t__awskeys_export \"$2\"\n\telse\n\t\t__awskeys_help\n\tfi\n}\n\nfunction __awskeys_help {\n\techo -e \"Usage: awskeys [COMMAND] [profile]\\n\"\n\techo -e \"Helper to AWS credentials file.\\n\"\n\techo -e \"Commands:\\n\"\n\techo \"   help    Show this help message\"\n\techo \"   list    List available AWS credentials profiles\"\n\techo \"   show    Show the AWS keys associated to a credentials profile\"\n\techo \"   export  Export an AWS credentials profile keys as environment variables\"\n\techo \"   unset   Unset the AWS keys variables from the environment\"\n}\n\nfunction __awskeys_get {\n\tlocal ln\n\tln=\"$(grep -n \"\\[ *$1 *\\]\" \"${AWS_SHARED_CREDENTIALS_FILE}\" | cut -d \":\" -f 1)\"\n\tif [[ -n \"${ln}\" ]]; then\n\t\ttail -n +\"${ln}\" \"${AWS_SHARED_CREDENTIALS_FILE}\" | grep -F -m 2 -e \"aws_access_key_id\" -e \"aws_secret_access_key\"\n\t\ttail -n +\"${ln}\" \"${AWS_SHARED_CREDENTIALS_FILE}\" | grep -F -m 1 \"aws_session_token\"\n\tfi\n}\n\nfunction __awskeys_list {\n\tlocal credentials_list\n\tcredentials_list=\"$(\n\t\tgrep -E '^\\[ *[a-zA-Z0-9_-]+ *\\]$' \"${AWS_SHARED_CREDENTIALS_FILE}\"\n\t\tgrep \"\\[profile\" \"${AWS_CONFIG_FILE}\" | sed \"s|\\[profile |\\[|g\" | sort -u\n\t)\"\n\tif [[ -n \"${credentials_list}\" ]]; then\n\t\techo -e \"Available credentials profiles:\\n\"\n\t\tfor profile in ${credentials_list}; do\n\t\t\techo \"    $(echo \"${profile}\" | tr -d \"[]\")\"\n\t\tdone\n\t\techo\n\telse\n\t\techo \"No profiles found in credentials file\"\n\tfi\n}\n\nfunction __awskeys_show {\n\tlocal p_keys\n\tIFS=\" \" read -r -a p_keys <<< \"$(__awskeys_get \"$1\")\"\n\tif [[ -n \"${p_keys[*]}\" ]]; then\n\t\techo \"${p_keys[@]}\"\n\telse\n\t\techo \"Profile $1 not found in credentials file\"\n\tfi\n}\n\nfunction __awskeys_export {\n\tif [[ $(__awskeys_list) == *\"$1\"* ]]; then\n\t\tlocal p_keys\n\t\tIFS=\" \" read -r -a p_keys <<< \"$(__awskeys_get \"$1\" | tr -d \" \")\"\n\t\tif [[ -n \"${p_keys[*]}\" ]]; then\n\t\t\tfor p_key in \"${p_keys[@]}\"; do\n\t\t\t\tlocal key=\"${p_key%=*}\"\n\t\t\t\texport \"$(echo \"${key}\" | tr \"[:lower:]\" \"[:upper:]\")=${p_key#*=}\"\n\t\t\tdone\n\t\tfi\n\t\texport AWS_PROFILE=\"$1\"\n\telse\n\t\techo \"Profile $1 not found in credentials file\"\n\tfi\n}\n\nfunction __awskeys_unset {\n\tunset AWS_PROFILE AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN\n}\n\nfunction __awskeys_comp {\n\tlocal cur prev opts\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tprev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\n\topts=\"help list show export unset\"\n\n\tcase \"${prev}\" in\n\t\thelp | list | unset)\n\t\t\treturn 0\n\t\t\t;;\n\t\tshow | export)\n\t\t\tlocal profile_list\n\t\t\tprofile_list=\"$(__awskeys_list | grep \"    \")\"\n\t\t\tmapfile -t COMPREPLY < <(compgen -W \"${profile_list}\" -- \"${cur}\")\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\tmapfile -t COMPREPLY < <(compgen -W \"${opts}\" -- \"${cur}\")\n\n\treturn 0\n}\n\ncomplete -F __awskeys_comp awskeys\n"
  },
  {
    "path": "plugins/available/base.plugin.bash",
    "content": "# shellcheck shell=bash\n\ncite about-plugin\nabout-plugin 'miscellaneous tools'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction ips() {\n\tabout 'display all ip addresses for this host'\n\tgroup 'base'\n\tif _command_exists ifconfig; then\n\t\tifconfig | awk '/inet /{ gsub(/addr:/, \"\"); print $2 }'\n\telif _command_exists ip; then\n\t\tip addr | grep -oP 'inet \\K[\\d.]+'\n\telse\n\t\techo \"You don't have ifconfig or ip command installed!\"\n\tfi\n}\n\nfunction down4me() {\n\tabout 'checks whether a website is down for you, or everybody'\n\tparam '1: website url or domain'\n\texample '$ down4me http://www.google.com'\n\texample '$ down4me google.com'\n\tgroup 'base'\n\t# Strip protocol (http:// or https://) if present\n\tlocal site=\"${1#http://}\"\n\tsite=\"${site#https://}\"\n\t# Strip trailing slash if present\n\tsite=\"${site%/}\"\n\tcommand curl -Ls \"http://downforeveryoneorjustme.com/${site}\" | command sed '/just you/!d;s/<[^>]*>//g'\n}\n\nfunction myip() {\n\tabout 'displays your ip address, as seen by the Internet'\n\tgroup 'base'\n\tlist=(\"http://myip.dnsomatic.com/\" \"http://checkip.dyndns.com/\" \"http://checkip.dyndns.org/\")\n\tfor url in \"${list[@]}\"; do\n\t\tif res=\"$(curl -fs \"${url}\")\"; then\n\t\t\tbreak\n\t\tfi\n\tdone\n\tres=\"$(echo \"$res\" | grep -Eo '[0-9\\.]+')\"\n\techo -e \"Your public IP is: ${echo_bold_green-} $res ${echo_normal-}\"\n}\n\nfunction pickfrom() {\n\tabout 'picks random line from file'\n\tparam '1: filename'\n\texample '$ pickfrom /usr/share/dict/words'\n\tgroup 'base'\n\tlocal file=${1:-}\n\tlocal -i n=0 length\n\tif [[ ! -r \"$file\" ]]; then\n\t\treference \"${FUNCNAME[0]}\" && return\n\tfi\n\tlength=\"$(wc -l < \"$file\")\"\n\tn=$((RANDOM * length / 32768 + 1))\n\thead -n \"$n\" \"$file\" | tail -1\n}\n\nfunction passgen() {\n\tabout 'generates random password from dictionary words'\n\tparam 'optional integer length'\n\tparam 'if unset, defaults to 4'\n\texample '$ passgen'\n\texample '$ passgen 6'\n\tgroup 'base'\n\tlocal -i i length=${1:-4}\n\tlocal pass\n\t# shellcheck disable=SC2034\n\tpass=\"$(for i in $(eval \"echo {1..$length}\"); do pickfrom /usr/share/dict/words; done)\"\n\techo \"With spaces (easier to memorize): ${pass//$'\\n'/ }\"\n\techo \"Without spaces (easier to brute force): ${pass//$'\\n'/}\"\n}\n\n# Create alias pass to passgen when pass isn't installed or\n# BASH_IT_LEGACY_PASS is true.\nif ! _command_exists pass || [[ \"${BASH_IT_LEGACY_PASS:-}\" == true ]]; then\n\talias pass=passgen\nfi\n\nif _command_exists markdown && _command_exists browser; then\n\tfunction pmdown() {\n\t\tabout 'preview markdown file in a browser'\n\t\tparam '1: markdown file'\n\t\texample '$ pmdown README.md'\n\t\tgroup 'base'\n\n\t\tmarkdown \"${1?}\" | browser\n\t}\nfi\n\nfunction mkcd() {\n\tabout 'make one or more directories and cd into the last one'\n\tparam 'one or more directories to create'\n\texample '$ mkcd foo'\n\texample '$ mkcd /tmp/img/photos/large'\n\texample '$ mkcd foo foo1 foo2 fooN'\n\texample '$ mkcd /tmp/img/photos/large /tmp/img/photos/self /tmp/img/photos/Beijing'\n\tgroup 'base'\n\tmkdir -p -- \"$@\" && cd -- \"${!#}\" || return\n}\n\n# shellcheck disable=SC2010\nfunction lsgrep() {\n\tabout 'search through directory contents with grep'\n\tgroup 'base'\n\tls | grep \"$@\"\n}\n\nfunction quiet() {\n\tabout 'what *does* this do?'\n\tgroup 'base'\n\tnohup \"$@\" &> /dev/null < /dev/null &\n}\n\nfunction usage() {\n\tabout 'disk usage per directory, in Mac OS X and Linux'\n\tparam '1: directory name'\n\tgroup 'base'\n\tcase $OSTYPE in\n\t\t*'darwin'*)\n\t\t\tdu -hd 1 \"$@\"\n\t\t\t;;\n\t\t*'linux'*)\n\t\t\tdu -h --max-depth=1 \"$@\"\n\t\t\t;;\n\tesac\n}\n\nfunction t() {\n\tabout 'todo.sh if available, otherwise one thing todo'\n\tparam 'if not set, display todo item'\n\tparam '1: todo text'\n\n\tlocal todotxt=\"${XDG_STATE_HOME:-~/.local/state}/bash_it/todo.txt\"\n\n\tif _bash-it-component-item-is-enabled plugin todo; then\n\t\ttodo.sh \"$@\"\n\t\treturn\n\telif [[ ! -f \"${todotxt}\" && -f ~/.t ]]; then\n\t\tmv -vn ~/.t \"${todotxt}\" # Verbose, so the user knows. Don't overwrite, just in case.\n\tfi\n\n\tif [[ \"$#\" -eq 0 ]]; then\n\t\tcat \"${todotxt}\"\n\telse\n\t\techo \"$@\" >| \"${todotxt}\"\n\tfi\n}\n\nif _command_exists mkisofs; then\n\tfunction mkiso() {\n\t\tabout 'creates iso from current dir in the parent dir (unless defined)'\n\t\tparam '1: ISO name'\n\t\tparam '2: dest/path'\n\t\tparam '3: src/path'\n\t\texample 'mkiso'\n\t\texample 'mkiso ISO-Name dest/path src/path'\n\t\tgroup 'base'\n\n\t\tlocal isoname=\"${1:-${PWD##*/}}\"\n\t\tlocal destpath=\"${2:-../}\"\n\t\tlocal srcpath=\"${3:-${PWD}}\"\n\n\t\tif [[ ! -f \"${destpath%/}/${isoname}.iso\" ]]; then\n\t\t\techo \"writing ${isoname}.iso to ${destpath} from ${srcpath}\"\n\t\t\tmkisofs -V \"${isoname}\" -iso-level 3 -r -o \"${destpath%/}/${isoname}.iso\" \"${srcpath}\"\n\t\telse\n\t\t\techo \"${destpath%/}/${isoname}.iso already exists\"\n\t\tfi\n\t}\nfi\n\n# useful for administrators and configs\nfunction buf() {\n\tabout 'back up file with timestamp'\n\tparam 'filename'\n\tgroup 'base'\n\tlocal filename=\"${1?}\" filetime\n\tfiletime=$(date +%Y%m%d_%H%M%S)\n\tcp -a \"${filename}\" \"${filename}_${filetime}\"\n}\n\nif ! _command_exists del; then\n\tfunction del() {\n\t\tabout 'move files to hidden folder in tmp, that gets cleared on each reboot'\n\t\tparam 'file or folder to be deleted'\n\t\texample 'del ./file.txt'\n\t\tgroup 'base'\n\t\tmkdir -p /tmp/.trash && mv \"$@\" /tmp/.trash\n\t}\nfi\n\n# replace multiple file extensions at once\nfunction renex() {\n\tabout 'mass replace of the extension of multiple files'\n\tparam '1: extension to replace'\n\tparam '2: new extenstion'\n\texample 'rex txt md'\n\tgroup 'base'\n\tlocal ext2replace=\"${1:-}\"\n\tlocal newext=\"${2:-}\"\n\tlocal files=(*.\"$ext2replace\")\n\tfor file in \"${files[@]}\"; do\n\t\tlocal dst=${file/%.\"$ext2replace\"/.\"$newext\"}\n\t\tmv \"$file\" \"$dst\"\n\tdone\n}\n"
  },
  {
    "path": "plugins/available/basher.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'initializes basher, the shell package manager'\nurl \"https://github.com/basherpm/basher\"\n\n# https://github.com/basherpm/basher\n\nif ! _command_exists basher; then\n\tif [[ -x \"$HOME/.basher/bin/basher\" ]]; then\n\t\tpathmunge \"$HOME/.basher/bin\"\n\telse\n\t\t_log_warning 'basher not found'\n\t\treturn 0\n\tfi\nfi\n\neval \"$(basher init - bash)\"\n"
  },
  {
    "path": "plugins/available/blesh.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'load ble.sh, the Bash line editor!'\nurl \"https://github.com/akinomyoga/ble.sh\"\n\nif [[ -n \"${BLE_VERSION-}\" ]]; then\n\t_log_warning \"ble.sh is already loaded!\"\n\treturn\nfi\n\n_bash_it_ble_path=${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh\nif [[ -f $_bash_it_ble_path ]]; then\n\t# shellcheck disable=1090\n\tsource \"$_bash_it_ble_path\" --attach=prompt\n\tif _bash-it-component-item-is-enabled plugin fzf; then\n\t\tble-import -d integration/fzf-key-bindings\n\t\tble-import -d integration/fzf-completion\n\tfi\nelse\n\t_log_error \"Could not find ble.sh in $_bash_it_ble_path\"\n\t_log_error \"Please install using the following command:\"\n\t_log_error \"git clone https://github.com/akinomyoga/ble.sh && make -C ble.sh install\"\nfi\nunset _bash_it_ble_path\n"
  },
  {
    "path": "plugins/available/boot2docker.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Helpers to get Docker setup correctly for boot2docker'\nurl \"https://github.com/boot2docker/boot2docker\"\n\n# Note, this might need to be different if you have an older version\n# of boot2docker, or its configured for a different IP\nif [[ \"$OSTYPE\" == 'darwin'* ]]; then\n\texport DOCKER_HOST=\"tcp://192.168.59.103:2376\"\n\texport DOCKER_CERT_PATH=\"${HOME}/.boot2docker/certs/boot2docker-vm\"\n\texport DOCKER_TLS_VERIFY=1\nfi\n"
  },
  {
    "path": "plugins/available/browser.plugin.bash",
    "content": "# shellcheck shell=bash\n# based on https://gist.github.com/318247\n\ncite about-plugin\nabout-plugin 'render commandline output in your browser'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# shellcheck disable=SC2120\nfunction browser() {\n\tabout 'pipe html to a browser'\n\texample '$ echo \"<h1>hi mom!</h1>\" | browser'\n\texample '$ ron -5 man/rip.5.ron | browser'\n\tgroup 'browser'\n\n\tif [ -t 0 ]; then\n\t\tif [ -n \"$1\" ]; then\n\t\t\topen \"$1\"\n\t\telse\n\t\t\treference browser\n\t\tfi\n\n\telse\n\t\tf=\"/tmp/browser.$RANDOM.html\"\n\t\tcat /dev/stdin > $f\n\t\topen $f\n\tfi\n}\n\nfunction wmate() {\n\tabout 'pipe hot spicy interwebs into textmate and cleanup!'\n\texample '$ wmate google.com'\n\tgroup 'browser'\n\n\tif [ -t 0 ]; then\n\t\tif [ -n \"$1\" ]; then\n\t\t\twget -qO- \"$1\" | /usr/bin/mate\n\t\t\tTIDY=$(\n\t\t\t\t/usr/bin/osascript << EOT\ntell application \"TextMate\"\n\tactivate\nend tell\n\ntell application \"System Events\"\n\ttell process \"TextMate\"\n\t\ttell menu bar 1\n\t\t\ttell menu bar item \"Bundles\"\n\t\t\t\ttell menu \"Bundles\"\n\t\t\t\t\ttell menu item \"HTML\"\n\t\t\t\t\t\ttell menu \"HTML\"\n\t\t\t\t\t\t\tclick menu item \"Tidy\"\n\t\t\t\t\t\tend tell\n\t\t\t\t\tend tell\n\t\t\t\tend tell\n\t\t\tend tell\n\t\tend tell\n\tend tell\nend tell\nEOT\n\t\t\t)\n\t\t\texport TIDY\n\n\t\telse\n\t\t\treference wmate\n\t\tfi\n\tfi\n}\n\nfunction raw() {\n\tabout 'write wget into a temp file and pump it into your browser'\n\texample '$ raw google.com'\n\tgroup 'browser'\n\n\tif [ -t 0 ]; then\n\t\tif [ -n \"$1\" ]; then\n\t\t\twget -qO- \"$1\" | browser\n\t\telse\n\t\t\treference raw\n\t\tfi\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/chruby-auto.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1091\ncite about-plugin\nabout-plugin 'load chruby + auto-switching (from /usr/local/share/chruby)'\nurl \"https://github.com/postmodern/chruby\"\n\nsource /usr/local/share/chruby/chruby.sh\nsource /usr/local/share/chruby/auto.sh\n"
  },
  {
    "path": "plugins/available/chruby.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1091\ncite about-plugin\nabout-plugin 'load chruby                  (from /usr/local/share/chruby)'\nurl \"https://github.com/postmodern/chruby\"\n\nsource /usr/local/share/chruby/chruby.sh\n"
  },
  {
    "path": "plugins/available/cht-sh.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\n# shellcheck disable=SC2016\nabout-plugin 'Simplify `curl cht.sh/<query>` to `cht.sh <query>`'\nurl \"https://cht.sh/\"\n\n# Play nicely if user already installed cht.sh cli tool\nif ! _command_exists cht.sh; then\n\tfunction cht.sh() {\n\t\tabout 'Executes a cht.sh curl query using the provided arguments'\n\t\tparam ' [ ( topic [sub-topic] ) | ~keyword ] [ :list | :help | :learn ]'\n\t\texample '$ cht.sh :help'\n\t\texample '$ cht.sh :list'\n\t\texample '$ cht.sh tar'\n\t\texample '$ cht.sh js \"parse json\"'\n\t\texample '$ cht.sh python :learn'\n\t\texample '$ cht.sh rust :list'\n\t\tgroup 'cht-sh'\n\n\t\t# Separate arguments with '/', preserving spaces within them\n\t\tlocal query\n\t\tquery=$(\n\t\t\tIFS=/\n\t\t\techo \"$*\"\n\t\t)\n\t\tcurl \"cht.sh/${query}\"\n\t}\nfi\n"
  },
  {
    "path": "plugins/available/cmd-returned-notify.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Alert (BEL) when process ends after a threshold of seconds'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction precmd_return_notification() {\n\tlocal command_start=\"${COMMAND_DURATION_START_SECONDS:=0}\" current_time\n\tcurrent_time=\"$(_command_duration_current_time)\"\n\n\tlocal -i command_duration=\"$((${current_time%.*} - ${command_start%.*}))\"\n\tif [[ \"${command_duration}\" -gt \"${NOTIFY_IF_COMMAND_RETURNS_AFTER:-5}\" ]]; then\n\t\tprintf '\\a'\n\tfi\n\treturn 0\n}\n\nsafe_append_prompt_command 'precmd_return_notification'\nsafe_append_preexec '_command_duration_pre_exec'\n"
  },
  {
    "path": "plugins/available/colors.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2005\n\ncite \"about-plugin\"\nabout-plugin \"Provides color definitions and ANSI color code functions for terminal output\"\ngroup \"bash-it\"\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction __() {\n\techo \"$@\"\n}\n\nfunction __make_ansi() {\n\tnext=$1\n\tshift\n\techo -e \"\\[\\e[$(\"__$next\" \"$@\")m\\]\"\n}\n\nfunction __make_echo() {\n\tnext=$1\n\tshift\n\techo -e \"\\033[$(\"__$next\" \"$@\")m\"\n}\n\nfunction __reset() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"0${out:+;${out}}\"\n}\n\nfunction __bold() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}1\"\n}\n\nfunction __faint() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}2\"\n}\n\nfunction __italic() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}3\"\n}\n\nfunction __underline() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}4\"\n}\n\nfunction __negative() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}7\"\n}\n\nfunction __crossed() {\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"${out:+${out};}8\"\n}\n\nfunction __color_normal_fg() {\n\techo \"3$1\"\n}\n\nfunction __color_normal_bg() {\n\techo \"4$1\"\n}\n\nfunction __color_bright_fg() {\n\techo \"9$1\"\n}\n\nfunction __color_bright_bg() {\n\techo \"10$1\"\n}\n\nfunction __color_black() {\n\techo \"0\"\n}\n\nfunction __color_red() {\n\techo \"1\"\n}\n\nfunction __color_green() {\n\techo \"2\"\n}\n\nfunction __color_yellow() {\n\techo \"3\"\n}\n\nfunction __color_blue() {\n\techo \"4\"\n}\n\nfunction __color_magenta() {\n\techo \"5\"\n}\n\nfunction __color_cyan() {\n\techo \"6\"\n}\n\nfunction __color_white() {\n\techo \"7\"\n}\n\nfunction __color_rgb() {\n\tr=$1 && g=$2 && b=$3\n\t[[ $r == \"$g\" && $g == \"$b\" ]] && echo $((r / 11 + 232)) && return # gray range above 232\n\techo \"8;5;$(((r * 36 + b * 6 + g) / 51 + 16))\"\n}\n\nfunction __color() {\n\tcolor=\"$1\"\n\tshift\n\tcase \"$1\" in\n\t\tfg | bg)\n\t\t\tside=\"$1\"\n\t\t\tshift\n\t\t\t;;\n\t\t*) side=\"fg\" ;;\n\tesac\n\tcase \"$1\" in\n\t\tnormal | bright)\n\t\t\tmode=\"$1\"\n\t\t\tshift\n\t\t\t;;\n\t\t*) mode=normal ;;\n\tesac\n\t[[ $color == \"rgb\" ]] && rgb=\"$1 $2 $3\"\n\tshift 3\n\n\tnext=$1\n\tshift\n\tout=\"$(\"__$next\" \"$@\")\"\n\techo \"$(\"__color_${mode}_${side}\" \"$(\"__color_${color}\" \"$rgb\")\")${out:+;${out}}\"\n}\n\nfunction __black() {\n\techo \"$(__color black \"$@\")\"\n}\n\nfunction __red() {\n\techo \"$(__color red \"$@\")\"\n}\n\nfunction __green() {\n\techo \"$(__color green \"$@\")\"\n}\n\nfunction __yellow() {\n\techo \"$(__color yellow \"$@\")\"\n}\n\nfunction __blue() {\n\techo \"$(__color blue \"$@\")\"\n}\n\nfunction __magenta() {\n\techo \"$(__color magenta \"$@\")\"\n}\n\nfunction __cyan() {\n\techo \"$(__color cyan \"$@\")\"\n}\n\nfunction __white() {\n\techo \"$(__color white \"$@\")\"\n}\n\nfunction __rgb() {\n\techo \"$(__color rgb \"$@\")\"\n}\n\nfunction __color_parse() {\n\tnext=$1\n\tshift\n\techo \"$(\"__$next\" \"$@\")\"\n}\n\nfunction color() {\n\techo \"$(__color_parse make_ansi \"$@\")\"\n}\n\nfunction echo_color() {\n\techo \"$(__color_parse make_echo \"$@\")\"\n}\n"
  },
  {
    "path": "plugins/available/direnv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load direnv, if you are using it: https://direnv.net/'\nurl \"https://direnv.net/\"\n\nif _command_exists direnv; then\n\teval \"$(direnv hook bash)\"\nfi\n"
  },
  {
    "path": "plugins/available/dirs.plugin.bash",
    "content": "# shellcheck shell=bash\n# Directory stack navigation:\n#\n# Add to stack with: pu /path/to/directory\n# Delete current dir from stack with: po\n# Show stack with: d\n# Jump to location by number.\n\ncite about-plugin\nabout-plugin 'directory stack navigation'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Show directory stack\nalias d=\"dirs -v -l\"\n\n# Change to location in stack by number\nalias 1=\"pushd\"\nalias 2=\"pushd +2\"\nalias 3=\"pushd +3\"\nalias 4=\"pushd +4\"\nalias 5=\"pushd +5\"\nalias 6=\"pushd +6\"\nalias 7=\"pushd +7\"\nalias 8=\"pushd +8\"\nalias 9=\"pushd +9\"\n\n# Clone this location\nalias pc='pushd \"${PWD}\"'\n\n# Push new location\nalias pu=\"pushd\"\n\n# Pop current location\nalias po=\"popd\"\n\nfunction dirs-help() {\n\tabout 'directory navigation alias usage'\n\tgroup 'dirs'\n\n\techo \"Directory Navigation Alias Usage\"\n\techo\n\techo \"Use the power of directory stacking to move\"\n\techo \"between several locations with ease.\"\n\techo\n\techo \"d\t: Show directory stack.\"\n\techo \"po\t: Remove current location from stack.\"\n\techo \"pc\t: Adds current location to stack.\"\n\techo \"pu <dir>: Adds given location to stack.\"\n\techo \"1\t: Change to stack location 1.\"\n\techo \"2\t: Change to stack location 2.\"\n\techo \"3\t: Change to stack location 3.\"\n\techo \"4\t: Change to stack location 4.\"\n\techo \"5\t: Change to stack location 5.\"\n\techo \"6\t: Change to stack location 6.\"\n\techo \"7\t: Change to stack location 7.\"\n\techo \"8\t: Change to stack location 8.\"\n\techo \"9\t: Change to stack location 9.\"\n}\n\n# Add bookmarking functionality\n# Usage:\n\n: \"${BASH_IT_DIRS_BKS:=${XDG_STATE_HOME:-${HOME}/.local/state}/bash_it/dirs}\"\nif [[ -f \"${BASH_IT_DIRS_BKS?}\" ]]; then\n\t# shellcheck disable=SC1090\n\tsource \"${BASH_IT_DIRS_BKS?}\"\nelse\n\tmkdir -p \"${BASH_IT_DIRS_BKS%/*}\"\n\tif [[ -f ~/.dirs ]]; then\n\t\tmv -vn ~/.dirs \"${BASH_IT_DIRS_BKS?}\"\n\t\t# shellcheck disable=SC1090\n\t\tsource \"${BASH_IT_DIRS_BKS?}\"\n\telse\n\t\ttouch \"${BASH_IT_DIRS_BKS?}\"\n\tfi\nfi\n\nalias L='cat \"${BASH_IT_DIRS_BKS?}\"'\n\n# Goes to destination dir, otherwise stay in the dir\nfunction G() {\n\tabout 'goes to destination dir'\n\tparam '1: directory'\n\texample '$ G ..'\n\tgroup 'dirs'\n\n\tcd \"${1:-${PWD}}\" || return\n}\n\nfunction S() {\n\tabout 'save a bookmark'\n\tparam '1: bookmark name'\n\texample '$ S mybkmrk'\n\tgroup 'dirs'\n\n\t[[ $# -eq 1 ]] || {\n\t\techo \"${FUNCNAME[0]} function requires 1 argument\"\n\t\treturn 1\n\t}\n\n\tsed \"/$1/d\" \"${BASH_IT_DIRS_BKS?}\" > \"${BASH_IT_DIRS_BKS?}.new\"\n\tcommand mv \"${BASH_IT_DIRS_BKS?}.new\" \"${BASH_IT_DIRS_BKS?}\"\n\techo \"$1\"=\\\"\"${PWD}\"\\\" >> \"${BASH_IT_DIRS_BKS?}\"\n\t# shellcheck disable=SC1090\n\tsource \"${BASH_IT_DIRS_BKS?}\"\n}\n\nfunction R() {\n\tabout 'remove a bookmark'\n\tparam '1: bookmark name'\n\texample '$ R mybkmrk'\n\tgroup 'dirs'\n\n\t[[ $# -eq 1 ]] || {\n\t\techo \"${FUNCNAME[0]} function requires 1 argument\"\n\t\treturn 1\n\t}\n\n\tsed \"/$1/d\" \"${BASH_IT_DIRS_BKS?}\" > \"${BASH_IT_DIRS_BKS?}.new\"\n\tcommand mv \"${BASH_IT_DIRS_BKS?}.new\" \"${BASH_IT_DIRS_BKS?}\"\n}\n\nalias U='source \"${BASH_IT_DIRS_BKS?}\"' # Update bookmark stack\n"
  },
  {
    "path": "plugins/available/docker-compose.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Helper functions for using docker-compose'\nurl \"https://docs.docker.com/compose/\"\n\nfunction docker-compose-fresh() {\n\tabout 'Shut down, remove and start again the docker-compose setup, then tail the logs'\n\tgroup 'docker-compose'\n\tparam '1: name of the docker-compose.yaml file to use (optional). Default: docker-compose.yaml'\n\texample 'docker-compose-fresh docker-compose-foo.yaml'\n\n\tlocal DCO_FILE_PARAM=()\n\tif [ -n \"$1\" ]; then\n\t\techo \"Using docker-compose file: $1\"\n\t\tDCO_FILE_PARAM=(--file \"$1\")\n\tfi\n\n\tdocker-compose \"${DCO_FILE_PARAM[@]}\" stop\n\tdocker-compose \"${DCO_FILE_PARAM[@]}\" rm -f\n\tdocker-compose \"${DCO_FILE_PARAM[@]}\" up -d\n\tdocker-compose \"${DCO_FILE_PARAM[@]}\" logs -f --tail 100\n}\n"
  },
  {
    "path": "plugins/available/docker-machine.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Helpers to get Docker setup correctly for docker-machine'\nurl \"https://github.com/docker/machine\"\n_log_warning '\"docker-machine\" is now deprecated, and as such the plugin for it is also deprecated.\nPlease disable this plugin.'\n"
  },
  {
    "path": "plugins/available/docker.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Helpers to more easily work with Docker'\nurl \"https://www.docker.com/\"\n\nfunction docker-remove-most-recent-container() {\n\tabout 'attempt to remove the most recent container from docker ps -a'\n\tgroup 'docker'\n\tdocker ps -ql | xargs docker rm\n}\n\nfunction docker-remove-most-recent-image() {\n\tabout 'attempt to remove the most recent image from docker images'\n\tgroup 'docker'\n\tdocker images -q | head -1 | xargs docker rmi\n}\n\nfunction docker-remove-stale-assets() {\n\tabout 'attempt to remove exited containers and dangling images'\n\tgroup 'docker'\n\tdocker ps --filter status=exited -q | xargs docker rm --volumes\n\tdocker images --filter dangling=true -q | xargs docker rmi\n}\n\nfunction docker-enter() {\n\tabout 'enter the specified docker container using bash'\n\tgroup 'docker'\n\tparam '1: Name of the container to enter'\n\texample 'docker-enter oracle-xe'\n\n\tdocker exec -it \"$@\" /bin/bash\n}\n\nfunction docker-remove-images() {\n\tabout 'attempt to remove images with supplied tags or all if no tags are supplied'\n\tgroup 'docker'\n\tlocal line\n\tif [ -z \"$1\" ]; then\n\t\t# shellcheck disable=SC2046\n\t\tdocker rmi $(docker images -q)\n\telse\n\t\tDOCKER_IMAGES=\"\"\n\t\tfor IMAGE_ID in \"$@\"; do DOCKER_IMAGES=\"$DOCKER_IMAGES\\|$IMAGE_ID\"; done\n\t\t# Find the image IDs for the supplied tags\n\t\tID_ARRAY=()\n\t\twhile IFS='' read -r line; do ID_ARRAY+=(\"$line\"); done < <(docker images | grep \"${DOCKER_IMAGES:2}\" | awk '{print $3}')\n\t\t# Strip out duplicate IDs before attempting to remove the image(s)\n\t\t# shellcheck disable=SC2046\n\t\tdocker rmi $(echo \"${ID_ARRAY[@]}\" | tr ' ' '\\n' | sort -u)\n\tfi\n}\n\nfunction docker-image-dependencies() {\n\tabout 'attempt to create a Graphiz image of the supplied image ID dependencies'\n\tgroup 'docker'\n\tif hash dot 2> /dev/null; then\n\t\tOUT=$(mktemp -t docker-viz-XXXX.png)\n\t\tdocker images -viz | dot -Tpng > \"$OUT\"\n\t\tcase $OSTYPE in\n\t\t\tlinux*)\n\t\t\t\txdg-open \"$OUT\"\n\t\t\t\t;;\n\t\t\tdarwin*)\n\t\t\t\topen \"$OUT\"\n\t\t\t\t;;\n\t\tesac\n\telse\n\t\techo \"Can't show dependencies; Graphiz is not installed\" >&2\n\tfi\n}\n\nfunction docker-runtime-environment() {\n\tabout 'attempt to list the environmental variables of the supplied image ID'\n\tgroup 'docker'\n\tdocker run \"$@\" env\n}\n\nfunction docker-archive-content() {\n\tabout 'show the content of the provided Docker image archive'\n\tgroup 'docker'\n\tparam '1: image archive name'\n\texample 'docker-archive-content images.tar.gz'\n\n\tif [ -n \"$1\" ]; then\n\t\ttar -xzOf \"$1\" manifest.json | jq '[.[] | .RepoTags] | add'\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/edit-mode-emacs.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Enable emacs editing mode'\nurl \"https://www.gnu.org/software/bash/manual/html_node/Readline-Interaction.html\"\n\nset -o emacs\n"
  },
  {
    "path": "plugins/available/edit-mode-vi.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Enable vi editing mode'\nurl \"https://www.gnu.org/software/bash/manual/html_node/Readline-Interaction.html\"\n\nset -o vi\n"
  },
  {
    "path": "plugins/available/explain.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'mankier.com explain function to explain other commands'\nurl \"https://www.mankier.com/\"\n\nexplain() {\n\tabout 'explain any bash command via mankier.com manpage API'\n\tparam '1: Name of the command to explain'\n\texample '$ explain                # interactive mode. Type commands to explain in REPL'\n\texample '$ explain '\"'\"'cmd -o | ...'\"'\"' # one quoted command to explain it.'\n\tgroup 'explain'\n\n\tif [ \"$#\" -eq 0 ]; then\n\t\twhile read -r -p \"Command: \" cmd; do\n\t\t\tcurl -Gs \"https://www.mankier.com/api/explain/?cols=$(tput cols)\" --data-urlencode \"q=$cmd\"\n\t\tdone\n\t\techo \"Bye!\"\n\telif [ \"$#\" -eq 1 ]; then\n\t\tcurl -Gs \"https://www.mankier.com/api/explain/?cols=$(tput cols)\" --data-urlencode \"q=$1\"\n\telse\n\t\techo \"Usage\"\n\t\techo \"explain                  interactive mode.\"\n\t\techo \"explain 'cmd -o | ...'   one quoted command to explain it.\"\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/extract.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'one command to extract them all...'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# extract file(s) from compressed status\nextract() {\n\tlocal opt\n\tlocal OPTIND=1\n\twhile getopts \"hv\" opt; do\n\t\tcase \"$opt\" in\n\t\t\th)\n\t\t\t\tcat << End-Of-Usage\nUsage: ${FUNCNAME[0]} [option] <archives>\n    options:\n        -h  show this message and exit\n        -v  verbosely list files processed\nEnd-Of-Usage\n\t\t\t\treturn\n\t\t\t\t;;\n\t\t\tv)\n\t\t\t\tlocal -r verbose='v'\n\t\t\t\t;;\n\t\t\t?)\n\t\t\t\textract -h >&2\n\t\t\t\treturn 1\n\t\t\t\t;;\n\t\tesac\n\tdone\n\tshift $((OPTIND - 1))\n\n\tif [[ $# -eq 0 ]]; then\n\t\textract -h\n\t\treturn 1\n\tfi\n\n\twhile [[ $# -gt 0 ]]; do\n\t\tif [[ ! -f \"${1:-}\" ]]; then\n\t\t\techo \"extract: '$1' is not a valid file\" >&2\n\t\t\tshift\n\t\t\tcontinue\n\t\tfi\n\n\t\tlocal -r filename=$(basename -- \"$1\")\n\t\tlocal -r filedirname=$(dirname -- \"$1\")\n\t\tlocal targetdirname\n\t\t# shellcheck disable=SC2001 # we don't depend on `extglob`...\n\t\ttargetdirname=$(sed 's/\\(\\.tar\\.bz2$\\|\\.tbz$\\|\\.tbz2$\\|\\.tar\\.gz$\\|\\.tgz$\\|\\.tar$\\|\\.tar\\.xz$\\|\\.txz$\\|\\.tar\\.Z$\\|\\.7z$\\|\\.nupkg$\\|\\.zip$\\|\\.war$\\|\\.jar$\\)//g' <<< \"$filename\")\n\t\tif [[ \"$filename\" == \"$targetdirname\" ]]; then\n\t\t\t# archive type either not supported or it doesn't need dir creation\n\t\t\ttargetdirname=\"\"\n\t\telse\n\t\t\tmkdir -v \"$filedirname/$targetdirname\"\n\t\tfi\n\n\t\tif [[ -f \"$1\" ]]; then\n\t\t\tcase \"$1\" in\n\t\t\t\t*.tar.bz2 | *.tbz | *.tbz2) tar \"x${verbose}jf\" \"$1\" -C \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.tar.gz | *.tgz) tar \"x${verbose}zf\" \"$1\" -C \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.tar.xz | *.txz) tar \"x${verbose}Jf\" \"$1\" -C \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.tar.Z) tar \"x${verbose}Zf\" \"$1\" -C \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.bz2) bunzip2 \"$1\" ;;\n\t\t\t\t*.deb) dpkg-deb -x\"${verbose}\" \"$1\" \"${1:0:-4}\" ;;\n\t\t\t\t*.pax.gz)\n\t\t\t\t\tgunzip \"$1\"\n\t\t\t\t\tset -- \"$@\" \"${1:0:-3}\"\n\t\t\t\t\t;;\n\t\t\t\t*.gz) gunzip \"$1\" ;;\n\t\t\t\t*.pax) pax -r -f \"$1\" ;;\n\t\t\t\t*.pkg) pkgutil --expand \"$1\" \"${1:0:-4}\" ;;\n\t\t\t\t*.rar) unrar x \"$1\" ;;\n\t\t\t\t*.rpm) rpm2cpio \"$1\" | cpio -idm\"${verbose}\" ;;\n\t\t\t\t*.tar) tar \"x${verbose}f\" \"$1\" -C \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.xz) xz --decompress \"$1\" ;;\n\t\t\t\t*.zip | *.war | *.jar | *.nupkg) unzip \"$1\" -d \"$filedirname/$targetdirname\" ;;\n\t\t\t\t*.Z) uncompress \"$1\" ;;\n\t\t\t\t*.7z) 7za x -o\"$filedirname/$targetdirname\" \"$1\" ;;\n\t\t\t\t*) echo \"'$1' cannot be extracted via extract\" >&2 ;;\n\t\t\tesac\n\t\tfi\n\n\t\tshift\n\tdone\n}\n\n# Shorten extract\nalias xt='extract'\n"
  },
  {
    "path": "plugins/available/fasd.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load fasd, if you are using it'\nurl \"https://github.com/clvv/fasd\"\n\n_command_exists fasd || return\n\neval \"$(fasd --init auto)\"\n"
  },
  {
    "path": "plugins/available/fzf.plugin.bash",
    "content": "# shellcheck shell=bash\n# Load after the system completion to make sure that the fzf completions are working\n# BASH_IT_LOAD_PRIORITY: 375\n\ncite about-plugin\nabout-plugin 'load fzf, if you are using it'\nurl \"https://github.com/junegunn/fzf\"\n\nif ! _bash-it-component-item-is-enabled plugin blesh; then\n\tif [ -r ~/.fzf.bash ]; then\n\t\t# shellcheck disable=SC1090\n\t\tsource ~/.fzf.bash\n\telif [ -r \"${XDG_CONFIG_HOME:-$HOME/.config}\"/fzf/fzf.bash ]; then\n\t\t# shellcheck disable=SC1091\n\t\tsource \"${XDG_CONFIG_HOME:-$HOME/.config}\"/fzf/fzf.bash\n\tfi\nfi # only sources the keybindings and integration if blesh is not integrated already\n\n# No need to continue if the command is not present\n_command_exists fzf || return\n\nif [ -z ${FZF_DEFAULT_COMMAND+x} ] && _command_exists fd; then\n\texport FZF_DEFAULT_COMMAND='fd --type f'\nfi\n\nfe() {\n\tabout \"Open the selected file in the default editor\"\n\tgroup \"fzf\"\n\tparam \"1: Search term\"\n\texample \"fe foo\"\n\n\tlocal IFS=$'\\n' line\n\tlocal files=()\n\twhile IFS='' read -r line; do files+=(\"$line\"); done < <(fzf-tmux --query=\"$1\" --multi --select-1 --exit-0)\n\t[[ -n \"${files[0]}\" ]] && ${EDITOR:-vim} \"${files[@]}\"\n}\n\nfcd() {\n\tabout \"cd to the selected directory\"\n\tgroup \"fzf\"\n\tparam \"1: Directory to browse, or . if omitted\"\n\texample \"fcd aliases\"\n\n\tlocal dir\n\tdir=$(find \"${1:-.}\" -path '*/\\.*' -prune \\\n\t\t-o -type d -print 2> /dev/null | fzf +m) \\\n\t\t&& cd \"$dir\" || return 1\n}\n"
  },
  {
    "path": "plugins/available/gif.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'video to gif, gif to WebM helper functions'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Based loosely on:\n#  https://gist.github.com/SlexAxton/4989674#comment-1199058\n#  https://linustechtips.com/main/topic/343253-tutorial-convert-videogifs-to-webm/\n#  and other sources\n# Renamed gifify to v2gif to go avoid clobbering https://github.com/jclem/gifify\n# Requirements (Mac OS X using Homebrew): brew install ffmpeg giflossy imagemagick\n# Requirements on Ubuntu: sudo apt install ffmpeg imagemagick ; plus install https://github.com/pornel/giflossy\n# Optional: install mediainfo for autodetection of original video FPS.\n# Optional: if lossy is not important, Ubuntu has gifsicle packaged for apt-get, instead of giflossy\n# Optional: gifski (from `brew install gifski` or github.com/ImageOptim/gifski)\n#           for high quality huge files.\nfunction v2gif() {\n\tabout 'Converts a .mov/.avi/.mp4 file into an into an animated GIF.'\n\tgroup 'gif'\n\tparam '1: MOV/AVI/MP4 file name(s)'\n\tparam '2: -w <num> ; Optional: max width in pixels'\n\tparam '3: -l <num> ; Optional: extra lossy level for smaller files (80-200 make sense, needs giflossy instead of gifsicle)'\n\tparam '4: -h       ; Optional: high quality using gifski (installed seperately) - overrides \"--lossy\" above!'\n\tparam '5: -d       ; Optional: delete the original video file if succeeded'\n\tparam '6: -t       ; Optional: Tag the result with quality stamp for comparison use'\n\tparam '7: -f <num> ; Optional: Change number of frames per second (default 10 or original FPS if mediainfo installed)'\n\tparam '8: -a <num> ; Optional: Alert if resulting file is over <num> kilobytes (default is 5000, 0 turns off)'\n\tparam '9: -m       ; Optional: Also create a WebM file (will one day replace GIF, Smaller and higher quality than mp4)'\n\texample '$ v2gif foo.mov'\n\texample '$ v2gif foo.mov -w 600'\n\texample '$ v2gif -l 100 -d *.mp4'\n\texample '$ v2gif -dh *.avi'\n\texample '$ v2gif -thw 600 *.avi *.mov'\n\n\tlocal convert ffmpeg mediainfo gifsicle getopt args gifski out_size\n\n\tconvert=\"$(type -p convert)\"\n\t[[ -x \"$convert\" ]] || {\n\t\techo \"No convert found!\"\n\t\treturn 2\n\t}\n\tffmpeg=\"$(type -p ffmpeg)\"\n\t[[ -x \"$ffmpeg\" ]] || {\n\t\techo \"No ffmpeg found!\"\n\t\treturn 2\n\t}\n\tmediainfo=\"$(type -p mediainfo)\"\n\t[[ -x \"$mediainfo\" ]] || {\n\t\techo \"No mediainfo found!\"\n\t\treturn 2\n\t}\n\tgifsicle=\"$(type -p gifsicle)\"\n\t[[ -x \"$gifsicle\" ]] || {\n\t\techo \"No gifsicle found!\"\n\t\treturn 2\n\t}\n\tgetopt=\"$(type -p getopt)\"\n\n\tif [[ \"$OSTYPE\" == \"darwin\"* ]]; then\n\t\t# Getopt on BSD is incompatible with GNU\n\t\tgetopt=/usr/local/opt/gnu-getopt/bin/getopt\n\t\t[[ -x \"$getopt\" ]] || {\n\t\t\techo \"No GNU-getopt found!\"\n\t\t\treturn 2\n\t\t}\n\tfi\n\n\t# Parse the options\n\targs=$(\"$getopt\" -l \"alert:\" -l \"lossy:\" -l \"width:\" -l del,delete -l high -l help -l tag -l \"fps:\" -l webm -o \"a:l:w:f:dhmt\" -- \"$@\") || {\n\t\techo 'Terminating...' >&2\n\t\treturn 2\n\t}\n\n\teval set -- \"$args\"\n\tlocal use_gifski=\"\"\n\tlocal opt_del_after=\"\"\n\tlocal maxsize=()\n\tlocal lossiness=()\n\tlocal maxwidthski=()\n\tlocal giftagopt=\"\"\n\tlocal giftag=\"\"\n\tlocal defaultfps=10\n\tlocal infps=\"\"\n\tlocal fps=\"\"\n\tlocal make_webm=\"\"\n\tlocal alert=5000\n\tlocal printhelp=\"\"\n\twhile [[ $# -ge 1 ]]; do\n\t\tcase \"$1\" in\n\t\t\t--)\n\t\t\t\t# No more options left.\n\t\t\t\tshift\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\t\t-d | --del | --delete)\n\t\t\t\t# Delete after\n\t\t\t\topt_del_after=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t--help)\n\t\t\t\t# Print Help\n\t\t\t\tprinthelp=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t-h | --high)\n\t\t\t\t#High Quality, use gifski\n\t\t\t\tgifski=\"$(type -p gifski)\"\n\t\t\t\t[[ -x \"$gifski\" ]] || {\n\t\t\t\t\techo \"No gifski found!\"\n\t\t\t\t\treturn 2\n\t\t\t\t}\n\t\t\t\tuse_gifski=true\n\t\t\t\tgiftag=\"${giftag}-h\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t-w | --width)\n\t\t\t\tmaxsize=(-vf \"scale=$2:-1\")\n\t\t\t\tmaxwidthski=(-W \"$2\")\n\t\t\t\tgiftag=\"${giftag}-w$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-t | --tag)\n\t\t\t\t# mark with a quality tag\n\t\t\t\tgiftagopt=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t-l | --lossy)\n\t\t\t\t# Use giflossy parameter\n\t\t\t\tlossiness=(\"--lossy=$2\")\n\t\t\t\tgiftag=\"${giftag}-l$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-f | --fps)\n\t\t\t\t# select fps\n\t\t\t\tinfps=\"$2\"\n\t\t\t\tgiftag=\"${giftag}-f$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-a | --alert)\n\t\t\t\t# set size alert\n\t\t\t\talert=\"$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-m | --webm)\n\t\t\t\t# set size alert\n\t\t\t\tmake_webm=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tif [[ -z \"$*\" || \"$printhelp\" ]]; then\n\t\techo \"$(tput setaf 1)No input files given. Example: v2gif file [file...] [-w <max width (pixels)>] [-l <lossy level>] $(tput sgr 0)\"\n\t\techo \"-d/--del/--delete Delete original vid if done suceessfully (and file not over the size limit)\"\n\t\techo \"-h/--high         High Quality - use Gifski instead of gifsicle\"\n\t\techo \"-w/--width N      Lock maximum gif width to N pixels, resize if necessary\"\n\t\techo \"-t/--tag          Add a tag to the output gif describing the options used (useful for comparing several options)\"\n\t\techo \"-l/--lossy N      Use the Giflossy parameter for gifsicle (If your version supports it)\"\n\t\techo \"-f/--fps N        Override autodetection of incoming vid FPS (useful for downsampling)\"\n\t\techo \"-a/--alert N      Alert if over N kilobytes (Defaults to 5000)\"\n\t\techo \"-m/--webm         Also create a webm file\"\n\t\treturn 1\n\tfi\n\n\t# Prepare the quality tag if requested.\n\t[[ -z \"$giftag\" ]] && giftag=\"-default\"\n\t[[ -z \"$giftagopt\" ]] && giftag=\"\"\n\n\tfor file; do\n\n\t\tlocal output_file=\"${file%.*}${giftag}.gif\"\n\t\tlocal del_after=$opt_del_after\n\n\t\tif [[ -n \"$make_webm\" ]]; then\n\t\t\t$ffmpeg -loglevel warning -i \"$file\" \\\n\t\t\t\t-c:v libvpx -crf 4 -threads 0 -an -b:v 2M -auto-alt-ref 0 \\\n\t\t\t\t-quality best -loop 0 \"${file%.*}.webm\" || return 2\n\t\tfi\n\n\t\t# Set FPS to match the video if possible, otherwise fallback to default.\n\t\tif [[ -n \"$infps\" ]]; then\n\t\t\tfps=$infps\n\t\telse\n\t\t\tfps=$defaultfps\n\t\t\tif [[ -x \"$mediainfo\" ]]; then\n\t\t\t\tfps=$($mediainfo \"$file\" | grep \"Frame rate   \" | sed 's/.*: \\([0-9.]\\+\\) .*/\\1/' | head -1)\n\t\t\t\t[[ -z \"$fps\" ]] && fps=$($mediainfo \"$file\" | grep \"Minimum frame rate\" | sed 's/.*: \\([0-9.]\\+\\) .*/\\1/' | head -1)\n\t\t\tfi\n\t\tfi\n\n\t\techo \"$(tput setaf 2)Creating '$output_file' at $fps FPS ...$(tput sgr 0)\"\n\n\t\tif [[ \"$use_gifski\" = \"true\" ]]; then\n\t\t\t# I trust @pornel to do his own resizing optimization choices\n\t\t\t$ffmpeg -loglevel warning -i \"$file\" -r \"$fps\" -vcodec png v2gif-tmp-%05d.png \\\n\t\t\t\t&& $gifski \"${maxwidthski[@]}\" --fps \"$(printf \"%.0f\" \"$fps\")\" -o \"$output_file\" v2gif-tmp-*.png || return 2\n\t\telse\n\t\t\t$ffmpeg -loglevel warning -i \"$file\" \"${maxsize[@]}\" -r \"$fps\" -vcodec png v2gif-tmp-%05d.png \\\n\t\t\t\t&& $convert +dither -layers Optimize v2gif-tmp-*.png GIF:- \\\n\t\t\t\t| $gifsicle \"${lossiness[@]}\" --no-warnings --colors 256 --delay=\"$(echo \"100/$fps\" | bc)\" --loop --optimize=3 --multifile - > \"$output_file\" || return 2\n\t\tfi\n\n\t\trm v2gif-tmp-*.png\n\n\t\t# Checking if the file is bigger than Twitter likes and warn\n\t\tif [[ $alert -gt 0 ]]; then\n\t\t\tout_size=$(wc --bytes < \"$output_file\")\n\t\t\tif [[ $out_size -gt $((alert * 1000)) ]]; then\n\t\t\t\techo \"$(tput setaf 3)Warning: '$output_file' is $((out_size / 1000))kb.$(tput sgr 0)\"\n\t\t\t\t[[ \"$del_after\" == \"true\" ]] && echo \"$(tput setaf 3)Warning: Keeping '$file' even though --del requested.$(tput sgr 0)\"\n\t\t\t\tdel_after=\"\"\n\t\t\tfi\n\t\tfi\n\n\t\t[[ \"$del_after\" = \"true\" ]] && rm \"$file\"\n\n\tdone\n\n\techo \"$(tput setaf 2)Done.$(tput sgr 0)\"\n}\n\nfunction any2webm() {\n\tabout 'Converts an movies and Animated GIF files into an into a modern quality WebM video.'\n\tgroup 'gif'\n\tparam '1: GIF/video file name(s)'\n\tparam '2: -s <WxH> ; Optional: set <W>idth and <H>eight in pixels'\n\tparam '3: -d       ; Optional: delete the original file if succeeded'\n\tparam '4: -t       ; Optional: Tag the result with quality stamp for comparison use'\n\tparam '5: -f <num> ; Optional: Change number of frames per second'\n\tparam '6: -b <num> ; Optional: Set Bandwidth (quality/size of resulting file), Defaults to 2M (bits/sec, accepts fractions)\"'\n\tparam '7: -a <num> ; Optional: Alert if resulting file is over <num> kilobytes (default is 5000, 0 turns off)'\n\texample '$ any2webm foo.gif'\n\texample '$ any2webm *.mov -b 1.5M -s 600x480'\n\n\tlocal args out_size\n\n\t# Parse the options\n\targs=$(getopt -l alert -l \"bandwidth:\" -l \"width:\" -l del,delete -l tag -l \"fps:\" -l webm -o \"a:b:w:f:dt\" -- \"$@\") || {\n\t\techo 'Terminating...' >&2\n\t\treturn 2\n\t}\n\n\teval set -- \"$args\"\n\tlocal opt_del_after=\"\"\n\tlocal size=\"\"\n\tlocal webmtagopt=\"\"\n\tlocal webmtag=\"\"\n\tlocal defaultfps=10\n\tlocal fps=\"\"\n\tlocal bandwidth=\"2M\"\n\tlocal alert=5000\n\twhile [[ $# -ge 1 ]]; do\n\t\tcase \"$1\" in\n\t\t\t--)\n\t\t\t\t# No more options left.\n\t\t\t\tshift\n\t\t\t\tbreak\n\t\t\t\t;;\n\t\t\t-d | --del | --delete)\n\t\t\t\t# Delete after\n\t\t\t\topt_del_after=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t-s | --size)\n\t\t\t\tsize=\"-s $2\"\n\t\t\t\twebmtag=\"${webmtag}-s$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-t | --tag)\n\t\t\t\t# mark with a quality tag\n\t\t\t\twebmtagopt=\"true\"\n\t\t\t\tshift\n\t\t\t\t;;\n\t\t\t-f | --fps)\n\t\t\t\t# select fps\n\t\t\t\tfps=\"-r $2\"\n\t\t\t\twebmtag=\"${webmtag}-f$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-b | --bandwidth)\n\t\t\t\t# select bandwidth\n\t\t\t\tbandwidth=\"$2\"\n\t\t\t\twebmtag=\"${webmtag}-b$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\t\t-a | --alert)\n\t\t\t\t# set size alert\n\t\t\t\talert=\"$2\"\n\t\t\t\tshift 2\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tif [[ -z \"$*\" ]]; then\n\t\techo \"$(tput setaf 1)No input files given. Example: any2webm file [file...] [-w <max width (pixels)>] < $(tput sgr 0)\"\n\t\treturn 1\n\tfi\n\n\t# Prepare the quality tag if requested.\n\t[[ -z \"$webmtag\" ]] && webmtag=\"-default\"\n\t[[ -z \"$webmtagopt\" ]] && webmtag=\"\"\n\n\tfor file; do\n\n\t\tlocal output_file=\"${file%.*}${webmtag}.webm\"\n\t\tlocal del_after=$opt_del_after\n\n\t\techo \"$(tput setaf 2)Creating '$output_file' ...$(tput sgr 0)\"\n\n\t\t$ffmpeg -loglevel warning -i \"$file\" \\\n\t\t\t-c:v libvpx -crf 4 -threads 0 -an -b:v \"$bandwidth\" -auto-alt-ref 0 \\\n\t\t\t-quality best \"$fps\" \"$size\" -loop 0 -pix_fmt yuva420p \"$output_file\" || return 2\n\n\t\t# Checking if the file is bigger than Twitter likes and warn\n\t\tif [[ $alert -gt 0 ]]; then\n\t\t\tout_size=$(wc --bytes < \"$output_file\")\n\t\t\tif [[ $out_size -gt $((alert * 1000)) ]]; then\n\t\t\t\techo \"$(tput setaf 3)Warning: '$output_file' is $((out_size / 1000))kb.$(tput sgr 0)\"\n\t\t\t\t[[ \"$del_after\" == \"true\" ]] && echo \"$(tput setaf 3)Warning: Keeping '$file' even though --del requested.$(tput sgr 0)\"\n\t\t\t\tdel_after=\"\"\n\t\t\tfi\n\t\tfi\n\n\t\t[[ \"$del_after\" = \"true\" ]] && rm \"$file\"\n\n\tdone\n\n\techo \"$(tput setaf 2)Done.$(tput sgr 0)\"\n}\n"
  },
  {
    "path": "plugins/available/git-subrepo.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'load git-subrepo if you are using it, and initialize completions'\nurl \"https://github.com/ingydotnet/git-subrepo\"\n\nif [[ -s \"${GIT_SUBREPO_ROOT:=$HOME/.git-subrepo}/init\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"$GIT_SUBREPO_ROOT/init\"\nfi\n"
  },
  {
    "path": "plugins/available/git.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'git helper functions'\nurl \"https://git-scm.com/\"\n\n# shellcheck disable=SC2016\nfunction git_remote {\n\tabout 'adds remote $GIT_HOSTING:$1 to current repo'\n\tgroup \"git\"\n\n\techo \"Running: git remote add origin ${GIT_HOSTING:?}:$1.git\"\n\tgit remote add origin \"${GIT_HOSTING}:${1}\".git\n}\n\nfunction git_first_push {\n\tabout 'push into origin refs/heads/master'\n\tgroup 'git'\n\n\techo \"Running: git push origin master:refs/heads/master\"\n\tgit push origin master:refs/heads/master\n}\n\nfunction git_pub() {\n\tabout 'publishes current branch to remote origin'\n\tgroup 'git'\n\tBRANCH=$(git rev-parse --abbrev-ref HEAD)\n\n\techo \"Publishing ${BRANCH} to remote origin\"\n\tgit push -u origin \"${BRANCH}\"\n}\n\nfunction git_revert() {\n\tabout 'applies changes to HEAD that revert all changes after this commit'\n\tgroup 'git'\n\n\tgit reset \"${1:?}\"\n\tgit reset --soft \"HEAD@{1}\"\n\tgit commit -m \"Revert to ${1}\"\n\tgit reset --hard\n}\n\nfunction git_rollback() {\n\tabout 'resets the current HEAD to this commit'\n\tgroup 'git'\n\n\tfunction is_clean() {\n\t\tif [[ $(git diff --shortstat 2> /dev/null | tail -n1) != \"\" ]]; then\n\t\t\techo \"Your branch is dirty, please commit your changes\"\n\t\t\tkill -INT $$\n\t\tfi\n\t}\n\n\tfunction commit_exists() {\n\t\tif git rev-list --quiet \"${1:?}\"; then\n\t\t\techo \"Commit ${1} does not exist\"\n\t\t\tkill -INT $$\n\t\tfi\n\t}\n\n\tfunction keep_changes() {\n\t\twhile true; do\n\t\t\t# shellcheck disable=SC2162\n\t\t\tread -p \"Do you want to keep all changes from rolled back revisions in your working tree? [Y/N]\" RESP\n\t\t\tcase \"${RESP}\" in\n\n\t\t\t\t[yY])\n\t\t\t\t\techo \"Rolling back to commit ${1} with unstaged changes\"\n\t\t\t\t\tgit reset \"$1\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN])\n\t\t\t\t\techo \"Rolling back to commit ${1} with a clean working tree\"\n\t\t\t\t\tgit reset --hard \"$1\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo \"Please enter Y or N\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\t}\n\n\tif [ -n \"$(git symbolic-ref HEAD 2> /dev/null)\" ]; then\n\t\tis_clean\n\t\tcommit_exists \"$1\"\n\n\t\twhile true; do\n\t\t\t# shellcheck disable=SC2162\n\t\t\tread -p \"WARNING: This will change your history and move the current HEAD back to commit ${1}, continue? [Y/N]\" RESP\n\t\t\tcase \"${RESP}\" in\n\n\t\t\t\t[yY])\n\t\t\t\t\tkeep_changes \"$1\"\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t[nN])\n\t\t\t\t\tbreak\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\techo \"Please enter Y or N\"\n\t\t\t\t\t;;\n\t\t\tesac\n\t\tdone\n\telse\n\t\techo \"you're currently not in a git repository\"\n\tfi\n}\n\nfunction git_remove_missing_files() {\n\tabout \"git rm's missing files\"\n\tgroup 'git'\n\n\tgit ls-files -d -z | xargs -0 git update-index --remove\n}\n\n# Adds files to git's exclude file (same as .gitignore)\nfunction local-ignore() {\n\tabout 'adds file or path to git exclude file'\n\tparam '1: file or path fragment to ignore'\n\tgroup 'git'\n\techo \"$1\" >> .git/info/exclude\n}\n\n# get a quick overview for your git repo\nfunction git_info() {\n\tabout 'overview for your git repo'\n\tgroup 'git'\n\n\tif [ -n \"$(git symbolic-ref HEAD 2> /dev/null)\" ]; then\n\t\t# print informations\n\t\techo \"git repo overview\"\n\t\techo \"-----------------\"\n\t\techo\n\n\t\t# print all remotes and thier details\n\t\tfor remote in $(git remote show); do\n\t\t\techo \"${remote}\":\n\t\t\tgit remote show \"${remote}\"\n\t\t\techo\n\t\tdone\n\n\t\t# print status of working repo\n\t\techo \"status:\"\n\t\tif [ -n \"$(git status -s 2> /dev/null)\" ]; then\n\t\t\tgit status -s\n\t\telse\n\t\t\techo \"working directory is clean\"\n\t\tfi\n\n\t\t# print at least 5 last log entries\n\t\techo\n\t\techo \"log:\"\n\t\tgit log -5 --oneline\n\t\techo\n\n\telse\n\t\techo \"you're currently not in a git repository\"\n\n\tfi\n}\n\nfunction git_stats {\n\tabout 'display stats per author'\n\tgroup 'git'\n\n\t# awesome work from https://github.com/esc/git-stats\n\t# including some modifications\n\n\tif [ -n \"$(git symbolic-ref HEAD 2> /dev/null)\" ]; then\n\t\techo \"Number of commits per author:\"\n\t\tgit --no-pager shortlog -sn --all\n\t\tAUTHORS=$(git shortlog -sn --all | cut -f2 | cut -f1 -d' ')\n\t\tLOGOPTS=\"\"\n\t\tif [ \"$1\" == '-w' ]; then\n\t\t\tLOGOPTS=\"${LOGOPTS} -w\"\n\t\t\tshift\n\t\tfi\n\t\tif [ \"$1\" == '-M' ]; then\n\t\t\tLOGOPTS=\"${LOGOPTS} -M\"\n\t\t\tshift\n\t\tfi\n\t\tif [ \"$1\" == '-C' ]; then\n\t\t\tLOGOPTS=\"${LOGOPTS} -C --find-copies-harder\"\n\t\t\tshift\n\t\tfi\n\t\tfor a in ${AUTHORS}; do\n\t\t\techo '-------------------'\n\t\t\techo \"Statistics for: ${a}\"\n\t\t\techo -n \"Number of files changed: \"\n\t\t\t# shellcheck disable=SC2086\n\t\t\tgit log ${LOGOPTS} --all --numstat --format=\"%n\" --author=\"${a}\" | cut -f3 | sort -iu | wc -l\n\t\t\techo -n \"Number of lines added: \"\n\t\t\t# shellcheck disable=SC2086\n\t\t\tgit log ${LOGOPTS} --all --numstat --format=\"%n\" --author=\"${a}\" | cut -f1 | awk '{s+=$1} END {print s}'\n\t\t\techo -n \"Number of lines deleted: \"\n\t\t\t# shellcheck disable=SC2086\n\t\t\tgit log ${LOGOPTS} --all --numstat --format=\"%n\" --author=\"${a}\" | cut -f2 | awk '{s+=$1} END {print s}'\n\t\t\techo -n \"Number of merges: \"\n\t\t\t# shellcheck disable=SC2086\n\t\t\tgit log ${LOGOPTS} --all --merges --author=\"${a}\" | grep -c '^commit'\n\t\tdone\n\telse\n\t\techo \"you're currently not in a git repository\"\n\tfi\n}\n\nfunction gittowork() {\n\tabout 'Places the latest .gitignore file for a given project type in the current directory, or concatenates onto an existing .gitignore'\n\tgroup 'git'\n\tparam '1: the language/type of the project, used for determining the contents of the .gitignore file'\n\texample '$ gittowork java'\n\n\tresult=$(curl -L \"https://www.gitignore.io/api/$1\" 2> /dev/null)\n\n\tif [[ \"${result}\" =~ ERROR ]]; then\n\t\techo \"Query '$1' has no match. See a list of possible queries with 'gittowork list'\"\n\telif [[ $1 == list ]]; then\n\t\techo \"${result}\"\n\telse\n\t\tif [[ -f .gitignore ]]; then\n\t\t\tresult=$(grep -v \"# Created by http://www.gitignore.io\" <<< \"${result}\")\n\t\t\techo \".gitignore already exists, appending...\"\n\t\tfi\n\t\techo \"${result}\" >> .gitignore\n\tfi\n}\n\nfunction gitignore-reload() {\n\tabout 'Empties the git cache, and readds all files not blacklisted by .gitignore'\n\tgroup 'git'\n\texample '$ gitignore-reload'\n\n\t# The .gitignore file should not be reloaded if there are uncommited changes.\n\t# Firstly, require a clean work tree. The function require_clean_work_tree()\n\t# was stolen with love from https://www.spinics.net/lists/git/msg142043.html\n\n\t# Begin require_clean_work_tree()\n\n\t# Update the index\n\tgit update-index -q --ignore-submodules --refresh\n\terr=0\n\n\t# Disallow unstaged changes in the working tree\n\tif ! git diff-files --quiet --ignore-submodules --; then\n\t\techo >&2 \"ERROR: Cannot reload .gitignore: Your index contains unstaged changes.\"\n\t\tgit diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2\n\t\terr=1\n\tfi\n\n\t# Disallow uncommited changes in the index\n\tif ! git diff-index --cached --quiet HEAD --ignore-submodules; then\n\t\techo >&2 \"ERROR: Cannot reload .gitignore: Your index contains uncommited changes.\"\n\t\tgit diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2\n\t\terr=1\n\tfi\n\n\t# Prompt user to commit or stash changes and exit\n\tif [[ \"${err}\" == 1 ]]; then\n\t\techo >&2 \"Please commit or stash them.\"\n\tfi\n\n\t# End require_clean_work_tree()\n\n\t# If we're here, then there are no uncommited or unstaged changes dangling around.\n\t# Proceed to reload .gitignore\n\tif [[ \"${err}\" == 0 ]]; then\n\t\t# Remove all cached files\n\t\tgit rm -r --cached .\n\n\t\t# Re-add everything. The changed .gitignore will be picked up here and will exclude the files\n\t\t# now blacklisted by .gitignore\n\t\techo >&2 \"Running git add .\"\n\t\tgit add .\n\t\techo >&2 \"Files readded. Commit your new changes now.\"\n\tfi\n}\n\nfunction git-changelog() {\n\t# ---------------------------------------------------------------\n\t#  ORIGINAL ANSWER: https://stackoverflow.com/a/2979587/10362396 |\n\t# ---------------------------------------------------------------\n\tabout 'Creates the git changelog from one point to another by date'\n\tgroup 'git'\n\texample '$ git-changelog origin/master...origin/release [md|txt]'\n\n\tif [[ \"$1\" != *\"...\"* ]]; then\n\t\techo \"Please include the valid 'diff' to make changelog\"\n\t\treturn 1\n\tfi\n\n\t# shellcheck disable=SC2155\n\tlocal NEXT=$(date +%F)\n\n\tif [[ \"$2\" == \"md\" ]]; then\n\t\techo \"# CHANGELOG $1\"\n\n\t\t# shellcheck disable=SC2162\n\t\tgit log \"$1\" --no-merges --format=\"%cd\" --date=short | sort -u -r | while read DATE; do\n\t\t\techo\n\t\t\techo \"### ${DATE}\"\n\t\t\tgit log --no-merges --format=\" * (%h) %s by [%an](mailto:%ae)\" --since=\"${DATE} 00:00:00\" --until=\"${DATE} 24:00:00\"\n\t\t\tNEXT=${DATE}\n\t\tdone\n\telse\n\t\techo \"CHANGELOG $1\"\n\t\techo ----------------------\n\n\t\t# shellcheck disable=SC2162\n\t\tgit log \"$1\" --no-merges --format=\"%cd\" --date=short | sort -u -r | while read DATE; do\n\t\t\techo\n\t\t\techo \"[${DATE}]\"\n\t\t\tgit log --no-merges --format=\" * (%h) %s by %an <%ae>\" --since=\"${DATE} 00:00:00\" --until=\"${DATE} 24:00:00\"\n\t\t\t# shellcheck disable=SC2034\n\t\t\tNEXT=${DATE}\n\t\tdone\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/gitstatus.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus'\nurl \"https://github.com/romkatv/gitstatus\"\n\nfunction gitstatus_on_disable() {\n\tabout 'Destructor of gitstatus plugin'\n\tgroup 'gitstatus'\n\n\tunset SCM_GIT_USE_GITSTATUS\n\t_command_exists gitstatus_stop && gitstatus_stop\n}\n\n# No scm-check\n[[ $SCM_CHECK == \"true\" ]] || return\n\n# non-interactive shell\n[[ $- == *i* ]] || return\n\n: \"${SCM_GIT_GITSTATUS_DIR:=\"$HOME/gitstatus\"}\"\nif [[ -d ${SCM_GIT_GITSTATUS_DIR} ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"${SCM_GIT_GITSTATUS_DIR}/gitstatus.plugin.sh\"\n\t# Start the actual gitstatus binary\n\tgitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1\n\texport SCM_GIT_USE_GITSTATUS=true\nelse\n\t_log_warning \"Could not find gitstatus directory in ${SCM_GIT_GITSTATUS_DIR}. Please specify directory location using SCM_GIT_GITSTATUS_DIR.\"\nfi\n"
  },
  {
    "path": "plugins/available/go.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'go environment variables & path configuration'\nurl \"https://golang.org/\"\n\n# Load after basher and goenv\n# BASH_IT_LOAD_PRIORITY: 270\n\n# Test `go version` because goenv creates shim scripts that will be found in PATH\n# but do not always resolve to a working install.\n{ _command_exists go && go version &> /dev/null; } || return 0\n\nexport GOROOT=\"${GOROOT:-$(go env GOROOT)}\"\nexport GOPATH=\"${GOPATH:-$(go env GOPATH)}\"\n\n# $GOPATH/bin is the default location for binaries. Because GOPATH accepts a list of paths and each\n# might be managed differently, we add each path's /bin folder to PATH using pathmunge,\n# while preserving ordering.\n# e.g. GOPATH=foo:bar  ->  PATH=foo/bin:bar/bin\n_bash-it-gopath-pathmunge() {\n\t_about 'Ensures paths in GOPATH are added to PATH using pathmunge, with /bin appended'\n\t_group 'go'\n\tif [[ -z \"${GOPATH:-}\" ]]; then\n\t\t_log_warning 'GOPATH empty'\n\t\treturn 1\n\tfi\n\tlocal paths apath\n\tIFS=: read -r -a paths <<< \"$GOPATH\"\n\tfor apath in \"${paths[@]}\"; do\n\t\tpathmunge \"${apath}/bin\" || true\n\tdone\n}\n_bash-it-gopath-pathmunge\n"
  },
  {
    "path": "plugins/available/goenv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load goenv, if you are using it'\nurl \"https://github.com/syndbg/goenv\"\n\n# https://github.com/syndbg/goenv\n\n# Load after basher\n# BASH_IT_LOAD_PRIORITY: 260\n\n# Don't modify the environment if we can't find the tool:\n# - Check if in $PATH already\n# - Check if installed manually to $GOENV_ROOT\n# - Check if installed manually to $HOME\n_command_exists goenv \\\n\t|| [[ -n \"$GOENV_ROOT\" && -x \"$GOENV_ROOT/bin/goenv\" ]] \\\n\t|| [[ -x \"$HOME/.goenv/bin/goenv\" ]] \\\n\t|| return 0\n\n# Set GOENV_ROOT, if not already set\nexport GOENV_ROOT=\"${GOENV_ROOT:-$HOME/.goenv}\"\n\n# Add GOENV_ROOT/bin to PATH, if that's where it's installed\nif ! _command_exists goenv && [[ -x \"$GOENV_ROOT/bin/goenv\" ]]; then\n\tpathmunge \"$GOENV_ROOT/bin\"\nfi\n\n# Initialize goenv\neval \"$(goenv init - bash)\"\n\n# If moving to a directory with a goenv version set, reload the shell\n# to ensure the shell environment matches expectations.\n_bash-it-goenv-preexec() {\n\tGOENV_OLD_VERSION=\"$(goenv version-name)\"\n}\n_bash-it-goenv-precmd() {\n\tif [[ -n $GOENV_OLD_VERSION ]] && [[ \"$GOENV_OLD_VERSION\" != \"$(goenv version-name)\" ]]; then\n\t\texec env -u PATH -u GOROOT -u GOPATH -u GOENV_OLD_VERSION \"${0/-/}\" --login\n\tfi\n\tunset GOENV_OLD_VERSION\n}\npreexec_functions+=(_bash-it-goenv-preexec)\nprecmd_functions+=(_bash-it-goenv-precmd)\n"
  },
  {
    "path": "plugins/available/gradle.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Add a gw command to use gradle wrapper if present, else use system gradle'\nurl \"https://gradle.org/\"\n\nfunction gw() {\n\tlocal file=\"gradlew\"\n\tlocal result\n\n\tresult=\"$(_bash-it-find-in-ancestor \"${file}\")\"\n\n\t# Call gradle\n\t\"${result:-gradle}\" \"$@\"\n}\n"
  },
  {
    "path": "plugins/available/hg.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'hg helper functions'\nurl \"https://www.mercurial-scm.org/\"\n\nhg_dirty() {\n\tabout 'displays dirty status of hg repository'\n\tgroup 'hg'\n\n\thg status --no-color 2> /dev/null \\\n\t\t| awk '$1 == \"?\" { print \"?\" } $1 != \"?\" { print \"!\" }' \\\n\t\t| sort | uniq | head -c1\n}\n\nhg_in_repo() {\n\tabout 'determine if pwd is an hg repo'\n\tgroup 'hg'\n\n\t[[ $(hg branch 2> /dev/null) ]] && echo 'on '\n}\n\nhg_branch() {\n\tabout 'display current hg branch'\n\tgroup 'hg'\n\n\thg branch 2> /dev/null\n}\n"
  },
  {
    "path": "plugins/available/history-eternal.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'eternal bash history'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 3 ]]; then\n\t_log_warning \"Bash version 4.3 introduced the 'unlimited' history size capability.\"\n\t_log_warning \"Disabling history-eternal plugin (current version: $BASH_VERSION)\"\n\t_disable-plugin history-eternal\n\treturn 0\nfi\n\n# Modify history sizes before changing location to avoid unintentionally\n# truncating the history file early.\n\n# \"Numeric values less than zero result in every command being saved on the history list (there is no limit)\"\nHISTSIZE=-1 2> /dev/null || true\n\n# \"Non-numeric values and numeric values less than zero inhibit truncation\"\nHISTFILESIZE='unlimited' 2> /dev/null || true\n\n# Use a custom history file location so history is not truncated\n# if the environment ever loses this \"eternal\" configuration.\nHISTDIR=\"${XDG_STATE_HOME:-${HOME?}/.local/state}/bash\"\n[[ -d ${HISTDIR?} ]] || mkdir -p \"${HISTDIR?}\"\nHISTFILE=\"${HISTDIR?}/history\" 2> /dev/null || true\n"
  },
  {
    "path": "plugins/available/history-search.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'search history using the prefix already entered'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# enter a few characters and press UpArrow/DownArrow\n# to search backwards/forwards through the history\nif [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then\n\tbind '\"\\e[A\":history-search-backward'\n\tbind '\"\\e[B\":history-search-forward'\nfi\n"
  },
  {
    "path": "plugins/available/history-substring-search.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'search history using the substring already entered'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# enter a few characters and press UpArrow/DownArrow\n# to search backwards/forwards through the history\nif [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then\n\tbind '\"\\e[A\":history-substring-search-backward'\n\tbind '\"\\e[B\":history-substring-search-forward'\nfi\n"
  },
  {
    "path": "plugins/available/history.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'improve history handling with sane defaults'\nurl \"https://github.com/Bash-it/bash-it\"\n\n# Append the history list to the file named by the value of the HISTFILE\n# variable when the shell exits, rather than overwriting the file.\nshopt -s histappend\n\n# 'ignorespace': don't save command lines which begin with a space to history\n# 'erasedups' (alternative 'ignoredups'): don't save duplicates to history\n# 'autoshare': automatically share history between multiple running shells\n: \"${HISTCONTROL:=ignorespace:erasedups:autoshare}\"\n\n# resize history to 100x the default (500)\n: \"${HISTSIZE:=50000}\"\n\nfunction top-history() {\n\tabout 'print the name and count of the most commonly run tools'\n\n\t# - Make sure formatting doesn't interfer with our parsing\n\t# - Use awk to count how many times the first command on each line has been called\n\t# - Truncate to 10 lines\n\t# - Print in column format\n\tHISTTIMEFORMAT='' history \\\n\t\t| awk '{\n\t\t\t\ta[$2]++\n\t\t\t}END{\n\t\t\t\tfor(i in a)\n\t\t\t\tprintf(\"%s\\t%s\\n\", a[i], i)\n\t\t\t}' \\\n\t\t| sort --reverse --numeric-sort \\\n\t\t| head \\\n\t\t| column \\\n\t\t\t--table \\\n\t\t\t--table-columns 'Command Count,Command Name' \\\n\t\t\t--output-separator ' | '\n}\n"
  },
  {
    "path": "plugins/available/hub.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load hub, if you are using it'\nurl \"https://github.com/github/hub\"\n\nif _command_exists hub; then\n\teval \"$(hub alias -s)\"\nfi\n"
  },
  {
    "path": "plugins/available/java.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'Java and JAR helper functions'\nurl \"https://www.java.com/\"\n\nfunction jar_manifest {\n\tabout \"extracts the specified JAR file's MANIFEST file and prints it to stdout\"\n\tgroup 'java'\n\tparam '1: JAR file to extract the MANIFEST from'\n\texample 'jar_manifest lib/foo.jar'\n\n\tunzip -c \"${1:?${FUNCNAME[0]}: JAR file must be specified}\" META-INF/MANIFEST.MF\n}\n"
  },
  {
    "path": "plugins/available/javascript.plugin.bash",
    "content": "# shellcheck shell=bash\n# The install directory is hard-coded. TODO: allow the directory to be specified on the command line.\n\ncite about-plugin\nabout-plugin 'download jquery files into current project'\nurl \"https://jquery.com/\"\n\n[[ -z \"$JQUERY_VERSION_NUMBER\" ]] && JQUERY_VERSION_NUMBER=\"1.6.1\"\n[[ -z \"$JQUERY_UI_VERSION_NUMBER\" ]] && JQUERY_UI_VERSION_NUMBER=\"1.8.13\"\n\nfunction rails_jquery {\n\tabout 'download rails.js into public/javascripts'\n\tgroup 'javascript'\n\n\tcurl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js\n}\n\nfunction jquery_install {\n\tabout 'download jquery.js into public/javascripts'\n\tgroup 'javascript'\n\n\tif [ -z \"$1\" ]; then\n\t\tversion=$JQUERY_VERSION_NUMBER\n\telse\n\t\tversion=\"$1\"\n\tfi\n\tcurl -o public/javascripts/jquery.js \"http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js\"\n}\n\nfunction jquery_ui_install {\n\tabout 'download jquery_us.js into public/javascripts'\n\tgroup 'javascript'\n\n\tif [ -z \"$1\" ]; then\n\t\tversion=$JQUERY_UI_VERSION_NUMBER\n\telse\n\t\tversion=\"$1\"\n\tfi\n\n\tcurl -o public/javascripts/jquery_ui.js \"http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js\"\n}\n"
  },
  {
    "path": "plugins/available/jekyll.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'manage your jekyll site'\nurl \"https://jekyllrb.com/\"\n\nfunction editpost() {\n\tabout 'edit a post'\n\tparam '1: site directory'\n\tgroup 'jekyll'\n\n\tlocal SITE site POST DATE TITLE POSTS\n\tlocal -i COUNTER=1 POST_TO_EDIT ret\n\tif [[ -z \"${1:-}\" ]]; then\n\t\techo \"Error: no site specified.\"\n\t\techo \"The site is the name of the directory your project is in.\"\n\t\treturn 1\n\tfi\n\n\tfor site in \"${SITES[@]:-}\"; do\n\t\tif [[ \"${site##*/}\" == \"$1\" ]]; then\n\t\t\tSITE=\"${site}\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\tif [[ -z \"${SITE:-}\" ]]; then\n\t\techo \"No such site.\"\n\t\treturn 1\n\tfi\n\n\tpushd \"${SITE}/_posts\" > /dev/null || return\n\n\tfor POST in *; do\n\t\tDATE=\"$(echo \"${POST}\" | grep -E -o \"[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}\")\"\n\t\tTITLE=\"$(grep -E -o \"title: (.+)\" < \"${POST}\")\"\n\t\tTITLE=\"${TITLE/title: /}\"\n\t\techo \"${COUNTER}) \t${DATE}\t${TITLE}\"\n\t\tPOSTS[COUNTER]=\"$POST\"\n\t\tCOUNTER=\"$((COUNTER + 1))\"\n\tdone > >(less)\n\tread -rp \"Number of post to edit: \" POST_TO_EDIT\n\t\"${JEKYLL_EDITOR:-${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}}}\" \"${POSTS[POST_TO_EDIT]}\"\n\tret=\"$?\"\n\tpopd > /dev/null || return \"$ret\"\n\treturn \"$ret\"\n}\n\nfunction newpost() {\n\tabout 'create a new post'\n\tparam '1: site directory'\n\tgroup 'jekyll'\n\n\tlocal SITE site FNAME_POST_TITLE FNAME YAML_DATE\n\tlocal JEKYLL_FORMATTING FNAME_DATE OPTIONS OPTION POST_TYPE POST_TITLE\n\tlocal -i loc=0 ret\n\tif [[ -z \"${1:-}\" ]]; then\n\t\techo \"Error: no site specified.\"\n\t\techo \"The site is the name of the directory your project is in.\"\n\t\treturn 1\n\tfi\n\n\tif [[ -z \"${SITE}\" ]]; then\n\t\techo \"No such site.\"\n\t\treturn 1\n\tfi\n\n\tfor site in \"${SITES[@]}\"; do\n\t\tif [[ \"${site##*/}\" == \"$1\" ]]; then\n\t\t\tSITE=\"$site\"\n\t\t\tJEKYLL_FORMATTING=\"${MARKUPS[loc]}\"\n\t\t\tbreak\n\t\tfi\n\t\tloc=$((loc + 1))\n\tdone\n\n\t# Change directory into the local jekyll root\n\tpushd \"${SITE}/_posts\" > /dev/null || return\n\n\t# Get the date for the new post's filename\n\tFNAME_DATE=\"$(date \"+%Y-%m-%d\")\"\n\n\t# If the user is using markdown or textile formatting, let them choose what type of post they want. Sort of like Tumblr.\n\tOPTIONS=('Text' 'Quote' 'Image' 'Audio' 'Video' 'Link')\n\n\tif [[ $JEKYLL_FORMATTING == \"markdown\" || $JEKYLL_FORMATTING == \"textile\" ]]; then\n\t\tselect OPTION in \"${OPTIONS[@]}\"; do\n\t\t\tPOST_TYPE=\"${OPTION}\"\n\t\t\tbreak\n\t\tdone\n\tfi\n\n\t# Get the title for the new post\n\tread -rp \"Enter title of the new post: \" POST_TITLE\n\n\t# Convert the spaces in the title to hyphens for use in the filename\n\tFNAME_POST_TITLE=\"${POST_TITLE/ /-}\"\n\n\t# Now, put it all together for the full filename\n\tFNAME=\"$FNAME_DATE-$FNAME_POST_TITLE.$JEKYLL_FORMATTING\"\n\n\t# And, finally, create the actual post file. But we're not done yet...\n\t{\n\t\t# Write a little stuff to the file for the YAML Front Matter\n\t\techo \"---\"\n\n\t\t# Now we have to get the date, again. But this time for in the header (YAML Front Matter) of the file\n\t\tYAML_DATE=\"$(date \"+%B %d %Y %X\")\"\n\n\t\t# Echo the YAML Formatted date to the post file\n\t\techo \"date: $YAML_DATE\"\n\n\t\t# Echo the original post title to the YAML Front Matter header\n\t\techo \"title: $POST_TITLE\"\n\n\t\t# And, now, echo the \"post\" layout to the YAML Front Matter header\n\t\techo \"layout: post\"\n\n\t\t# Close the YAML Front Matter Header\n\t\techo \"---\"\n\n\t\techo\n\t} > \"${FNAME}\"\n\n\t# Generate template text based on the post type\n\tif [[ $JEKYLL_FORMATTING == \"markdown\" ]]; then\n\t\tcase $POST_TYPE in\n\t\t\t\"Text\")\n\t\t\t\ttrue\n\t\t\t\t;;\n\t\t\t\"Quote\")\n\t\t\t\techo \"> Quote\"\n\t\t\t\techo\n\t\t\t\techo \"&mdash; Author\"\n\t\t\t\t;;\n\t\t\t\"Image\")\n\t\t\t\techo \"![Alternate Text](/path/to/image/or/url)\"\n\t\t\t\t;;\n\t\t\t\"Audio\")\n\t\t\t\techo \"<html><audio src=\\\"/path/to/audio/file\\\" controls=\\\"controls\\\"></audio></html>\"\n\t\t\t\t;;\n\t\t\t\"Video\")\n\t\t\t\techo \"<html><video src=\\\"/path/to/video\\\" controls=\\\"controls\\\"></video></html>\"\n\t\t\t\t;;\n\t\t\t\"Link\")\n\t\t\t\techo \"[link][1]\"\n\t\t\t\techo\n\t\t\t\techo \"> Quote\"\n\t\t\t\techo\n\t\t\t\techo \"[1]: url\"\n\t\t\t\t;;\n\t\tesac\n\telif [[ $JEKYLL_FORMATTING == \"textile\" ]]; then\n\t\tcase $POST_TYPE in\n\t\t\t\"Text\")\n\t\t\t\ttrue\n\t\t\t\t;;\n\t\t\t\"Quote\")\n\t\t\t\techo \"bq. Quote\"\n\t\t\t\techo\n\t\t\t\techo \"&mdash; Author\"\n\t\t\t\t;;\n\t\t\t\"Image\")\n\t\t\t\techo \"!url(alt text)\"\n\t\t\t\t;;\n\t\t\t\"Audio\")\n\t\t\t\techo \"<html><audio src=\\\"/path/to/audio/file\\\" controls=\\\"controls\\\"></audio></html>\"\n\t\t\t\t;;\n\t\t\t\"Video\")\n\t\t\t\techo \"<html><video src=\\\"/path/to/video\\\" controls=\\\"controls\\\"></video></html>\"\n\t\t\t\t;;\n\t\t\t\"Link\")\n\t\t\t\techo \"\\\"Site\\\":url\"\n\t\t\t\techo\n\t\t\t\techo \"bq. Quote\"\n\t\t\t\t;;\n\t\tesac\n\tfi >> \"${FNAME}\"\n\n\t# Open the file in your favorite editor\n\t\"${JEKYLL_EDITOR:-${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}}}\" \"${FNAME}\"\n\tret=\"$?\"\n\tpopd > /dev/null || return \"$ret\"\n\treturn \"$ret\"\n}\n\nfunction testsite() {\n\tabout 'launches local jekyll server'\n\tparam '1: site directory'\n\tgroup 'jekyll'\n\n\tlocal SITE site\n\tlocal -i ret\n\tif [[ -z \"${1:-}\" ]]; then\n\t\techo \"Error: no site specified.\"\n\t\techo \"The site is the name of the directory your project is in.\"\n\t\treturn 1\n\tfi\n\n\tfor site in \"${SITES[@]}\"; do\n\t\tif [[ \"${site##*/}\" == \"$1\" ]]; then\n\t\t\tSITE=\"$site\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\tif [[ -z \"${SITE}\" ]]; then\n\t\techo \"No such site.\"\n\t\treturn 1\n\tfi\n\n\tpushd \"${SITE}\" > /dev/null || return\n\tjekyll --server --auto\n\tret=\"$?\"\n\tpopd > /dev/null || return \"$ret\"\n\treturn \"$ret\"\n}\n\nfunction buildsite() {\n\tabout 'builds site'\n\tparam '1: site directory'\n\tgroup 'jekyll'\n\n\tlocal SITE site\n\tlocal -i ret\n\tif [[ -z \"${1:-}\" ]]; then\n\t\techo \"Error: no site specified.\"\n\t\techo \"The site is the name of the directory your project is in.\"\n\t\treturn 1\n\tfi\n\n\tfor site in \"${SITES[@]}\"; do\n\t\tif [[ \"${site##*/}\" == \"$1\" ]]; then\n\t\t\tSITE=\"$site\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\tif [[ -z \"${SITE}\" ]]; then\n\t\techo \"No such site.\"\n\t\treturn 1\n\tfi\n\n\tpushd \"${SITE}\" > /dev/null || return\n\trm -rf _site\n\tjekyll --no-server\n\tret=\"$?\"\n\tpopd > /dev/null || return \"$ret\"\n\treturn \"$ret\"\n}\n\nfunction deploysite() {\n\tabout 'rsyncs site to remote host'\n\tparam '1: site directory'\n\tgroup 'jekyll'\n\n\tlocal SITE site REMOTE\n\tlocal -i loc=0 ret\n\tif [[ -z \"${1:-}\" ]]; then\n\t\techo \"Error: no site specified.\"\n\t\techo \"The site is the name of the directory your project is in.\"\n\t\treturn 1\n\tfi\n\n\tfor site in \"${SITES[@]}\"; do\n\t\tif [[ \"${site##*/}\" == \"$1\" ]]; then\n\t\t\tSITE=\"$site\"\n\t\t\t# shellcheck disable=SC2153 # who knows\n\t\t\tREMOTE=\"${REMOTES[loc]}\"\n\t\t\tbreak\n\t\tfi\n\t\tloc=$((loc + 1))\n\tdone\n\n\tif [[ -z \"${SITE}\" ]]; then\n\t\techo \"No such site.\"\n\t\treturn 1\n\tfi\n\n\tpushd \"${SITE}\" > /dev/null || return\n\trsync -rz \"${REMOTE?}\"\n\tret=\"$?\"\n\tpopd > /dev/null || return \"$ret\"\n\treturn \"$ret\"\n}\n\n# Load the Jekyll config\nif [[ -s \"$HOME/.jekyllconfig\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"$HOME/.jekyllconfig\"\nfi\n"
  },
  {
    "path": "plugins/available/jenv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load jenv, if you are using it'\nurl \"https://www.jenv.be/\"\n\n# Don't modify the environment if we can't find the tool:\n# - Check if in $PATH already\n# - Check if installed manually to $JENV_ROOT\n# - Check if installed manually to $HOME\n_command_exists jenv \\\n\t|| [[ -n \"$JENV_ROOT\" && -x \"$JENV_ROOT/bin/jenv\" ]] \\\n\t|| [[ -x \"$HOME/.jenv/bin/jenv\" ]] \\\n\t|| return\n\n# Set JENV_ROOT, if not already set\nexport JENV_ROOT=\"${JENV_ROOT:-$HOME/.jenv}\"\n\n# Add JENV_ROOT/bin to PATH, if that's where it's installed\n! _command_exists jenv \\\n\t&& [[ -x \"$JENV_ROOT/bin/jenv\" ]] \\\n\t&& pathmunge \"$JENV_ROOT/bin\"\n\n# Initialize jenv\neval \"$(jenv init - bash)\"\n"
  },
  {
    "path": "plugins/available/jgitflow.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2086\ncite about-plugin\nabout-plugin 'Maven jgitflow build helpers'\nurl \"https://bitbucket.org/atlassian/jgit-flow/\"\n\nfunction pre-jgitflow {\n\tabout 'helper function for execute before jgitflow'\n\tgroup 'jgitflow'\n}\n\nfunction test-pre-jgitflow {\n\tabout 'helper function for starting a new hotfix'\n\tgroup 'jgitflow'\n\n\techo \"Init pre-maven\" && pre-jgitflow && echo \"Finish pre-maven\"\n}\n\nfunction hotfix-start {\n\tabout 'helper function for starting a new hotfix'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:hotfix-start ${JGITFLOW_MVN_ARGUMENTS}\n}\n\nfunction hotfix-finish {\n\tabout 'helper function for finishing a hotfix'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:hotfix-finish -Darguments=\"${JGITFLOW_MVN_ARGUMENTS}\" && git push && git push origin master && git push --tags && mvn clean\n}\n\nfunction feature-start {\n\tabout 'helper function for starting a new feature'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:feature-start ${JGITFLOW_MVN_ARGUMENTS}\n}\n\nfunction feature-finish {\n\tabout 'helper function for finishing a feature'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:feature-finish ${JGITFLOW_MVN_ARGUMENTS} && mvn clean\n\techo -e '\\033[32m----------------------------------------------------------------\\033[0m'\n\techo -e '\\033[32m===== REMEMBER TO CREATE A NEW RELEASE TO DEPLOY THIS FEATURE ====\\033[0m'\n\techo -e '\\033[32m----------------------------------------------------------------\\033[0m'\n}\n\nfunction release-start {\n\tabout 'helper function for starting a new release'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:release-start ${JGITFLOW_MVN_ARGUMENTS}\n}\n\nfunction release-finish {\n\tabout 'helper function for finishing a release'\n\tgroup 'jgitflow'\n\n\tpre-jgitflow && mvn jgitflow:release-finish -Darguments=\"${JGITFLOW_MVN_ARGUMENTS}\" && git push && git push origin master && git push --tags && mvn clean\n}\n"
  },
  {
    "path": "plugins/available/jump.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2016\ncite about-plugin\nabout-plugin 'initialize jump (see https://github.com/gsamokovarov/jump). Add `export JUMP_OPTS=(\"--bind=z\")` to change keybinding'\nurl \"https://github.com/gsamokovarov/jump\"\n\nfunction __init_jump() {\n\tif _command_exists jump; then\n\t\teval \"$(jump shell bash \"${JUMP_OPTS[@]}\")\"\n\tfi\n}\n\n__init_jump\n"
  },
  {
    "path": "plugins/available/latex.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'add MacTeX to PATH'\nurl \"https://www.latex-project.org/\"\n\n_bash_it_plugin_latex_paths=(\n\t# Standard locations\n\t/usr/local/texbin\n\t# MacOS locations\n\t/Library/TeX/texbin\n)\n\n# add mactex to the path if its present\nfor _bash_it_plugin_latex_path in \"${_bash_it_plugin_latex_paths[@]}\"; do\n\tif [[ -d \"$_bash_it_plugin_latex_path/\" ]]; then\n\t\tpathmunge \"$_bash_it_plugin_latex_path\" after && break\n\tfi\ndone\n\n# Cleanup\nunset \"${!_bash_it_plugin_latex_@}\"\n"
  },
  {
    "path": "plugins/available/less-pretty-cat.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'pygmentize instead of cat to terminal if possible'\nurl \"https://pygments.org/\"\n\n_command_exists pygmentize || return\n\n# pigmentize cat and less outputs - call them ccat and cless to avoid that\n# especially cat'ed output in scripts gets mangled with pygemtized meta characters\nfunction ccat() {\n\tabout 'runs pygmentize on each file passed in'\n\tparam '*: files to concatenate (as normally passed to cat)'\n\texample 'ccat mysite/manage.py dir/text-file.txt'\n\n\tpygmentize -f 256 -O style=\"${BASH_IT_CCAT_STYLE:-default}\" -g \"$@\"\n}\n\nfunction cless() {\n\tabout 'pigments the files passed in and passes to less for pagination'\n\tparam '*: the files to paginate with less'\n\texample 'cless mysite/manage.py'\n\n\tpygmentize -f 256 -O style=\"${BASH_IT_CLESS_STYLE:-default}\" -g \"$@\" | command less -R\n}\n"
  },
  {
    "path": "plugins/available/man.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'colorize man pages for better readability'\nurl \"https://github.com/Bash-it/bash-it\"\n\nalias man=\"\\\nLESS_TERMCAP_mb=$'\\e[1;32m' \\\nLESS_TERMCAP_md=$'\\e[1;32m' LESS_TERMCAP_me=$'\\e[0m' \\\nLESS_TERMCAP_se=$'\\e[0m'    LESS_TERMCAP_so=$'\\e[01;33m' \\\nLESS_TERMCAP_ue=$'\\e[0m'    LESS_TERMCAP_us=$'\\e[1;4;31m' \\\nLESS=--RAW-CONTROL-CHARS \\man\"\n"
  },
  {
    "path": "plugins/available/nginx.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'manage your nginx service'\nurl \"https://nginx.org/\"\n\npathmunge \"${NGINX_PATH:=/opt/nginx}/sbin\" after\nexport NGINX_PATH\n\nfunction nginx_reload() {\n\tabout 'reload your nginx config'\n\tgroup 'nginx'\n\n\tlocal FILE=\"${NGINX_PATH?}/logs/nginx.pid\"\n\tif [[ -s $FILE ]]; then\n\t\techo \"Reloading NGINX...\"\n\t\tread -r PID < \"${FILE}\"\n\t\tsudo kill -HUP \"${PID?}\"\n\telse\n\t\techo \"Nginx pid file not found\"\n\t\treturn 0\n\tfi\n}\n\nfunction nginx_stop() {\n\tabout 'stop nginx'\n\tgroup 'nginx'\n\n\tlocal FILE=\"${NGINX_PATH?}/logs/nginx.pid\"\n\tif [[ -s $FILE ]]; then\n\t\techo \"Stopping NGINX...\"\n\t\tread -r PID < \"${FILE}\"\n\t\tsudo kill -INT \"${PID?}\"\n\telse\n\t\techo \"Nginx pid file not found\"\n\t\treturn 0\n\tfi\n}\n\nfunction nginx_start() {\n\tabout 'start nginx'\n\tgroup 'nginx'\n\n\tlocal FILE=\"${NGINX_PATH?}/sbin/nginx\"\n\tif [[ -x $FILE ]]; then\n\t\techo \"Starting NGINX...\"\n\t\tsudo \"${FILE}\"\n\telse\n\t\techo \"Couldn't start nginx\"\n\tfi\n}\n\nfunction nginx_restart() {\n\tabout 'restart nginx'\n\tgroup 'nginx'\n\n\tnginx_stop && nginx_start\n}\n"
  },
  {
    "path": "plugins/available/node.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Node.js helper functions'\nurl \"https://nodejs.org/\"\n\n# Check that we have npm\n_command_exists npm || return\n\n# Ensure local modules are preferred in PATH\npathmunge \"./node_modules/.bin\" \"after\"\n\n# If not using nodenv, ensure global modules are in PATH\nif [[ ! \"$(type -p npm)\" == *\"nodenv/shims\"* ]]; then\n\tpathmunge \"$(npm config get prefix)/bin\" \"after\"\nfi\n"
  },
  {
    "path": "plugins/available/nodenv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load nodenv, if you are using it'\nurl \"https://github.com/nodenv/nodenv\"\n\nexport NODENV_ROOT=\"$HOME/.nodenv\"\npathmunge \"$NODENV_ROOT/bin\"\n\nif _command_exists nodenv; then\n\teval \"$(nodenv init - bash)\"\nfi\n"
  },
  {
    "path": "plugins/available/nvm.plugin.bash",
    "content": "# shellcheck shell=bash\n#\n# BASH_IT_LOAD_PRIORITY: 225\n#\n# Bash-it no longer bundles nvm, as this was quickly becoming outdated.\n# Please install nvm from https://github.com/creationix/nvm.git if you want to use it.\n\ncite about-plugin\nabout-plugin 'node version manager configuration'\nurl \"https://github.com/nvm-sh/nvm\"\n\nexport NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n\n# first check if NVM is managed by brew\nNVM_BREW_PREFIX=\"\"\nif _bash_it_homebrew_check; then\n\tNVM_BREW_PREFIX=$(brew --prefix nvm 2> /dev/null)\nfi\n\n# This loads nvm\nif [[ -n \"$NVM_BREW_PREFIX\" && -s \"${NVM_BREW_PREFIX}/nvm.sh\" ]]; then\n\t# shellcheck disable=SC1091\n\tsource \"${NVM_BREW_PREFIX}/nvm.sh\"\nelse\n\t# shellcheck disable=SC1091\n\t[[ -s \"$NVM_DIR/nvm.sh\" ]] && source \"$NVM_DIR/nvm.sh\"\nfi\n\nif ! _command_exists nvm; then\n\tfunction nvm() {\n\t\techo \"Bash-it no longer bundles the nvm script. Please install the latest version from\"\n\t\techo \"\"\n\t\techo \"https://github.com/creationix/nvm.git\"\n\t\techo \"\"\n\t\techo \"if you want to use nvm. You can keep this plugin enabled once you have installed nvm.\"\n\t}\n\n\tnvm\nfi\n"
  },
  {
    "path": "plugins/available/osx-timemachine.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'OS X Time Machine functions'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif [[ \"${OSTYPE}\" != 'darwin'* ]]; then\n\t_log_warning \"This plugin only works with Mac OS X\"\n\treturn 1\nfi\n\nfunction time-machine-destination() {\n\tgroup \"osx-timemachine\"\n\tabout \"Shows the OS X Time Machine destination/mount point\"\n\n\ttmutil destinationinfo | grep \"Mount Point\" | sed -e 's/Mount Point   : \\(.*\\)/\\1/g'\n}\n\nfunction time-machine-list-machines() {\n\tgroup \"osx-timemachine\"\n\tabout \"Lists the OS X Time Machine machines on the backup volume\"\n\n\tlocal tmdest line\n\ttmdest=\"$(time-machine-destination)/Backups.backupdb\"\n\n\tfind \"$tmdest\" -maxdepth 1 -mindepth 1 -type d | grep -v \"/\\.\" | while read -r line; do\n\t\techo \"${line##*/}\"\n\tdone\n}\n\nfunction time-machine-list-all-backups() {\n\tgroup \"osx-timemachine\"\n\tabout \"Shows all of the backups for the specified machine\"\n\tparam \"1: Machine name (optional)\"\n\texample \"time-machine-list-all-backups my-laptop\"\n\n\t# Use the local hostname if none provided\n\tlocal COMPUTERNAME BACKUP_LOCATION line\n\tCOMPUTERNAME=${1:-$(scutil --get ComputerName)}\n\tBACKUP_LOCATION=\"$(time-machine-destination)/Backups.backupdb/$COMPUTERNAME\"\n\n\tfind \"$BACKUP_LOCATION\" -maxdepth 1 -mindepth 1 -type d | while read -r line; do\n\t\techo \"$line\"\n\tdone\n}\n\nfunction time-machine-list-old-backups() {\n\tgroup \"osx-timemachine\"\n\tabout \"Shows all of the backups for the specified machine, except for the most recent backup\"\n\tparam \"1: Machine name (optional)\"\n\texample \"time-machine-list-old-backups my-laptop\"\n\n\t# Use the local hostname if none provided\n\tlocal COMPUTERNAME BACKUP_LOCATION line\n\tCOMPUTERNAME=${1:-$(scutil --get ComputerName)}\n\tBACKUP_LOCATION=\"$(time-machine-destination)/Backups.backupdb/$COMPUTERNAME\"\n\n\t# List all but the most recent one\n\tfind \"$BACKUP_LOCATION\" -maxdepth 1 -mindepth 1 -type d -name 2\\* | sed \\$d | while read -r line; do\n\t\techo \"$line\"\n\tdone\n}\n\n# Taken from here: http://stackoverflow.com/a/30547074/1228454\nfunction _tm_startsudo() {\n\tlocal -x SUDO_COMMAND=\"plugin/osx-timemachine: keep 'sudo' token alive during long-run 'tmutil' commands\"\n\tsudo \"-${SUDO_ASKPASS:+A}v\" # validate without running a command, using `ssh-askpass` if available.\n\t(while sudo \"-${SUDO_ASKPASS:+A}v\"; do\n\t\tsleep 50\n\tdone) &\n\tSUDO_PID=\"$!\"\n\ttrap _tm_stopsudo SIGINT SIGTERM\n}\nfunction _tm_stopsudo() {\n\tkill \"$SUDO_PID\"\n\ttrap - SIGINT SIGTERM\n\tsudo -k\n}\n\nfunction time-machine-delete-old-backups() {\n\tgroup \"osx-timemachine\"\n\tabout \"Deletes all of the backups for the specified machine, with the exception of the most recent one\"\n\tparam \"1: Machine name (optional)\"\n\texample \"time-machine-delete-old-backups my-laptop\"\n\n\t# Use the local hostname if none provided\n\tlocal COMPUTERNAME=${1:-$(scutil --get ComputerName)} _old_backup\n\n\t# Ask for sudo credentials only once\n\t_tm_startsudo\n\n\twhile read -r _old_backup; do\n\t\t# Delete the backup\n\t\tsudo tmutil delete \"$_old_backup\"\n\tdone <<< \"$(time-machine-list-old-backups \"$COMPUTERNAME\")\"\n\n\t_tm_stopsudo\n}\n"
  },
  {
    "path": "plugins/available/osx.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'osx-specific functions'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif [[ \"${OSTYPE}\" != 'darwin'* ]]; then\n\t_log_warning \"This plugin only works with Mac OS X.\"\n\treturn 1\nfi\n\n# OS X: Open new tabs in same directory\nif _is_function update_terminal_cwd; then\n\tsafe_append_prompt_command 'update_terminal_cwd'\nfi\n\nfunction tab() {\n\tabout 'opens a new terminal tab'\n\tgroup 'osx'\n\n\tosascript 2> /dev/null << EOF\n    tell application \"System Events\"\n      tell process \"Terminal\" to keystroke \"t\" using command down\n    end\n    tell application \"Terminal\"\n      activate\n      do script with command \" cd \\\"$PWD\\\"; $*\" in window 0\n    end tell\nEOF\n}\n\n# renames the current os x terminal tab title\nfunction tabname {\n\tprintf '%b' \"\\e]1;$1\\a\"\n}\n\n# renames the current os x terminal window title\nfunction winname {\n\tprintf '%b' \"\\e]2;$1\\a\"\n}\n\nfunction pman() {\n\tabout 'view man documentation in Preview'\n\tparam '1: man page to view'\n\texample '$ pman bash'\n\tgroup 'osx'\n\tman -t \"${1}\" | open -fa 'Preview'\n}\n\nfunction pri() {\n\tabout 'display information about Ruby classes, modules, or methods, in Preview'\n\tparam '1: Ruby method, module, or class'\n\texample '$ pri Array'\n\tgroup 'osx'\n\tri -T \"${1}\" | open -fa 'Preview'\n}\n\n# Download a file and open it in Preview\nfunction prevcurl() {\n\tabout 'download a file and open it in Preview'\n\tparam '1: url'\n\tgroup 'osx'\n\n\tcurl \"$*\" | open -fa 'Preview'\n}\n\nfunction refresh-launchpad() {\n\tabout 'Reset launchpad layout in macOS'\n\texample '$ refresh-launchpad'\n\tgroup 'osx'\n\n\tdefaults write com.apple.dock ResetLaunchPad -bool TRUE\n\tkillall Dock\n}\n\nfunction list-jvms() {\n\tabout 'List java virtual machines and their states in macOS'\n\texample 'list-jvms'\n\tgroup 'osx'\n\n\tlocal JVMS_DIR=\"/Library/Java/JavaVirtualMachines\"\n\t# The following variables are intended to impact the enclosing scope, not local.\n\tJVMS=(\"${JVMS_DIR}\"/*)\n\tJVMS_STATES=()\n\n\t# Map state of JVM\n\tfor ((i = 0; i < ${#JVMS[@]}; i++)); do\n\t\tif [[ -f \"${JVMS[i]}/Contents/Info.plist\" ]]; then\n\t\t\tJVMS_STATES[i]=enabled\n\t\telse\n\t\t\tJVMS_STATES[i]=disabled\n\t\tfi\n\t\tprintf '%s\\t%s\\t%s\\n' \"${i}\" \"${JVMS[i]##*/}\" \"${JVMS_STATES[i]}\"\n\tdone\n}\n\nfunction pick-default-jvm() {\n\tabout 'Pick the default Java Virtual Machines in system-wide scope in macOS'\n\texample 'pick-default-jvm'\n\n\t# Declare variables\n\tlocal JVMS JVMS_STATES\n\tlocal DEFAULT_JVM_DIR DEFAULT_JVM OPTION\n\n\t# Call function for listing\n\tlist-jvms\n\n\t# OPTION for default jdk and set variables\n\twhile [[ ! \"$OPTION\" =~ ^[0-9]+$ || OPTION -ge \"${#JVMS[@]}\" ]]; do\n\t\tread -rp \"Enter Default JVM: \" OPTION\n\t\tif [[ ! \"$OPTION\" =~ ^[0-9]+$ ]]; then\n\t\t\techo \"Please enter a number\"\n\t\tfi\n\n\t\tif [[ OPTION -ge \"${#JVMS[@]}\" ]]; then\n\t\t\techo \"Please select one of the displayed JVMs\"\n\t\tfi\n\tdone\n\n\tDEFAULT_JVM_DIR=\"${JVMS[OPTION]}\"\n\tDEFAULT_JVM=\"${JVMS[OPTION]##*/}\"\n\n\t# Disable all jdk\n\tfor ((i = 0; i < ${#JVMS[@]}; i++)); do\n\t\tif [[ \"${JVMS[i]}\" != \"${DEFAULT_JVM_DIR}\" && -f \"${JVMS[i]}/Contents/Info.plist\" ]]; then\n\t\t\tsudo mv \"${JVMS[i]}/Contents/Info.plist\" \"${JVMS[i]}/Contents/Info.plist.disable\"\n\t\tfi\n\tdone\n\n\t# Enable default jdk\n\tif [[ -f \"${DEFAULT_JVM_DIR}/Contents/Info.plist.disable\" ]]; then\n\t\tsudo mv -vn \"${DEFAULT_JVM_DIR}/Contents/Info.plist.disable\" \"${DEFAULT_JVM_DIR}/Contents/Info.plist\" \\\n\t\t\t&& echo \"Enabled ${DEFAULT_JVM} as default JVM\"\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/pack.plugin.bash",
    "content": "# shellcheck shell=bash\n# bash completion for pack                                 -*- shell-script -*-\n\n# Requires bash 4+ for associative arrays\n# Skip loading if bash version is too old\nif [[ \"${BASH_VERSINFO[0]}\" -lt 4 ]]; then\n\t_disable-plugin pack\n\treturn 0\nfi\n\ncite about-plugin\nabout-plugin 'CNB pack cli aliases'\nurl \"https://buildpacks.io/\"\n\n__pack_debug() {\n\tif [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then\n\t\techo \"$*\" >> \"${BASH_COMP_DEBUG_FILE}\"\n\tfi\n}\n\n# Homebrew on Macs have version 1.3 of bash-completion which doesn't include\n# _init_completion. This is a very minimal version of that function.\n__pack_init_completion() {\n\tCOMPREPLY=()\n\t_get_comp_words_by_ref \"$@\" cur prev words cword\n}\n\n__pack_index_of_word() {\n\tlocal w word=$1\n\tshift\n\tindex=0\n\tfor w in \"$@\"; do\n\t\t[[ $w = \"$word\" ]] && return\n\t\tindex=$((index + 1))\n\tdone\n\tindex=-1\n}\n\n__pack_contains_word() {\n\tlocal w word=$1\n\tshift\n\tfor w in \"$@\"; do\n\t\t[[ $w = \"$word\" ]] && return\n\tdone\n\treturn 1\n}\n\n__pack_handle_reply() {\n\t__pack_debug \"${FUNCNAME[0]}\"\n\tcase $cur in\n\t\t-*)\n\t\t\tif [[ $(type -t compopt) = \"builtin\" ]]; then\n\t\t\t\tcompopt -o nospace\n\t\t\tfi\n\t\t\tlocal allflags line\n\t\t\tif [ ${#must_have_one_flag[@]} -ne 0 ]; then\n\t\t\t\tallflags=(\"${must_have_one_flag[@]}\")\n\t\t\telse\n\t\t\t\tallflags=(\"${flags[*]} ${two_word_flags[*]}\")\n\t\t\tfi\n\t\t\tCOMPREPLY=()\n\t\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${allflags[*]}\" -- \"$cur\")\n\t\t\tif [[ $(type -t compopt) = \"builtin\" ]]; then\n\t\t\t\t[[ \"${COMPREPLY[0]}\" == *= ]] || compopt +o nospace\n\t\t\tfi\n\n\t\t\t# complete after --flag=abc\n\t\t\tif [[ $cur == *=* ]]; then\n\t\t\t\tif [[ $(type -t compopt) = \"builtin\" ]]; then\n\t\t\t\t\tcompopt +o nospace\n\t\t\t\tfi\n\n\t\t\t\tlocal index flag\n\t\t\t\tflag=\"${cur%=*}\"\n\t\t\t\t__pack_index_of_word \"${flag}\" \"${flags_with_completion[@]}\"\n\t\t\t\tCOMPREPLY=()\n\t\t\t\tif [[ ${index} -ge 0 ]]; then\n\t\t\t\t\t# PREFIX=\"\"\n\t\t\t\t\tcur=\"${cur#*=}\"\n\t\t\t\t\t${flags_completion[${index}]}\n\t\t\t\t\tif [ -n \"${ZSH_VERSION}\" ]; then\n\t\t\t\t\t\t# zsh completion needs --flag= prefix\n\t\t\t\t\t\teval \"COMPREPLY=( \\\"\\${COMPREPLY[@]/#/${flag}=}\\\" )\"\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\tfi\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t# check if we are handling a flag with special work handling\n\tlocal index completions line\n\t__pack_index_of_word \"${prev}\" \"${flags_with_completion[@]}\"\n\tif [[ ${index} -ge 0 ]]; then\n\t\t${flags_completion[${index}]}\n\t\treturn\n\tfi\n\n\t# we are parsing a flag and don't have a special handler, no completion\n\tif [[ ${cur} != \"${words[cword]}\" ]]; then\n\t\treturn\n\tfi\n\n\tcompletions=(\"${commands[@]}\")\n\tif [[ ${#must_have_one_noun[@]} -ne 0 ]]; then\n\t\tcompletions=(\"${must_have_one_noun[@]}\")\n\tfi\n\tif [[ ${#must_have_one_flag[@]} -ne 0 ]]; then\n\t\tcompletions+=(\"${must_have_one_flag[@]}\")\n\tfi\n\tCOMPREPLY=()\n\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${completions[*]}\" -- \"$cur\")\n\n\tif [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then\n\t\tCOMPREPLY=()\n\t\twhile IFS='' read -r line; do COMPREPLY+=(\"$line\"); done < <(compgen -W \"${noun_aliases[*]}\" -- \"$cur\")\n\tfi\n\n\tif [[ ${#COMPREPLY[@]} -eq 0 ]]; then\n\t\tdeclare -F __custom_func > /dev/null && __custom_func\n\tfi\n\n\t# available in bash-completion >= 2, not always present on macOS\n\tif declare -F __ltrim_colon_completions > /dev/null; then\n\t\t__ltrim_colon_completions \"$cur\"\n\tfi\n\n\t# If there is only 1 completion and it is a flag with an = it will be completed\n\t# but we don't want a space after the =\n\tif [[ \"${#COMPREPLY[@]}\" -eq \"1\" ]] && [[ $(type -t compopt) = \"builtin\" ]] && [[ \"${COMPREPLY[0]}\" == --*= ]]; then\n\t\tcompopt -o nospace\n\tfi\n}\n\n# The arguments should be in the form \"ext1|ext2|extn\"\n__pack_handle_filename_extension_flag() {\n\tlocal ext=\"$1\"\n\t_filedir \"@(${ext})\"\n}\n\n__pack_handle_subdirs_in_dir_flag() {\n\tlocal dir=\"$1\"\n\tpushd \"${dir}\" > /dev/null 2>&1 && _filedir -d && popd > /dev/null 2>&1 || return 1\n}\n\n__pack_handle_flag() {\n\t__pack_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n\t# if a command required a flag, and we found it, unset must_have_one_flag()\n\tlocal flagname=${words[c]}\n\tlocal flagvalue\n\t# if the word contained an =\n\tif [[ ${words[c]} == *\"=\"* ]]; then\n\t\tflagvalue=${flagname#*=} # take in as flagvalue after the =\n\t\tflagname=${flagname%=*}  # strip everything after the =\n\t\tflagname=\"${flagname}=\"  # but put the = back\n\tfi\n\t__pack_debug \"${FUNCNAME[0]}: looking for ${flagname}\"\n\tif __pack_contains_word \"${flagname}\" \"${must_have_one_flag[@]}\"; then\n\t\tmust_have_one_flag=()\n\tfi\n\n\t# if you set a flag which only applies to this command, don't show subcommands\n\tif __pack_contains_word \"${flagname}\" \"${local_nonpersistent_flags[@]}\"; then\n\t\tcommands=()\n\tfi\n\n\t# keep flag value with flagname as flaghash\n\t# flaghash variable is an associative array which is only supported in bash > 3.\n\tif [[ -z \"${BASH_VERSION}\" || \"${BASH_VERSINFO[0]}\" -gt 3 ]]; then\n\t\tif [ -n \"${flagvalue}\" ]; then\n\t\t\tflaghash[${flagname}]=${flagvalue}\n\t\telif [ -n \"${words[$((c + 1))]}\" ]; then\n\t\t\tflaghash[${flagname}]=${words[$((c + 1))]}\n\t\telse\n\t\t\tflaghash[${flagname}]=\"true\" # pad \"true\" for bool flag\n\t\tfi\n\tfi\n\n\t# skip the argument to a two word flag\n\tif __pack_contains_word \"${words[c]}\" \"${two_word_flags[@]}\"; then\n\t\tc=$((c + 1))\n\t\t# if we are looking for a flags value, don't show commands\n\t\tif [[ $c -eq $cword ]]; then\n\t\t\tcommands=()\n\t\tfi\n\tfi\n\n\tc=$((c + 1))\n\n}\n\n__pack_handle_noun() {\n\t__pack_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n\tif __pack_contains_word \"${words[c]}\" \"${must_have_one_noun[@]}\"; then\n\t\tmust_have_one_noun=()\n\telif __pack_contains_word \"${words[c]}\" \"${noun_aliases[@]}\"; then\n\t\tmust_have_one_noun=()\n\tfi\n\n\tnouns+=(\"${words[c]}\")\n\tc=$((c + 1))\n}\n\n__pack_handle_command() {\n\t__pack_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\n\tlocal next_command\n\tif [[ -n ${last_command} ]]; then\n\t\tnext_command=\"_${last_command}_${words[c]//:/__}\"\n\telse\n\t\tif [[ $c -eq 0 ]]; then\n\t\t\tnext_command=\"_pack_root_command\"\n\t\telse\n\t\t\tnext_command=\"_${words[c]//:/__}\"\n\t\tfi\n\tfi\n\tc=$((c + 1))\n\t__pack_debug \"${FUNCNAME[0]}: looking for ${next_command}\"\n\tdeclare -F \"$next_command\" > /dev/null && $next_command\n}\n\n__pack_handle_word() {\n\tif [[ $c -ge $cword ]]; then\n\t\t__pack_handle_reply\n\t\treturn\n\tfi\n\t__pack_debug \"${FUNCNAME[0]}: c is $c words[c] is ${words[c]}\"\n\tif [[ \"${words[c]}\" == -* ]]; then\n\t\t__pack_handle_flag\n\telif __pack_contains_word \"${words[c]}\" \"${commands[@]}\"; then\n\t\t__pack_handle_command\n\telif [[ $c -eq 0 ]]; then\n\t\t__pack_handle_command\n\telif __pack_contains_word \"${words[c]}\" \"${command_aliases[@]}\"; then\n\t\t# aliashash variable is an associative array which is only supported in bash > 3.\n\t\tif [[ -z \"${BASH_VERSION}\" || \"${BASH_VERSINFO[0]}\" -gt 3 ]]; then\n\t\t\twords[c]=${aliashash[${words[c]}]}\n\t\t\t__pack_handle_command\n\t\telse\n\t\t\t__pack_handle_noun\n\t\tfi\n\telse\n\t\t__pack_handle_noun\n\tfi\n\t__pack_handle_word\n}\n\n_pack_build() {\n\tlast_command=\"pack_build\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--builder=\")\n\tlocal_nonpersistent_flags+=(\"--builder=\")\n\tflags+=(\"--buildpack=\")\n\tlocal_nonpersistent_flags+=(\"--buildpack=\")\n\tflags+=(\"--clear-cache\")\n\tlocal_nonpersistent_flags+=(\"--clear-cache\")\n\tflags+=(\"--env=\")\n\ttwo_word_flags+=(\"-e\")\n\tlocal_nonpersistent_flags+=(\"--env=\")\n\tflags+=(\"--env-file=\")\n\tlocal_nonpersistent_flags+=(\"--env-file=\")\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-pull\")\n\tlocal_nonpersistent_flags+=(\"--no-pull\")\n\tflags+=(\"--path=\")\n\ttwo_word_flags+=(\"-p\")\n\tlocal_nonpersistent_flags+=(\"--path=\")\n\tflags+=(\"--publish\")\n\tlocal_nonpersistent_flags+=(\"--publish\")\n\tflags+=(\"--run-image=\")\n\tlocal_nonpersistent_flags+=(\"--run-image=\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_run() {\n\tlast_command=\"pack_run\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--builder=\")\n\tlocal_nonpersistent_flags+=(\"--builder=\")\n\tflags+=(\"--buildpack=\")\n\tlocal_nonpersistent_flags+=(\"--buildpack=\")\n\tflags+=(\"--clear-cache\")\n\tlocal_nonpersistent_flags+=(\"--clear-cache\")\n\tflags+=(\"--env=\")\n\ttwo_word_flags+=(\"-e\")\n\tlocal_nonpersistent_flags+=(\"--env=\")\n\tflags+=(\"--env-file=\")\n\tlocal_nonpersistent_flags+=(\"--env-file=\")\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-pull\")\n\tlocal_nonpersistent_flags+=(\"--no-pull\")\n\tflags+=(\"--path=\")\n\ttwo_word_flags+=(\"-p\")\n\tlocal_nonpersistent_flags+=(\"--path=\")\n\tflags+=(\"--port=\")\n\tlocal_nonpersistent_flags+=(\"--port=\")\n\tflags+=(\"--run-image=\")\n\tlocal_nonpersistent_flags+=(\"--run-image=\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_rebase() {\n\tlast_command=\"pack_rebase\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-pull\")\n\tlocal_nonpersistent_flags+=(\"--no-pull\")\n\tflags+=(\"--publish\")\n\tlocal_nonpersistent_flags+=(\"--publish\")\n\tflags+=(\"--run-image=\")\n\tlocal_nonpersistent_flags+=(\"--run-image=\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_create-builder() {\n\tlast_command=\"pack_create-builder\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--builder-config=\")\n\ttwo_word_flags+=(\"-b\")\n\tlocal_nonpersistent_flags+=(\"--builder-config=\")\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-pull\")\n\tlocal_nonpersistent_flags+=(\"--no-pull\")\n\tflags+=(\"--publish\")\n\tlocal_nonpersistent_flags+=(\"--publish\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_flag+=(\"--builder-config=\")\n\tmust_have_one_flag+=(\"-b\")\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_set-run-image-mirrors() {\n\tlast_command=\"pack_set-run-image-mirrors\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--mirror=\")\n\ttwo_word_flags+=(\"-m\")\n\tlocal_nonpersistent_flags+=(\"--mirror=\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_flag+=(\"--mirror=\")\n\tmust_have_one_flag+=(\"-m\")\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_inspect-builder() {\n\tlast_command=\"pack_inspect-builder\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_set-default-builder() {\n\tlast_command=\"pack_set-default-builder\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_version() {\n\tlast_command=\"pack_version\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_completion() {\n\tlast_command=\"pack_completion\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n_pack_root_command() {\n\tlast_command=\"pack\"\n\n\tcommand_aliases=()\n\n\tcommands=()\n\tcommands+=(\"build\")\n\tcommands+=(\"run\")\n\tcommands+=(\"rebase\")\n\tcommands+=(\"create-builder\")\n\tcommands+=(\"set-run-image-mirrors\")\n\tcommands+=(\"inspect-builder\")\n\tcommands+=(\"set-default-builder\")\n\tcommands+=(\"version\")\n\tcommands+=(\"completion\")\n\n\tflags=()\n\ttwo_word_flags=()\n\tlocal_nonpersistent_flags=()\n\tflags_with_completion=()\n\tflags_completion=()\n\n\tflags+=(\"--help\")\n\tflags+=(\"-h\")\n\tlocal_nonpersistent_flags+=(\"--help\")\n\tflags+=(\"--no-color\")\n\tflags+=(\"--quiet\")\n\tflags+=(\"-q\")\n\tflags+=(\"--timestamps\")\n\n\tmust_have_one_flag=()\n\tmust_have_one_noun=()\n\tnoun_aliases=()\n}\n\n__start_pack() {\n\tlocal cur prev words cword\n\t#shellcheck disable=SC2034\n\tdeclare -A flaghash 2> /dev/null || :\n\tdeclare -A aliashash 2> /dev/null || :\n\tif declare -F _init_completion > /dev/null 2>&1; then\n\t\t_init_completion -s || return\n\telse\n\t\t__pack_init_completion -n \"=\" || return\n\tfi\n\n\tlocal c=0\n\tlocal flags=()\n\tlocal two_word_flags=()\n\tlocal local_nonpersistent_flags=()\n\tlocal flags_with_completion=()\n\tlocal flags_completion=()\n\tlocal commands=(\"pack\")\n\tlocal must_have_one_flag=()\n\tlocal must_have_one_noun=()\n\tlocal last_command\n\tlocal nouns=()\n\n\t__pack_handle_word\n}\n\nif [[ $(type -t compopt) = \"builtin\" ]]; then\n\tcomplete -o default -F __start_pack pack\nelse\n\tcomplete -o default -o nospace -F __start_pack pack\nfi\n\n# ex: ts=4 sw=4 et filetype=sh\n"
  },
  {
    "path": "plugins/available/percol.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Search&Select history with percol'\nurl \"https://github.com/mooz/percol\"\n\n# Notice\n## You have to upgrade bash to bash 4.x on Mac OS X.\n## http://stackoverflow.com/questions/16416195/how-do-i-upgrade-bash-in-mac-osx-mountain-lion-and-set-it-the-correct-path\n\n# Install\n## (sudo) pip install percol\n## bash-it enable percol\n\n# Usage\n## C-r to search&select from history\n\n_command_exists percol || return\n\nif [[ ${BASH_VERSINFO[0]} -lt 4 ]]; then\n\t_log_warning \"You have to upgrade Bash to Bash v4.x to use the 'percol' plugin.\"\n\t_log_warning \"Disabling percol plugin (current version: $BASH_VERSION)\"\n\t_disable-plugin percol\n\treturn 0\nfi\n\nfunction _replace_by_history() {\n\tlocal HISTTIMEFORMAT= # Ensure we can parse history properly\n\t#TODO: \"${histlines[@]/*( )+([[:digit:]])*( )/}\"\n\tlocal l\n\tl=\"$(history | tail -r | sed -e 's/^\\ *[0-9]*\\ *//' | percol --query \"${READLINE_LINE:-}\")\"\n\tREADLINE_LINE=\"${l}\"\n\tREADLINE_POINT=${#l}\n}\nbind -x '\"\\C-r\": _replace_by_history'\n"
  },
  {
    "path": "plugins/available/pipsi.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load pipsi, if you are using it'\nurl \"https://github.com/mitsuhiko/pipsi\"\n\nif [[ -f \"$HOME/.local/bin/pipsi\" ]]; then\n\tpathmunge ~/.local/bin\nfi\n"
  },
  {
    "path": "plugins/available/plenv.plugin.bash",
    "content": "# shellcheck shell=bash\n#\n# plugin for plenv\n\ncite about-plugin\nabout-plugin 'plenv plugin for Perl'\nurl \"https://github.com/tokuhirom/plenv\"\n\nif [[ -d \"${HOME}/.plenv/bin\" ]]; then\n\t# load plenv bin dir into path if it exists\n\tpathmunge \"${HOME}/.plenv/bin\"\nfi\n\nif _command_exists plenv; then\n\t# init plenv\n\teval \"$(plenv init - bash)\"\nfi\n"
  },
  {
    "path": "plugins/available/postgres.plugin.bash",
    "content": "# shellcheck shell=bash\n\ncite about-plugin\nabout-plugin 'postgres helper functions'\nurl \"https://www.postgresql.org/\"\n\nPGVERSION=$(pg_config --version | awk '{print $2}')\nPOSTGRES_BIN=$(pg_config --bindir)\nexport POSTGRES_BIN PGVERSION\nCOMMON_PGDATA_PATHS=(\"/usr/local/var/postgres\" \"/var/pgsql\" \"/Library/Server/PostgreSQL/Data\")\nfor possible in \"${COMMON_PGDATA_PATHS[@]}\"; do\n\t:\n\tif [ -f \"$possible/pg_hba.conf\" ]; then\n\t\t# echo \"PGDATA: $possible\"\n\t\texport PGDATA=$possible\n\tfi\ndone\n\nfunction postgres_start {\n\tabout 'Starts PostgreSQL server'\n\tgroup 'postgres'\n\n\techo 'Starting Postgres....'\n\t\"$POSTGRES_BIN/pg_ctl\" -D \"$PGDATA\" -l \"$PGDATA/logfile\" start\n}\n\nfunction postgres_stop {\n\tabout 'Stops PostgreSQL server'\n\tgroup 'postgres'\n\n\techo 'Stopping Postgres....'\n\t\"$POSTGRES_BIN/pg_ctl\" -D \"$PGDATA\" -l \"$PGDATA/logfile\" stop -s -m fast\n}\n\nfunction postgres_status {\n\tabout 'Returns status of PostgreSQL server'\n\tgroup 'postgres'\n\n\t# \"$POSTGRES_BIN/pg_ctl\" -D \"$PGDATA status\"\n\tif [[ $(is_postgres_running) == \"no server running\" ]]; then\n\t\techo \"Postgres service [STOPPED]\"\n\telse\n\t\techo \"Postgres service [RUNNING]\"\n\tfi\n}\n\nfunction is_postgres_running {\n\t\"$POSTGRES_BIN/pg_ctl\" -D \"$PGDATA\" status | grep -F -o \"no server running\"\n}\n\nfunction postgres_restart {\n\tabout 'Restarts status of PostgreSQL server'\n\tgroup 'postgres'\n\n\techo 'Restarting Postgres....'\n\t\"$POSTGRES_BIN/pg_ctl\" -D \"$PGDATA\" restart\n}\n\nfunction postgres_logfile {\n\tabout 'View the last 500 lines from logfile'\n\tgroup 'postgres'\n\n\ttail -500 \"$PGDATA/logfile\" | less\n}\n\nfunction postgres_serverlog {\n\tabout 'View the last 500 lines from server.log'\n\tgroup 'postgres'\n\n\ttail -500 \"$PGDATA/server.log\" | less\n}\n\n# function postgres_syslog {\n#   about 'View the last 500 lines from syslog'\n#   group 'postgres'\n#\n#   tail -500 $PGDATA/pg_log/`ls -Art $PGDATA/pg_log | tail -n 1` | less\n# }\n#\n"
  },
  {
    "path": "plugins/available/powerline.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034\n\ncite about-plugin\nabout-plugin 'enables powerline daemon'\nurl \"https://github.com/powerline/powerline\"\n\n_command_exists powerline-daemon || return\npowerline-daemon -q\n\n#the following should not be executed if bashit powerline themes in use\ncase \"$BASH_IT_THEME\" in\n\t*powerline*)\n\t\treturn\n\t\t;;\nesac\nPOWERLINE_BASH_CONTINUATION=1\nPOWERLINE_BASH_SELECT=1\nbashPowerlineInit=\"$(python -c \\\n\t\"import os; \\\n\timport powerline;\\\n\tprint(os.path.join(os.path.dirname(\\\n\tpowerline.__file__),\\\n\t'bindings', \\\n\t'bash', \\\n\t'powerline.sh'))\")\"\n[ -e \"$bashPowerlineInit\" ] || return\n# shellcheck disable=SC1090\nsource \"$bashPowerlineInit\"\n"
  },
  {
    "path": "plugins/available/projects.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'quickly navigate configured project paths'\nurl \"https://github.com/Bash-it/bash-it\"\n\n: \"${BASH_IT_PROJECT_PATHS:=$HOME/Projects:$HOME/src:$HOME/work}\"\n\nfunction pj() {\n\tabout 'navigate quickly to your various project directories'\n\tgroup 'projects'\n\n\tlocal proj=\"${1?${FUNCNAME[0]}: project name required}\"\n\tlocal cmd PS3 dest d\n\tlocal -a dests\n\n\tif [[ \"$proj\" == \"open\" ]]; then\n\t\tshift\n\t\tproj=\"${1}\"\n\t\tcmd=\"${EDITOR?}\"\n\tfi\n\n\t# collect possible destinations to account for directories\n\t# with the same name in project directories\n\tIFS=':' read -ra dests <<< \"${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}\"\n\tfor d in \"${!dests[@]}\"; do\n\t\tif [[ ! -d \"${dests[d]}/${proj}\" ]]; then\n\t\t\tunset 'dests[d]'\n\t\tfi\n\tdone\n\n\tcase ${#dests[@]} in\n\t\t0)\n\t\t\t_log_error \"BASH_IT_PROJECT_PATHS must contain at least one existing location\"\n\t\t\treturn 1\n\t\t\t;;\n\t\t1)\n\t\t\tdest=\"${dests[*]}/${proj}\"\n\t\t\t;;\n\t\t*)\n\t\t\tPS3=\"Multiple project directories found. Please select one: \"\n\t\t\tdests+=(\"cancel\")\n\t\t\tselect d in \"${dests[@]}\"; do\n\t\t\t\tcase $d in\n\t\t\t\t\t\"cancel\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\tdest=\"${d}/${proj}\"\n\t\t\t\t\t\tbreak\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\tdone\n\t\t\t;;\n\tesac\n\n\t\"${cmd:-cd}\" \"${dest}\"\n}\n\nalias pjo=\"pj open\"\n"
  },
  {
    "path": "plugins/available/proxy.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'Proxy Tools'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction disable-proxy() {\n\tabout 'Disables proxy settings for Bash, npm and SSH'\n\tgroup 'proxy'\n\n\tunset http_proxy\n\tunset https_proxy\n\tunset HTTP_PROXY\n\tunset HTTPS_PROXY\n\tunset ALL_PROXY\n\tunset no_proxy\n\tunset NO_PROXY\n\techo \"Disabled proxy environment variables\"\n\n\tnpm-disable-proxy\n\tssh-disable-proxy\n\tsvn-disable-proxy\n}\n\nfunction enable-proxy() {\n\tabout 'Enables proxy settings for Bash, npm and SSH'\n\tgroup 'proxy'\n\n\texport http_proxy=\"${BASH_IT_HTTP_PROXY:-}\"\n\texport https_proxy=\"${BASH_IT_HTTPS_PROXY:-}\"\n\texport HTTP_PROXY=\"${http_proxy:-}\"\n\texport HTTPS_PROXY=\"${https_proxy:-}\"\n\texport ALL_PROXY=\"${http_proxy:-}\"\n\texport no_proxy=\"${BASH_IT_NO_PROXY:-}\"\n\texport NO_PROXY=\"${no_proxy:-}\"\n\techo \"Enabled proxy environment variables\"\n\n\tnpm-enable-proxy\n\tssh-enable-proxy\n\tsvn-enable-proxy\n}\n\nfunction enable-proxy-alt() {\n\tabout 'Enables alternate proxy settings for Bash, npm and SSH'\n\tgroup 'proxy'\n\n\texport http_proxy=\"${BASH_IT_HTTP_PROXY_ALT:-}\"\n\texport https_proxy=\"${BASH_IT_HTTPS_PROXY_ALT:-}\"\n\texport HTTP_PROXY=\"${http_proxy:-}\"\n\texport HTTPS_PROXY=\"${https_proxy:-}\"\n\texport ALL_PROXY=\"${http_proxy:-}\"\n\texport no_proxy=\"${BASH_IT_NO_PROXY:-}\"\n\texport NO_PROXY=\"${no_proxy:-}\"\n\techo \"Enabled alternate proxy environment variables\"\n\n\tnpm-enable-proxy \"${http_proxy:-}\" \"${https_proxy:-}\"\n\tssh-enable-proxy\n\tsvn-enable-proxy \"${http_proxy:-}\"\n}\n\nfunction show-proxy() {\n\tabout 'Shows the proxy settings for Bash, Git, npm and SSH'\n\tgroup 'proxy'\n\n\techo \"\"\n\techo \"Environment Variables\"\n\techo \"=====================\"\n\tenv | grep -i \"proxy\" | grep -v \"BASH_IT\"\n\n\tbash-it-show-proxy\n\tnpm-show-proxy\n\tgit-global-show-proxy\n\tsvn-show-proxy\n\tssh-show-proxy\n}\n\nfunction proxy-help() {\n\tabout 'Provides an overview of the bash-it proxy configuration'\n\tgroup 'proxy'\n\n\tcat << EOF\nBash-it provides support for enabling/disabling proxy settings for various shell tools.\n\nThe following backends are currently supported (in addition to the shell's environment variables): Git, SVN, npm, ssh\n\nBash-it uses the following variables to set the shell's proxy settings when you call 'enable-proxy'.\nThese variables are best defined in a custom script in bash-it's custom script folder ('$BASH_IT/custom'),\ne.g. '$BASH_IT/custom/proxy.env.bash'\n* BASH_IT_HTTP_PROXY and BASH_IT_HTTPS_PROXY: Define the proxy URL to be used, e.g. 'http://localhost:1234'\n* BASH_IT_NO_PROXY: A comma-separated list of proxy exclusions, e.g. '127.0.0.1,localhost'\n\nRun 'glossary proxy' to show the available proxy functions with a short description.\nEOF\n\n\tbash-it-show-proxy\n}\n\nfunction bash-it-show-proxy() {\n\tabout 'Shows the bash-it proxy settings'\n\tgroup 'proxy'\n\n\techo \"\"\n\techo \"bash-it Environment Variables\"\n\techo \"=============================\"\n\techo \"(These variables will be used to set the proxy when you call 'enable-proxy')\"\n\techo \"\"\n\tenv | grep -e \"BASH_IT.*PROXY\"\n}\n\nfunction npm-show-proxy() {\n\tabout 'Shows the npm proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists npm; then\n\t\techo \"\"\n\t\techo \"npm\"\n\t\techo \"===\"\n\t\techo \"npm HTTP  proxy: $(npm config get proxy)\"\n\t\techo \"npm HTTPS proxy: $(npm config get https-proxy)\"\n\t\techo \"npm proxy exceptions: $(npm config get noproxy)\"\n\tfi\n}\n\nfunction npm-disable-proxy() {\n\tabout 'Disables npm proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists npm; then\n\t\tnpm config delete proxy\n\t\tnpm config delete https-proxy\n\t\tnpm config delete noproxy\n\t\techo \"Disabled npm proxy settings\"\n\tfi\n}\n\nfunction npm-enable-proxy() {\n\tabout 'Enables npm proxy settings'\n\tgroup 'proxy'\n\n\tlocal my_http_proxy=\"${1:-${BASH_IT_HTTP_PROXY:-}}\"\n\tlocal my_https_proxy=\"${2:-${BASH_IT_HTTPS_PROXY:-}}\"\n\tlocal my_no_proxy=\"${3:-${BASH_IT_NO_PROXY:-}}\"\n\n\tif _command_exists npm; then\n\t\tnpm config set proxy \"${my_http_proxy:?}\" || return\n\t\tnpm config set https-proxy \"${my_https_proxy:?}\" || return\n\t\tnpm config set noproxy \"${my_no_proxy:-}\" || return\n\t\techo \"Enabled npm proxy settings\"\n\tfi\n}\n\nfunction git-global-show-proxy() {\n\tabout 'Shows global Git proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\techo \"\"\n\t\techo \"Git (Global Settings)\"\n\t\techo \"=====================\"\n\t\techo \"Git (Global) HTTP  proxy: $(git config --global --get http.proxy)\"\n\t\techo \"Git (Global) HTTPS proxy: $(git config --global --get https.proxy)\"\n\tfi\n}\n\nfunction git-global-disable-proxy() {\n\tabout 'Disables global Git proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\tgit config --global --unset-all http.proxy\n\t\tgit config --global --unset-all https.proxy\n\t\techo \"Disabled global Git proxy settings\"\n\tfi\n}\n\nfunction git-global-enable-proxy() {\n\tabout 'Enables global Git proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\tgit-global-disable-proxy\n\n\t\tgit config --global --add http.proxy \"${BASH_IT_HTTP_PROXY:?}\"\n\t\tgit config --global --add https.proxy \"${BASH_IT_HTTPS_PROXY:?}\"\n\t\techo \"Enabled global Git proxy settings\"\n\tfi\n}\n\nfunction git-show-proxy() {\n\tabout 'Shows current Git project proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\techo \"Git Project Proxy Settings\"\n\t\techo \"=====================\"\n\t\techo \"Git HTTP  proxy: $(git config --get http.proxy)\"\n\t\techo \"Git HTTPS proxy: $(git config --get https.proxy)\"\n\tfi\n}\n\nfunction git-disable-proxy() {\n\tabout 'Disables current Git project proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\tgit config --unset-all http.proxy\n\t\tgit config --unset-all https.proxy\n\t\techo \"Disabled Git project proxy settings\"\n\tfi\n}\n\nfunction git-enable-proxy() {\n\tabout 'Enables current Git project proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists git; then\n\t\tgit-disable-proxy\n\n\t\tgit config --add http.proxy \"${BASH_IT_HTTP_PROXY:?}\"\n\t\tgit config --add https.proxy \"${BASH_IT_HTTPS_PROXY:?}\"\n\t\techo \"Enabled Git project proxy settings\"\n\tfi\n}\n\nfunction svn-show-proxy() {\n\tabout 'Shows SVN proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists svn && _command_exists python2; then\n\t\techo \"\"\n\t\techo \"SVN Proxy Settings\"\n\t\techo \"==================\"\n\t\tpython2 - << END\nimport ConfigParser, os\nconfig = ConfigParser.ConfigParser()\nconfig.read(os.path.expanduser('~/.subversion/servers'))\nif (config.has_section('global')):\n\tproxy_host = ''\n\tproxy_port = ''\n\tproxy_exceptions = ''\n\tif (config.has_option('global', 'http-proxy-host')):\n\t\tproxy_host = config.get('global', 'http-proxy-host')\n\tif (config.has_option('global', 'http-proxy-port')):\n\t\tproxy_port = config.get('global', 'http-proxy-port')\n\tif (config.has_option('global', 'http-proxy-exceptions')):\n\t\tproxy_exceptions = config.get('global', 'http-proxy-exceptions')\n\tprint 'http-proxy-host      : ' + proxy_host\n\tprint 'http-proxy-port      : ' + proxy_port\n\tprint 'http-proxy-exceptions: ' + proxy_exceptions\nEND\n\tfi\n}\n\nfunction svn-disable-proxy() {\n\tabout 'Disables SVN proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists svn_command_exists python2; then\n\t\tpython2 - << END\nimport ConfigParser, os\nconfig = ConfigParser.ConfigParser()\nconfig.read(os.path.expanduser('~/.subversion/servers'))\nif config.has_section('global'):\n\tchanged = False\n\tif config.has_option('global', 'http-proxy-host'):\n\t\tconfig.remove_option('global', 'http-proxy-host')\n\t\tchanged = True\n\tif config.has_option('global', 'http-proxy-port'):\n\t\tconfig.remove_option('global', 'http-proxy-port')\n\t\tchanged = True\n\tif config.has_option('global', 'http-proxy-exceptions'):\n\t\tconfig.remove_option('global', 'http-proxy-exceptions')\n\t\tchanged = True\n\tif changed:\n\t\twith open(os.path.expanduser('~/.subversion/servers'), 'wb') as configfile:\n\t\t\tconfig.write(configfile)\n\tprint 'Disabled SVN proxy settings'\nEND\n\tfi\n}\n\nfunction svn-enable-proxy() {\n\tabout 'Enables SVN proxy settings'\n\tgroup 'proxy'\n\n\tif _command_exists svn _command_exists python2; then\n\t\tlocal my_http_proxy=\"${1:-${BASH_IT_HTTP_PROXY:-}}\"\n\n\t\tpython2 - \"${my_http_proxy:?}\" \"${BASH_IT_NO_PROXY:-}\" << END\nimport ConfigParser, os, sys, urlparse\npieces = urlparse.urlparse(sys.argv[1])\nhost = pieces.hostname\nport = pieces.port\nexceptions = sys.argv[2]\nconfig = ConfigParser.ConfigParser()\nconfig.read(os.path.expanduser('~/.subversion/servers'))\nif not config.has_section('global'):\n\tconfig.add_section('global')\nif host is not None:\n\tconfig.set('global', 'http-proxy-host', host)\nelse:\n\tconfig.remove_option('global', 'http-proxy-host')\nif port is not None:\n\tconfig.set('global', 'http-proxy-port', port)\nelse:\n\tconfig.remove_option('global', 'http-proxy-port')\nif exceptions is not None:\n\tconfig.set('global', 'http-proxy-exceptions', exceptions)\nelse:\n\tconfig.remove_option('global', 'http-proxy-exceptions')\nwith open(os.path.expanduser('~/.subversion/servers'), 'wb') as configfile:\n\tconfig.write(configfile)\nprint 'Enabled SVN proxy settings'\nEND\n\tfi\n}\n\nfunction ssh-show-proxy() {\n\tabout 'Shows SSH config proxy settings (from ~/.ssh/config)'\n\tgroup 'proxy'\n\n\tif [ -f ~/.ssh/config ]; then\n\t\techo \"\"\n\t\techo \"SSH Config Enabled in ~/.ssh/config\"\n\t\techo \"===================================\"\n\t\tawk '\n\t\t    $1 == \"Host\" {\n\t\t        host = $2;\n\t\t        next;\n\t\t    }\n\t\t    $1 == \"ProxyCommand\" {\n\t\t        $1 = \"\";\n\t\t        printf \"%s\\t%s\\n\", host, $0\n\t\t    }\n\t\t' ~/.ssh/config | column -t\n\n\t\techo \"\"\n\t\techo \"SSH Config Disabled in ~/.ssh/config\"\n\t\techo \"====================================\"\n\t\tawk '\n\t\t    $1 == \"Host\" {\n\t\t        host = $2;\n\t\t        next;\n\t\t    }\n\t\t    $0 ~ \"^#.*ProxyCommand.*\" {\n\t\t        $1 = \"\";\n\t\t        $2 = \"\";\n\t\t        printf \"%s\\t%s\\n\", host, $0\n\t\t    }\n\t\t' ~/.ssh/config | column -t\n\tfi\n}\n\nfunction ssh-disable-proxy() {\n\tabout 'Disables SSH config proxy settings'\n\tgroup 'proxy'\n\n\tif [ -f ~/.ssh/config ]; then\n\t\tsed -e's/^.*ProxyCommand/#\tProxyCommand/' \"${BASH_IT_SED_I_PARAMETERS[@]}\" ~/.ssh/config\n\t\techo \"Disabled SSH config proxy settings\"\n\tfi\n}\n\nfunction ssh-enable-proxy() {\n\tabout 'Enables SSH config proxy settings'\n\tgroup 'proxy'\n\n\tif [ -f ~/.ssh/config ]; then\n\t\tsed -e's/#\tProxyCommand/\tProxyCommand/' \"${BASH_IT_SED_I_PARAMETERS[@]}\" ~/.ssh/config\n\t\techo \"Enabled SSH config proxy settings\"\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/pyenv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load pyenv, if you are using it'\nurl \"https://github.com/pyenv/pyenv\"\n\n# https://github.com/pyenv/pyenv\n\n# Load after basher\n# BASH_IT_LOAD_PRIORITY: 260\n\n# Don't modify the environment if we can't find the tool:\n# - Check if in $PATH already\n# - Check if installed manually to $PYENV_ROOT\n# - Check if installed manually to $HOME\n_command_exists pyenv \\\n\t|| [[ -n \"$PYENV_ROOT\" && -x \"$PYENV_ROOT/bin/pyenv\" ]] \\\n\t|| [[ -x \"$HOME/.pyenv/bin/pyenv\" ]] \\\n\t|| return 0\n\n# Set PYENV_ROOT, if not already set\nexport PYENV_ROOT=\"${PYENV_ROOT:-$HOME/.pyenv}\"\n\n# Add PYENV_ROOT/bin to PATH, if that's where it's installed\nif ! _command_exists pyenv && [[ -x \"$PYENV_ROOT/bin/pyenv\" ]]; then\n\tpathmunge \"$PYENV_ROOT/bin\"\nfi\n\n# Initialize pyenv\npathmunge \"$PYENV_ROOT/shims\"\neval \"$(pyenv init - bash)\"\n\n# Load pyenv virtualenv if the virtualenv plugin is installed.\nif pyenv virtualenv-init - &> /dev/null; then\n\teval \"$(pyenv virtualenv-init - bash)\"\nfi\n"
  },
  {
    "path": "plugins/available/python.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'alias \"shttp\" to SimpleHTTPServer'\nurl \"https://docs.python.org/3/library/http.server.html\"\n\nif _command_exists python3; then\n\talias shttp='python3 -m http.server'\nelif _command_exists python; then\n\talias shttp='python -m http.server'\nelse\n\t_log_warning \"Unable to load 'plugin/python' due to being unable to find a working 'python'\"\n\treturn 1\nfi\n\nfunction pyedit() {\n\tabout 'opens python module in your EDITOR'\n\tparam '1: python module to open'\n\texample '$ pyedit requests'\n\tgroup 'python'\n\n\txpyc=\"$(python -c \"import os, sys; f = open(os.devnull, 'w'); sys.stderr = f; module = __import__('$1'); sys.stdout.write(module.__file__)\")\"\n\n\tif [[ \"$xpyc\" == \"\" ]]; then\n\t\techo \"Python module $1 not found\"\n\t\treturn 1\n\telif [[ \"$xpyc\" == *__init__.py* ]]; then\n\t\txpydir=\"${xpyc%/*}\"\n\t\techo \"$EDITOR $xpydir\"\n\t\t${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} \"$xpydir\"\n\telse\n\t\techo \"$EDITOR ${xpyc%.*}.py\"\n\t\t${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} \"${xpyc%.*}.py\"\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/rails.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Helper functions for Ruby on Rails'\nurl \"https://rubyonrails.org/\"\n\n# Quick function to kill a daemonized Rails server\nfunction killrails() {\n\tabout 'Searches for a daemonized Rails server in tmp/pids and attempts to kill it.'\n\tgroup 'rails'\n\n\trailsPid=\"$(cat tmp/pids/server.pid)\"\n\tif [ -n \"$railsPid\" ]; then\n\t\techo \"[OK] Rails Server Process Id : ${railsPid}\"\n\t\tkill -9 \"$railsPid\"\n\t\techo \"[OK] Process Killed\"\n\telse\n\t\techo \"[FAIL] Error killing Rails server\"\n\t\treturn 1\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/rbenv.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'load rbenv, if you are using it'\nurl \"https://github.com/rbenv/rbenv\"\n\nexport RBENV_ROOT=\"$HOME/.rbenv\"\npathmunge \"$RBENV_ROOT/bin\"\n\nif _command_exists rbenv; then\n\teval \"$(rbenv init - bash)\"\nfi\n"
  },
  {
    "path": "plugins/available/ruby.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'ruby and rubygems specific functions and settings'\nurl \"https://www.ruby-lang.org/\"\n\n# Make commands installed with 'gem install --user-install' available\n# ~/.gem/ruby/${RUBY_VERSION}/bin/\nif _command_exists ruby && _command_exists gem; then\n\tpathmunge \"$(ruby -e 'print Gem.user_dir')/bin\" after || true\nelse\n\t_log_warning \"Unable to load Ruby plugin as a working 'ruby', or 'gem', was not found.\"\nfi\n\nfunction remove_gem() {\n\tabout 'removes installed gem'\n\tparam '1: installed gem name'\n\tgroup 'ruby'\n\n\tgem list | grep \"${1:?${FUNCNAME[0]}: no gem name provided}\" | awk '{ print $1; }' | xargs sudo gem uninstall\n}\n"
  },
  {
    "path": "plugins/available/rvm.plugin.bash",
    "content": "# shellcheck shell=bash\n# Load RVM, if you are using it\n\ncite about-plugin\nabout-plugin 'load rvm, if you are using it'\nurl \"https://rvm.io/\"\n\n# shellcheck disable=SC1091\n[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && source \"$HOME/.rvm/scripts/rvm\"\n\n# Check to make sure that RVM is actually loaded before adding\n# the customizations to it.\nif [ \"$rvm_path\" ]; then\n\t# Load the auto-completion script if RVM was loaded.\n\t# shellcheck disable=SC1091\n\t[[ -r \"$rvm_path/scripts/completion\" ]] && . \"$rvm_path/scripts/completion\"\n\n\tswitch() {\n\t\trvm \"$1\"\n\t\tlocal v\n\t\tv=$(rvm_version)\n\t\trvm wrapper \"$1\" textmate\n\t\techo \"Switch to Ruby version: $v\"\n\t}\n\n\trvm_default() {\n\t\trvm --default \"$1\"\n\t\trvm wrapper \"$1\" textmate\n\t}\n\n\tfunction rvm_version() {\n\t\truby --version\n\t}\n\nfi\n"
  },
  {
    "path": "plugins/available/sdkman.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Load Software Development Kit Manager'\nurl \"https://sdkman.io/\"\n\n# Use $SDKMAN_DIR if defined,\n# otherwise default to ~/.sdkman\nexport SDKMAN_DIR=${SDKMAN_DIR:-$HOME/.sdkman}\n\n# shellcheck disable=SC1091\n[[ -s \"${SDKMAN_DIR}/bin/sdkman-init.sh\" ]] && source \"${SDKMAN_DIR}/bin/sdkman-init.sh\"\n"
  },
  {
    "path": "plugins/available/ssh.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'ssh helper functions'\nurl \"https://www.openssh.com/\"\n\nfunction add_ssh() {\n\tabout 'add entry to ssh config'\n\tparam '1: host'\n\tparam '2: hostname'\n\tparam '3: user'\n\tgroup 'ssh'\n\n\t[[ $# -ne 3 ]] && echo \"add_ssh host hostname user\" && return 1\n\t[[ ! -d ~/.ssh ]] && mkdir -m 700 ~/.ssh\n\t[[ ! -e ~/.ssh/config ]] && touch ~/.ssh/config && chmod 600 ~/.ssh/config\n\techo -en \"\\n\\nHost $1\\n  HostName $2\\n  User $3\\n  ServerAliveInterval 30\\n  ServerAliveCountMax 120\" >> ~/.ssh/config\n}\n\nfunction sshlist() {\n\tabout 'list hosts defined in ssh config'\n\tgroup 'ssh'\n\n\tawk '$1 ~ /Host$/ {for (i=2; i<=NF; i++) print $i}' ~/.ssh/config\n}\n\nfunction ssh-add-all() {\n\tabout 'add all ssh private keys to agent'\n\tgroup 'ssh'\n\n\tgrep -slR \"PRIVATE\" ~/.ssh | xargs ssh-add\n}\n"
  },
  {
    "path": "plugins/available/sshagent.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'sshagent helper functions'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction _get_sshagent_pid_from_env_file() {\n\tlocal env_file=\"${1}\"\n\t[[ -r \"${env_file}\" ]] || {\n\t\techo \"\"\n\t\treturn\n\t}\n\ttail -1 \"${env_file}\" \\\n\t\t| cut -d' ' -f4 \\\n\t\t| cut -d';' -f1\n}\n\nfunction _get_process_status_field() {\n\t# uses /proc filesystem\n\tlocal \\\n\t\tpid \\\n\t\tstatus_file \\\n\t\tfield\n\tpid=\"${1}\"\n\tfield=\"${2}\"\n\tstatus_file=\"/proc/${pid}/status\"\n\tif ! { [[ -d \"${status_file%/*}\" ]] \\\n\t\t&& [[ -r \"${status_file}\" ]]; }; then\n\t\techo \"\"\n\t\treturn\n\tfi\n\tgrep \"${field}:\" \"${status_file}\" \\\n\t\t| cut -d':' -f2 \\\n\t\t| sed -e 's/[[:space:]]\\+//g' \\\n\t\t| cut -d'(' -f1\n}\n\nfunction _is_item_in_list() {\n\tlocal item\n\tfor item in \"${@:1}\"; do\n\t\tif [[ \"${item}\" == \"${1}\" ]]; then\n\t\t\treturn 1\n\t\tfi\n\tdone\n\treturn 0\n}\n\nfunction _is_proc_alive_at_pid() {\n\tlocal \\\n\t\tpid \\\n\t\texpected_name \\\n\t\tactual_name \\\n\t\tactual_state\n\tpid=\"${1?}\"\n\texpected_name=\"ssh-agent\"\n\t# we want to exclude: X (killed), T (traced), Z (zombie)\n\tactual_name=$(_get_process_status_field \"${pid}\" \"Name\")\n\t[[ \"${expected_name}\" == \"${actual_name}\" ]] || return 1\n\tactual_state=$(_get_process_status_field \"${pid}\" \"State\")\n\tif _is_item_in_list \"${actual_state}\" \"X\" \"T\" \"Z\"; then\n\t\treturn 1\n\tfi\n\treturn 0\n}\n\nfunction _ensure_valid_sshagent_env() {\n\tlocal \\\n\t\tagent_pid \\\n\t\ttmp_res\n\n\tmkdir -p \"${HOME}/.ssh\"\n\ttype restorecon &> /dev/null\n\ttmp_res=\"$?\"\n\n\tif [[ \"${tmp_res}\" -eq 0 ]]; then\n\t\trestorecon -rv \"${HOME}/.ssh\"\n\tfi\n\n\t# no env file -> shoot a new agent\n\tif ! [[ -r \"${SSH_AGENT_ENV}\" ]]; then\n\t\tssh-agent > \"${SSH_AGENT_ENV}\"\n\t\treturn\n\tfi\n\n\t## do not trust pre-existing SSH_AGENT_ENV\n\tagent_pid=$(_get_sshagent_pid_from_env_file \"${SSH_AGENT_ENV}\")\n\tif [[ -z \"${agent_pid}\" ]]; then\n\t\t# no pid detected -> shoot a new agent\n\t\tssh-agent > \"${SSH_AGENT_ENV}\"\n\t\treturn\n\tfi\n\n\t## do not trust SSH_AGENT_PID\n\tif _is_proc_alive_at_pid \"${agent_pid}\"; then\n\t\treturn\n\tfi\n\n\tssh-agent > \"${SSH_AGENT_ENV}\"\n\treturn\n}\n\nfunction _ensure_sshagent_dead() {\n\t[[ -r \"${SSH_AGENT_ENV}\" ]] \\\n\t\t|| return ## no agent file - no problems\n\t## ensure the file indeed points to a really running agent:\n\tagent_pid=$(\n\t\t_get_sshagent_pid_from_env_file \\\n\t\t\t\"${SSH_AGENT_ENV}\"\n\t)\n\n\t[[ -n \"${agent_pid}\" ]] \\\n\t\t|| return # no pid - no problem\n\n\t_is_proc_alive_at_pid \"${agent_pid}\" \\\n\t\t|| return # process is not alive - no problem\n\n\techo -e -n \"Killing ssh-agent (pid:${agent_pid}) ... \"\n\tkill -9 \"${agent_pid}\" && echo \"DONE\" || echo \"FAILED\"\n\trm -f \"${SSH_AGENT_ENV}\"\n}\n\nfunction sshagent() {\n\tabout 'ensures ssh-agent is up and running'\n\tparam '1: on|off '\n\texample '$ sshagent on'\n\tgroup 'ssh'\n\t[[ -z \"${SSH_AGENT_ENV}\" ]] \\\n\t\t&& export SSH_AGENT_ENV=\"${HOME}/.ssh/agent_env.${HOSTNAME}\"\n\n\tcase \"${1}\" in\n\t\ton)\n\t\t\t_ensure_valid_sshagent_env\n\t\t\t# shellcheck disable=SC1090\n\t\t\tsource \"${SSH_AGENT_ENV}\" > /dev/null\n\t\t\t;;\n\t\toff)\n\t\t\t_ensure_sshagent_dead\n\t\t\t;;\n\t\t*) ;;\n\tesac\n}\n\nsshagent on\n"
  },
  {
    "path": "plugins/available/subversion.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'svn helper functions'\nurl \"https://subversion.apache.org/\"\n\nrm_svn() {\n\tabout 'remove \".svn\" files from directory'\n\tparam '1: directory to search for files'\n\tgroup 'svn'\n\n\tif [ -z \"$1\" ]; then\n\t\treference rm_svn\n\t\treturn\n\tfi\n\tfind \"$1\" -name .svn -print0 | xargs -0 rm -rf\n}\n\nsvn_add() {\n\tabout 'add to svn repo'\n\tgroup 'svn'\n\n\tsvn status | grep '^\\?' | sed -e 's/? *//' | sed -e 's/ /\\ /g' | xargs svn add\n}\n"
  },
  {
    "path": "plugins/available/sudo.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Toggle sudo at the beginning of the current or the previous command by hitting the ESC key twice'\nurl \"https://www.sudo.ws/\"\n\nfunction sudo-command-line() {\n\tabout \"toggle sudo at the beginning of the current or the previous command by hitting the ESC key twice\"\n\tgroup \"sudo\"\n\n\t[[ ${#READLINE_LINE} -eq 0 ]] && READLINE_LINE=$(fc -l -n -1 | xargs)\n\tif [[ $READLINE_LINE == sudo\\ * ]]; then\n\t\tREADLINE_LINE=\"${READLINE_LINE#sudo }\"\n\telse\n\t\tREADLINE_LINE=\"sudo $READLINE_LINE\"\n\tfi\n\tREADLINE_POINT=${#READLINE_LINE}\n}\n\n# Define shortcut keys: [Esc] [Esc]\n\n# Readline library requires bash version 4 or later\nif [ \"${BASH_VERSINFO[0]}\" -ge 4 ]; then\n\tbind -x '\"\\e\\e\": sudo-command-line'\nfi\n"
  },
  {
    "path": "plugins/available/textmate.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'set textmate as a default editor'\nurl \"https://macromates.com/\"\n\nif _command_exists mate; then\n\tEDITOR=\"$(type -p mate) -w\"\n\tGIT_EDITOR=\"$EDITOR\"\n\texport EDITOR GIT_EDITOR\nfi\n"
  },
  {
    "path": "plugins/available/thefuck.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Initialization for fuck'\nurl \"https://github.com/nvbn/thefuck\"\n\n# https://github.com/nvbn/thefuck\n\nif _command_exists thefuck; then\n\t# shellcheck disable=SC2046\n\teval $(thefuck --alias)\nfi\n"
  },
  {
    "path": "plugins/available/tmux.plugin.bash",
    "content": "# shellcheck shell=bash\n# make sure that tmux is launched in 256 color mode\n\ncite about-plugin\nabout-plugin 'make sure that tmux is launched in 256 color mode'\nurl \"https://github.com/tmux/tmux\"\n\nalias tmux=\"TERM=xterm-256color tmux\"\n"
  },
  {
    "path": "plugins/available/tmuxinator.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'sources tmuxinator script if available'\nurl \"https://github.com/tmuxinator/tmuxinator\"\n\n# shellcheck disable=SC1091\n[[ -s \"$HOME/.tmuxinator/scripts/tmuxinator\" ]] && . \"$HOME/.tmuxinator/scripts/tmuxinator\"\n"
  },
  {
    "path": "plugins/available/todo.plugin.bash",
    "content": "# shellcheck shell=bash\nabout-plugin 'Todo.txt integration'\nurl \"https://github.com/todotxt/todo.txt-cli\"\n\n# you may override any of the exported variables below in your .bash_profile\n: \"${TODOTXT_DEFAULT_ACTION:=ls}\"\nexport TODOTXT_DEFAULT_ACTION\n"
  },
  {
    "path": "plugins/available/url.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'Basic url handling and manipulation functions'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction slugify() {\n\tabout 'takes the text and transform to slug url, also supports formats like (html,link,rst,md)'\n\tgroup 'url'\n\tparam \"1: Text to transform (optional)\"\n\tparam \"2: Output format (html,rst,link,md). Omit or pass any text to return only output\"\n\n\tlocal TXT=$1\n\tlocal OUTPUT=$2\n\tlocal SLUG\n\n\tif [[ -z $TXT ]]; then\n\t\tread -rp \"Enter the valid string: \" TXT\n\tfi\n\n\t# Pass 1 - Clean the url\n\t# Credits: https://stackoverflow.com/a/20007549/10362396\n\tSLUG=$(echo -n \"$TXT\" | tr -cd ' [:alnum:]._-' | tr -s ' ')\n\n\t# Pass 2 - Transformation\n\tSLUG=$(echo -n \"$SLUG\" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')\n\n\tcase \"$OUTPUT\" in\n\t\thtml | htm)\n\t\t\techo \"<a href=\\\"#$SLUG\\\">$TXT</a>\"\n\t\t\t;;\n\t\thref | link)\n\t\t\techo \"#$SLUG\"\n\t\t\t;;\n\t\tmd)\n\t\t\techo \"[$TXT](#$SLUG)\"\n\t\t\t;;\n\t\trst)\n\t\t\techo \"\\`$TXT <#$SLUG>\\`_\"\n\t\t\t;;\n\n\t\t*)\n\t\t\techo \"$SLUG\"\n\t\t\t;;\n\tesac\n\n}\n"
  },
  {
    "path": "plugins/available/virtualenv.plugin.bash",
    "content": "# shellcheck shell=bash\n#\n# make sure virtualenvwrapper is enabled if available\n\ncite about-plugin\nurl \"https://virtualenvwrapper.readthedocs.io/\"\nabout-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions'\n\n# Check for whole command instead of just pyenv\nif [ -n \"$(command pyenv virtualenvwrapper --help 2> /dev/null)\" ]; then\n\tpyenv virtualenvwrapper\nelif _command_exists virtualenvwrapper.sh; then\n\t# shellcheck disable=SC1091\n\tsource virtualenvwrapper.sh\nelse\n\t_log_debug \"${2:-'virtualenvwrapper' was not found}\"\nfi\n\nfunction mkvenv {\n\tabout 'create a new virtualenv for this directory'\n\tgroup 'virtualenv'\n\n\tlocal cwd=\"${PWD##*/}\"\n\tmkvirtualenv --distribute \"$cwd\"\n}\n\nfunction mkvbranch {\n\tabout 'create a new virtualenv for the current branch'\n\tgroup 'virtualenv'\n\n\tlocal cwd=\"${PWD##*/}\"\n\tmkvirtualenv --distribute \"${cwd}@${SCM_BRANCH}\"\n}\n\nfunction wovbranch {\n\tabout 'sets workon branch'\n\tgroup 'virtualenv'\n\n\tlocal cwd=\"${PWD##*/}\"\n\tworkon \"${cwd}@${SCM_BRANCH}\"\n}\n\nfunction wovenv {\n\tabout 'works on the virtualenv for this directory'\n\tgroup 'virtualenv'\n\n\tworkon \"${PWD##*/}\"\n}\n"
  },
  {
    "path": "plugins/available/xterm.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'automatically set your xterm title with host and location info'\nurl \"https://github.com/Bash-it/bash-it\"\n\nfunction _short-dirname() {\n\tlocal dir_name=\"${PWD/~/\\~}\"\n\tif [[ \"${SHORT_TERM_LINE:-}\" == true && \"${#dir_name}\" -gt 8 ]]; then\n\t\techo \"${dir_name##*/}\"\n\telse\n\t\techo \"${dir_name}\"\n\tfi\n}\n\nfunction _short-command() {\n\tlocal input_command=\"$*\"\n\tif [[ \"${SHORT_TERM_LINE:-}\" == true && \"${#input_command}\" -gt 8 ]]; then\n\t\techo \"${input_command%% *}\"\n\telse\n\t\techo \"${input_command}\"\n\tfi\n}\n\nfunction set_xterm_title() {\n\tlocal title=\"${1:-}\"\n\techo -ne \"\\033]0;${title}\\007\"\n}\n\nfunction precmd_xterm_title() {\n\tset_xterm_title \"${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}} $(_short-dirname) ${PROMPT_CHAR:-\\$}\"\n}\n\nfunction preexec_xterm_title() {\n\tlocal command_line=\"${BASH_COMMAND:-${1:-}}\"\n\tlocal directory_name short_command\n\tdirectory_name=\"$(_short-dirname)\"\n\tshort_command=\"$(_short-command \"${command_line}\")\"\n\tset_xterm_title \"${short_command} {${directory_name}} (${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}})\"\n}\n\ncase \"${TERM:-dumb}\" in\n\txterm* | rxvt* | gnome-terminal | konsole | zvt | dtterm | kterm | Eterm | zterm)\n\t\t# Check for safe_append functions and use fallback if not available\n\t\tif _is_function safe_append_prompt_command; then\n\t\t\tsafe_append_prompt_command 'precmd_xterm_title'\n\t\telif [[ -n \"${PROMPT_COMMAND:-}\" ]]; then\n\t\t\t# Fallback: append to PROMPT_COMMAND if it exists\n\t\t\tPROMPT_COMMAND=\"precmd_xterm_title;${PROMPT_COMMAND}\"\n\t\telse\n\t\t\tPROMPT_COMMAND='precmd_xterm_title'\n\t\tfi\n\n\t\tif _is_function safe_append_preexec; then\n\t\t\tsafe_append_preexec 'preexec_xterm_title'\n\t\telse\n\t\t\t# Fallback: register function directly if preexec array is available\n\t\t\tif [[ -n \"${preexec_functions:-}\" ]]; then\n\t\t\t\tpreexec_functions+=('preexec_xterm_title')\n\t\t\tfi\n\t\tfi\n\t\t;;\nesac\n"
  },
  {
    "path": "plugins/available/z_autoenv.plugin.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2207,SC2120,SC2034\ncite about-plugin\nabout-plugin 'source into environment when cding to directories'\nurl \"https://github.com/Bash-it/bash-it\"\n\nif [[ -n \"${ZSH_VERSION}\" ]]; then\n\t__array_offset=0\nelse\n\t__array_offset=1\nfi\n\nautoenv_init() {\n\ttypeset target home _file\n\ttypeset -a _files\n\ttarget=$1\n\thome=\"${HOME%/*}\"\n\n\t_files=($(\n\t\twhile [[ \"$PWD\" != \"/\" && \"$PWD\" != \"$home\" ]]; do\n\t\t\t_file=\"$PWD/.env\"\n\t\t\tif [[ -e \"${_file}\" ]]; then\n\t\t\t\techo \"${_file}\"\n\t\t\tfi\n\t\t\tbuiltin cd .. || true\n\t\tdone\n\t))\n\n\t_file=${#_files[@]}\n\twhile ((_file > 0)); do\n\t\t#shellcheck disable=SC1090\n\t\tsource \"${_files[_file - __array_offset]}\"\n\t\t: $((_file -= 1))\n\tdone\n}\n\ncd() {\n\tlocal return_code\n\tif builtin cd \"$@\"; then\n\t\tautoenv_init\n\t\treturn 0\n\telse\n\t\treturn_code=$?\n\t\techo \"else?\"\n\t\treturn \"$return_code\"\n\tfi\n}\n"
  },
  {
    "path": "plugins/available/zoxide.plugin.bash",
    "content": "# shellcheck shell=bash\ncite about-plugin\nabout-plugin 'zoxide is a smarter cd command for your shell.'\nurl \"https://github.com/ajeetdsouza/zoxide\"\n\nif _command_exists zoxide; then\n\teval \"$(zoxide init bash)\"\nelse\n\t_log_error 'zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide'\nfi\n"
  },
  {
    "path": "profiles/default.bash_it",
    "content": "# This is the default profile of Bash-it\n\n# plugins\nplugins base\n\n# completion\ncompletion aliases\ncompletion bash-it\ncompletion system\n\n# aliases\naliases general\naliases bash-it\naliases directory\naliases editor\n"
  },
  {
    "path": "scripts/reloader.bash",
    "content": "# shellcheck shell=bash\n#\n# The core component loader.\n\n# shellcheck disable=SC2034\nBASH_IT_LOG_PREFIX=\"core: reloader: \"\n_bash_it_reloader_type=\"\"\n\nif [[ \"${1:-}\" != \"skip\" ]] && [[ -d \"${BASH_IT?}/enabled\" ]]; then\n\tcase $1 in\n\t\talias | completion | plugin)\n\t\t\t_bash_it_reloader_type=$1\n\t\t\t_log_debug \"Loading enabled $1 components...\"\n\t\t\t;;\n\t\t'' | *)\n\t\t\t_log_debug \"Loading all enabled components...\"\n\t\t\t;;\n\tesac\n\n\tfor _bash_it_reloader_file in \"$BASH_IT/enabled\"/*\"${_bash_it_reloader_type}.bash\"; do\n\t\tif [[ -e \"${_bash_it_reloader_file}\" ]]; then\n\t\t\t_bash-it-log-prefix-by-path \"${_bash_it_reloader_file}\"\n\t\t\t_log_debug \"Loading component...\"\n\t\t\t# shellcheck source=/dev/null\n\t\t\tsource \"$_bash_it_reloader_file\"\n\t\t\t_log_debug \"Loaded.\"\n\t\telse\n\t\t\t_log_error \"Unable to read ${_bash_it_reloader_file}\"\n\t\tfi\n\tdone\nfi\n\nif [[ -n \"${2:-}\" ]] && [[ -d \"$BASH_IT/${2}/enabled\" ]]; then\n\tcase $2 in\n\t\taliases | completion | plugins)\n\t\t\t_log_warning \"Using legacy enabling for $2, please update your bash-it version and migrate\"\n\t\t\tfor _bash_it_reloader_file in \"$BASH_IT/${2}/enabled\"/*.bash; do\n\t\t\t\tif [[ -e \"$_bash_it_reloader_file\" ]]; then\n\t\t\t\t\t_bash-it-log-prefix-by-path \"${_bash_it_reloader_file}\"\n\t\t\t\t\t_log_debug \"Loading component...\"\n\t\t\t\t\t# shellcheck source=/dev/null\n\t\t\t\t\tsource \"$_bash_it_reloader_file\"\n\t\t\t\t\t_log_debug \"Loaded.\"\n\t\t\t\telse\n\t\t\t\t\t_log_error \"Unable to locate ${_bash_it_reloader_file}\"\n\t\t\t\tfi\n\t\t\tdone\n\t\t\t;;\n\tesac\nfi\n\nunset \"${!_bash_it_reloader_@}\"\n"
  },
  {
    "path": "template/bashrc.template.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034\n\n# If not running interactively, don't do anything\ncase $- in\n\t*i*) ;;\n\t*) return ;;\nesac\n\n# Path to the bash it configuration\nBASH_IT=\"{{BASH_IT}}\"\n\n# Lock and Load a custom theme file.\n# Leave empty to disable theming.\n# location \"$BASH_IT\"/themes/\nexport BASH_IT_THEME='bobby'\n\n# Some themes can show whether `sudo` has a current token or not.\n# Set `$THEME_CHECK_SUDO` to `true` to check every prompt:\n#THEME_CHECK_SUDO='true'\n\n# (Advanced): Change this to the name of your remote repo if you\n# cloned bash-it with a remote other than origin such as `bash-it`.\n#BASH_IT_REMOTE='bash-it'\n\n# (Advanced): Change this to the name of the main development branch if\n# you renamed it or if it was changed for some reason\n#BASH_IT_DEVELOPMENT_BRANCH='master'\n\n# Your place for hosting Git repos. I use this for private repos.\n#GIT_HOSTING='git@git.domain.com'\n\n# Don't check mail when opening terminal.\nunset MAILCHECK\n\n# Change this to your console based IRC client of choice.\nexport IRC_CLIENT='irssi'\n\n# Set this to the command you use for todo.txt-cli\nTODO=\"t\"\n\n# Set this to the location of your work or project folders\n#BASH_IT_PROJECT_PATHS=\"${HOME}/Projects:/Volumes/work/src\"\n\n# Set this to false to turn off version control status checking within the prompt for all themes\n#SCM_CHECK=true\n\n# Set to actual location of gitstatus directory if installed\n#SCM_GIT_GITSTATUS_DIR=\"$HOME/gitstatus\"\n# per default gitstatus uses 2 times as many threads as CPU cores, you can change this here if you must\n#export GITSTATUS_NUM_THREADS=8\n\n# If your theme use command duration, uncomment this to\n# enable display of last command duration.\n#BASH_IT_COMMAND_DURATION=true\n# You can choose the minimum time in seconds before\n# command duration is displayed.\n#COMMAND_DURATION_MIN_SECONDS=1\n\n# Set Xterm/screen/Tmux title with shortened command and directory.\n# Uncomment this to set.\n#SHORT_TERM_LINE=true\n\n# Set vcprompt executable path for scm advance info in prompt (demula theme)\n# https://github.com/djl/vcprompt\n#VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt\n\n# (Advanced): Uncomment this to make Bash-it reload itself automatically\n# after enabling or disabling aliases, plugins, and completions.\n# BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1\n\n# Uncomment this to make Bash-it create alias reload.\n# BASH_IT_RELOAD_LEGACY=1\n\n# Load Bash It\nsource \"${BASH_IT?}/bash_it.sh\"\n"
  },
  {
    "path": "test/bash_it/bash_it.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\t# Copy the test fixture to the Bash-it folder\n\tcp -fRP \"${BASH_IT?}/test/fixtures/bash_it\"/* \"${BASH_IT?}/\" || true\n\t# don't load any libraries as the tests here test the *whole* kit\n}\n\n@test \"bash-it: verify that the test fixture is available\" {\n\tassert_file_exist \"${BASH_IT?}/aliases/available/a.aliases.bash\"\n\tassert_file_exist \"${BASH_IT?}/aliases/available/b.aliases.bash\"\n}\n\n@test \"bash-it: load aliases in order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='b'\"\n}\n\n@test \"bash-it: load aliases in priority order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/175---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/175---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/aliases/enabled/755---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/755---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='a'\"\n}\n\n@test \"bash-it: load aliases and plugins in priority order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='c'\"\n}\n\n@test \"bash-it: load aliases, plugins and completions in priority order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/completion/enabled/350---b.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/completion/enabled/350---b.completion.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/completion/enabled/350---b.completion.bash\"\n\tassert_link_exist \"$BASH_IT/completion/enabled/350---b.completion.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\t# \"b\" wins since completions are loaded last in the old directory structure\n\tassert_line -n 0 \"alias test_alias='b'\"\n}\n\n@test \"bash-it: load aliases, plugins and completions in priority order, even if the priority says otherwise\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/450---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/450---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/completion/enabled/350---b.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/completion/enabled/350---b.completion.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/plugins/enabled/950---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/950---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\t# \"b\" wins since completions are loaded last in the old directory structure\n\tassert_line -n 0 \"alias test_alias='b'\"\n}\n\n@test \"bash-it: load aliases and plugins in priority order, with one alias higher than plugins\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/aliases/enabled/350---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/350---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/aliases/enabled/350---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/350---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/250---c.plugin.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\t# This will be c, loaded from the c plugin, since the individual directories\n\t# are loaded one by one.\n\tassert_line -n 0 \"alias test_alias='c'\"\n}\n\n@test \"bash-it: load global aliases in order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/enabled/150---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/enabled/750---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---b.aliases.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='b'\"\n}\n\n@test \"bash-it: load global aliases in priority order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/enabled/175---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/175---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/enabled/755---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/755---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---b.aliases.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='a'\"\n}\n\n@test \"bash-it: load global aliases and plugins in priority order\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/enabled/150---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/enabled/755---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/755---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---b.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/enabled/850---c.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/850---c.plugin.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\tassert_line -n 0 \"alias test_alias='c'\"\n}\n\n@test \"bash-it: load global aliases and plugins in priority order, with one alias higher than plugins\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/enabled/350---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/350---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/enabled/950---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/950---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---b.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/enabled/850---c.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/850---c.plugin.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\t# This will be a, loaded from the a aliases, since the global directory\n\t# loads all component types at once\n\tassert_line -n 0 \"alias test_alias='a'\"\n}\n\n@test \"bash-it: load global aliases and plugins in priority order, individual old directories are loaded later\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/aliases/available/a.aliases.bash\" \"${BASH_IT?}/enabled/350---a.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/350---a.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---b.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/c.plugin.bash\" \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---c.plugin.bash\"\n\t# Add one file in the old directory structure\n\trun ln -s \"${BASH_IT?}/aliases/available/b.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---b.aliases.bash\"\n\n\t# The `test_alias` alias should not exist\n\trun alias test_alias &> /dev/null\n\tassert_failure\n\n\trun ln -s \"$BASH_IT/aliases/available/a.aliases.bash\" \"$BASH_IT/enabled/350---a.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/350---a.aliases.bash\"\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---b.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/c.plugin.bash\" \"$BASH_IT/enabled/250---c.aplugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/250---c.plugin.bash\"\n\t# Add one file in the old directory structure\n\trun ln -s \"$BASH_IT/aliases/available/b.aliases.bash\" \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---b.aliases.bash\"\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias test_alias &> /dev/null\n\tassert_success\n\t# This will be \"b\", loaded from the b aliases in the individual directory, since\n\t# the individual directories are loaded after the global one.\n\tassert_line -n 0 \"alias test_alias='b'\"\n}\n\n@test \"bash-it: load enabled aliases from new structure, priority-based\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/atom.aliases.bash\" \"${BASH_IT?}/enabled/150---atom.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/150---atom.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\n\tmkdir -p \"$BASH_IT/enabled\"\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/base.plugin.bash\" \"$BASH_IT/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/250---base.plugin.bash\"\n\n\t# The `ah` alias should not exist\n\trun alias ah &> /dev/null\n\tassert_failure\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias ah &> /dev/null\n\tassert_success\n}\n\n@test \"bash-it: load enabled aliases from old structure, priority-based\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/atom.aliases.bash\" \"${BASH_IT?}/aliases/enabled/150---atom.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/150---atom.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---base.plugin.bash\"\n\n\tmkdir -p \"$BASH_IT/aliases/enabled\"\n\tmkdir -p \"$BASH_IT/plugins/enabled\"\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\trun ln -s \"$BASH_IT/plugins/available/base.plugin.bash\" \"$BASH_IT/plugins/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/250---base.plugin.bash\"\n\n\t# The `ah` alias should not exist\n\trun alias ah &> /dev/null\n\tassert_failure\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias ah &> /dev/null\n\tassert_success\n}\n\n@test \"bash-it: load enabled aliases from old structure, without priorities\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/atom.aliases.bash\" \"${BASH_IT?}/aliases/enabled/atom.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/atom.aliases.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/base.plugin.bash\" \"${BASH_IT?}/plugins/enabled/base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/base.plugin.bash\"\n\n\t# The `ah` alias should not exist\n\trun alias ah &> /dev/null\n\tassert_failure\n\n\tload \"${BASH_IT?}/bash_it.sh\"\n\n\trun alias ah &> /dev/null\n\tassert_success\n}\n"
  },
  {
    "path": "test/completion/aliases.completion.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n\t# Load something, anything...\n\tload ../../completion/available/capistrano.completion\n}\n\n@test \"alias-completion: See that aliases with double quotes and brackets do not break the plugin\" {\n\talias gtest=\"git log --graph --pretty=format:'%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset' --abbrev-commit --date=relative\"\n\trun load \"${BASH_IT?}/completion/available/aliases.completion.bash\"\n\n\tassert_success\n}\n\n@test \"alias-completion: See that aliases with single quotes and brackets do not break the plugin\" {\n\talias gtest='git log --graph --pretty=format:\"%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset\" --abbrev-commit --date=relative'\n\trun load \"${BASH_IT?}/completion/available/aliases.completion.bash\"\n\n\tassert_success\n}\n\n@test \"alias-completion: See that having aliased rm command does not output unnecessary output\" {\n\talias rm='rm -v'\n\trun load \"${BASH_IT?}/completion/available/aliases.completion.bash\"\n\n\tassert_output \"\"\n}\n"
  },
  {
    "path": "test/completion/bash-it.completion.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n\tload \"${BASH_IT?}/completion/available/bash-it.completion.bash\"\n}\n\n@test \"completion bash-it: ensure that the _bash-it function is available\" {\n\trun type -t _bash-it\n\tassert_success\n\tassert_output \"function\"\n}\n\nfunction __check_completion() {\n\t# Get the parameters as a single value\n\tCOMP_LINE=$*\n\n\t# Get the parameters as an array\n\t# shellcheck disable=SC2294\n\teval set -- \"$@\"\n\tCOMP_WORDS=(\"$@\")\n\n\t# Index of the cursor in the line\n\tCOMP_POINT=${#COMP_LINE}\n\n\t# Get the last character of the line that was entered\n\tCOMP_LAST=$((COMP_POINT - 1))\n\n\t# If the last character was a space...\n\tif [[ ${COMP_LINE:$COMP_LAST} = ' ' ]]; then\n\t\t# ...then add an empty array item\n\t\tCOMP_WORDS+=('')\n\tfi\n\n\t# Word index of the last word\n\tCOMP_CWORD=$((${#COMP_WORDS[@]} - 1))\n\n\t# Run the Bash-it completion function\n\t_bash-it\n\n\t# Return the completion output\n\techo \"${COMPREPLY[@]}\"\n}\n\n@test \"completion bash-it: doctor - show options\" {\n\trun __check_completion 'bash-it doctor '\n\tassert_output \"errors warnings all\"\n}\n\n@test \"completion bash-it: help - show options\" {\n\trun __check_completion 'bash-it help '\n\tassert_output \"aliases completions migrate plugins update\"\n}\n\n@test \"completion bash-it: help - aliases v\" {\n\trun __check_completion 'bash-it help aliases v'\n\tassert_output \"vagrant vault vim\"\n}\n\n@test \"completion bash-it: update - show options\" {\n\trun __check_completion 'bash-it update '\n\tassert_output \"stable dev\"\n}\n\n@test \"completion bash-it: update - show optional flags\" {\n\trun __check_completion 'bash-it update -'\n\tassert_output \"-s --silent\"\n}\n\n@test \"completion bash-it: search - show no options\" {\n\trun __check_completion 'bash-it search '\n\tassert_output \"\"\n}\n\n@test \"completion bash-it: migrate - show no options\" {\n\trun __check_completion 'bash-it migrate '\n\tassert_output \"\"\n}\n\n@test \"completion bash-it: show options\" {\n\trun __check_completion 'bash-it '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: bash-ti - show options\" {\n\trun __check_completion 'bash-ti '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: shit - show options\" {\n\trun __check_completion 'shit '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: bashit - show options\" {\n\trun __check_completion 'bashit '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: batshit - show options\" {\n\trun __check_completion 'batshit '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: bash_it - show options\" {\n\trun __check_completion 'bash_it '\n\tassert_output \"disable enable help migrate reload restart preview profile doctor search show update version\"\n}\n\n@test \"completion bash-it: profile - show options\" {\n\trun __check_completion 'bash-it profile '\n\tassert_output \"load save list rm\"\n}\n\n@test \"completion bash-it: profile load - show options\" {\n\trun __check_completion 'bash-it profile load '\n\tassert_output \"default\"\n}\n\n@test \"completion bash-it: show - show options\" {\n\trun __check_completion 'bash-it show '\n\tassert_output \"aliases completions plugins\"\n}\n\n@test \"completion bash-it: enable - show options\" {\n\trun __check_completion 'bash-it enable '\n\tassert_output \"alias completion plugin\"\n}\n\n@test \"completion bash-it: enable - show options a\" {\n\trun __check_completion 'bash-it enable a'\n\tassert_output \"alias\"\n}\n\n@test \"completion bash-it: disable - show options\" {\n\trun __check_completion 'bash-it disable '\n\tassert_output \"alias completion plugin\"\n}\n\n@test \"completion bash-it: disable - show options a\" {\n\trun __check_completion 'bash-it disable a'\n\tassert_output \"alias\"\n}\n\n@test \"completion bash-it: disable - provide nothing when atom is not enabled\" {\n\trun __check_completion 'bash-it disable alias ato'\n\tassert_output \"\"\n}\n\n@test \"completion bash-it: disable - provide 'all' when atom is not enabled\" {\n\trun __check_completion 'bash-it disable alias a'\n\tassert_output \"all\"\n}\n\n@test \"completion bash-it: disable - provide the a* aliases when atom is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/aliases/enabled/atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/atom.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/completion/available/apm.completion.bash\" \"$BASH_IT/completion/enabled/apm.completion.bash\"\n\tassert_link_exist \"$BASH_IT/completion/enabled/apm.completion.bash\"\n\n\trun _bash-it-component-item-is-enabled \"alias\" \"atom\"\n\tassert_success\n\n\trun __check_completion 'bash-it disable alias a'\n\tassert_output \"all atom\"\n}\n\n@test \"completion bash-it: disable - provide the a* aliases when atom is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/completion/available/apm.completion.bash\" \"$BASH_IT/completion/enabled/350---apm.completion.bash\"\n\tassert_link_exist \"$BASH_IT/completion/enabled/350---apm.completion.bash\"\n\n\trun __check_completion 'bash-it disable alias a'\n\tassert_output \"all atom\"\n}\n\n@test \"completion bash-it: disable - provide the a* aliases when atom is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/completion/available/apm.completion.bash\" \"$BASH_IT/enabled/350---apm.completion.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/350---apm.completion.bash\"\n\n\trun __check_completion 'bash-it disable alias a'\n\tassert_output \"all atom\"\n}\n\n@test \"completion bash-it: disable - provide the docker-machine plugin when docker-machine is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/docker-machine.plugin.bash\" \"$BASH_IT/plugins/enabled/docker-machine.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/docker-machine.plugin.bash\"\n\n\trun __check_completion 'bash-it disable plugin docker'\n\tassert_output \"docker-machine\"\n}\n\n@test \"completion bash-it: disable - provide the docker-machine plugin when docker-machine is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/docker-machine.plugin.bash\" \"$BASH_IT/plugins/enabled/350---docker-machine.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/350---docker-machine.plugin.bash\"\n\n\trun __check_completion 'bash-it disable plugin docker'\n\tassert_output \"docker-machine\"\n}\n\n@test \"completion bash-it: disable - provide the docker-machine plugin when docker-machine is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/docker-machine.plugin.bash\" \"$BASH_IT/enabled/350---docker-machine.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/350---docker-machine.plugin.bash\"\n\n\trun __check_completion 'bash-it disable plugin docker'\n\tassert_output \"docker-machine\"\n}\n\n@test \"completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/todo.aliases.bash\" \"$BASH_IT/aliases/enabled/todo.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/todo.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/plugins/enabled/todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/todo.plugin.bash\"\n\n\trun __check_completion 'bash-it disable alias to'\n\tassert_output \"todo\"\n}\n\n@test \"completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/todo.aliases.bash\" \"$BASH_IT/aliases/enabled/750---todo.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---todo.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/plugins/enabled/350---todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/350---todo.plugin.bash\"\n\n\trun __check_completion 'bash-it disable alias to'\n\tassert_output \"todo\"\n}\n\n@test \"completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/todo.aliases.bash\" \"$BASH_IT/enabled/750---todo.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---todo.aliases.bash\"\n\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/enabled/350---todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/350---todo.plugin.bash\"\n\n\trun __check_completion 'bash-it disable alias to'\n\tassert_output \"todo\"\n}\n\n@test \"completion bash-it: enable - provide the atom aliases when not enabled\" {\n\trun __check_completion 'bash-it enable alias ato'\n\tassert_output \"atom\"\n}\n\n@test \"completion bash-it: enable - provide the a* aliases when not enabled\" {\n\trun __check_completion 'bash-it enable alias a'\n\tassert_output \"all ag ansible apt atom\"\n}\n\n@test \"completion bash-it: enable - provide the a* aliases when atom is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/aliases/enabled/atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/atom.aliases.bash\"\n\n\trun __check_completion 'bash-it enable alias a'\n\tassert_output \"all ag ansible apt\"\n}\n\n@test \"completion bash-it: enable - provide the a* aliases when atom is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---atom.aliases.bash\"\n\n\trun __check_completion 'bash-it enable alias a'\n\tassert_output \"all ag ansible apt\"\n}\n\n@test \"completion bash-it: enable - provide the a* aliases when atom is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/atom.aliases.bash\" \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---atom.aliases.bash\"\n\n\trun __check_completion 'bash-it enable alias a'\n\tassert_output \"all ag ansible apt\"\n}\n\n@test \"completion bash-it: enable - provide the docker* plugins when docker-compose is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable plugin docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the docker-* plugins when docker-compose is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable plugin docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the docker-* plugins when docker-compose is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable plugin docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the docker* completions when docker-compose is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable completion docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the docker* completions when docker-compose is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable completion docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the docker* completions when docker-compose is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/aliases/available/docker-compose.aliases.bash\" \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/750---docker-compose.aliases.bash\"\n\n\trun __check_completion 'bash-it enable completion docker'\n\tassert_output \"docker docker-compose docker-machine\"\n}\n\n@test \"completion bash-it: enable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and name\" {\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/plugins/enabled/todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/todo.plugin.bash\"\n\n\trun __check_completion 'bash-it enable alias to'\n\tassert_output \"todo\"\n}\n\n@test \"completion bash-it: enable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and priority-based name\" {\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/plugins/enabled/350---todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/plugins/enabled/350---todo.plugin.bash\"\n\n\trun __check_completion 'bash-it enable alias to'\n\tassert_output \"todo\"\n}\n\n@test \"completion bash-it: enable - provide the todo.txt-cli aliases when todo plugin is enabled with the new location and priority-based name\" {\n\trun ln -s \"$BASH_IT/plugins/available/todo.plugin.bash\" \"$BASH_IT/enabled/350---todo.plugin.bash\"\n\tassert_link_exist \"$BASH_IT/enabled/350---todo.plugin.bash\"\n\n\trun __check_completion 'bash-it enable alias to'\n\tassert_output \"todo\"\n}\n"
  },
  {
    "path": "test/fixtures/bash_it/aliases/available/a.aliases.bash",
    "content": "# shellcheck shell=bash\n\nalias test_alias=\"a\"\n"
  },
  {
    "path": "test/fixtures/bash_it/aliases/available/b.aliases.bash",
    "content": "# shellcheck shell=bash\n\nalias test_alias=\"b\"\n"
  },
  {
    "path": "test/fixtures/bash_it/plugins/available/c.plugin.bash",
    "content": "# shellcheck shell=bash\n\nalias test_alias=\"c\"\n"
  },
  {
    "path": "test/fixtures/bash_it/profiles/test-bad-component.bash_it",
    "content": "# plugins\nplugins base\n\n# completion\ncompletion aliases\ncompletion bash-it\ncompletion system\n\n# aliases\naliases general\n# Bad component\naliases bla\n"
  },
  {
    "path": "test/fixtures/bash_it/profiles/test-bad-type.bash_it",
    "content": "# plugins\nplugins base\n# Bad type\ncompleetion aliases\n\n# completion\ncompletion aliases\ncompletion bash-it\ncompletion system\n\n# aliases\naliases general\n"
  },
  {
    "path": "test/fixtures/go/go path/bin/.keep",
    "content": ""
  },
  {
    "path": "test/fixtures/go/gopath/bin/.keep",
    "content": ""
  },
  {
    "path": "test/fixtures/go/gopath2/bin/.keep",
    "content": ""
  },
  {
    "path": "test/fixtures/plugin/xterm/files/arg0",
    "content": ""
  },
  {
    "path": "test/fixtures/plugin/xterm/files/arg1",
    "content": ""
  },
  {
    "path": "test/fixtures/svn/broken/svn",
    "content": "#!/usr/bin/env bash\n\n# Simply return an error code to simulate a broken SVN installation\nexit 72\n"
  },
  {
    "path": "test/fixtures/svn/broken/xcrun",
    "content": ""
  },
  {
    "path": "test/fixtures/svn/working/svn",
    "content": "#!/usr/bin/env bash\n\n# If the info command is called\n# AND the parent folder contains the .svn folder\n# THEN return the current path, similar to what `svn info` does\nif [[ \"$1\" == \"info\" ]] && [[ -d \"../.svn\" ]]; then\n  echo \"$PWD\"\nfi\n\nexit 0\n"
  },
  {
    "path": "test/fixtures/svn/working/xcrun",
    "content": ""
  },
  {
    "path": "test/install/install.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup() {\n\texport HOME=\"${BATS_TEST_TMPDIR?}\"\n}\n\nfunction local_setup_file() {\n\t# Determine which config file to use based on OS.\n\texport BASH_IT_CONFIG_FILE=.bashrc\n}\n\n@test \"install: verify that the install script exists\" {\n\tassert_file_exist \"${BASH_IT?}/install.sh\"\n}\n\n@test \"install: run the install script silently\" {\n\tcd \"$BASH_IT\"\n\n\t./install.sh --silent\n\n\tassert_file_exist \"$HOME/$BASH_IT_CONFIG_FILE\"\n\n\tassert_link_exist \"${BASH_IT?}/enabled/750---general.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/800---aliases.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/350---bash-it.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/325---system.completion.bash\"\n}\n\n@test \"install: verify that a backup file is created\" {\n\tlocal md5_orig md5_bak\n\tcd \"${BASH_IT?}\"\n\n\ttouch \"$HOME/$BASH_IT_CONFIG_FILE\"\n\techo \"test file content\" > \"$HOME/$BASH_IT_CONFIG_FILE\"\n\tmd5_orig=$(md5sum \"$HOME/$BASH_IT_CONFIG_FILE\" | awk '{print $1}')\n\n\t./install.sh --silent\n\n\tassert_file_exist \"$HOME/$BASH_IT_CONFIG_FILE\"\n\tassert_file_exist \"$HOME/$BASH_IT_CONFIG_FILE.bak\"\n\n\tmd5_bak=$(md5sum \"$HOME/$BASH_IT_CONFIG_FILE.bak\" | awk '{print $1}')\n\n\tassert_equal \"$md5_orig\" \"$md5_bak\"\n}\n\n@test \"install: verify that silent and interactive can not be used at the same time\" {\n\tcd \"$BASH_IT\"\n\n\trun ./install.sh --silent --interactive\n\n\tassert_failure\n}\n\n@test \"install: verify that no-modify-config and append-to-config can not be used at the same time\" {\n\tcd \"$BASH_IT\"\n\n\trun ./install.sh --silent --no-modify-config --append-to-config\n\n\tassert_failure\n}\n\n@test \"install: verify that the template is appended\" {\n\tcd \"$BASH_IT\"\n\n\ttouch \"$HOME/$BASH_IT_CONFIG_FILE\"\n\techo \"test file content\" > \"$HOME/$BASH_IT_CONFIG_FILE\"\n\n\t./install.sh --silent --append-to-config\n\n\tassert_file_exist \"$HOME/$BASH_IT_CONFIG_FILE\"\n\tassert_file_exist \"$HOME/$BASH_IT_CONFIG_FILE.bak\"\n\n\trun cat \"$HOME/$BASH_IT_CONFIG_FILE\"\n\n\tassert_line \"test file content\"\n\tassert_line \"source \\\"\\${BASH_IT?}/bash_it.sh\\\"\"\n}\n"
  },
  {
    "path": "test/install/uninstall.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup() {\n\texport HOME=\"${BATS_TEST_TMPDIR?}\"\n}\n\nfunction local_setup_file() {\n\t# Determine which config file to use based on OS.\n\tcase $OSTYPE in\n\t\tdarwin*)\n\t\t\texport BASH_IT_CONFIG_FILE=.bash_profile\n\t\t\t;;\n\t\t*)\n\t\t\texport BASH_IT_CONFIG_FILE=.bashrc\n\t\t\t;;\n\tesac\n\t# don't load any libraries as the tests here test the *whole* kit\n}\n\n@test \"uninstall: verify that the uninstall script exists\" {\n\tassert_file_exist \"${BASH_IT?}/uninstall.sh\"\n}\n\n@test \"uninstall: run the uninstall script with existing backup 'bashrc'\" {\n\tlocal md5_bak md5_conf\n\tcd \"${BASH_IT?}\"\n\n\techo \"test file cont  BASH_IT_COent for backup\" > \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\techo \"test file content for original BASH_IT file\" > \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\tmd5_bak=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\" | awk '{print $1}')\n\n\trun \"${BASH_IT?}/uninstall.sh\"\n\tassert_success\n\tassert_output --partial \"Your original ~/$BASH_IT_CONFIG_FILE has been restored.\"\n\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\tassert_file_exist \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\n\tmd5_conf=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE\" | awk '{print $1}')\n\n\tassert_equal \"$md5_bak\" \"$md5_conf\"\n}\n\n@test \"uninstall: run the uninstall script with existing backup 'bash_profile'\" {\n\tlocal md5_bak md5_conf\n\tBASH_IT_CONFIG_FILE=.bash_profile\n\n\techo \"test file content for backup file\" > \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\techo \"test file content for original BASH_IT file\" > \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\tmd5_bak=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\" | awk '{print $1}')\n\n\trun \"${BASH_IT?}/uninstall.sh\"\n\tassert_success\n\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\tassert_file_exist \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\n\tmd5_conf=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE\" | awk '{print $1}')\n\n\tassert_equal \"$md5_bak\" \"$md5_conf\"\n}\n\n@test \"uninstall: run the uninstall script without existing backup 'bashrc\" {\n\tlocal md5_orig md5_uninstall\n\tBASH_IT_CONFIG_FILE=.bashrc\n\n\techo \"test file content for original BASH_IT file\" > \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\tmd5_orig=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE\" | awk '{print $1}')\n\n\trun \"${BASH_IT?}/uninstall.sh\"\n\tassert_success\n\n\tassert_file_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\n\tmd5_uninstall=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\" | awk '{print $1}')\n\n\tassert_equal \"$md5_orig\" \"$md5_uninstall\"\n}\n\n@test \"uninstall: run the uninstall script without existing backup 'bash_profile\" {\n\tlocal md5_orig md5_uninstall\n\tBASH_IT_CONFIG_FILE=.bash_profile\n\n\techo \"test file content for original BASH_IT file\" > \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\tmd5_orig=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE\" | awk '{print $1}')\n\n\trun \"${BASH_IT?}/uninstall.sh\"\n\n\tassert_success\n\n\tassert_file_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE.bak\"\n\tassert_file_not_exist \"${HOME?}/$BASH_IT_CONFIG_FILE\"\n\n\tmd5_uninstall=$(md5sum \"${HOME?}/$BASH_IT_CONFIG_FILE.uninstall\" | awk '{print $1}')\n\n\tassert_equal \"$md5_orig\" \"$md5_uninstall\"\n}\n"
  },
  {
    "path": "test/lib/battery.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n\tload \"${BASH_IT?}/lib/battery.bash\"\n}\n\n# Sets up the `_command_exists` function so that it only responds `true` if called with\n# the name of the function that was passed in as an argument to `setup_command_exists`.\n# This is used to ensure that the test cases can test the various energy management tools\n# without actually having them. When called like\n#\n# setup_command_exists \"pmset\"\n#\n# then calling `_command_exists \"pmset\"` will return `true`,\n# while calling `_command_exists \"ioreg\"` (or other commands) will return `false`.\n#\n# It's cool that Bash allows to define functions within functions, works almost like\n# a closure in JavaScript.\nfunction setup_command_exists {\n\tsuccess_command=\"$1\"\n\n\tfunction _command_exists {\n\t\tcase \"$1\" in\n\t\t\t\"${success_command}\")\n\t\t\t\ttrue\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\tfalse\n\t\t\t\t;;\n\t\tesac\n\t}\n}\n\n#######################\n#\n# no tool\n#\n\n@test 'plugins battery: battery-percentage with no tool' {\n\tsetup_command_exists \"fooooo\"\n\n\trun battery_percentage\n\tassert_output \"no\"\n}\n\n#######################\n#\n# pmset\n#\n\n# Creates a `pmset` function that simulates output like the real `pmset` command.\n# The passed in parameter is used for the remaining battery percentage.\nfunction setup_pmset {\n\tpercent=\"$1\"\n\n\tfunction pmset {\n\t\tprintf \"\\-InternalBattery-0 (id=12345)\t%s; discharging; 16:00 remaining present: true\" \"${percent}\"\n\t}\n}\n\n@test 'plugins battery: battery-percentage with pmset, 100%' {\n\tsetup_command_exists \"pmset\"\n\n\tsetup_pmset \"100%\"\n\n\trun battery_percentage\n\tassert_output \"100\"\n}\n\n@test 'plugins battery: battery-percentage with pmset, 98%' {\n\tsetup_command_exists \"pmset\"\n\n\tsetup_pmset \"98%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with pmset, 98.5%' {\n\tsetup_command_exists \"pmset\"\n\n\tsetup_pmset \"98.5%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with pmset, 4%' {\n\tsetup_command_exists \"pmset\"\n\n\tsetup_pmset \"4%\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with pmset, no status' {\n\tsetup_command_exists \"pmset\"\n\n\tsetup_pmset \"\"\n\n\trun battery_percentage\n\tassert_output \"-1\"\n}\n\n#######################\n#\n# acpi\n#\n\n# Creates a `acpi` function that simulates output like the real `acpi` command.\n# The passed in parameters are used for\n# 1) the remaining battery percentage.\n# 2) the battery status\nfunction setup_acpi {\n\tpercent=\"$1\"\n\tstatus=\"$2\"\n\n\tfunction acpi {\n\t\tprintf \"Battery 0: %s, %s, 01:02:48 until charged\" \"${status}\" \"${percent}\"\n\t}\n}\n\n@test 'plugins battery: battery-percentage with acpi, 100% Full' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"100%\" \"Full\"\n\n\trun battery_percentage\n\tassert_output \"100\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, 98% Charging' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"98%\" \"Charging\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, 98% Discharging' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"98%\" \"Discharging\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, 98% Unknown' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"98%\" \"Unknown\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, 4% Charging' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"4%\" \"Charging\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, 4% no status' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"4%\" \"\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with acpi, no status' {\n\tsetup_command_exists \"acpi\"\n\n\tsetup_acpi \"\" \"\"\n\n\trun battery_percentage\n\tassert_output \"-1\"\n}\n\n#######################\n#\n# upower\n#\n\n# Creates a `upower` function that simulates output like the real `upower` command.\n# The passed in parameter is used for the remaining battery percentage.\nfunction setup_upower {\n\tpercent=\"$1\"\n\tBAT0=\"/org/freedesktop/UPower/devices/battery_BAT$RANDOM\"\n\n\tfunction upower {\n\t\tcase $1 in\n\t\t\t'-e' | '--enumerate')\n\t\t\t\tprintf '%s\\n' \"$BAT0\" \"/org/freedesktop/UPower/devices/mouse_hid_${RANDOM}_battery\"\n\t\t\t\t;;\n\t\t\t'-i' | '--show-info')\n\t\t\t\tif [[ $2 == \"$BAT0\" ]]; then\n\t\t\t\t\tprintf \"voltage:             12.191 V\\n    time to full:        57.3 minutes\\n    percentage:          %s\\n    capacity:            84.6964\" \"${percent}\"\n\t\t\t\telse\n\t\t\t\t\tfalse\n\t\t\t\tfi\n\t\t\t\t;;\n\t\tesac\n\t}\n}\n\n@test 'plugins battery: battery-percentage with upower, 100%' {\n\tsetup_command_exists \"upower\"\n\n\tsetup_upower \"100.00%\"\n\n\trun battery_percentage\n\tassert_output \"100\"\n}\n\n@test 'plugins battery: battery-percentage with upower, 98%' {\n\tsetup_command_exists \"upower\"\n\n\tsetup_upower \"98.4567%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with upower, 98.5%' {\n\tsetup_command_exists \"upower\"\n\n\tsetup_upower \"98.5%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with upower, 4%' {\n\tsetup_command_exists \"upower\"\n\n\tsetup_upower \"4.2345%\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with upower, no output' {\n\tsetup_command_exists \"upower\"\n\n\tsetup_upower \"\"\n\n\trun battery_percentage\n\tassert_output \"-1\"\n}\n\n#######################\n#\n# ioreg\n#\n\n# Creates a `ioreg` function that simulates output like the real `ioreg` command.\n# The passed in parameter is used for the remaining battery percentage.\nfunction setup_ioreg {\n\tpercent=\"$1\"\n\n\t# shellcheck disable=SC2317\n\tfunction ioreg {\n\t\tprintf \"\\\"MaxCapacity\\\" = 100\\n\\\"CurrentCapacity\\\" = %s\" \"${percent}\"\n\t}\n}\n\n@test 'plugins battery: battery-percentage with ioreg, 100%' {\n\tsetup_command_exists \"ioreg\"\n\n\tsetup_ioreg \"100%\"\n\n\trun battery_percentage\n\tassert_output \"100\"\n}\n\n@test 'plugins battery: battery-percentage with ioreg, 98%' {\n\tsetup_command_exists \"ioreg\"\n\n\tsetup_ioreg \"98%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with ioreg, 98.5%' {\n\tsetup_command_exists \"ioreg\"\n\n\tsetup_ioreg \"98.5%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with ioreg, 4%' {\n\tsetup_command_exists \"ioreg\"\n\n\tsetup_ioreg \"4%\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with ioreg, no status' {\n\tsetup_command_exists \"ioreg\"\n\n\t# Simulate that no battery is present\n\tfunction ioreg {\n\t\tprintf \"\"\n\t}\n\n\trun battery_percentage\n\tassert_output \"-1\"\n}\n\n#######################\n#\n# WMIC\n#\n\n# Creates a `WMIC` function that simulates output like the real `WMIC` command.\n# The passed in parameter is used for the remaining battery percentage.\nfunction setup_WMIC {\n\tpercent=\"$1\"\n\n\tfunction WMIC {\n\t\tprintf \"Charge: %s\" \"${percent}\"\n\t}\n}\n\n@test 'plugins battery: battery-percentage with WMIC, 100%' {\n\tsetup_command_exists \"WMIC\"\n\n\tsetup_WMIC \"100%\"\n\n\trun battery_percentage\n\tassert_output \"100\"\n}\n\n@test 'plugins battery: battery-percentage with WMIC, 98%' {\n\tsetup_command_exists \"WMIC\"\n\n\tsetup_WMIC \"98%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with WMIC, 98.5%' {\n\tsetup_command_exists \"WMIC\"\n\n\tsetup_WMIC \"98.5%\"\n\n\trun battery_percentage\n\tassert_output \"98\"\n}\n\n@test 'plugins battery: battery-percentage with WMIC, 4%' {\n\tsetup_command_exists \"WMIC\"\n\n\tsetup_WMIC \"4%\"\n\n\trun battery_percentage\n\tassert_output \"04\"\n}\n\n@test 'plugins battery: battery-percentage with WMIC, no status' {\n\tsetup_command_exists \"WMIC\"\n\n\tsetup_WMIC \"\"\n\n\trun battery_percentage\n\tassert_output \"-1\"\n}\n"
  },
  {
    "path": "test/lib/command_duration.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=2034,2329\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"command_duration\"\n}\n\n@test \"command_duration: _command_duration_current_time\" {\n\trun _command_duration_current_time\n\tassert_success\n\tassert_output --regexp '^[0-9]+(\\.[0-9]+)?$'\n}\n\n@test \"command_duration: _command_duration_current_time without EPOCHREALTIME\" {\n\t_command_duration_current_time_no_epoch() {\n\t\tlocal EPOCHREALTIME\n\t\tunset EPOCHREALTIME\n\t\tlocal SECONDS=123\n\t\t_command_duration_current_time\n\t}\n\trun _command_duration_current_time_no_epoch\n\tassert_success\n\tassert_output \"123\"\n}\n\n@test \"command_duration: _command_duration_pre_exec\" {\n\t_command_duration_pre_exec\n\tassert [ -n \"$COMMAND_DURATION_START_SECONDS\" ]\n}\n\n@test \"command_duration: _command_duration_pre_cmd\" {\n\tCOMMAND_DURATION_START_SECONDS=\"1234.567\"\n\t_command_duration_pre_cmd\n\tassert [ -z \"$COMMAND_DURATION_START_SECONDS\" ]\n}\n\n@test \"command_duration: _dynamic_clock_icon\" {\n\t_dynamic_clock_icon 1\n\tassert [ -n \"$COMMAND_DURATION_ICON\" ]\n}\n\n@test \"command_duration: _command_duration disabled\" {\n\tunset BASH_IT_COMMAND_DURATION\n\tCOMMAND_DURATION_START_SECONDS=\"100\"\n\trun _command_duration\n\tassert_output \"\"\n}\n\n@test \"command_duration: _command_duration no start time\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tunset COMMAND_DURATION_START_SECONDS\n\trun _command_duration\n\tassert_output \"\"\n}\n\n@test \"command_duration: _command_duration below threshold\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=2\n\t# Mock _command_duration_current_time\n\t_command_duration_current_time() { echo 101; }\n\tCOMMAND_DURATION_START_SECONDS=100\n\trun _command_duration\n\tassert_output \"\"\n}\n\n@test \"command_duration: _command_duration above threshold (seconds)\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=1\n\tCOMMAND_DURATION_PRECISION=0\n\t# Mock _command_duration_current_time\n\t_command_duration_current_time() { echo 105; }\n\tCOMMAND_DURATION_START_SECONDS=100\n\trun _command_duration\n\tassert_output --regexp \".* 5s$\"\n}\n\n@test \"command_duration: _command_duration precision 0 with microseconds time\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=1\n\tCOMMAND_DURATION_PRECISION=0\n\t# Mock _command_duration_current_time\n\t_command_duration_current_time() { echo 105.600005; }\n\tCOMMAND_DURATION_START_SECONDS=100.200007\n\trun _command_duration\n\tassert_output --regexp \".* 5s$\"\n}\n\n@test \"command_duration: _command_duration with precision\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=1\n\tCOMMAND_DURATION_PRECISION=1\n\t# Mock _command_duration_current_time\n\t_command_duration_current_time() { echo 105.600000; }\n\tCOMMAND_DURATION_START_SECONDS=100.200000\n\trun _command_duration\n\tassert_output --regexp \".* 5.4s$\"\n}\n\n@test \"command_duration: _command_duration with minutes\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=1\n\t# Mock _command_duration_current_time\n\t_command_duration_current_time() { echo 200; }\n\tCOMMAND_DURATION_START_SECONDS=70\n\trun _command_duration\n\tassert_output --regexp \".* 2m 10s$\"\n}\n\n@test \"command_duration: _command_duration with microsecond rollover\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=0\n\tCOMMAND_DURATION_PRECISION=1\n\t# Mock _command_duration_current_time\n\t# 105.1 - 100.2 = 4.9\n\t_command_duration_current_time() { echo 105.100000; }\n\tCOMMAND_DURATION_START_SECONDS=100.200000\n\trun _command_duration\n\tassert_output --regexp \".* 4.9s$\"\n}\n\n@test \"command_duration: _command_duration with precision and leading zeros\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=0\n\tCOMMAND_DURATION_PRECISION=3\n\tCOMMAND_DURATION_START_SECONDS=100.001000\n\t_command_duration_current_time() { echo 105.002000; }\n\trun _command_duration\n\tassert_output --regexp \".* 5.001s$\"\n}\n\n@test \"command_duration: _command_duration without EPOCHREALTIME (SECONDS only)\" {\n\tBASH_IT_COMMAND_DURATION=true\n\tCOMMAND_DURATION_MIN_SECONDS=1\n\tCOMMAND_DURATION_PRECISION=1\n\t# Mock _command_duration_current_time to return integer (like SECONDS would)\n\t_command_duration_current_time() { echo 105; }\n\tCOMMAND_DURATION_START_SECONDS=100\n\trun _command_duration\n\tassert_output --regexp \".* 5s$\"\n}\n"
  },
  {
    "path": "test/lib/composure.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\ttrue\n\t# don't load any libraries as the tests here test the *whole* kit\n}\n\n@test \"lib composure: _composure_keywords()\" {\n\trun _composure_keywords\n\tassert_output \"about author example group param version\"\n}\n"
  },
  {
    "path": "test/lib/helpers.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"colors\"\n}\n\nfunction local_setup() {\n\t# Copy the test fixture to the Bash-it folder\n\tcp -RP \"${BASH_IT?}/test/fixtures/bash_it\"/* \"${BASH_IT?}/\"\n}\n\n# TODO Create global __is_enabled function\n# TODO Create global __get_base_name function\n# TODO Create global __get_enabled_name function\n@test \"bash-it: verify that the test fixture is available\" {\n\tassert_file_exist \"${BASH_IT?}/profiles/test-bad-component.bash_it\"\n\tassert_file_exist \"${BASH_IT?}/profiles/test-bad-type.bash_it\"\n}\n\n@test \"helpers: bash-it help aliases ag\" {\n\trun bash-it help aliases \"ag\"\n\tassert_line -n 0 \"ag='ag --smart-case --pager=\\\"less -MIRFX'\"\n}\n\n@test \"helpers: bash-it help aliases without any aliases enabled\" {\n\trun bash-it help aliases\n\tassert_output \"\"\n}\n\n@test \"helpers: bash-it help plugins\" {\n\trun bash-it help plugins\n\tassert_line -n 1 \"composure:\"\n}\n\n@test \"helpers: bash-it help list aliases without any aliases enabled\" {\n\trun _help-list-aliases \"${BASH_IT?}/aliases/available/ag.aliases.bash\"\n\tassert_line -n 0 \"ag:\"\n}\n\n@test \"helpers: bash-it help list aliases with ag aliases enabled\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/ag.aliases.bash\" \"${BASH_IT?}/aliases/enabled/750---ag.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/750---ag.aliases.bash\"\n\n\trun _help-list-aliases \"${BASH_IT?}/aliases/enabled/750---ag.aliases.bash\"\n\tassert_line -n 0 \"ag:\"\n}\n\n@test \"helpers: bash-it help list aliases with todo aliases enabled\" {\n\tln -s \"${BASH_IT?}/aliases/available/todo.aliases.bash\" \"${BASH_IT?}/aliases/enabled/750---todo.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/750---todo.aliases.bash\"\n\n\trun _help-list-aliases \"${BASH_IT?}/aliases/enabled/750---todo.aliases.bash\"\n\tassert_line -n 0 \"todo:\"\n}\n\n@test \"helpers: bash-it help list aliases with docker-compose aliases enabled\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/docker-compose.aliases.bash\" \"${BASH_IT?}/aliases/enabled/750---docker-compose.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/750---docker-compose.aliases.bash\"\n\n\trun _help-list-aliases \"${BASH_IT?}/aliases/enabled/750---docker-compose.aliases.bash\"\n\tassert_line -n 0 \"docker-compose:\"\n}\n\n@test \"helpers: bash-it help list aliases with ag aliases enabled in global directory\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/ag.aliases.bash\" \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun _help-list-aliases \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\tassert_line -n 0 \"ag:\"\n}\n\n@test \"helpers: bash-it help aliases one alias enabled in the old directory\" {\n\trun ln -s \"${BASH_IT?}/aliases/available/ag.aliases.bash\" \"${BASH_IT?}/aliases/enabled/750---ag.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/750---ag.aliases.bash\"\n\n\trun bash-it help aliases\n\tassert_line -n 0 \"ag:\"\n}\n\n@test \"helpers: bash-it help aliases one alias enabled in global directory\" {\n\trun bash-it enable alias \"ag\"\n\tassert_line -n 0 'ag enabled with priority 750.'\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun bash-it enable plugin \"aws\"\n\tassert_line -n 0 'aws enabled with priority 250.'\n\tassert_link_exist \"${BASH_IT?}/enabled/250---aws.plugin.bash\"\n\n\trun bash-it help aliases\n\tassert_line -n 0 \"ag:\"\n\tassert_line -n 1 \"ag='ag --smart-case --pager=\\\"less -MIRFX'\"\n}\n\n@test \"helpers: enable the todo aliases through the bash-it function\" {\n\trun bash-it enable alias \"todo\"\n\tassert_line -n 0 'todo enabled with priority 750.'\n\tassert_link_exist \"${BASH_IT?}/enabled/750---todo.aliases.bash\"\n}\n\n@test \"helpers: enable the curl aliases\" {\n\trun _enable-alias \"curl\"\n\tassert_line -n 0 'curl enabled with priority 750.'\n\tassert_link_exist \"${BASH_IT?}/enabled/750---curl.aliases.bash\"\n}\n\n@test \"helpers: enable the apm completion through the bash-it function\" {\n\trun bash-it enable completion \"apm\"\n\tassert_line -n 0 'apm enabled with priority 350.'\n\tassert_link_exist \"${BASH_IT?}/enabled/350---apm.completion.bash\"\n}\n\n@test \"helpers: enable the brew completion\" {\n\trun _enable-completion \"brew\"\n\tassert_line -n 0 'brew enabled with priority 375.'\n\tassert_link_exist \"${BASH_IT?}/enabled/375---brew.completion.bash\"\n}\n\n@test \"helpers: enable the node plugin\" {\n\trun _enable-plugin \"node\"\n\tassert_line -n 0 'node enabled with priority 250.'\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\" \"../plugins/available/node.plugin.bash\"\n}\n\n@test \"helpers: enable the node plugin through the bash-it function\" {\n\trun bash-it enable plugin \"node\"\n\tassert_line -n 0 'node enabled with priority 250.'\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\"\n}\n\n@test \"helpers: enable the node and nvm plugins through the bash-it function\" {\n\trun bash-it enable plugin \"node\" \"nvm\"\n\tassert_line -n 0 'node enabled with priority 250.'\n\tassert_line -n 1 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n}\n\n@test \"helpers: enable the foo-unkown and nvm plugins through the bash-it function\" {\n\trun bash-it enable plugin \"foo-unknown\" \"nvm\"\n\tassert_line -n 0 'sorry, foo-unknown does not appear to be an available plugin.'\n\tassert_line -n 1 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n}\n\n@test \"helpers: enable the nvm plugin\" {\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n}\n\n@test \"helpers: enable an unknown plugin\" {\n\trun _enable-plugin \"unknown-foo\"\n\tassert_line -n 0 'sorry, unknown-foo does not appear to be an available plugin.'\n\n\t# Check for both old an new structure\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/250---unknown-foo.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/unknown-foo.plugin.bash\" ]\n\n\tassert [ ! -L \"${BASH_IT?}/enabled/250---unknown-foo.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/enabled/unknown-foo.plugin.bash\" ]\n}\n\n@test \"helpers: enable an unknown plugin through the bash-it function\" {\n\trun bash-it enable plugin \"unknown-foo\"\n\techo \"${lines[@]}\"\n\tassert_line -n 0 'sorry, unknown-foo does not appear to be an available plugin.'\n\n\t# Check for both old an new structure\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/250---unknown-foo.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/unknown-foo.plugin.bash\" ]\n\n\tassert [ ! -L \"${BASH_IT?}/enabled/250---unknown-foo.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/enabled/unknown-foo.plugin.bash\" ]\n}\n\n@test \"helpers: disable a plugin that is not enabled\" {\n\trun _disable-plugin \"sdkman\"\n\tassert_line -n 0 'sorry, sdkman does not appear to be an enabled plugin.'\n}\n\n@test \"helpers: enable and disable the nvm plugin\" {\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\" ]\n\n\trun _disable-plugin \"nvm\"\n\tassert_line -n 0 'nvm disabled.'\n\tassert [ ! -L \"${BASH_IT?}/enabled/225---nvm.plugin.bash\" ]\n}\n\n@test \"helpers: disable the nvm plugin if it was enabled with a priority, but in the component-specific directory\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/enabled/225---nvm.plugin.bash\" ]\n\n\trun _disable-plugin \"nvm\"\n\tassert_line -n 0 'nvm disabled.'\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/enabled/225---nvm.plugin.bash\" ]\n}\n\n@test \"helpers: disable the nvm plugin if it was enabled without a priority\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\trun _disable-plugin \"nvm\"\n\tassert_line -n 0 'nvm disabled.'\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\" ]\n}\n\n@test \"helpers: enable the nvm plugin if it was enabled without a priority\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm is already enabled.'\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/enabled/225---nvm.plugin.bash\" ]\n}\n\n@test \"helpers: enable the nvm plugin if it was enabled with a priority, but in the component-specific directory\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm is already enabled.'\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\" ]\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/enabled/225---nvm.plugin.bash\" ]\n}\n\n@test \"helpers: enable the nvm plugin twice\" {\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm is already enabled.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n}\n\n@test \"helpers: profile load command sanity\" {\n\trun _bash-it-profile-load \"default\"\n\tassert_success\n\n\tassert_link_exist \"${BASH_IT?}/enabled/750---general.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/800---aliases.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/350---bash-it.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/325---system.completion.bash\"\n}\n\n@test \"helpers: profile save command sanity\" {\n\trun _enable-plugin \"nvm\"\n\n\trun _bash-it-profile-save \"test\"\n\tassert_line -n 0 \"Saving plugins configuration...\"\n\tassert_line -n 1 \"Saving completion configuration...\"\n\tassert_line -n 2 \"Saving aliases configuration...\"\n\tassert_line -n 3 \"All done!\"\n\tassert_file_exist \"${BASH_IT?}/profiles/test.bash_it\"\n}\n\n@test \"helpers: profile save creates valid file with only plugin enabled\" {\n\trun _enable-plugin \"nvm\"\n\n\trun _bash-it-profile-save \"test\"\n\trun cat \"${BASH_IT?}/profiles/test.bash_it\"\n\tassert_line -n 0 \"# This file is auto generated by Bash-it. Do not edit manually!\"\n\tassert_line -n 1 \"# plugins\"\n\tassert_line -n 2 \"plugins nvm\"\n}\n\n@test \"helpers: profile save creates valid file with only completion enabled\" {\n\trun _enable-completion \"bash-it\"\n\n\trun _bash-it-profile-save \"test\"\n\trun cat \"${BASH_IT?}/profiles/test.bash_it\"\n\tassert_line -n 0 \"# This file is auto generated by Bash-it. Do not edit manually!\"\n\tassert_line -n 1 \"# completion\"\n\tassert_line -n 2 \"completion bash-it\"\n}\n\n@test \"helpers: profile save creates valid file with only aliases enabled\" {\n\trun _enable-alias \"general\"\n\n\trun _bash-it-profile-save \"test\"\n\trun cat \"${BASH_IT?}/profiles/test.bash_it\"\n\tassert_line -n 0 \"# This file is auto generated by Bash-it. Do not edit manually!\"\n\tassert_line -n 1 \"# aliases\"\n\tassert_line -n 2 \"aliases general\"\n}\n\n@test \"helpers: profile edge case, empty configuration\" {\n\trun _bash-it-profile-save \"test\"\n\tassert_success\n\tassert_line -n 3 \"It seems like no configuration was enabled..\"\n\tassert_line -n 4 \"Make sure to double check that this is the wanted behavior.\"\n\n\trun _enable-alias \"general\"\n\tassert_success\n\trun _enable-plugin \"base\"\n\tassert_success\n\trun _enable-completion \"aliases\"\n\tassert_success\n\trun _enable-completion \"bash-it\"\n\tassert_success\n\trun _enable-completion \"system\"\n\tassert_success\n\n\trun _bash-it-profile-load \"test\"\n\tassert_success\n\tassert_line -n 0 \"Trying to parse profile 'test'...\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/750---general.aliases.bash\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/250---base.plugin.bash\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/800---aliases.completion.bash\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/350---bash-it.completion.bash\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/325---system.completion.bash\"\n}\n\n@test \"helpers: profile save and load\" {\n\trun _enable-alias \"general\"\n\tassert_success\n\trun _enable-plugin \"base\"\n\tassert_success\n\trun _enable-plugin \"alias-completion\"\n\tassert_success\n\trun _enable-completion \"bash-it\"\n\tassert_success\n\trun _enable-completion \"system\"\n\tassert_success\n\n\trun _bash-it-profile-save \"test\"\n\tassert_success\n\n\trun _disable-alias \"general\"\n\tassert_success\n\tassert_output \"general disabled.\"\n\tassert_link_not_exist \"${BASH_IT?}/enabled/750---general.aliases.bash\"\n\trun _bash-it-profile-load \"test\"\n\tassert_success\n\tassert_link_exist \"${BASH_IT?}/enabled/750---general.aliases.bash\"\n}\n\n@test \"helpers: profile load corrupted profile file: bad component\" {\n\trun _bash-it-profile-load \"test-bad-component\"\n\tassert_line -n 1 -p \"Bad line(#12) in profile, aborting load...\"\n}\n\n@test \"helpers: profile load corrupted profile file: bad subdirectory\" {\n\trun _bash-it-profile-load \"test-bad-type\"\n\tassert_line -n 1 -p \"Bad line(#4) in profile, aborting load...\"\n}\n\n@test \"helpers: profile rm sanity\" {\n\trun _bash-it-profile-save \"test\"\n\tassert_file_exist \"${BASH_IT?}/profiles/test.bash_it\"\n\trun _bash-it-profile-rm \"test\"\n\tassert_line -n 0 \"Removed profile 'test' successfully!\"\n\tassert_file_not_exist \"${BASH_IT?}/profiles/test.bash_it\"\n}\n\n@test \"helpers: profile rm no params\" {\n\trun _bash-it-profile-rm \"\"\n\tassert_line -n 0 -p \"Please specify profile name to remove...\"\n}\n\n@test \"helpers: profile load no params\" {\n\trun _bash-it-profile-load \"\"\n\tassert_line -n 0 -p \"Please specify profile name to load, not changing configuration...\"\n}\n\n@test \"helpers: profile rm default\" {\n\trun _bash-it-profile-rm \"default\"\n\tassert_line -n 0 -p \"Can not remove the default profile...\"\n\tassert_file_exist \"${BASH_IT?}/profiles/default.bash_it\"\n}\n\n@test \"helpers: profile rm bad profile name\" {\n\trun _bash-it-profile-rm \"notexisting\"\n\tassert_line -n 0 -p \"Could not find profile 'notexisting'...\"\n}\n\n@test \"helpers: profile list sanity\" {\n\trun _bash-it-profile-list\n\tassert_line -n 0 \"Available profiles:\"\n\tassert_line -n 1 \"default\"\n}\n\n@test \"helpers: profile list more profiles\" {\n\trun _bash-it-profile-save \"cactus\"\n\trun _bash-it-profile-save \"another\"\n\trun _bash-it-profile-save \"brother\"\n\trun _bash-it-profile-list\n\tassert_line -n 0 \"Available profiles:\"\n\tassert_line -n 4 \"default\"\n\tassert_line -n 3 \"cactus\"\n\tassert_line -n 1 \"another\"\n\tassert_line -n 2 \"brother\"\n}\n\n@test \"helpers: migrate plugins and completions that share the same name\" {\n\trun ln -s \"${BASH_IT?}/completion/available/dirs.completion.bash\" \"${BASH_IT?}/completion/enabled/350---dirs.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/completion/enabled/350---dirs.completion.bash\"\n\n\trun ln -s \"${BASH_IT?}/plugins/available/dirs.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---dirs.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---dirs.plugin.bash\"\n\n\trun _bash-it-migrate\n\tassert_line -n 0 'Migrating plugin dirs.'\n\tassert_line -n 1 'dirs disabled.'\n\tassert_line -n 2 'dirs enabled with priority 250.'\n\tassert_line -n 3 'Migrating completion dirs.'\n\tassert_line -n 4 'dirs disabled.'\n\tassert_line -n 5 'dirs enabled with priority 350.'\n\tassert_line -n 6 'If any migration errors were reported, please try the following: reload && bash-it migrate'\n\n\tassert_link_exist \"${BASH_IT?}/enabled/350---dirs.completion.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---dirs.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/completion/enabled/350----dirs.completion.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/250----dirs.plugin.bash\" ]\n}\n\n@test \"helpers: migrate enabled plugins that don't use the new priority-based configuration\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/plugins/available/node.plugin.bash\" \"${BASH_IT?}/plugins/enabled/node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/node.plugin.bash\"\n\n\tln -s \"${BASH_IT?}/aliases/available/todo.aliases.bash\" \"${BASH_IT?}/aliases/enabled/todo.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/todo.aliases.bash\"\n\n\trun _enable-plugin \"ssh\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n\n\trun _bash-it-migrate\n\tassert_line -n 0 'Migrating alias todo.'\n\tassert_line -n 1 'todo disabled.'\n\tassert_line -n 2 'todo enabled with priority 750.'\n\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---todo.aliases.bash\"\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/node.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/aliases/enabled/todo.aliases.bash\" ]\n}\n\n@test \"helpers: migrate enabled plugins that use the new priority-based configuration in the individual directories\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/plugins/available/node.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\n\tln -s \"${BASH_IT?}/aliases/available/todo.aliases.bash\" \"${BASH_IT?}/aliases/enabled/250---todo.aliases.bash\"\n\tassert_link_exist \"${BASH_IT?}/aliases/enabled/250---todo.aliases.bash\"\n\n\trun _enable-plugin \"ssh\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n\n\trun _bash-it-migrate\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---todo.aliases.bash\"\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/225----node.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/250----nvm.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/aliases/enabled/250----todo.aliases.bash\" ]\n}\n\n@test \"helpers: run the migrate command without anything to migrate and nothing enabled\" {\n\trun _bash-it-migrate\n}\n\n@test \"helpers: run the migrate command without anything to migrate\" {\n\trun _enable-plugin \"ssh\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n\n\trun _bash-it-migrate\n\tassert_link_exist \"${BASH_IT?}/enabled/250---ssh.plugin.bash\"\n}\n\nfunction __migrate_all_components() {\n\tsubdirectory=\"${1:-}\"\n\tone_type=\"${2:-}\"\n\tpriority=\"${3:-}\"\n\n\tfor f in \"${BASH_IT}/$subdirectory/available/\"*.bash; do\n\t\tto_enable=$(basename \"$f\")\n\t\tif [[ -z \"$priority\" ]]; then\n\t\t\trun ln -s \"../available/$to_enable\" \"${BASH_IT}/${subdirectory}/enabled/$to_enable\"\n\t\telse\n\t\t\trun ln -s \"../available/$to_enable\" \"${BASH_IT}/${subdirectory}/enabled/$priority---$to_enable\"\n\t\tfi\n\tdone\n\n\tls \"${BASH_IT?}/${subdirectory}/enabled\"\n\n\tall_available=$(compgen -G \"${BASH_IT}/${subdirectory}/available/*.$one_type.bash\" | wc -l | xargs)\n\tall_enabled_old=$(compgen -G \"${BASH_IT}/${subdirectory}/enabled/*.$one_type.bash\" | wc -l | xargs)\n\n\tassert_equal \"$all_available\" \"$all_enabled_old\"\n\n\trun bash-it migrate\n\n\tall_enabled_old_after=$(compgen -G \"${BASH_IT}/${subdirectory}/enabled/*.$one_type.bash\" | wc -l | xargs)\n\tassert_equal \"0\" \"$all_enabled_old_after\"\n\n\tall_enabled_new_after=$(compgen -G \"${BASH_IT}/enabled/*.$one_type.bash\" | wc -l | xargs)\n\tassert_equal \"$all_enabled_old\" \"$all_enabled_new_after\"\n}\n\n@test \"helpers: migrate all plugins\" {\n\tsubdirectory=\"plugins\"\n\tone_type=\"plugin\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\"\n\tassert_success\n}\n\n@test \"helpers: migrate all aliases\" {\n\tsubdirectory=\"aliases\"\n\tone_type=\"aliases\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\"\n\tassert_success\n}\n\n@test \"helpers: migrate all completions\" {\n\tsubdirectory=\"completion\"\n\tone_type=\"completion\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\"\n\tassert_success\n}\n\n@test \"helpers: migrate all plugins with previous priority\" {\n\tsubdirectory=\"plugins\"\n\tone_type=\"plugin\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\" \"100\"\n\tassert_success\n}\n\n@test \"helpers: migrate all aliases with previous priority\" {\n\tsubdirectory=\"aliases\"\n\tone_type=\"aliases\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\" \"100\"\n\tassert_success\n}\n\n@test \"helpers: migrate all completions with previous priority\" {\n\tsubdirectory=\"completion\"\n\tone_type=\"completion\"\n\n\trun __migrate_all_components \"$subdirectory\" \"$one_type\" \"100\"\n\tassert_success\n}\n\n@test \"helpers: verify that existing components are automatically migrated when something is enabled\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\trun bash-it enable plugin \"node\"\n\tassert_line -n 0 'Migrating plugin nvm.'\n\tassert_line -n 1 'nvm disabled.'\n\tassert_line -n 2 'nvm enabled with priority 225.'\n\tassert_line -n 3 'If any migration errors were reported, please try the following: reload && bash-it migrate'\n\tassert_line -n 4 'node enabled with priority 250.'\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\" ]\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/enabled/250---node.plugin.bash\"\n}\n\n@test \"helpers: verify that existing components are automatically migrated when something is disabled\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\trun ln -s \"${BASH_IT?}/plugins/available/node.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\n\trun bash-it disable plugin \"node\"\n\tassert_line -n 0 'Migrating plugin node.'\n\tassert_line -n 1 'node disabled.'\n\tassert_line -n 2 'node enabled with priority 250.'\n\tassert_line -n 3 'Migrating plugin nvm.'\n\tassert_line -n 4 'nvm disabled.'\n\tassert_line -n 5 'nvm enabled with priority 225.'\n\tassert_line -n 6 'If any migration errors were reported, please try the following: reload && bash-it migrate'\n\tassert_line -n 7 'node disabled.'\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\" ]\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\tassert [ ! -L \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\" ]\n\tassert [ ! -L \"${BASH_IT?}/enabled/250---node.plugin.bash\" ]\n}\n\n@test \"helpers: enable all plugins\" {\n\tlocal available enabled\n\trun _enable-plugin \"all\"\n\tavailable=$(find \"${BASH_IT?}/plugins/available\" -name '*.plugin.bash' | wc -l | xargs)\n\tenabled=$(find \"${BASH_IT?}/enabled\" -name '[0-9]*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"$available\" \"$enabled\"\n}\n\n@test \"helpers: disable all plugins\" {\n\tlocal available enabled enabled2\n\trun _enable-plugin \"all\"\n\tavailable=$(find \"${BASH_IT?}/plugins/available\" -name '*.plugin.bash' | wc -l | xargs)\n\tenabled=$(find \"${BASH_IT?}/enabled\" -name '[0-9]*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"$available\" \"$enabled\"\n\n\trun _enable-alias \"ag\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun _disable-plugin \"all\"\n\tenabled2=$(find \"${BASH_IT?}/enabled\" -name '[0-9]*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"0\" \"$enabled2\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n}\n\n@test \"helpers: disable all plugins in the old directory structure\" {\n\tlocal enabled enabled2\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/plugins/available/node.plugin.bash\" \"${BASH_IT?}/plugins/enabled/node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/node.plugin.bash\"\n\n\tenabled=$(find \"${BASH_IT?}/plugins/enabled\" -name '*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"2\" \"$enabled\"\n\n\trun _enable-alias \"ag\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun _disable-plugin \"all\"\n\tenabled2=$(find \"${BASH_IT?}/plugins/enabled\" -name '*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"0\" \"$enabled2\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n}\n\n@test \"helpers: disable all plugins in the old directory structure with priority\" {\n\tlocal enabled enabled2\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---nvm.plugin.bash\"\n\n\trun ln -s \"${BASH_IT?}/plugins/available/node.plugin.bash\" \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/250---node.plugin.bash\"\n\n\tenabled=$(find \"${BASH_IT?}/plugins/enabled\" -name '*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"2\" \"$enabled\"\n\n\trun _enable-alias \"ag\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun _disable-plugin \"all\"\n\tenabled2=$(find \"${BASH_IT?}/plugins/enabled\" -name '*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"0\" \"$enabled2\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n}\n\n@test \"helpers: disable all plugins without anything enabled\" {\n\tlocal enabled enabled2\n\tenabled=$(find \"${BASH_IT?}/enabled\" -name '[0-9]*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"0\" \"$enabled\"\n\n\trun _enable-alias \"ag\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n\n\trun _disable-plugin \"all\"\n\tenabled2=$(find \"${BASH_IT?}/enabled\" -name '[0-9]*.plugin.bash' | wc -l | xargs)\n\tassert_equal \"0\" \"$enabled2\"\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ag.aliases.bash\"\n}\n\n@test \"helpers: enable the ansible aliases through the bash-it function\" {\n\trun bash-it enable alias \"ansible\"\n\tassert_line -n 0 'ansible enabled with priority 750.'\n\tassert_link_exist \"${BASH_IT?}/enabled/750---ansible.aliases.bash\"\n}\n\n@test \"helpers: describe the nvm plugin without enabling it\" {\n\t_bash-it-plugins | grep \"nvm\" | grep \"\\[ \\]\"\n}\n\n@test \"helpers: describe the nvm plugin after enabling it\" {\n\trun _enable-plugin \"nvm\"\n\tassert_line -n 0 'nvm enabled with priority 225.'\n\tassert_link_exist \"${BASH_IT?}/enabled/225---nvm.plugin.bash\"\n\n\t_bash-it-plugins | grep \"nvm\" | grep \"\\[x\\]\"\n}\n\n@test \"helpers: describe the nvm plugin after enabling it in the old directory\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/nvm.plugin.bash\"\n\n\t_bash-it-plugins | grep \"nvm\" | grep \"\\[x\\]\"\n}\n\n@test \"helpers: describe the nvm plugin after enabling it in the old directory with priority\" {\n\trun ln -s \"${BASH_IT?}/plugins/available/nvm.plugin.bash\" \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\tassert_link_exist \"${BASH_IT?}/plugins/enabled/225---nvm.plugin.bash\"\n\n\t_bash-it-plugins | grep \"nvm\" | grep \"\\[x\\]\"\n}\n\n@test \"helpers: describe the todo aliases without enabling them\" {\n\trun _bash-it-aliases\n\tassert_line \"todo                 [ ]        todo.txt-cli abbreviations\"\n}\n"
  },
  {
    "path": "test/lib/log.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2034\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"log\"\n}\n\n@test \"lib log: basic debug logging with BASH_IT_LOG_LEVEL_ALL\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ALL?}\n\trun _log_debug \"test test test\"\n\tassert_output \"DEBUG: default: test test test\"\n}\n\n@test \"lib log: basic warning logging with BASH_IT_LOG_LEVEL_ALL\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ALL?}\n\trun _log_warning \"test test test\"\n\tassert_output \" WARN: default: test test test\"\n}\n\n@test \"lib log: basic error logging with BASH_IT_LOG_LEVEL_ALL\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ALL?}\n\trun _log_error \"test test test\"\n\tassert_output \"ERROR: default: test test test\"\n}\n\n@test \"lib log: basic debug logging with BASH_IT_LOG_LEVEL_WARNING\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_WARNING?}\n\trun _log_debug \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: basic warning logging with BASH_IT_LOG_LEVEL_WARNING\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_WARNING?}\n\trun _log_warning \"test test test\"\n\tassert_output \" WARN: default: test test test\"\n}\n\n@test \"lib log: basic error logging with BASH_IT_LOG_LEVEL_WARNING\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_WARNING?}\n\trun _log_error \"test test test\"\n\tassert_output \"ERROR: default: test test test\"\n}\n\n@test \"lib log: basic debug logging with BASH_IT_LOG_LEVEL_ERROR\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ERROR?}\n\trun _log_debug \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: basic warning logging with BASH_IT_LOG_LEVEL_ERROR\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ERROR?}\n\trun _log_warning \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: basic error logging with BASH_IT_LOG_LEVEL_ERROR\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ERROR?}\n\trun _log_error \"test test test\"\n\tassert_output \"ERROR: default: test test test\"\n}\n\n@test \"lib log: basic debug silent logging\" {\n\trun _log_debug \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: basic warning silent logging\" {\n\trun _log_warning \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: basic error silent logging\" {\n\trun _log_error \"test test test\"\n\tassert_output \"\"\n}\n\n@test \"lib log: logging with prefix\" {\n\tBASH_IT_LOG_LEVEL=${BASH_IT_LOG_LEVEL_ALL?}\n\tBASH_IT_LOG_PREFIX=\"nice: prefix: \"\n\trun _log_debug \"test test test\"\n\tassert_output \"DEBUG: nice: prefix: test test test\"\n}\n"
  },
  {
    "path": "test/lib/preexec.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2030 disable=SC2031\n\nload ../test_helper\n\nfunction local_setup {\n\tsetup_test_fixture\n\texport __bp_enable_subshells=yas\n}\n\n@test \"vendor preexec: __bp_install_after_session_init() without existing\" {\n\ttest_prompt_string=\"\"\n\texport PROMPT_COMMAND=\"$test_prompt_string\"\n\n\trun load ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\tassert_success\n\tload ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\n\tassert_equal \"${PROMPT_COMMAND}\" $'__bp_trap_string=\"$(trap -p DEBUG)\"\\ntrap - DEBUG\\n__bp_install'\n}\n\n@test \"vendor preexec: __bp_install_after_session_init() with existing\" {\n\ttest_prompt_string=\"nah\"\n\texport PROMPT_COMMAND=\"$test_prompt_string\"\n\n\trun load ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\tassert_success\n\tload ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\n\tassert_equal \"${PROMPT_COMMAND}\" \"$test_prompt_string\"$'\\n__bp_trap_string=\"$(trap -p DEBUG)\"\\ntrap - DEBUG\\n__bp_install'\n}\n\n@test \"vendor preexec: __bp_install_after_session_init() delayed\" {\n\ttest_prompt_string=\"nah\"\n\texport PROMPT_COMMAND=\"$test_prompt_string\"\n\texport __bp_delay_install=\"blarg\"\n\n\trun load ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\tassert_success\n\tload ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\n\tassert_equal \"${PROMPT_COMMAND}\" \"$test_prompt_string\"\n\n\trun __bp_install_after_session_init\n\tassert_success\n\n\t__bp_install_after_session_init\n\tassert_equal \"${PROMPT_COMMAND}\" \"$test_prompt_string\"$'\\n__bp_trap_string=\"$(trap -p DEBUG)\"\\ntrap - DEBUG\\n__bp_install'\n}\n\n@test \"vendor preexec: __bp_install() without existing\" {\n\ttest_prompt_string=\"\"\n\texport PROMPT_COMMAND=\"$test_prompt_string\"\n\n\trun load ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\tassert_success\n\tload ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\n\trun __bp_install\n\tassert_success\n\n\t__bp_install\n\tif ((BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 1))); then\n\t\tassert_equal \"${PROMPT_COMMAND[*]}\" $'__bp_precmd_invoke_cmd __bp_interactive_mode'\n\telse\n\t\tassert_equal \"${PROMPT_COMMAND}\" $'__bp_precmd_invoke_cmd\\n__bp_interactive_mode'\n\tfi\n}\n\n@test \"vendor preexec: __bp_install() with existing\" {\n\ttest_prompt_string=\"nah\"\n\texport PROMPT_COMMAND=\"$test_prompt_string\"\n\n\trun load ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\tassert_success\n\tload ../../vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n\n\trun __bp_install\n\tassert_success\n\n\t__bp_install\n\tif ((BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 1))); then\n\t\tassert_equal \"${PROMPT_COMMAND[*]}\" $'__bp_precmd_invoke_cmd\\n'\"$test_prompt_string\"$'\\n: __bp_interactive_mode'\n\telse\n\t\tassert_equal \"${PROMPT_COMMAND}\" $'__bp_precmd_invoke_cmd\\n'\"$test_prompt_string\"$'\\n:\\n__bp_interactive_mode'\n\tfi\n}\n\n@test \"lib preexec: __bp_require_not_readonly()\" {\n\trun type -t __bp_require_not_readonly\n\tassert_failure\n\n\trun load ../../lib/preexec.bash\n\tassert_success\n\tload ../../lib/preexec.bash\n\n\trun type -t __bp_require_not_readonly\n\tassert_success\n\n\texport HISTCONTROL=blah:blah PROMPT_COMMAND=\"silly;rabbit\"\n\treadonly HISTCONTROL PROMPT_COMMAND\n\n\trun __bp_require_not_readonly\n\tassert_success\n}\n\n@test \"lib preexec: __bp_adjust_histcontrol()\" {\n\trun type -t __bp_adjust_histcontrol\n\tassert_failure\n\n\trun load ../../lib/preexec.bash\n\tassert_success\n\tload ../../lib/preexec.bash\n\n\trun type -t __bp_adjust_histcontrol\n\tassert_success\n\n\ttest_history_control_string=\"ignoreall:ignoredups:ignorespace:erasedups\"\n\texport HISTCONTROL=\"${test_history_control_string}\"\n\n\trun __bp_adjust_histcontrol\n\tassert_success\n\tassert_equal \"${HISTCONTROL}\" \"${test_history_control_string}\"\n}\n\n@test \"lib preexec: __check_precmd_conflict()\" {\n\ttest_precmd_function_name=\"test\"\n\tsetup_libs \"preexec\"\n\n\trun __check_precmd_conflict \"$test_precmd_function_name\"\n\tassert_failure\n\n\texport precmd_functions=(\"$test_precmd_function_name\")\n\n\trun __check_precmd_conflict \"$test_precmd_function_name\"\n\tassert_success\n}\n\n@test \"lib preexec: __check_preexec_conflict()\" {\n\ttest_preexec_function_name=\"test\"\n\tsetup_libs \"preexec\"\n\n\trun __check_preexec_conflict \"$test_preexec_function_name\"\n\tassert_failure\n\n\texport preexec_functions=(\"$test_preexec_function_name\")\n\n\trun __check_preexec_conflict \"$test_preexec_function_name\"\n\tassert_success\n}\n\n@test \"lib preexec: safe_append_prompt_command()\" {\n\ttest_precmd_function_name=\"test\"\n\tsetup_libs \"preexec\"\n\n\texport precmd_functions=()\n\tassert_equal \"${precmd_functions[*]}\" \"\"\n\n\trun safe_append_prompt_command \"$test_precmd_function_name\"\n\tassert_success\n\n\tsafe_append_prompt_command \"$test_precmd_function_name\"\n\tassert_equal \"${precmd_functions[*]}\" \"$test_precmd_function_name\"\n}\n\n@test \"lib preexec: safe_append_preexec()\" {\n\ttest_preexec_function_name=\"test\"\n\tsetup_libs \"preexec\"\n\n\texport preexec_functions=()\n\tassert_equal \"${preexec_functions[*]}\" \"\"\n\n\trun safe_append_preexec \"$test_preexec_function_name\"\n\tassert_success\n\n\tsafe_append_preexec \"$test_preexec_function_name\"\n\tassert_equal \"${preexec_functions[*]}\" \"$test_preexec_function_name\"\n}\n"
  },
  {
    "path": "test/lib/search.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"search\"\n}\n\nfunction local_setup() {\n\t# shellcheck disable=SC2034\n\tBASH_IT_SEARCH_USE_COLOR=false\n}\n\n@test \"search: plugin base\" {\n\trun _bash-it-search-component 'plugins' 'base'\n\tassert_success\n\tassert_line -n 0 '      plugins: base   '\n}\n\n@test \"search: git\" {\n\tlocal plugin completion\n\trun _bash-it-search 'git' --no-color\n\n\tassert_line -n 0 -p '      aliases:'\n\tassert_success\n\tfor alias in 'git' 'gitsvn' 'git-omz'; do\n\t\techo $alias\n\t\tassert_line -n 0 -p $alias\n\tdone\n\n\tassert_line -n 1 -p '      plugins:'\n\tfor plugin in \"autojump\" \"git\" \"gitstatus\" \"git-subrepo\" \"jgitflow\" \"jump\"; do\n\t\tassert_line -n 1 -p \"$plugin\"\n\tdone\n\tfor completion in \"git\" \"git_flow\" \"git_flow_avh\" \"github-cli\"; do\n\t\tassert_line -n 2 -p \"$completion\"\n\tdone\n}\n\n@test \"search: ruby gem bundle rake rails\" {\n\trun _bash-it-search rails ruby gem bundler rake --no-color\n\tassert_success\n\n\tassert_line -n 0 '      aliases: bundler   rails   '\n\tassert_line -n 1 '      plugins: chruby   chruby-auto   rails   ruby   '\n\tassert_line -n 2 '  completions: bundler   gem   rake   '\n}\n\n@test \"search: rails ruby gem bundler rake -chruby\" {\n\trun _bash-it-search rails ruby gem bundler rake -chruby --no-color\n\tassert_success\n\n\tassert_line -n 0 '      aliases: bundler   rails   '\n\tassert_line -n 1 '      plugins: rails   ruby   '\n\tassert_line -n 2 '  completions: bundler   gem   rake   '\n}\n\n@test \"search: @git\" {\n\trun _bash-it-search '@git' --no-color\n\tassert_success\n\tassert_line -n 0 '      aliases: git   '\n\tassert_line -n 1 '      plugins: git   '\n\tassert_line -n 2 '  completions: git   '\n}\n\n@test \"search: @git --enable  / --disable\" {\n\trun _bash-it-search '@git' --enable --no-color\n\tassert_success\n\trun _bash-it-search '@git' --no-color\n\tassert_success\n\tassert_line -n 0 -p '✓'\n\n\trun _bash-it-search '@git' --disable --no-color\n\tassert_success\n\trun _bash-it-search '@git' --no-color\n\tassert_success\n\n\tassert_line -n 0 '      aliases: git   '\n\tassert_line -n 1 '      plugins: git   '\n\tassert_line -n 2 '  completions: git   '\n}\n\n@test \"search: @git --disable / --enable\" {\n\trun _bash-it-search '@git' --disable --no-color\n\tassert_success\n\trun _bash-it-search '@git' --no-color\n\tassert_success\n\n\tassert_line -n 0 '      aliases: git   '\n\tassert_line -n 1 '      plugins: git   '\n\tassert_line -n 2 '  completions: git   '\n\n\trun _bash-it-search '@git' --enable --no-color\n\tassert_success\n\trun _bash-it-search '@git' --no-color\n\tassert_success\n\tassert_line -n 0 -p '✓'\n}\n"
  },
  {
    "path": "test/lib/utilities.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n}\n\n@test \"utilities: _is_function: _command_exists\" {\n\trun _is_function _command_exists\n\tassert_success\n}\n\n@test \"utilities: _command_exists function positive test ls\" {\n\trun _command_exists ls\n\tassert_success\n}\n\n@test \"utilities: _command_exists function positive test bash-it\" {\n\trun _command_exists bash-it\n\tassert_success\n}\n\n@test \"utilities: _command_exists function negative test\" {\n\trun _command_exists \"__addfkds_dfdsjdf_${RANDOM:-}\"\n\tassert_failure\n}\n\n@test \"utilities: _is_function: _binary_exists\" {\n\trun _is_function _binary_exists\n\tassert_success\n}\n\n@test \"utilities: _binary_exists function positive test ls\" {\n\trun _binary_exists ls\n\tassert_success\n}\n\n@test \"utilities: _binary_exists function negative test function\" {\n\trun _binary_exists _binary_exists\n\tassert_failure\n}\n\n@test \"utilities: _binary_exists function negative test\" {\n\trun _binary_exists \"__addfkds_dfdsjdf_${RANDOM:-}\"\n\tassert_failure\n}\n\n@test \"utilities: _is_function: _completion_exists\" {\n\trun _is_function _completion_exists\n\tassert_success\n}\n\n@test \"utilities: _is_function new function\" {\n\tlocal teh_new_func=\"__addfkds_dfdsjdf_${RANDOM:-}\"\n\trun _is_function \"${teh_new_func?}\"\n\tassert_failure\n\n\tcite \"${teh_new_func?}\"\n\trun _is_function \"${teh_new_func?}\"\n\tassert_success\n}\n\n@test \"utilities: _command_exists new function\" {\n\tlocal teh_new_func=\"__addfkds_dfdsjdf_${RANDOM:-}\"\n\trun _command_exists \"${teh_new_func?}\"\n\tassert_failure\n\n\tcite \"${teh_new_func?}\"\n\trun _command_exists \"${teh_new_func?}\"\n\tassert_success\n}\n\n@test \"_bash-it-component-item-is-enabled() - for a disabled item\" {\n\trun _bash-it-component-item-is-enabled aliases svn\n\tassert_failure\n}\n\n@test \"_bash-it-component-item-is-enabled() - for an enabled/disabled item\" {\n\trun bash-it enable alias svn\n\tassert_line -n 0 'svn enabled with priority 750.'\n\n\trun _bash-it-component-item-is-enabled alias svn\n\tassert_success\n\trun _bash-it-component-item-is-disabled alias svn\n\tassert_failure\n\n\trun bash-it disable alias svn\n\tassert_line -n 0 'svn disabled.'\n\n\trun _bash-it-component-item-is-enabled alias svn\n\tassert_failure\n\trun _bash-it-component-item-is-disabled alias svn\n\tassert_success\n}\n\n@test \"_bash-it-component-item-is-disabled() - for a disabled item\" {\n\trun _bash-it-component-item-is-disabled alias svn\n\tassert_success\n}\n\n@test \"_bash-it-component-item-is-disabled() - for an enabled/disabled item\" {\n\trun bash-it enable alias svn\n\tassert_line -n 0 'svn enabled with priority 750.'\n\n\trun _bash-it-component-item-is-disabled alias svn\n\tassert_failure\n\trun _bash-it-component-item-is-enabled alias svn\n\tassert_success\n\n\trun bash-it disable alias svn\n\tassert_line -n 0 'svn disabled.'\n\n\trun _bash-it-component-item-is-disabled alias svn\n\tassert_success\n\trun _bash-it-component-item-is-enabled alias svn\n\tassert_failure\n}\n\n@test \"_bash-it-array-contains-element() - when match is found, and is the first\" {\n\tdeclare -a fruits=(apple pear orange mandarin)\n\trun _bash-it-array-contains-element apple \"${fruits[@]}\"\n\tassert_success\n}\n\n@test \"_bash-it-array-contains-element() - when match is found, and is the last\" {\n\tdeclare -a fruits=(apple pear orange mandarin)\n\trun _bash-it-array-contains-element mandarin \"${fruits[@]}\"\n\tassert_success\n}\n\n@test \"_bash-it-array-contains-element() - when match is found, and is in the middle\" {\n\tdeclare -a fruits=(apple pear orange mandarin)\n\trun _bash-it-array-contains-element pear \"${fruits[@]}\"\n\tassert_success\n}\n\n@test \"_bash-it-array-contains-element() - when match is found, and it has spaces\" {\n\tdeclare -a fruits=(apple pear orange mandarin \"yellow watermelon\")\n\trun _bash-it-array-contains-element \"yellow watermelon\" \"${fruits[@]}\"\n\tassert_success\n}\n\n@test \"_bash-it-array-contains-element() - when match is not found\" {\n\tdeclare -a fruits=(apple pear orange mandarin)\n\trun _bash-it-array-contains-element xyz \"${fruits[@]}\"\n\tassert_failure\n}\n"
  },
  {
    "path": "test/lint-requirements.txt",
    "content": "pre-commit==2.3.0\n"
  },
  {
    "path": "test/plugins/base.plugin.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n\tload \"${BASH_IT?}/plugins/available/base.plugin.bash\"\n}\n\n@test 'plugins base: ips()' {\n\tif [[ -n \"${CI:-}\" ]]; then\n\t\tskip 'ifconfig probably requires sudo on TravisCI'\n\tfi\n\n\tdeclare -r localhost='127.0.0.1'\n\trun ips\n\tassert_success\n\tassert_line $localhost\n}\n\n@test 'plugins base: myip()' {\n\tlocal mask_ip\n\trun myip\n\tassert_success\n\tshopt -s extglob\n\tmask_ip=\"${output//+([[:digit:]]|[[:digit:]][[:digit:]]|[[:digit:]][[:digit:]][[:digit:]])/?}\" #$(echo \"$output\" | tr -s '0-9' '?')\n\t[[ $mask_ip == 'Your public IP is:  ?.?.?.? ' ]]\n}\n\n@test 'plugins base: pickfrom()' {\n\tstub_file=\"${BATS_TEST_TMPDIR?}/stub_file\"\n\tprintf \"l1\\nl2\\nl3\" > \"$stub_file\"\n\trun pickfrom \"$stub_file\"\n\tassert_success\n\t[[ $output == l? ]]\n}\n\n@test 'plugins base: mkcd()' {\n\tcd \"${BATS_TEST_TMPDIR?}\"\n\tdeclare -r dir_name=\"-dir_with_dash\"\n\n\t# Make sure that the directory does not exist prior to the test\n\trm -rf \"${BATS_TEST_TMPDIR:?}/${dir_name}\"\n\n\trun mkcd \"${dir_name}\"\n\tassert_success\n\tassert_dir_exist \"${BATS_TEST_TMPDIR?}/${dir_name}\"\n\n\tmkcd \"${dir_name}\"\n\tassert_equal \"${PWD}\" \"${BATS_TEST_TMPDIR//\\/\\///}/${dir_name}\"\n}\n\n@test 'plugins base: lsgrep()' {\n\tfor i in 1 2 3; do mkdir -p \"${BASH_IT}/${i}\"; done\n\tcd \"${BASH_IT?}\"\n\trun lsgrep 2\n\tassert_success\n\tassert_equal \"$output\" 2\n}\n\n@test 'plugins base: buf()' {\n\tdeclare -r file=\"${BATS_TEST_TMPDIR?}/file\"\n\ttouch \"$file\"\n\n\t# Take one timestamp before running the `buf` function\n\tdeclare -r stamp1=$(date +%Y%m%d_%H%M%S)\n\n\trun buf \"$file\"\n\n\t# Take another timestamp after running `buf`.\n\tdeclare -r stamp2=$(date +%Y%m%d_%H%M%S)\n\n\t# Verify that the backup file ends with one of the two timestamps.\n\t# This is done to avoid race conditions where buf is run close to the end\n\t# of a second, in which case the second timestamp might be in the next second,\n\t# causing the test to fail.\n\t# By using `or` for the two checks, we can verify that one of the two files is present.\n\t# In most cases, it's going to have the same timestamp anyway.\n\t# We can't use `assert_file_exist` here, since it only checks for a single file name.\n\tassert [ -e \"${file}_${stamp1}\" \\\n\t\t-o -e \"${file}_${stamp2}\" ]\n}\n"
  },
  {
    "path": "test/plugins/cmd-returned-notify.plugin.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2034\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"command_duration\"\n\tload \"${BASH_IT?}/plugins/available/cmd-returned-notify.plugin.bash\"\n}\n\n@test \"plugins cmd-returned-notify: notify after elapsed time\" {\n\tNOTIFY_IF_COMMAND_RETURNS_AFTER=0\n\tCOMMAND_DURATION_START_SECONDS=\"$(_command_duration_current_time)\"\n\texport COMMAND_DURATION_START_SECONDS NOTIFY_IF_COMMAND_RETURNS_AFTER\n\tsleep 1\n\trun precmd_return_notification\n\tassert_success\n\tassert_output $'\\a'\n}\n\n@test \"plugins cmd-returned-notify: do not notify before elapsed time\" {\n\tNOTIFY_IF_COMMAND_RETURNS_AFTER=10\n\tCOMMAND_DURATION_START_SECONDS=\"$(_command_duration_current_time)\"\n\texport COMMAND_DURATION_START_SECONDS NOTIFY_IF_COMMAND_RETURNS_AFTER\n\tsleep 1\n\trun precmd_return_notification\n\tassert_success\n\tassert_output $''\n}\n\n@test \"lib command_duration: preexec no output\" {\n\tCOMMAND_DURATION_START_SECONDS=\n\trun _command_duration_pre_exec\n\tassert_success\n\tassert_output \"\"\n}\n@test \"lib command_duration: preexec set COMMAND_DURATION_START_SECONDS\" {\n\tCOMMAND_DURATION_START_SECONDS=\n\tassert_equal \"${COMMAND_DURATION_START_SECONDS}\" \"\"\n\tNOW=\"$(_command_duration_current_time)\"\n\t_command_duration_pre_exec\n\t# We need to make sure to account for nanoseconds...\n\tassert_equal \"${COMMAND_DURATION_START_SECONDS%.*}\" \"${NOW%.*}\"\n}\n"
  },
  {
    "path": "test/plugins/go.plugin.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2034\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n}\n\nfunction setup_go_path() {\n\tlocal go_path=\"$1\"\n\n\t# Make sure that the requested GO folder is available\n\tassert_dir_exist \"$go_path/bin\"\n\n\t# Make sure that the requested GO folder is on the path\n\texport GOPATH=\"$go_path:${GOPATH:-}\"\n}\n\n# We test `go version` in each test to account for users with goenv and no system go.\n\n@test 'ensure _bash-it-gopath-pathmunge is defined' {\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\trun type -t _bash-it-gopath-pathmunge\n\tassert_line 'function'\n}\n\n@test 'plugins go: single entry in GOPATH' {\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/gopath\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/gopath/bin\"\n}\n\n@test 'plugins go: single entry in GOPATH, with space' {\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/go path\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/go path/bin\"\n}\n\n@test 'plugins go: single entry in GOPATH, with escaped space' {\n\tskip 'huh?'\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/go\\ path\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/go\\ path/bin\"\n}\n\n@test 'plugins go: multiple entries in GOPATH' {\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/gopath\"\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/gopath2\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1,2 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/gopath/bin:$BASH_IT/test/fixtures/go/gopath2/bin\"\n}\n\n@test 'plugins go: multiple entries in GOPATH, with space' {\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/gopath\"\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/go path\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1,2 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/gopath/bin:$BASH_IT/test/fixtures/go/go path/bin\"\n}\n\n@test 'plugins go: multiple entries in GOPATH, with escaped space' {\n\tskip 'huh?'\n\t{ _command_exists go && go version &> /dev/null; } || skip 'golang not found'\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/gopath\"\n\tsetup_go_path \"$BASH_IT/test/fixtures/go/go path\"\n\tload \"${BASH_IT?}/plugins/available/go.plugin.bash\"\n\tassert_equal \"$(cut -d':' -f1,2 <<< \"$PATH\")\" \"$BASH_IT/test/fixtures/go/go\\ path/bin:$BASH_IT/test/fixtures/go/gopath/bin\"\n}\n"
  },
  {
    "path": "test/plugins/ruby.plugin.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n}\n\n@test \"plugins ruby: remove_gem is defined\" {\n\trun load \"${BASH_IT?}/plugins/available/ruby.plugin.bash\"\n\tassert_success\n\tload \"${BASH_IT?}/plugins/available/ruby.plugin.bash\"\n\n\trun type remove_gem\n\tassert_line -n 1 \"remove_gem () \"\n}\n\n@test \"plugins ruby: PATH includes ~/.gem/ruby/bin\" {\n\tlocal last_path_entry\n\tif ! type ruby > /dev/null; then\n\t\tskip 'ruby not installed'\n\tfi\n\n\tmkdir -p \"$(ruby -e 'print Gem.user_dir')/bin\"\n\n\trun load \"${BASH_IT?}/plugins/available/ruby.plugin.bash\"\n\tassert_success\n\tload \"${BASH_IT?}/plugins/available/ruby.plugin.bash\"\n\n\tlast_path_entry=\"$(tail -1 <<< \"${PATH//:/$'\\n'}\")\"\n\t[[ \"${last_path_entry}\" == \"$(ruby -e 'print Gem.user_dir')/bin\" ]]\n}\n"
  },
  {
    "path": "test/plugins/xterm.plugin.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2034\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"helpers\"\n\tload \"${BASH_IT?}/plugins/available/xterm.plugin.bash\"\n}\n\n@test \"plugins xterm: shorten command output\" {\n\tSHORT_TERM_LINE=true\n\trun _short-command \"${BASH_IT}/test/fixtures/plugin/xterm/files\"/*\n\tassert_success\n\tassert_output \"${BASH_IT}/test/fixtures/plugin/xterm/files/arg0\"\n}\n\n@test \"plugins xterm: full command output\" {\n\tSHORT_TERM_LINE=false\n\trun _short-command \"${BASH_IT}/test/fixtures/plugin/xterm/files\"/*\n\tassert_success\n\tassert_output \"$(echo \"${BASH_IT}/test/fixtures/plugin/xterm/files\"/*)\"\n}\n\n@test \"plugins xterm: shorten dirname output\" {\n\tSHORT_TERM_LINE=true\n\trun _short-dirname\n\tassert_success\n\tassert_output \"$(basename \"${PWD}\")\"\n}\n\n@test \"plugins xterm: full dirname output\" {\n\tSHORT_TERM_LINE=false\n\trun _short-dirname\n\tassert_success\n\tassert_output \"${PWD}\"\n}\n\n@test \"plugins xterm: set xterm title\" {\n\trun set_xterm_title title\n\tassert_success\n\tassert_output $'\\033]0;title\\007'\n}\n"
  },
  {
    "path": "test/run",
    "content": "#!/usr/bin/env bash\ntest_directory=\"$(cd \"$(dirname \"$0\")\" && pwd)\"\nbats_executable=\"${test_directory}/../test_lib/bats-core/bin/bats\"\n\n# Locate ourselves for easy reference.\nexport MAIN_BASH_IT_DIR=\"${test_directory%/*}\"\nexport MAIN_BASH_IT_GITDIR=\"${MAIN_BASH_IT_DIR}/.git\"\n\n# Make sure BATS is available:\ngit submodule init && git submodule update\n\n# Warn user that tests run from the current git HEAD\nif ! git diff --quiet; then\n\techo \"${BASH_SOURCE##*/}: your worktree is dirty; uncommitted changes will *not* be tested!\"\nfi\n\n# Which tests do we run?\nif [[ $# -eq '0' ]]; then\n\ttest_dirs=(\"${test_directory}\"/{bash_it,completion,install,lib,plugins,themes})\nelse\n\ttest_dirs=(\"$@\")\nfi\n\n# Make sure that the `parallel` command is installed,\n# AND that it is the GNU version of `parallel`.\n# If that is the case, try to guess the number of CPU cores,\n# so we can run `bats` in parallel processing mode, which is a lot faster.\nif command -v parallel &> /dev/null \\\n\t&& parallel -V &> /dev/null \\\n\t&& { parallel -V 2> /dev/null | grep -q '^GNU\\>'; }; then\n\t# Expect to run at least on a dual-core CPU; slightly degraded performance\n\t# shouldn't matter otherwise.\n\tdeclare -i -r test_jobs_default=2\n\t# shellcheck disable=SC2155\n\tdeclare -i -r test_jobs_effective=\"$(\n\t\tif [[ \"${TEST_JOBS:-detect}\" = \"detect\" ]] \\\n\t\t\t&& command -v nproc &> /dev/null; then\n\t\t\tnproc\n\t\telif [[ -n \"${TEST_JOBS}\" ]] \\\n\t\t\t&& [[ \"${TEST_JOBS}\" != \"detect\" ]]; then\n\t\t\techo \"${TEST_JOBS}\"\n\t\telse\n\t\t\techo \"${test_jobs_default}\"\n\t\tfi\n\t)\"\n\texec \"$bats_executable\" \"${CI:+--tap}\" --jobs \"${test_jobs_effective}\" \\\n\t\t--no-parallelize-within-files \"${test_dirs[@]}\"\nelse\n\t# Run `bats` in single-threaded mode.\n\texec \"$bats_executable\" \"${CI:+--tap}\" \"${test_dirs[@]}\"\nfi\n"
  },
  {
    "path": "test/test_helper.bash",
    "content": "# shellcheck shell=bash\n\nfunction setup_file() {\n\tcommon_setup_file\n}\n\nfunction common_setup_file() {\n\t# export *everything* to subshells, needed to support tests\n\tset -a\n\n\t# Locate ourselves for easy reference.\n\tTEST_MAIN_DIR=\"${MAIN_BASH_IT_DIR:-${BATS_TEST_DIRNAME?}/../..}/test\"\n\tTEST_DEPS_DIR=\"${MAIN_BASH_IT_DIR:-${TEST_MAIN_DIR}/..}/test_lib\"\n\n\t# Load the BATS modules we use:\n\tload \"${TEST_DEPS_DIR}/bats-support/load.bash\"\n\tload \"${TEST_DEPS_DIR}/bats-assert/load.bash\"\n\tload \"${TEST_DEPS_DIR}/bats-file/load.bash\"\n\n\t# shellcheck disable=SC2034 # Clear any inherited environment:\n\tXDG_DUMMY=\"\" BASH_IT_DUMMY=\"\"    # avoid possible invalid reference:\n\tunset \"${!XDG_@}\" \"${!BASH_IT@}\" # unset all BASH_IT* and XDG_* variables\n\tunset GIT_HOSTING NGINX_PATH IRC_CLIENT TODO SCM_CHECK\n\n\t# Some tools, e.g. `git` use configuration files from the $HOME directory,\n\t# which interferes with our tests. The only way to keep `git` from doing\n\t# this seems to set HOME explicitly to a separate location.\n\t# Refer to https://git-scm.com/docs/git-config#FILES.\n\treadonly HOME=\"${BATS_SUITE_TMPDIR?}\"\n\tmkdir -p \"${HOME}\"\n\n\t# For `git` tests to run well, user name and email need to be set.\n\t# Refer to https://git-scm.com/docs/git-commit#_commit_information.\n\t# This goes to the test-specific config, due to the $HOME overridden above.\n\tgit config --global user.name \"Bash It BATS Runner\"\n\tgit config --global user.email \"bats@bash.it\"\n\tgit config --global advice.detachedHead false\n\tgit config --global init.defaultBranch \"master\"\n\n\t# Locate the temporary folder, avoid double-slash.\n\tBASH_IT=\"${BATS_FILE_TMPDIR//\\/\\///}/.bash_it\"\n\n\t# This sets up a local test fixture, i.e. a completely fresh and isolated Bash-it directory. This is done to avoid messing with your own Bash-it source directory.\n\tgit --git-dir=\"${MAIN_BASH_IT_GITDIR?}\" worktree add --detach \"${BASH_IT}\"\n\n\tload \"${BASH_IT?}/vendor/github.com/erichs/composure/composure.sh\"\n\t# Extend composure with additional metadata functions\n\t# shellcheck disable=SC2317,SC2329\n\turl() { :; }\n\n\t# support 'plumbing' metadata\n\tcite _about _param _example _group _author _version url\n\tcite about-alias about-plugin about-completion\n\n\t# Run any local test setup\n\tlocal_setup_file\n\tset +a # not needed, but symetiric!\n}\n\n# Load standard _Bash It_ libraries\nfunction setup_libs() {\n\tlocal lib\n\t# Use a loop to allow convenient short-circuiting for some test files\n\tfor lib in \"log\" \"utilities\" \"helpers\" \"search\" \"colors\" \"preview\" \"preexec\" \"history\" \"command_duration\"; do\n\t\tload \"${BASH_IT?}/lib/${lib}.bash\" || return\n\t\t# shellcheck disable=SC2015 # short-circuit if we've reached the requested library\n\t\t[[ \"${lib}\" == \"${1:-}\" ]] && return 0 || true\n\tdone\n\treturn 0\n}\n\nfunction local_setup_file() {\n\tsetup_libs \"colors\" # overridable default\n}\n\nfunction local_setup() {\n\ttrue\n}\n\nfunction local_teardown() {\n\ttrue\n}\n\nfunction clean_test_fixture() {\n\trm -rf \"${BASH_IT_CONFIG?}/enabled\"\n\trm -rf \"${BASH_IT_CONFIG?}/aliases/enabled\"\n\trm -rf \"${BASH_IT_CONFIG?}/completion/enabled\"\n\trm -rf \"${BASH_IT_CONFIG?}/plugins/enabled\"\n\n\trm -rf \"${BASH_IT_CONFIG?}/tmp/cache\"\n\trm -rf \"${BASH_IT_CONFIG?}/profiles\"/test*.bash_it\n}\n\nfunction setup_test_fixture() {\n\tmkdir -p \"${BASH_IT_CONFIG?}/enabled\"\n\tmkdir -p \"${BASH_IT_CONFIG?}/aliases/enabled\"\n\tmkdir -p \"${BASH_IT_CONFIG?}/completion/enabled\"\n\tmkdir -p \"${BASH_IT_CONFIG?}/plugins/enabled\"\n}\n\nfunction setup() {\n\t# be independent of git's system configuration\n\texport GIT_CONFIG_NOSYSTEM\n\t# Locate the temporary folder:\n\tBASH_IT_CONFIG=\"${BASH_IT?}\" #\"${BATS_TEST_TMPDIR//\\/\\///}\"\n\texport XDG_CACHE_HOME=\"${BATS_TEST_TMPDIR?}\"\n\n\tsetup_test_fixture\n\tlocal_setup\n}\n\nfunction teardown() {\n\tunset GIT_CONFIG_NOSYSTEM\n\tlocal_teardown\n\tclean_test_fixture\n}\n\nfunction teardown_file() {\n\t# This only serves to clean metadata from the real git repo.\n\tgit --git-dir=\"${MAIN_BASH_IT_GITDIR?}\" worktree remove -f \"${BASH_IT?}\"\n}\n"
  },
  {
    "path": "test/themes/base.theme.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"colors\" #\"theme\"\n\tload \"${BASH_IT?}/themes/base.theme.bash\"\n}\n\n@test 'themes base: battery_percentage should not exist' {\n\trun type -a battery_percentage &> /dev/null\n\tassert_failure\n}\n\n@test 'themes base: battery_percentage should exist if battery library loaded' {\n\tload \"${BASH_IT?}/lib/battery.bash\"\n\n\trun type -a battery_percentage &> /dev/null\n\tassert_success\n}\n\n@test 'themes base: battery_char should exist' {\n\trun type -t battery_char\n\tassert_success\n\tassert_line \"function\"\n\n\trun battery_char\n\tassert_output \"\"\n}\n\n@test 'themes base: battery_char should exist if battery library loaded' {\n\tunset -f battery_char\n\n\tload \"${BASH_IT?}/lib/battery.bash\"\n\trun type -t battery_percentage\n\tassert_success\n\tassert_line \"function\"\n\n\tload \"${BASH_IT?}/themes/base.theme.bash\"\n\trun type -t battery_char\n\tassert_success\n\tassert_line \"function\"\n\n\trun battery_char\n\tassert_success\n\n\trun type -a battery_char\n\tassert_output --partial 'THEME_BATTERY_PERCENTAGE_CHECK'\n}\n\n@test 'themes base: battery_charge should exist' {\n\trun type -a battery_charge &> /dev/null\n\tassert_success\n\n\trun battery_charge\n\tassert_success\n\tassert_output \"\"\n}\n\n@test 'themes base: battery_charge should exist if battery library loaded' {\n\tunset -f battery_charge\n\tload \"${BASH_IT?}/lib/battery.bash\"\n\tload \"${BASH_IT?}/themes/base.theme.bash\"\n\n\trun type -a battery_charge &> /dev/null\n\tassert_success\n\n\trun battery_charge\n\tassert_success\n\n\trun type -a battery_charge\n\tassert_line '        no)'\n}\n"
  },
  {
    "path": "test/themes/base.theme.git.bats",
    "content": "# shellcheck shell=bats\n# shellcheck disable=SC2034\n# shellcheck disable=SC2016\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"colors\" #\"theme\"\n\tload \"${BASH_IT?}/themes/base.theme.bash\"\n\tload \"${BASH_IT?}/themes/githelpers.theme.bash\"\n}\n\nadd_commit() {\n\tlocal file_name=\"general-${RANDOM}\"\n\ttouch \"${file_name}\"\n\techo \"\" >> \"${file_name}\"\n\tgit add \"${file_name}\"\n\tgit commit -m\"message\"\n}\n\nenter_new_git_repo() {\n\trepo=\"$(setup_repo)\"\n\tpushd \"${repo}\" || return\n}\n\nsetup_repo() {\n\tupstream=\"$(mktemp -d)\"\n\tpushd \"$upstream\" > /dev/null || return\n\tgit init . > /dev/null\n\n\techo \"$upstream\"\n}\n\nsetup_repo_with_upstream() {\n\tupstream=\"$(setup_repo)\"\n\tpushd \"$upstream\" > /dev/null || return\n\tadd_commit > /dev/null\n\tgit checkout -b branch-two\n\tgit checkout -b gone-branch\n\tgit checkout master\n\tpopd > /dev/null || return\n\n\tdownstream=\"$(setup_repo)\"\n\tpushd \"$downstream\" > /dev/null || return\n\tadd_commit > /dev/null\n\tgit remote add my-remote \"$upstream\"\n\tgit fetch my-remote\n\tgit branch -u my-remote/master > /dev/null\n\tpopd > /dev/null || return\n\n\tpushd \"$upstream\" > /dev/null || return\n\tgit branch -d gone-branch > /dev/null\n\tpopd > /dev/null || return\n\n\tpushd \"$downstream\" > /dev/null || return\n\tgit fetch my-remote\n\tpopd > /dev/null || return\n\n\techo \"$downstream\"\n}\n\n@test 'themes base: Git: when tracking a remote branch: it shows the commits ahead and behind' {\n\tpre='$(_git-friendly-ref)'\n\n\tremote=\"$(setup_repo)\"\n\tpushd \"$remote\" || return\n\tadd_commit\n\tadd_commit\n\tpopd || return\n\n\tclone=\"$(mktemp -d)\"\n\tpushd \"$clone\" || return\n\tgit clone \"$remote\" clone\n\tcd clone\n\n\tSCM_GIT_SHOW_COMMIT_COUNT=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"\n\n\tadd_commit\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ↑1\"\n\n\tadd_commit\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ↑2\"\n\tpopd || return\n\n\tpushd \"$remote\" || return\n\tadd_commit\n\tadd_commit\n\tadd_commit\n\tpopd || return\n\n\tpushd \"$clone/clone\" || return\n\tgit fetch\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ↑2 ↓3\"\n\n\tgit reset HEAD~2 --hard\n\n\tSCM_GIT_BEHIND_CHAR=\"↓\"\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ↓3\"\n}\n\n@test 'themes base: Git: when stashes exist: it shows the number of stashes' {\n\tpre='$(_git-friendly-ref)'\n\n\tenter_new_git_repo\n\tadd_commit\n\n\ttouch file\n\tgit add file\n\tgit stash\n\n\tSCM_GIT_SHOW_STASH_INFO=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} {1}\"\n\n\ttouch file2\n\tgit add file2\n\tgit stash\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} {2}\"\n}\n\n@test 'themes base: Git: remote info: when there is no upstream remote: is empty' {\n\tpre='$(_git-friendly-ref)'\n\tpost=\" ↑1 ↓1\"\n\n\tenter_new_git_repo\n\tadd_commit\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"\n}\n\n@test 'themes base: Git: remote info: when SCM_GIT_SHOW_REMOTE_INFO is true: includes the remote' {\n\tpre='$(_git-friendly-ref) → '\n\teval_pre=\"master → \"\n\tpost=\" ↑1 ↓1\"\n\n\trepo=\"$(setup_repo_with_upstream)\"\n\tpushd \"${repo}\" || return\n\n\tSCM_GIT_SHOW_REMOTE_INFO=true\n\tSCM_GIT_SHOW_COMMIT_COUNT=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}my-remote${post}\"\n\n\tgit branch -u my-remote/branch-two\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"'$(_git-upstream)'\"${post}\"\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"${eval_pre}my-remote/branch-two${post}\"\n}\n\n@test 'themes base: Git: remote info: when SCM_GIT_SHOW_REMOTE_INFO is auto: includes the remote when more than one remote' {\n\tpre='$(_git-friendly-ref)'\n\teval_pre=\"master\"\n\tpost=\" ↑1 ↓1\"\n\n\trepo=\"$(setup_repo_with_upstream)\"\n\tpushd \"${repo}\" || return\n\n\tSCM_GIT_SHOW_REMOTE_INFO=auto\n\tSCM_GIT_SHOW_COMMIT_COUNT=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}${post}\"\n\n\tpre=\"${pre} → \"\n\teval_pre=\"${eval_pre} → \"\n\tgit branch -u my-remote/branch-two\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"'$(_git-upstream-branch)'\"${post}\"\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"${eval_pre}branch-two${post}\"\n\n\tgit remote add second-remote \"$(mktemp -d)\"\n\tgit branch -u my-remote/master\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}my-remote${post}\"\n\n\tgit branch -u my-remote/branch-two\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"'$(_git-upstream)'\"${post}\"\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"${eval_pre}my-remote/branch-two${post}\"\n}\n\n@test 'themes base: Git: remote info: when SCM_GIT_SHOW_REMOTE_INFO is false: never include the remote' {\n\tpre='$(_git-friendly-ref)'\n\teval_pre=\"master\"\n\tpost=\" ↑1 ↓1\"\n\n\trepo=\"$(setup_repo_with_upstream)\"\n\tpushd \"${repo}\" || return\n\tgit remote add second-remote \"$(mktemp -d)\"\n\tgit remote add third-remote \"$(mktemp -d)\"\n\n\tSCM_GIT_SHOW_REMOTE_INFO=false\n\tSCM_GIT_SHOW_COMMIT_COUNT=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}${post}\"\n\n\tpre=\"${pre} → \"\n\teval_pre=\"${eval_pre} → \"\n\tgit branch -u my-remote/branch-two\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"'$(_git-upstream-branch)'\"${post}\"\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"${eval_pre}branch-two${post}\"\n}\n\n@test 'themes base: Git: remote info: when showing remote info: show if upstream branch is gone' {\n\tpre='$(_git-friendly-ref)'\n\tpost=\" ↑1 ↓1\"\n\n\trepo=\"$(setup_repo_with_upstream)\"\n\tpushd \"${repo}\" || return\n\n\tSCM_GIT_SHOW_REMOTE_INFO=true\n\tSCM_GIT_SHOW_COMMIT_COUNT=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} → my-remote${post}\"\n\n\tgit checkout gone-branch\n\tgit fetch --prune --all\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ⇢ my-remote\"\n}\n\n@test 'themes base: Git: git friendly ref: when a branch is checked out: shows that branch' {\n\tenter_new_git_repo\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"master\"\n\n\tgit checkout -b second-branch\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"second-branch\"\n}\n\n@test 'themes base: Git: git friendly ref: when a branch is not checked out: shows that branch' {\n\tenter_new_git_repo\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"master\"\n\n\tgit checkout -b second-branch\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"second-branch\"\n}\n\n@test 'themes base: Git: git friendly ref: when detached: commit has branch and tag: show a tag' {\n\tenter_new_git_repo\n\tadd_commit\n\tgit tag first-tag\n\tgit checkout -b second-branch\n\tadd_commit\n\tgit checkout HEAD~1\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"tag:first-tag\"\n}\n\n@test 'themes base: Git: git friendly ref: when detached: commit has branch and no tag: show a branch' {\n\tenter_new_git_repo\n\tadd_commit\n\tgit checkout -b second-branch\n\tadd_commit\n\tgit checkout HEAD~1\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"detached:master\"\n}\n\n@test 'themes base: Git: git friendly ref: when detached with no branch or tag: commit is parent to a named ref: show relative name' {\n\tenter_new_git_repo\n\tadd_commit\n\tadd_commit\n\tgit checkout HEAD~1\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"detached:master~1\"\n}\n\n@test 'themes base: Git: git friendly ref: when detached with no branch or tag: commit is not parent to a named ref: show short sha' {\n\tenter_new_git_repo\n\tadd_commit\n\tadd_commit\n\tsha=\"$(git rev-parse --short HEAD)\"\n\tgit reset --hard HEAD~1\n\tgit checkout \"$sha\"\n\n\tgit_prompt_vars\n\tassert_equal \"$(eval \"echo \\\"${SCM_BRANCH?}\\\"\")\" \"detached:$sha\"\n}\n\n@test 'themes base: Git: git friendly ref: shows staged, unstaged, and untracked file counts' {\n\tpre='$(_git-friendly-ref)'\n\n\tenter_new_git_repo\n\techo \"line1\" > file1\n\techo \"line1\" > file2\n\techo \"line1\" > file3\n\techo \"line1\" > file4\n\tgit add .\n\tgit commit -m\"commit1\"\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_STATE?}\" \" ✓\"\n\n\techo \"line2\" >> file1\n\tgit add file1\n\n\tSCM_GIT_SHOW_DETAILS=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} S:1\"\n\tassert_equal \"${SCM_STATE?}\" \" ✗\"\n\tassert_equal \"${SCM_DIRTY?}\" \"3\"\n\n\techo \"line2\" >> file2\n\techo \"line2\" >> file3\n\techo \"line2\" >> file4\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} S:1 U:3\"\n\tassert_equal \"${SCM_DIRTY?}\" \"2\"\n\n\techo \"line1\" > newfile5\n\techo \"line1\" > newfile6\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} S:1 U:3 ?:2\"\n\tassert_equal \"${SCM_DIRTY?}\" \"1\"\n\n\tgit config bash-it.hide-status 1\n\n\tSCM_DIRTY='nope'\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"\n\tassert_equal \"${SCM_DIRTY?}\" \"nope\"\n}\n\n@test 'themes base: Git: git user info: shows user initials' {\n\tpre='$(_git-friendly-ref)'\n\n\tenter_new_git_repo\n\tgit config user.name \"Cool User\"\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre}\"\n\n\tSCM_GIT_SHOW_CURRENT_USER=true\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ☺︎ cu\"\n\n\tgit config user.name \"Çool Üser\"\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ☺︎ çü\"\n\n\t# show initials set by `git pair`\n\n\tgit config user.initials \"ab cd\"\n\n\tgit_prompt_vars\n\tassert_equal \"${SCM_BRANCH?}\" \"${pre} ☺︎ ab+cd\"\n}\n"
  },
  {
    "path": "test/themes/base.theme.svn.bats",
    "content": "# shellcheck shell=bats\n\nload \"${MAIN_BASH_IT_DIR?}/test/test_helper.bash\"\n\nfunction local_setup_file() {\n\tsetup_libs \"colors\" #\"theme\"\n\tload \"${BASH_IT?}/themes/base.theme.bash\"\n}\n\nfunction setup_repo {\n\tupstream=\"$(mktemp -d)\"\n\tpushd \"$upstream\" > /dev/null || return\n\t# Create a dummy SVN folder - this will not work with an actual `svn` command,\n\t# but will be enough to trigger the SVN check in the base theme.\n\tmkdir .svn\n\n\techo \"$upstream\"\n}\n\nfunction setup_svn_path {\n\tlocal svn_path=\"$1\"\n\n\t# Make sure that the requested SVN script is available\n\tassert_file_exist \"$svn_path/svn\"\n\n\t# Make sure that the requested SVN script is on the path\n\texport PATH=\"$svn_path:$PATH\"\n}\n\n@test 'themes base: SVN: detect SVN repo' {\n\trepo=\"$(setup_repo)\"\n\tpushd \"$repo\" || return\n\n\tsetup_svn_path \"$BASH_IT/test/fixtures/svn/working\"\n\n\t# Init the base theme again so that the working SVN script is detected\n\trun _bash_it_appearance_scm_init\n\tassert_success\n\t_bash_it_appearance_scm_init\n\n\tscm\n\t# Make sure that the SVN command is used\n\tassert_equal \"${SCM?}\" \"${SCM_SVN?}\"\n}\n\n@test 'themes base: SVN: detect SVN repo even from a subfolder' {\n\trepo=\"$(setup_repo)\"\n\tpushd \"$repo\" || return\n\n\tmkdir foo\n\tpushd foo || return\n\n\tsetup_svn_path \"$BASH_IT/test/fixtures/svn/working\"\n\n\t# Init the base theme again so that the working SVN script is detected\n\trun _bash_it_appearance_scm_init\n\tassert_success\n\t_bash_it_appearance_scm_init\n\n\tscm\n\t# Make sure that the SVN command is used\n\tassert_equal \"${SCM?}\" \"${SCM_SVN?}\"\n}\n\n@test 'themes base: SVN: no SCM if no .svn folder can be found' {\n\trepo=\"$(setup_repo)\"\n\tpushd \"$repo\" || return\n\n\trm -rf .svn\n\n\tsetup_svn_path \"$BASH_IT/test/fixtures/svn/working\"\n\n\t# Init the base theme again so that the working SVN script is detected\n\trun _bash_it_appearance_scm_init\n\tassert_success\n\t_bash_it_appearance_scm_init\n\n\tscm\n\t# Make sure that no SVN command is used\n\tassert_equal \"${SCM?}\" \"${SCM_NONE?}\"\n}\n\n@test 'themes base: SVN: ignore SVN repo when using broken SVN command' {\n\trepo=\"$(setup_repo)\"\n\tpushd \"$repo\" || return\n\n\tsetup_svn_path \"$BASH_IT/test/fixtures/svn/broken\"\n\n\t# Init the base theme again so that the working SVN script is detected\n\trun _bash_it_appearance_scm_init\n\tassert_success\n\t_bash_it_appearance_scm_init\n\n\tscm\n\t# Make sure that no SVN command is not used\n\tassert_equal \"${SCM?}\" \"${SCM_NONE?}\"\n}\n\n@test 'themes base: SVN: ignore SVN repo even from a subfolder when using a broken SVN' {\n\trepo=\"$(setup_repo)\"\n\tpushd \"$repo\" || return\n\n\tmkdir foo\n\tpushd foo || return\n\n\tsetup_svn_path \"$BASH_IT/test/fixtures/svn/broken\"\n\n\t# Init the base theme again so that the working SVN script is detected\n\trun _bash_it_appearance_scm_init\n\tassert_success\n\t_bash_it_appearance_scm_init\n\n\tscm\n\t# Make sure that no SVN command is used\n\tassert_equal \"${SCM?}\" \"${SCM_NONE?}\"\n}\n"
  },
  {
    "path": "themes/90210/90210.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\n# Nicely formatted terminal prompt\nfunction prompt_command() {\n\tlocal scm_prompt_info\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tPS1=\"\\n${bold_black?}[${blue?}\\@${bold_black?}]-${bold_black?}[${green?}\\u${yellow?}@${green?}\\h${bold_black?}]-${bold_black?}[${purple?}\\w${bold_black?}]-${scm_prompt_info?}\\n${reset_color?}\\$ \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/agnoster/agnoster.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# vim: ft=bash ts=2 sw=2 sts=2\n#\n# agnoster's Theme - https://gist.github.com/3712874\n# A Powerline-inspired theme for BASH\n#\n# (Converted from ZSH theme by Kenny Root)\n# https://gist.github.com/kruton/8345450\n#\n# Updated & fixed by Erik Selberg erik@selberg.org 1/14/17\n# Tested on MacOSX, Ubuntu, Amazon Linux\n# Bash v3 and v4\n#\n# # README\n#\n# In order for this theme to render correctly, you will need a\n# [Powerline-patched font](https://gist.github.com/1595572).\n# I recommend: https://github.com/powerline/fonts.git\n# > git clone https://github.com/powerline/fonts.git fonts\n# > cd fonts\n# > install.sh\n\n# In addition, I recommend the\n# [Solarized theme](https://github.com/altercation/solarized/) and, if you're\n# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -\n# it has significantly better color fidelity.\n\n# Install:\n\n# I recommend the following:\n# $ cd home\n# $ mkdir -p .bash/themes/agnoster-bash\n# $ git clone https://github.com/speedenator/agnoster-bash.git .bash/themes/agnoster-bash\n\n# then add the following to your .bashrc:\n\n# export THEME=$HOME/.bash/themes/agnoster-bash/agnoster.bash\n# if [[ -f $THEME ]]; then\n#     export DEFAULT_USER=`whoami`\n#     source $THEME\n# fi\n\n#\n# # Goals\n#\n# The aim of this theme is to only show you *relevant* information. Like most\n# prompts, it will only show git information when in a git working directory.\n# However, it goes a step further: everything from the current user and\n# hostname to whether the last call exited with an error to whether background\n# jobs are running in this shell will all be displayed automatically when\n# appropriate.\n\n# Generally speaking, this script has limited support for right\n# prompts (ala powerlevel9k on zsh), but it's pretty problematic in Bash.\n# The general pattern is to write out the right prompt, hit \\r, then\n# write the left. This is problematic for the following reasons:\n# - Doesn't properly resize dynamically when you resize the terminal\n# - Changes to the prompt (like clearing and re-typing, super common) deletes the prompt\n# - Getting the right alignment via columns / tput cols is pretty problematic (and is a bug in this version)\n# - Bash prompt escapes (like \\h or \\w) don't get interpolated\n#\n# all in all, if you really, really want right-side prompts without a\n# ton of work, recommend going to zsh for now. If you know how to fix this,\n# would appreciate it!\n\n# note: requires bash v4+... Mac users - you often have bash3.\n# 'brew install bash' will set you free\nPROMPT_DIRTRIM=2 # bash4 and above\n\n######################################################################\nDEBUG=0\ndebug() {\n\tif [[ ${DEBUG} -ne 0 ]]; then\n\t\techo >&2 -e \"$@\"\n\tfi\n}\n\n######################################################################\n### Segment drawing\n# A few utility functions to make it easy and re-usable to draw segmented prompts\n\nCURRENT_BG='NONE'\nCURRENT_RBG='NONE'\nSEGMENT_SEPARATOR=''\nRIGHT_SEPARATOR=''\nLEFT_SUBSEG=''\nRIGHT_SUBSEG=''\n\ntext_effect() {\n\tcase \"$1\" in\n\t\treset) echo 0 ;;\n\t\tbold) echo 1 ;;\n\t\tunderline) echo 4 ;;\n\tesac\n}\n\n# to add colors, see\n# http://bitmote.com/index.php?post/2012/11/19/Using-ANSI-Color-Codes-to-Colorize-Your-Bash-Prompt-on-Linux\n# under the \"256 (8-bit) Colors\" section, and follow the example for orange below\nfg_color() {\n\tcase \"$1\" in\n\t\tblack) echo 30 ;;\n\t\tred) echo 31 ;;\n\t\tgreen) echo 32 ;;\n\t\tyellow) echo 33 ;;\n\t\tblue) echo 34 ;;\n\t\tmagenta) echo 35 ;;\n\t\tcyan) echo 36 ;;\n\t\twhite) echo 37 ;;\n\t\torange) echo 38\\;5\\;166 ;;\n\tesac\n}\n\nbg_color() {\n\tcase \"$1\" in\n\t\tblack) echo 40 ;;\n\t\tred) echo 41 ;;\n\t\tgreen) echo 42 ;;\n\t\tyellow) echo 43 ;;\n\t\tblue) echo 44 ;;\n\t\tmagenta) echo 45 ;;\n\t\tcyan) echo 46 ;;\n\t\twhite) echo 47 ;;\n\t\torange) echo 48\\;5\\;166 ;;\n\tesac\n}\n\n# TIL: declare is global not local, so best use a different name\n# for codes (mycodes) as otherwise it'll clobber the original.\n# this changes from BASH v3 to BASH v4.\nansi() {\n\tlocal seq\n\tdeclare -a mycodes=(\"${!1}\")\n\n\tdebug \"ansi: ${!1} all: $* aka \" \"${mycodes[@]}\"\n\n\tseq=\"\"\n\tfor ((i = 0; i < ${#mycodes[@]}; i++)); do\n\t\tif [[ -n $seq ]]; then\n\t\t\tseq=\"${seq};\"\n\t\tfi\n\t\tseq=\"${seq}${mycodes[$i]}\"\n\tdone\n\tdebug \"ansi debug:\" '\\\\[\\\\033['\"${seq}\"'m\\\\]'\n\techo -ne '\\[\\033['\"${seq}\"'m\\]'\n\t# PR=\"$PR\\[\\033[${seq}m\\]\"\n}\n\nansi_single() {\n\techo -ne '\\[\\033['\"$1\"'m\\]'\n}\n\n# Begin a segment\n# Takes two arguments, background and foreground. Both can be omitted,\n# rendering default background/foreground.\nprompt_segment() {\n\tlocal bg fg\n\tdeclare -a codes\n\n\tdebug \"Prompting $1 $2 $3\"\n\n\t# if commented out from kruton's original... I'm not clear\n\t# if it did anything, but it messed up things like\n\t# prompt_status - Erik 1/14/17\n\n\t#    if [[ -z $1 || ( -z $2 && $2 != default ) ]]; then\n\tcodes=(\"${codes[@]}\" \"$(text_effect reset)\")\n\t#    fi\n\tif [[ -n $1 ]]; then\n\t\tbg=$(bg_color \"$1\")\n\t\tcodes=(\"${codes[@]}\" \"$bg\")\n\t\tdebug \"Added $bg as background to codes\"\n\tfi\n\tif [[ -n $2 ]]; then\n\t\tfg=$(fg_color \"$2\")\n\t\tcodes=(\"${codes[@]}\" \"$fg\")\n\t\tdebug \"Added $fg as foreground to codes\"\n\tfi\n\n\tdebug \"Codes: \"\n\t# declare -p codes\n\n\tif [[ $CURRENT_BG != NONE && $1 != \"$CURRENT_BG\" ]]; then\n\t\tdeclare -a intermediate=(\"$(fg_color \"$CURRENT_BG\")\" \"$(bg_color \"$1\")\")\n\t\tdebug \"pre prompt \" \"$(ansi intermediate[@])\"\n\t\tPR=\"$PR $(ansi intermediate[@])$SEGMENT_SEPARATOR\"\n\t\tdebug \"post prompt \" \"$(ansi codes[@])\"\n\t\tPR=\"$PR$(ansi codes[@]) \"\n\telse\n\t\tdebug \"no current BG, codes is \" \"${codes[@]}\"\n\t\tPR=\"$PR$(ansi codes[@]) \"\n\tfi\n\tCURRENT_BG=$1\n\t[[ -n $3 ]] && PR=\"$PR$3\"\n}\n\n# End the prompt, closing any open segments\nprompt_end() {\n\tif [[ -n $CURRENT_BG ]]; then\n\t\tdeclare -a codes=(\"$(text_effect reset)\" \"$(fg_color \"$CURRENT_BG\")\")\n\t\tPR=\"$PR $(ansi codes[@])$SEGMENT_SEPARATOR\"\n\tfi\n\tdeclare -a reset=(\"$(text_effect reset)\")\n\tPR=\"$PR $(ansi reset[@])\"\n\tCURRENT_BG=''\n}\n\n### virtualenv prompt\nprompt_virtualenv() {\n\tif [[ -n $VIRTUAL_ENV ]]; then\n\t\tcolor=cyan\n\t\tprompt_segment $color \"$PRIMARY_FG\"\n\t\tve=$(basename \"$VIRTUAL_ENV\")\n\t\tprompt_segment $color white \"$ve\"\n\tfi\n}\n\n### Prompt components\n# Each component will draw itself, and hide itself if no information needs to be shown\n\n# Context: user@hostname (who am I and where am I)\nprompt_context() {\n\tlocal user=\"${USER:-${LOGNAME:?}}\"\n\n\tif [[ $user != \"$DEFAULT_USER\" || -n $SSH_CLIENT ]]; then\n\t\tprompt_segment black default \"$user@\\h\"\n\tfi\n}\n\n# prints history followed by HH:MM, useful for remembering what\n# we did previously\nprompt_histdt() {\n\tprompt_segment black default \"\\! [\\A]\"\n}\n\ngit_status_dirty() {\n\tlocal dirty\n\tdirty=$(git status --porcelain 2> /dev/null | tail -n 1)\n\t[[ -n $dirty ]] && echo \" ●\"\n}\n\n# Git: branch/detached head, dirty status\nprompt_git() {\n\tlocal ref dirty\n\tif git rev-parse --is-inside-work-tree > /dev/null 2>&1; then\n\t\tZSH_THEME_GIT_PROMPT_DIRTY='±'\n\t\tdirty=$(git_status_dirty)\n\t\tref=$(git symbolic-ref HEAD 2> /dev/null) || ref=\"➦ $(git show-ref --head -s --abbrev | head -n1 2> /dev/null)\"\n\t\tif [[ -n $dirty ]]; then\n\t\t\tprompt_segment yellow black\n\t\telse\n\t\t\tprompt_segment green black\n\t\tfi\n\t\tPR=\"$PR${ref/refs\\/heads\\// }$dirty\"\n\tfi\n}\n\n# Dir: current working directory\nprompt_dir() {\n\tprompt_segment blue black '\\w'\n}\n\n# Status:\n# - was there an error\n# - am I root\n# - are there background jobs?\nprompt_status() {\n\tlocal symbols\n\tsymbols=()\n\t[[ $RETVAL -ne 0 ]] && symbols+=(\"$(ansi_single \"$(fg_color red)\")✘\")\n\t[[ $UID -eq 0 ]] && symbols+=(\"$(ansi_single \"$(fg_color yellow)\")⚡\")\n\t[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+=(\"$(ansi_single \"$(fg_color cyan)\")⚙\")\n\n\t[[ -n \"${symbols[*]}\" ]] && prompt_segment black default \"${symbols[@]}\"\n}\n\n######################################################################\n#\n# experimental right prompt stuff\n# requires setting prompt_foo to use PRIGHT vs PR\n# doesn't quite work per above\n\nrightprompt() {\n\tprintf \"%*s\" $COLUMNS \"$PRIGHT\"\n}\n\n# quick right prompt I grabbed to test things.\n__command_rprompt() {\n\tlocal times=n=$COLUMNS tz\n\tfor tz in ZRH:Europe/Zurich PIT:US/Eastern \\\n\t\tMTV:US/Pacific TOK:Asia/Tokyo; do\n\t\t[ \"$n\" -gt 40 ] || break\n\t\ttimes=\"$times ${tz%%:*}\\e[30;1m:\\e[0;36;1m\"\n\t\ttimes=\"$times$(TZ=${tz#*:} date +%H:%M)\\e[0m\"\n\t\tn=$((\"$n\" - 10))\n\tdone\n\t[ -z \"$times\" ] || printf \"%${n}s$times\\\\r\" ''\n}\n# PROMPT_COMMAND=__command_rprompt\n\n# this doens't wrap code in \\[ \\]\nansi_r() {\n\tlocal seq\n\tdeclare -a mycodes2=(\"${!1}\")\n\n\tdebug \"ansi: ${!1} all: $* aka \" \"${mycodes2[@]}\"\n\n\tseq=\"\"\n\tfor ((i = 0; i < ${#mycodes2[@]}; i++)); do\n\t\tif [[ -n $seq ]]; then\n\t\t\tseq=\"${seq};\"\n\t\tfi\n\t\tseq=\"${seq}${mycodes2[$i]}\"\n\tdone\n\tdebug \"ansi debug:\" '\\\\[\\\\033['\"${seq}\"'m\\\\]'\n\techo -ne '\\033['\"${seq}\"'m'\n\t# PR=\"$PR\\[\\033[${seq}m\\]\"\n}\n\n# Begin a segment on the right\n# Takes two arguments, background and foreground. Both can be omitted,\n# rendering default background/foreground.\nprompt_right_segment() {\n\tlocal bg fg\n\tdeclare -a codes\n\n\tdebug \"Prompt right\"\n\tdebug \"Prompting $1 $2 $3\"\n\n\t# if commented out from kruton's original... I'm not clear\n\t# if it did anything, but it messed up things like\n\t# prompt_status - Erik 1/14/17\n\n\t#    if [[ -z $1 || ( -z $2 && $2 != default ) ]]; then\n\tcodes=(\"${codes[@]}\" \"$(text_effect reset)\")\n\t#    fi\n\tif [[ -n $1 ]]; then\n\t\tbg=$(bg_color \"$1\")\n\t\tcodes=(\"${codes[@]}\" \"$bg\")\n\t\tdebug \"Added $bg as background to codes\"\n\tfi\n\tif [[ -n $2 ]]; then\n\t\tfg=$(fg_color \"$2\")\n\t\tcodes=(\"${codes[@]}\" \"$fg\")\n\t\tdebug \"Added $fg as foreground to codes\"\n\tfi\n\n\tdebug \"Right Codes: \"\n\t# declare -p codes\n\n\t# right always has a separator\n\t# if [[ $CURRENT_RBG != NONE && $1 != $CURRENT_RBG ]]; then\n\t#     $CURRENT_RBG=\n\t# fi\n\tdeclare -a intermediate2=(\"$(fg_color \"$1\")\" \"$(bg_color $CURRENT_RBG)\")\n\t# PRIGHT=\"$PRIGHT---\"\n\tdebug \"pre prompt \" \"$(ansi_r intermediate2[@])\"\n\tPRIGHT=\"$PRIGHT$(ansi_r intermediate2[@])$RIGHT_SEPARATOR\"\n\tdebug \"post prompt \" \"$(ansi_r codes[@])\"\n\tPRIGHT=\"$PRIGHT$(ansi_r codes[@]) \"\n\t# else\n\t#     debug \"no current BG, codes is $codes[@]\"\n\t#     PRIGHT=\"$PRIGHT$(ansi codes[@]) \"\n\t# fi\n\tCURRENT_RBG=$1\n\t[[ -n $3 ]] && PRIGHT=\"$PRIGHT$3\"\n}\n\n######################################################################\n## Emacs prompt --- for dir tracking\n# stick the following in your .emacs if you use this:\n\n# (setq dirtrack-list '(\".*DIR *\\\\([^ ]*\\\\) DIR\" 1 nil))\n# (defun dirtrack-filter-out-pwd-prompt (string)\n#   \"dirtrack-mode doesn't remove the PWD match from the prompt.  This does.\"\n#   ;; TODO: support dirtrack-mode's multiline regexp.\n#   (if (and (stringp string) (string-match (first dirtrack-list) string))\n#       (replace-match \"\" t t string 0)\n#     string))\n# (add-hook 'shell-mode-hook\n#           #'(lambda ()\n#               (dirtrack-mode 1)\n#               (add-hook 'comint-preoutput-filter-functions\n#                         'dirtrack-filter-out-pwd-prompt t t)))\n\nprompt_emacsdir() {\n\t# no color or other setting... this will be deleted per above\n\tPR=\"DIR \\w DIR$PR\"\n}\n\n######################################################################\n## Main prompt\n\nbuild_prompt() {\n\t[[ -n ${AG_EMACS_DIR+x} ]] && prompt_emacsdir\n\tprompt_status\n\t#[[ -z ${AG_NO_HIST+x} ]] && prompt_histdt\n\t[[ -z ${AG_NO_CONTEXT+x} ]] && prompt_context\n\tprompt_virtualenv\n\tprompt_dir\n\tprompt_git\n\tprompt_end\n}\n\n# from orig...\n# export PS1='$(ansi_single $(text_effect reset)) $(build_prompt) '\n# this doesn't work... new model: create a prompt via a PR variable and\n# use that.\n\nset_bash_prompt() {\n\tRETVAL=$?\n\tPR=\"\"\n\tPRIGHT=\"\"\n\tCURRENT_BG=NONE\n\tPR=\"$(ansi_single \"$(text_effect reset)\")\"\n\tbuild_prompt\n\n\t# uncomment below to use right prompt\n\t#     PS1='\\[$(tput sc; printf \"%*s\" $COLUMNS \"$PRIGHT\"; tput rc)\\]'$PR\n\tPS1=$PR\n}\n\nPROMPT_COMMAND=set_bash_prompt\n"
  },
  {
    "path": "themes/atomic/atomic.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Atomic Bash Prompt for Bash-it\n# By lfelipe base on the theme brainy of MunifTanjim\n\n############\n## Colors ##\n############\nIRed=\"\\e[1;49;31m\"\nIGreen=\"\\e[1;49;32m\"\nIYellow=\"\\e[1;49;33m\"\nIWhite=\"\\e[1;49;37m\"\nBIWhite=\"\\e[1;49;37m\"\nBICyan=\"\\e[1;49;36m\"\n\n#############\n## Symbols ##\n#############\nLine=\"\\342\\224\\200\"\nLineA=\"\\342\\224\\214\\342\\224\\200\"\nSX=\"\\342\\234\\227\"\nLineB=\"\\342\\224\\224\\342\\224\\200\\342\\224\\200\"\nCircle=\"\\342\\227\\217\"\nFace=\"\\342\\230\\273\"\n\n#############\n## Parsers ##\n#############\n\nfunction ____atomic_top_left_parse() {\n\tlocal ifs_old=\"${IFS}\"\n\tlocal IFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\tif [[ -n \"${args[3]:-}\" ]]; then\n\t\t_TOP_LEFT+=\"${args[2]?}${args[3]?}\"\n\tfi\n\t_TOP_LEFT+=\"${args[0]?}${args[1]:-}\"\n\tif [[ -n \"${args[4]:-}\" ]]; then\n\t\t_TOP_LEFT+=\"${args[2]?}${args[4]?}\"\n\tfi\n\t_TOP_LEFT+=\"\"\n}\n\nfunction ____atomic_top_right_parse() {\n\tlocal ifs_old=\"${IFS}\"\n\tlocal IFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\t_TOP_RIGHT+=\" \"\n\tif [[ -n \"${args[3]:-}\" ]]; then\n\t\t_TOP_RIGHT+=\"${args[2]?}${args[3]?}\"\n\tfi\n\t_TOP_RIGHT+=\"${args[0]?}${args[1]:-}\"\n\tif [[ -n \"${args[4]:-}\" ]]; then\n\t\t_TOP_RIGHT+=\"${args[2]?}${args[4]?}\"\n\tfi\n\t__TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN + ${#args[1]} + ${#args[3]} + ${#args[4]} + 1))\n\t((__SEG_AT_RIGHT += 1))\n}\n\nfunction ____atomic_bottom_parse() {\n\tlocal ifs_old=\"${IFS}\"\n\tlocal IFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\t_BOTTOM+=\"${args[0]?}${args[1]?${FUNCNAME[0]}}\"\n\t[[ ${#args[1]} -gt 0 ]] && _BOTTOM+=\" \"\n}\n\nfunction ____atomic_top() {\n\t_TOP_LEFT=\"\"\n\t_TOP_RIGHT=\"\"\n\t__TOP_RIGHT_LEN=0\n\t__SEG_AT_RIGHT=0\n\n\tfor seg in ${___ATOMIC_TOP_LEFT}; do\n\t\tinfo=\"$(___atomic_prompt_\"${seg}\")\"\n\t\t[[ -n \"${info}\" ]] && ____atomic_top_left_parse \"${info}\"\n\tdone\n\n\t___cursor_right=\"\\e[500C\"\n\t_TOP_LEFT+=\"${___cursor_right}\"\n\n\tfor seg in ${___ATOMIC_TOP_RIGHT}; do\n\t\tinfo=\"$(___atomic_prompt_\"${seg}\")\"\n\t\t[[ -n \"${info}\" ]] && ____atomic_top_right_parse \"${info}\"\n\tdone\n\n\t[[ $__TOP_RIGHT_LEN -gt 0 ]] && __TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN - 0))\n\t___cursor_adjust=\"\\e[${__TOP_RIGHT_LEN}D\"\n\t_TOP_LEFT+=\"${___cursor_adjust}\"\n\n\tprintf \"%s%s\" \"${_TOP_LEFT}\" \"${_TOP_RIGHT}\"\n}\n\nfunction ____atomic_bottom() {\n\t_BOTTOM=\"\"\n\tfor seg in $___ATOMIC_BOTTOM; do\n\t\tinfo=\"$(___atomic_prompt_\"${seg}\")\"\n\t\t[[ -n \"${info}\" ]] && ____atomic_bottom_parse \"${info}\"\n\tdone\n\tprintf \"\\n%s\" \"${_BOTTOM}\"\n}\n\n##############\n## Segments ##\n##############\n\nfunction ___atomic_prompt_user_info() {\n\tlocal color=\"${white?}\" box\n\tlocal info=\"${IYellow}\\u${IRed}@${IGreen}\\h\"\n\tbox=\"${normal?}${LineA?}\\$([[ \\$? != 0 ]] && echo \\\"${BIWhite?}[${IRed?}${SX?}${BIWhite?}]${normal?}${Line?}\\\")${Line?}${BIWhite?}[|${BIWhite?}]${normal?}${Line?}\"\n\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${white?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_dir() {\n\tlocal color=\"${IRed?}\"\n\tlocal box=\"[|]${normal?}\"\n\tlocal info=\"\\w\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_scm() {\n\t[[ \"${THEME_SHOW_SCM:-}\" != \"true\" ]] && return\n\tlocal color=\"${bold_green?}\" box info\n\tbox=\"${Line?}[${IWhite?}$(scm_char)] \"\n\tinfo=\"$(scm_prompt_info)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_python() {\n\t[[ \"${THEME_SHOW_PYTHON:-}\" != \"true\" ]] && return\n\tlocal color=\"${bold_yellow?}\"\n\tlocal box=\"[|]\" info\n\tinfo=\"$(python_version_prompt)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_blue?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_ruby() {\n\t[[ \"${THEME_SHOW_RUBY:-}\" != \"true\" ]] && return\n\tlocal color=\"${bold_white?}\"\n\tlocal box=\"[|]\" info\n\tinfo=\"rb-$(ruby_version_prompt)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_red?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_todo() {\n\t[[ \"${THEME_SHOW_TODO:-}\" != \"true\" ||\n\t\t-z \"$(which todo.sh)\" ]] && return\n\tlocal color=\"${bold_white?}\"\n\tlocal box=\"[|]\" info\n\tinfo=\"t:$(todo.sh ls | grep -E \"TODO: [0-9]+ of ([0-9]+)\" | awk '{ print $4 }')\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_green?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_clock() {\n\t[[ \"${THEME_SHOW_CLOCK:-}\" != \"true\" ]] && return\n\tlocal color=\"${THEME_CLOCK_COLOR:-}\"\n\tlocal box=\"[|]\" info\n\tinfo=\"$(date +\"${THEME_CLOCK_FORMAT}\")\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_battery() {\n\tlocal batp box info\n\t! _command_exists battery_percentage \\\n\t\t|| [[ \"${THEME_SHOW_BATTERY:-}\" != \"true\" ]] \\\n\t\t|| [[ \"$(battery_percentage)\" = \"no\" ]] && return\n\n\tbatp=$(battery_percentage)\n\tif [[ \"$batp\" -eq 50 || \"$batp\" -gt 50 ]]; then\n\t\tcolor=\"${bold_green?}\"\n\telif [[ \"$batp\" -lt 50 && \"$batp\" -gt 25 ]]; then\n\t\tcolor=\"${bold_yellow?}\"\n\telif [[ \"$batp\" -eq 25 || \"$batp\" -lt 25 ]]; then\n\t\tcolor=\"${IRed?}\"\n\tfi\n\tbox=\"[|]\"\n\tac_adapter_connected && info=\"+\"\n\tac_adapter_disconnected && info=\"-\"\n\tinfo+=$batp\n\t[[ \"$batp\" -eq 100 || \"$batp\" -gt 100 ]] && info=\"AC\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\nfunction ___atomic_prompt_exitcode() {\n\t[[ \"${THEME_SHOW_EXITCODE:-}\" != \"true\" ]] && return\n\tlocal color=\"${bold_purple?}\"\n\t[[ \"${exitcode?}\" -ne 0 ]] && printf \"%s|%s\" \"${color}\" \"${exitcode}\"\n}\n\nfunction ___atomic_prompt_char() {\n\tlocal color=\"${white?}\"\n\tlocal prompt_char=\"${__ATOMIC_PROMPT_CHAR_PS1?}\"\n\tif [[ \"${THEME_SHOW_SUDO:-}\" == \"true\" ]]; then\n\t\tif sudo -vn 1> /dev/null 2>&1; then\n\t\t\tprompt_char=\"${__ATOMIC_PROMPT_CHAR_PS1_SUDO?}\"\n\t\tfi\n\tfi\n\tprintf \"%s|%s\" \"${color}\" \"${prompt_char}\"\n}\n\n#########\n## cli ##\n#########\n\nfunction __atomic_show() {\n\tlocal _seg=\"${1?}\"\n\texport \"THEME_SHOW_${_seg}\"=true\n}\n\nfunction __atomic_hide() {\n\tlocal _seg=\"${1?}\"\n\texport \"THEME_SHOW_${_seg}\"=false\n}\n\nfunction _atomic_completion() {\n\tlocal cur _action actions segments\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\t_action=\"${COMP_WORDS[1]}\"\n\tactions=\"show hide\"\n\tsegments=\"battery clock exitcode python ruby scm sudo todo\"\n\tcase \"${_action}\" in\n\t\tshow | hide)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"${segments}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t# shellcheck disable=SC2207\n\tCOMPREPLY=($(compgen -W \"${actions}\" -- \"${cur}\"))\n\treturn 0\n}\n\nfunction atomic() {\n\tlocal action=\"${1?}\"\n\tshift\n\tlocal segs=(\"${@?}\")\n\tlocal func\n\tcase \"${action}\" in\n\t\tshow)\n\t\t\tfunc=__atomic_show\n\t\t\t;;\n\t\thide)\n\t\t\tfunc=__atomic_hide\n\t\t\t;;\n\t\t*)\n\t\t\t_log_error \"${FUNCNAME[0]}: unknown action '${action}'\"\n\t\t\treturn 1\n\t\t\t;;\n\tesac\n\tfor seg in \"${segs[@]}\"; do\n\t\tseg=\"$(printf \"%s\" \"${seg}\" | tr '[:lower:]' '[:upper:]')\"\n\t\t\"${func}\" \"${seg}\"\n\tdone\n}\n\ncomplete -F _atomic_completion atomic\n\n###############\n## Variables ##\n###############\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRBFU_THEME_PROMPT_PREFIX=\"\"\nRBFU_THEME_PROMPT_SUFFIX=\"\"\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\n\n: \"${THEME_SHOW_SUDO:=\"true\"}\"\n: \"${THEME_SHOW_SCM:=\"true\"}\"\n: \"${THEME_SHOW_RUBY:=\"false\"}\"\n: \"${THEME_SHOW_PYTHON:=\"false\"}\"\n: \"${THEME_SHOW_CLOCK:=\"true\"}\"\n: \"${THEME_SHOW_TODO:=\"false\"}\"\n: \"${THEME_SHOW_BATTERY:=\"true\"}\"\n: \"${THEME_SHOW_EXITCODE:=\"false\"}\"\n\n: \"${THEME_CLOCK_COLOR:=${BICyan?}}\"\n: \"${THEME_CLOCK_FORMAT:=\"%a %b %d - %H:%M\"}\"\n\n__ATOMIC_PROMPT_CHAR_PS1=${THEME_PROMPT_CHAR_PS1:-\"${normal?}${LineB?}${bold_white?}${Circle?}\"}\n__ATOMIC_PROMPT_CHAR_PS2=${THEME_PROMPT_CHAR_PS2:-\"${normal?}${LineB?}${bold_white?}${Circle?}\"}\n\n__ATOMIC_PROMPT_CHAR_PS1_SUDO=${THEME_PROMPT_CHAR_PS1_SUDO:-\"${normal?}${LineB?}${bold_red?}${Face?}\"}\n__ATOMIC_PROMPT_CHAR_PS2_SUDO=${THEME_PROMPT_CHAR_PS2_SUDO:-\"${normal?}${LineB?}${bold_red?}${Face?}\"}\n\n: \"${___ATOMIC_TOP_LEFT:=\"user_info dir scm\"}\"\n: \"${___ATOMIC_TOP_RIGHT:=\"exitcode python ruby todo clock battery\"}\"\n: \"${___ATOMIC_BOTTOM:=\"char\"}\"\n\n############\n## Prompt ##\n############\n\nfunction __atomic_ps1() {\n\tprintf \"%s%s%s\" \"$(____atomic_top)\" \"$(____atomic_bottom)\" \"${normal?}\"\n}\n\nfunction __atomic_ps2() {\n\tcolor=\"${bold_white?}\"\n\tprintf \"%s%s%s\" \"${color}\" \"${__ATOMIC_PROMPT_CHAR_PS2?}  \" \"${normal?}\"\n}\n\nfunction _atomic_prompt() {\n\texitcode=\"$?\"\n\n\tPS1=\"$(__atomic_ps1)\"\n\tPS2=\"$(__atomic_ps2)\"\n}\n\nsafe_append_prompt_command _atomic_prompt\n"
  },
  {
    "path": "themes/axin/axin.theme.bash",
    "content": "# shellcheck shell=bash\n\n# Axin Bash Prompt, inspired by theme \"Sexy\" and \"Bobby\"\n# thanks to them\n\nif tput setaf 1 &> /dev/null; then\n\tif [[ $(tput colors) -ge 256 ]] 2> /dev/null; then\n\t\tMAGENTA=$(tput setaf 9)\n\t\tORANGE=$(tput setaf 172)\n\t\tGREEN=$(tput setaf 190)\n\t\tPURPLE=$(tput setaf 141)\n\t\tWHITE=$(tput setaf 0)\n\telse\n\t\tMAGENTA=$(tput setaf 5)\n\t\tORANGE=$(tput setaf 4)\n\t\tGREEN=$(tput setaf 2)\n\t\tPURPLE=$(tput setaf 1)\n\t\tWHITE=$(tput setaf 7)\n\tfi\n\tBOLD=$(tput bold)\n\tRESET=$(tput sgr0)\nelse\n\tMAGENTA=\"\\033[1;31m\"\n\tORANGE=\"\\033[1;33m\"\n\tGREEN=\"\\033[1;32m\"\n\tPURPLE=\"\\033[1;35m\"\n\tWHITE=\"\\033[1;37m\"\n\tBOLD=\"\"\n\tRESET=\"\\033[m\"\nfi\n\nfunction prompt_command() {\n\tPS1=\"\\[${BOLD}${MAGENTA}\\]\\u \\[$WHITE\\]@ \\[$ORANGE\\]\\h \\[$WHITE\\]in \\[$GREEN\\]\\w\\[$WHITE\\]\\[$SCM_THEME_PROMPT_PREFIX\\]$(clock_prompt) \\[$PURPLE\\]$(scm_prompt_info) \\n\\$ \\[$RESET\\]\"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${white?}\"}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/bakke/bakke.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction prompt_command() {\n\t#PS1=\"${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info)${purple?}$(ruby_version_prompt) ${yellow?}\\h ${reset_color?}in ${green?}\\w ${reset_color?}\\n${green}→${reset_color?} \"\n\t#PS1=\"\\n${purple?}\\h: ${reset_color?} ${green?}\\w\\n${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info) ${green}→${reset_color?} \"\n\t#PS1=\"\\n${cyan?}\\h: ${reset_color?} ${yellow?}\\w\\n${red?}$(scm_char)${red?}$(scm_prompt_info) ${green?}→${reset_color?} \"\n\tlocal virtualenv_prompt scm_prompt_info\n\tvirtualenv_prompt=\"$(virtualenv_prompt)\"\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tPS1=\"\\n${cyan?}\\h:${virtualenv_prompt} ${reset_color?} ${yellow?}\\w ${green?}${scm_prompt_info}\\n${reset_color?}→ \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/barbuk/barbuk.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Prompt defaut configuration\nBARBUK_PROMPT=${BARBUK_PROMPT:=\"git-upstream-remote-logo ssh path scm python_venv uv ruby node bun docker pre_commit terraform mysql ansible cloud duration exit\"}\n\n# Theme custom glyphs\n# SCM\nSCM_GIT_CHAR_GITLAB=${BARBUK_GITLAB_CHAR:='  '}\nSCM_GIT_CHAR_BITBUCKET=${BARBUK_BITBUCKET_CHAR:='  '}\nSCM_GIT_CHAR_GITHUB=${BARBUK_GITHUB_CHAR:='  '}\nSCM_GIT_CHAR_ARCHLINUX=${BARBUK_ARCHLINUX_CHAR:='  '}\nSCM_GIT_CHAR_CODEBERG=${BARBUK_CODEBERG_CHAR:='  '}\nSCM_GIT_CHAR_DEFAULT=${BARBUK_GIT_DEFAULT_CHAR:='  '}\nSCM_GIT_CHAR_ICON_BRANCH=${BARBUK_GIT_BRANCH_ICON:=''}\nSCM_HG_CHAR=${BARBUK_HG_CHAR:='☿ '}\nSCM_SVN_CHAR=${BARBUK_SVN_CHAR:='⑆ '}\nSCM_THEME_CURRENT_USER_PREFFIX=${normal?}${BARBUK_CURRENT_USER_PREFFIX:='  '}\n# Exit code\nEXIT_CODE_ICON=${BARBUK_EXIT_CODE_ICON:=' '}\n# Programming and tools\nPRE_COMMIT_CHAR=${BARBUK_PRE_COMMIT_CHAR:=' '}\nPREK_CHAR=${BARBUK_PREK_CHAR:='⚡'}\nPYTHON_VENV_CHAR=${BARBUK_PYTHON_VENV_CHAR:=' '}\nUV_CHAR=${BARBUK_UV_CHAR:='🐍'}\nRUBY_CHAR=${BARBUK_RUBY_CHAR:=' '}\nNODE_CHAR=${BARBUK_NODE_CHAR:=' '}\nBUN_CHAR=${BARBUK_BUN_CHAR:='🍞 '}\nTERRAFORM_CHAR=${BARBUK_TERRAFORM_CHAR:=\"❲t❳ \"}\nDOCKER_CHAR=${BARBUK_DOCKER_CHAR:=\" \"}\nMYSQL_CHAR=${BARBUK_MYSQL_CHAR:=\" \"}\nMARIADB_CHAR=${BARBUK_MARIADB_CHAR:=\" \"}\nANSIBLE_CHAR=${BARBUK_ANSIBLE_CHAR:=\" \"}\n# Cloud\nAWS_PROFILE_CHAR=${BARBUK_AWS_PROFILE_CHAR:=\" aws \"}\nSCALEWAY_PROFILE_CHAR=${BARBUK_SCALEWAY_PROFILE_CHAR:=\" scw \"}\nGCLOUD_CHAR=${BARBUK_GCLOUD_CHAR:=\" google \"}\n\n# Command duration\n: \"${COMMAND_DURATION_MIN_SECONDS:=1}\"\n: \"${COMMAND_DURATION_COLOR:=\"${normal?}\"}\"\n\n# Ssh user and hostname display\nSSH_INFO=${BARBUK_SSH_INFO:=true}\nHOST_INFO=${BARBUK_HOST_INFO:=long}\n\n# Home info display\nANSIBLE_HOME_DISPLAY=${BARBUK_ANSIBLE_HOME_DISPLAY:=false}\n\n# Bash-it default glyphs overrides\nSCM_NONE_CHAR=\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\"|\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}| \"\nSCM_GIT_BEHIND_CHAR=\"${bold_red?}↓${normal?}\"\nSCM_GIT_AHEAD_CHAR=\"${bold_green?}↑${normal?}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${bold_yellow?}•${normal?}\"\nSCM_GIT_STAGED_CHAR=\"${bold_green?}+${normal?}\"\nGIT_THEME_PROMPT_DIRTY=\" ${bold_red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${cyan?}\"\nGIT_THEME_PROMPT_SUFFIX=\"${cyan?}\"\nSCM_THEME_BRANCH_TRACK_PREFIX=\"${normal?} ⤏  ${cyan?}\"\nSCM_THEME_BRANCH_GONE_PREFIX=\"${normal?} ↛  ${red?}\"\nNVM_THEME_PROMPT_PREFIX=''\nNVM_THEME_PROMPT_SUFFIX=''\nRVM_THEME_PROMPT_PREFIX=''\nRVM_THEME_PROMPT_SUFFIX=''\nRBENV_THEME_PROMPT_PREFIX=' '\nRBENV_THEME_PROMPT_SUFFIX=''\nRBFU_THEME_PROMPT_PREFIX=''\nRBFU_THEME_PROMPT_SUFFIX=''\n\nfunction __get_domain_from_git_remote() {\n\tlocal git_remote=\"$1\"\n\techo \"$git_remote\" | awk -F'[@:]' '$1 ~ /ssh/ {domain=$3} $1 ~ /https/ {domain=$2} $1 ~ /git/ {domain=$2} { sub(\"//\", \"\", domain); sub(/\\/.*$/, \"\", domain); print domain }'\n}\n\nfunction __git-upstream-remote-logo_prompt() {\n\t[[ -z \"$(_git-upstream)\" ]] && SCM_GIT_CHAR=\"${SCM_GIT_CHAR_DEFAULT:-}\"\n\n\tlocal remote remote_domain\n\tremote=\"$(_git-upstream-remote)\"\n\n\tif [ -z \"$remote\" ]; then\n\t\tremote=$(git ls-remote --get-url 2> /dev/null)\n\telse\n\t\tremote=$(git config --get remote.\"${remote}\".url)\n\tfi\n\n\tremote_domain=$(__get_domain_from_git_remote \"$remote\")\n\n\tcase \"${remote_domain}\" in\n\t\tgithub.com) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_GITHUB:-}\" ;;\n\t\tgitlab.com) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_GITLAB:-}\" ;;\n\t\tbitbucket.com) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_BITBUCKET:-}\" ;;\n\t\tcodeberg.org) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_CODEBERG:-}\" ;;\n\t\taur.archlinux.org) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_ARCHLINUX:-}\" ;;\n\t\t*) SCM_GIT_CHAR=\"${SCM_GIT_CHAR_DEFAULT:-}\" ;;\n\tesac\n\n\techo \"${purple?}$(scm_char)\"\n}\n\nfunction git_prompt_info() {\n\tgit_prompt_vars\n\techo -e \"on $SCM_GIT_CHAR_ICON_BRANCH $SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_GIT_AHEAD$SCM_GIT_BEHIND$SCM_GIT_STASH$SCM_SUFFIX \"\n}\n\nfunction __exit_prompt() {\n\tif [[ \"$exit_code\" -ne 0 ]]; then\n\t\techo \"${purple?}${EXIT_CODE_ICON}${yellow?}${exit_code}${bold_orange?} \"\n\telse\n\t\techo \"${bold_green?}\"\n\tfi\n}\n\nfunction __aws_profile_prompt() {\n\tif [[ -n \"${AWS_PROFILE}\" ]]; then\n\t\techo -n \"${bold_purple?}${AWS_PROFILE_CHAR}${normal?}${AWS_PROFILE} \"\n\tfi\n}\n\nfunction __scaleway_profile_prompt() {\n\tif [[ -n \"${SCW_PROFILE}\" ]]; then\n\t\techo -n \"${bold_purple?}${SCALEWAY_PROFILE_CHAR}${normal?}${SCW_PROFILE} \"\n\tfi\n}\n\nfunction __gcloud_prompt() {\n\tlocal active_gcloud_account=\"\"\n\n\tactive_gcloud_account=\"$(active_gcloud_account_prompt)\"\n\t[[ -n \"${active_gcloud_account}\" ]] && echo \"${bold_purple?}${GCLOUD_CHAR}${normal?}${active_gcloud_account} \"\n}\n\nfunction __cloud_prompt() {\n\t__aws_profile_prompt\n\t__scaleway_profile_prompt\n\t__gcloud_prompt\n}\n\nfunction __terraform_prompt() {\n\tlocal terraform_workspace=\"\"\n\n\tif [ -d .terraform ]; then\n\t\tterraform_workspace=\"$(terraform_workspace_prompt)\"\n\t\t[[ -n \"${terraform_workspace}\" ]] && echo \"${bold_purple?}${TERRAFORM_CHAR}${normal?}${terraform_workspace} \"\n\tfi\n}\n\nfunction __node_prompt() {\n\tlocal node_version=\"\"\n\n\tnode_version=\"$(node_version_prompt)\"\n\t[[ -n \"${node_version}\" ]] && echo \"${bold_purple?}${NODE_CHAR}${normal?}${node_version} \"\n}\n\nfunction __bun_prompt() {\n\tif [[ -f bun.lockb || -f bun.lock || -f bunfig.toml ]]; then\n\t\tlocal bun_version=\"\"\n\t\tif _command_exists bun; then\n\t\t\tbun_version=$(bun --version 2> /dev/null)\n\t\tfi\n\t\techo \"${bold_purple?}${BUN_CHAR}${normal?}${bun_version} \"\n\tfi\n}\n\nfunction __ruby_prompt() {\n\tlocal ruby_version=\"\"\n\n\truby_version=\"$(ruby_version_prompt)\"\n\t[[ -n \"${ruby_version}\" ]] && echo \"${bold_purple?}${RUBY_CHAR}${normal?}${ruby_version} \"\n}\n\nfunction __ssh_prompt() {\n\t# Detect ssh\n\tif [[ -n \"${SSH_CONNECTION:-}\" && \"${SSH_INFO:-}\" == true ]]; then\n\t\tif [[ \"${HOST_INFO:-}\" == long ]]; then\n\t\t\thost=\"\\H\"\n\t\telse\n\t\t\thost=\"\\h\"\n\t\tfi\n\t\techo \"${bold_blue?}\\u${bold_orange?}@${cyan?}$host ${bold_orange?}in \"\n\tfi\n}\n\nfunction __python_venv_prompt() {\n\tlocal python_info=\"\"\n\tif [[ -n \"${CONDA_DEFAULT_ENV}\" ]]; then\n\t\tpython_info=\"${CONDA_DEFAULT_ENV}\"\n\telif [[ -n \"${VIRTUAL_ENV_PROMPT}\" ]]; then\n\t\tpython_info=\"${VIRTUAL_ENV_PROMPT}\"\n\telif [[ -f pyproject.toml ]]; then\n\t\tpython_info=$(awk -F'\"' '/^requires-python/ {print $2}' pyproject.toml)\n\t\t[[ -z \"${python_info}\" ]] && python_info=\"py\"\n\tfi\n\n\tif [[ -n \"${python_info}\" ]]; then\n\t\techo \"${bold_purple?}$PYTHON_VENV_CHAR${normal?}${python_info} \"\n\tfi\n}\n\nfunction __uv_prompt() {\n\tif [[ -f uv.lock ]]; then\n\t\techo \"${bold_purple?}${UV_CHAR}${normal?} \"\n\tfi\n}\n\nfunction __pre_commit_prompt() {\n\tif [[ -f .pre-commit-config.yaml ]]; then\n\t\tlocal icon=\"${PRE_COMMIT_CHAR}\"\n\t\tif [[ -f .git/hooks/pre-commit ]]; then\n\t\t\tif grep -q \"prek\" .git/hooks/pre-commit 2> /dev/null; then\n\t\t\t\ticon=\"${PREK_CHAR}\"\n\t\t\tfi\n\t\tfi\n\t\techo \"${bold_purple?}${icon}${normal?} \"\n\tfi\n}\n\nfunction __path_prompt() {\n\tlocal dir_color=${green?}\n\t# Detect root shell\n\tif [ \"$(whoami)\" = root ]; then\n\t\tdir_color=${red?}\n\tfi\n\n\techo \"${dir_color}\\w${normal?} \"\n}\n\nfunction __scm_prompt() {\n\tscm_prompt_info\n}\n\nfunction __duration_prompt() {\n\t[[ -n \"$command_duration\" ]] && echo \"${command_duration} \"\n}\n\nfunction __docker_prompt() {\n\tlocal docker_context=''\n\n\tif [ -f compose.yml ] || [ -f docker-compose.yml ] || [ -f Dockerfile ]; then\n\t\tif [ -n \"$DOCKER_CONTEXT\" ]; then\n\t\t\tdocker_context=\"$DOCKER_CONTEXT\"\n\t\telif [ -n \"$DOCKER_HOST\" ]; then\n\t\t\tdocker_context=\"$DOCKER_HOST\"\n\t\telif [ -f .env ] && grep -qF COMPOSE_PROJECT_NAME .env; then\n\t\t\tdocker_context=$(awk -F'[ \\t\\n=]+' '/COMPOSE_PROJECT_NAME/ {print $2; exit}' .env)\n\t\tfi\n\t\techo \"${bold_blue?}${DOCKER_CHAR}${normal?}${docker_context} \"\n\tfi\n}\n\nfunction __mysql_prompt() {\n\t# \\R displays current time in 24 HR format\n\t# \\m displays the minutes\n\t# \\s displays the seconds\n\t# \\U displays username@hostname accountname\n\t# \\c displays a mysql statement counter. keeps increasing as you type commands.\n\t# \\d displays default database\n\texport MYSQL_PS1=\"\\R:\\m:\\s (\\U) \\c [\\d]> \"\n\n\tlocal user char\n\n\tif [ -f \"$HOME/.my.cnf\" ]; then\n\t\tuser=$(awk -F'[ \\t\\n=]+' '/user/ {print $2; exit}' \"$HOME/.my.cnf\")\n\t\tchar=\"$MYSQL_CHAR\"\n\t\tif [ -n \"$user\" ]; then\n\t\t\tif _command_exists mariadb; then\n\t\t\t\tchar=\"$MARIADB_CHAR\"\n\t\t\tfi\n\t\t\techo \"${bold_blue?}${char}${normal?}${user} \"\n\t\tfi\n\tfi\n}\n\nfunction __ansible_prompt() {\n\tlocal config\n\t# Ansible will check:\n\t# ANSIBLE_CONFIG (environment variable if set)\n\t# ansible.cfg (in the current directory)\n\t# ~/.ansible.cfg (in the home directory)\n\t# /etc/ansible/ansible.cfg\n\t#\n\t# Ansible will process the above list and use the first file found, all others are ignored.\n\tif [ -n \"$ANSIBLE_CONFIG\" ]; then\n\t\tconfig=\"$ANSIBLE_CONFIG\"\n\telif [ -f ansible.cfg ]; then\n\t\tconfig=ansible.cfg\n\telif [ -f \"$HOME/.ansible.cfg\" ] && [ \"$ANSIBLE_HOME_DISPLAY\" = true ]; then\n\t\t# shellcheck disable=SC2088\n\t\tconfig=\"~/.ansible.cfg\"\n\telif [ -f /etc/ansible/ansible.cfg ]; then\n\t\tconfig=\"/etc/ansible/ansible.cfg\"\n\tfi\n\n\tif [ -n \"$config\" ]; then\n\t\techo \"${bold_purple?}${ANSIBLE_CHAR}${normal?}${config} \"\n\tfi\n}\n\nfunction __prompt-command() {\n\texit_code=\"$?\"\n\tcommand_duration=$(_command_duration)\n\tlocal wrap_char\n\n\t# Generate prompt\n\tPS1=\"\\n \"\n\tfor segment in $BARBUK_PROMPT; do\n\t\tlocal info\n\t\tinfo=\"$(__\"${segment}\"_prompt)\"\n\t\t[[ -n \"${info}\" ]] && PS1+=\"${info}\"\n\tdone\n\n\t# Cut prompt when it's too long\n\tif [[ ${#PS1} -gt $((COLUMNS * 2)) ]]; then\n\t\twrap_char=\"\\n\"\n\tfi\n\n\tPS1=\"${PS1}${wrap_char}❯${normal?} \"\n}\n\nsafe_append_prompt_command __prompt-command\n"
  },
  {
    "path": "themes/base.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Colors for listing files, using default color scheme.\n# To customize color scheme by theme, check out https://geoff.greer.fm/lscolors/\nexport CLICOLOR LSCOLORS LS_COLORS\n\nCLOCK_CHAR_THEME_PROMPT_PREFIX=''\nCLOCK_CHAR_THEME_PROMPT_SUFFIX=''\nCLOCK_THEME_PROMPT_PREFIX=''\nCLOCK_THEME_PROMPT_SUFFIX=''\n\nTHEME_PROMPT_HOST='\\h'\n\nSCM=\n\n: \"${SCM_CHECK:=true}\"\n\nSCM_THEME_PROMPT_DIRTY=' ✗'\nSCM_THEME_PROMPT_CLEAN=' ✓'\nSCM_THEME_PROMPT_PREFIX=' |'\nSCM_THEME_PROMPT_SUFFIX='|'\nSCM_THEME_BRANCH_PREFIX=''\nSCM_THEME_TAG_PREFIX='tag:'\nSCM_THEME_DETACHED_PREFIX='detached:'\nSCM_THEME_BRANCH_TRACK_PREFIX=' → '\nSCM_THEME_BRANCH_GONE_PREFIX=' ⇢ '\nSCM_THEME_CURRENT_USER_PREFFIX=' ☺︎ '\nSCM_THEME_CURRENT_USER_SUFFIX=''\nSCM_THEME_CHAR_PREFIX=''\nSCM_THEME_CHAR_SUFFIX=''\n\n# Define this here so it can be used by all of the themes\n: \"${THEME_CHECK_SUDO:=false}\"\n: \"${THEME_BATTERY_PERCENTAGE_CHECK:=true}\"\n\n: \"${SCM_GIT_SHOW_DETAILS:=true}\"\n: \"${SCM_GIT_SHOW_REMOTE_INFO:=auto}\"\n: \"${SCM_GIT_IGNORE_UNTRACKED:=false}\"\n: \"${SCM_GIT_SHOW_CURRENT_USER:=false}\"\n: \"${SCM_GIT_SHOW_MINIMAL_INFO:=false}\"\n: \"${SCM_GIT_SHOW_STASH_INFO:=true}\"\n: \"${SCM_GIT_SHOW_COMMIT_COUNT:=true}\"\n: \"${SCM_GIT_USE_GITSTATUS:=false}\"\n: \"${SCM_GIT_GITSTATUS_RAN:=false}\"\n\nSCM_GIT='git'\nSCM_GIT_CHAR='±'\nSCM_GIT_DETACHED_CHAR='⌿'\nSCM_GIT_AHEAD_CHAR=\"↑\"\nSCM_GIT_BEHIND_CHAR=\"↓\"\nSCM_GIT_AHEAD_BEHIND_PREFIX_CHAR=\" \"\nSCM_GIT_UNTRACKED_CHAR=\"?:\"\nSCM_GIT_UNSTAGED_CHAR=\"U:\"\nSCM_GIT_STAGED_CHAR=\"S:\"\nSCM_GIT_STASH_CHAR_PREFIX=\"{\"\nSCM_GIT_STASH_CHAR_SUFFIX=\"}\"\n\nSCM_P4='p4'\nSCM_P4_CHAR='⌛'\nSCM_P4_CHANGES_CHAR='C:'\nSCM_P4_DEFAULT_CHAR='D:'\nSCM_P4_OPENED_CHAR='O:'\n\nSCM_HG='hg'\nSCM_HG_CHAR='☿'\n\nSCM_SVN='svn'\nSCM_SVN_CHAR='⑆'\n\nSCM_NONE='NONE'\nSCM_NONE_CHAR='○'\n\nNVM_THEME_PROMPT_PREFIX=' |'\nNVM_THEME_PROMPT_SUFFIX='|'\n\nNODE_THEME_PROMPT_PREFIX=' |'\nNODE_THEME_PROMPT_SUFFIX='|'\n\nRVM_THEME_PROMPT_PREFIX=' |'\nRVM_THEME_PROMPT_SUFFIX='|'\n\n: \"${THEME_SHOW_RUBY_PROMPT:=true}\"\n\n: \"${THEME_SHOW_USER_HOST:=false}\"\nUSER_HOST_THEME_PROMPT_PREFIX=''\nUSER_HOST_THEME_PROMPT_SUFFIX=''\n\nVIRTUALENV_THEME_PROMPT_PREFIX=' |'\nVIRTUALENV_THEME_PROMPT_SUFFIX='|'\n\nRBENV_THEME_PROMPT_PREFIX=' |'\nRBENV_THEME_PROMPT_SUFFIX='|'\n\nRBFU_THEME_PROMPT_PREFIX=' |'\nRBFU_THEME_PROMPT_SUFFIX='|'\n\n: \"${GIT_EXE:=${SCM_GIT?}}\"\n: \"${HG_EXE:=${SCM_HG?}}\"\n: \"${SVN_EXE:=${SCM_SVN?}}\"\n: \"${P4_EXE:=${SCM_P4?}}\"\n\nfunction _bash_it_appearance_scm_init() {\n\tGIT_EXE=\"$(type -P \"${SCM_GIT:-git}\" || true)\"\n\tHG_EXE=\"$(type -P \"${SCM_HG:-hg}\" || true)\"\n\tSVN_EXE=\"$(type -P \"${SCM_SVN:-svn}\" || true)\"\n\tP4_EXE=\"$(type -P \"${SCM_P4:-p4}\" || true)\"\n\n\t# Check for broken SVN exe that is caused by some versions of Xcode.\n\t# See https://github.com/Bash-it/bash-it/issues/1612 for more details.\n\tif [[ -x \"${SVN_EXE-}\" && -x \"${SVN_EXE%/svn}/xcrun\" ]]; then\n\t\tif ! \"${SVN_EXE}\" --version > /dev/null 2>&1; then\n\t\t\t# Unset the SVN exe variable so that SVN commands are avoided.\n\t\t\tSVN_EXE=\"\"\n\t\tfi\n\tfi\n\treturn 0\n}\n_bash_it_library_finalize_hook+=('_bash_it_appearance_scm_init')\n\nfunction scm() {\n\tif [[ \"${SCM_CHECK:-true}\" == \"false\" ]]; then\n\t\tSCM=\"${SCM_NONE-NONE}\"\n\telif [[ -x \"${GIT_EXE-}\" ]] && _bash-it-find-in-ancestor '.git' > /dev/null; then\n\t\tSCM=\"${SCM_GIT?}\"\n\telif [[ -x \"${HG_EXE-}\" ]] && _bash-it-find-in-ancestor '.hg' > /dev/null; then\n\t\tSCM=\"${SCM_HG?}\"\n\telif [[ -x \"${SVN_EXE-}\" ]] && _bash-it-find-in-ancestor '.svn' > /dev/null; then\n\t\tSCM=\"${SCM_SVN?}\"\n\telif [[ -x \"${P4_EXE-}\" && -n \"$(p4 set P4CLIENT 2> /dev/null)\" ]]; then\n\t\tSCM=\"${SCM_P4?}\"\n\telse\n\t\tSCM=\"${SCM_NONE-NONE}\"\n\tfi\n}\n\nfunction scm_prompt() {\n\tlocal format=\"${SCM_PROMPT_FORMAT-\"[%s%s]\"}\"\n\tlocal scm_char scm_prompt_info\n\tscm_char=\"$(scm_char)\"\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\n\tif [[ \"${scm_char}\" != \"${SCM_NONE_CHAR:-}\" ]]; then\n\t\t# shellcheck disable=2059\n\t\tprintf \"${format}\" \"${scm_char}\" \"${scm_prompt_info}\"\n\tfi\n}\n\nfunction scm_prompt_char() {\n\tif [[ -z \"${SCM:-}\" ]]; then\n\t\tscm\n\tfi\n\n\tcase ${SCM?} in\n\t\t\"${SCM_GIT?}\")\n\t\t\tSCM_CHAR=\"${SCM_GIT_CHAR?}\"\n\t\t\t;;\n\t\t\"${SCM_HG?}\")\n\t\t\tSCM_CHAR=\"${SCM_HG_CHAR?}\"\n\t\t\t;;\n\t\t\"${SCM_SVN?}\")\n\t\t\tSCM_CHAR=\"${SCM_SVN_CHAR?}\"\n\t\t\t;;\n\t\t\"${SCM_P4?}\")\n\t\t\tSCM_CHAR=\"${SCM_P4_CHAR?}\"\n\t\t\t;;\n\t\t*)\n\t\t\tSCM_CHAR=\"${SCM_NONE_CHAR:-}\"\n\t\t\t;;\n\tesac\n}\n\nfunction scm_prompt_vars() {\n\tscm\n\tscm_prompt_char\n\tSCM_DIRTY=0\n\tSCM_STATE=''\n\tSCM_BRANCH=''\n\n\tlocal prompt_vars=\"${SCM}_prompt_vars\"\n\t_is_function \"${prompt_vars}\" && \"${prompt_vars}\"\n}\n\nfunction scm_prompt_info() {\n\tscm\n\tscm_prompt_char\n\tscm_prompt_info_common\n}\n\nfunction scm_prompt_char_info() {\n\tscm_prompt_char\n\techo -ne \"${SCM_THEME_CHAR_PREFIX-}${SCM_CHAR?}${SCM_THEME_CHAR_SUFFIX-}\"\n\tscm_prompt_info_common\n}\n\nfunction scm_prompt_info_common() {\n\tlocal prompt_info\n\tSCM_DIRTY=0\n\tSCM_STATE=''\n\n\tcase ${SCM?} in\n\t\t\"${SCM_GIT?}\")\n\t\t\tif [[ ${SCM_GIT_SHOW_MINIMAL_INFO:-false} == \"true\" ]]; then\n\t\t\t\t# user requests minimal git status information\n\t\t\t\tprompt_info=\"${SCM}_prompt_minimal_info\"\n\t\t\telse\n\t\t\t\t# more detailed git status\n\t\t\t\tprompt_info=\"${SCM}_prompt_info\"\n\t\t\tfi\n\t\t\t;;\n\t\t*)\n\t\t\t# TODO: consider adding minimal status information for hg and svn\n\t\t\tprompt_info=\"${SCM}_prompt_info\"\n\t\t\t;;\n\tesac\n\t_is_function \"${prompt_info}\" && \"${prompt_info}\"\n}\n\nfunction terraform_workspace_prompt() {\n\tif _command_exists terraform; then\n\t\tif [[ -d .terraform ]]; then\n\t\t\tterraform workspace show 2> /dev/null\n\t\tfi\n\tfi\n}\n\nfunction active_gcloud_account_prompt() {\n\tif _command_exists gcloud; then\n\t\tgcloud config list account --format \"value(core.account)\" 2> /dev/null\n\tfi\n}\n\nfunction git_prompt_minimal_info() {\n\tSCM_STATE=\"${SCM_THEME_PROMPT_CLEAN?}\"\n\n\t_git-hide-status && return\n\n\tSCM_BRANCH=\"${SCM_THEME_BRANCH_PREFIX-}\\$(_git-friendly-ref)\"\n\n\tif [[ -n \"$(_git-status | tail -n1)\" ]]; then\n\t\tSCM_DIRTY=1\n\t\tSCM_STATE=\"${SCM_THEME_PROMPT_DIRTY?}\"\n\tfi\n\n\t# Output the git prompt\n\tSCM_PREFIX=\"${SCM_THEME_PROMPT_PREFIX-}\"\n\tSCM_SUFFIX=\"${SCM_THEME_PROMPT_SUFFIX-}\"\n\techo -ne \"${SCM_PREFIX}${SCM_BRANCH}${SCM_STATE}${SCM_SUFFIX}\"\n}\n\nfunction git_prompt_vars() {\n\tif [[ \"${SCM_GIT_USE_GITSTATUS:-false}\" != \"false\" ]] && _command_exists gitstatus_query && gitstatus_query && [[ \"${VCS_STATUS_RESULT:-}\" == \"ok-sync\" ]]; then\n\t\t# we can use faster gitstatus\n\t\t# use this variable in githelpers and below to choose gitstatus output\n\t\tSCM_GIT_GITSTATUS_RAN=true\n\telse\n\t\tSCM_GIT_GITSTATUS_RAN=false\n\tfi\n\n\tif _git-branch &> /dev/null; then\n\t\tSCM_GIT_DETACHED=\"false\"\n\t\tSCM_BRANCH=\"${SCM_THEME_BRANCH_PREFIX}\\$(_git-friendly-ref)$(_git-remote-info)\"\n\telse\n\t\tSCM_GIT_DETACHED=\"true\"\n\n\t\tlocal detached_prefix\n\t\tif _git-tag &> /dev/null; then\n\t\t\tdetached_prefix=\"${SCM_THEME_TAG_PREFIX}\"\n\t\telse\n\t\t\tdetached_prefix=\"${SCM_THEME_DETACHED_PREFIX}\"\n\t\tfi\n\t\tSCM_BRANCH=\"${detached_prefix}\\$(_git-friendly-ref)\"\n\tfi\n\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\tcommits_behind=\"${VCS_STATUS_COMMITS_BEHIND?}\"\n\t\tcommits_ahead=\"${VCS_STATUS_COMMITS_AHEAD?}\"\n\telse\n\t\tIFS=$'\\t' read -r commits_behind commits_ahead <<< \"$(_git-upstream-behind-ahead)\"\n\tfi\n\tif [[ \"${commits_ahead}\" -gt 0 ]]; then\n\t\tSCM_BRANCH+=\"${SCM_GIT_AHEAD_BEHIND_PREFIX_CHAR}${SCM_GIT_AHEAD_CHAR}\"\n\t\t[[ \"${SCM_GIT_SHOW_COMMIT_COUNT}\" == \"true\" ]] && SCM_BRANCH+=\"${commits_ahead}\"\n\tfi\n\tif [[ \"${commits_behind}\" -gt 0 ]]; then\n\t\tSCM_BRANCH+=\"${SCM_GIT_AHEAD_BEHIND_PREFIX_CHAR}${SCM_GIT_BEHIND_CHAR}\"\n\t\t[[ \"${SCM_GIT_SHOW_COMMIT_COUNT}\" == \"true\" ]] && SCM_BRANCH+=\"${commits_behind}\"\n\tfi\n\n\tif [[ \"${SCM_GIT_SHOW_STASH_INFO}\" == \"true\" ]]; then\n\t\tlocal stash_count\n\t\tif [[ \"${SCM_GIT_GITSTATUS_RAN}\" == \"true\" ]]; then\n\t\t\tstash_count=\"${VCS_STATUS_STASHES?}\"\n\t\telse\n\t\t\tstash_count=\"$(git stash list 2> /dev/null | wc -l | tr -d ' ')\"\n\t\tfi\n\t\t[[ \"${stash_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_GIT_STASH_CHAR_PREFIX}${stash_count}${SCM_GIT_STASH_CHAR_SUFFIX}\"\n\tfi\n\n\tSCM_STATE=\"${GIT_THEME_PROMPT_CLEAN:-${SCM_THEME_PROMPT_CLEAN:-}}\"\n\tif ! _git-hide-status; then\n\t\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\t\tuntracked_count=\"${VCS_STATUS_NUM_UNTRACKED?}\"\n\t\t\tunstaged_count=\"${VCS_STATUS_NUM_UNSTAGED?}\"\n\t\t\tstaged_count=\"${VCS_STATUS_NUM_STAGED?}\"\n\t\telse\n\t\t\tIFS=$'\\t' read -r untracked_count unstaged_count staged_count < <(_git-status-counts)\n\t\tfi\n\t\tif [[ \"${untracked_count}\" -gt 0 || \"${unstaged_count}\" -gt 0 || \"${staged_count}\" -gt 0 ]]; then\n\t\t\tSCM_DIRTY=1\n\t\t\tif [[ \"${SCM_GIT_SHOW_DETAILS}\" == \"true\" ]]; then\n\t\t\t\t[[ \"${staged_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_GIT_STAGED_CHAR}${staged_count}\" && SCM_DIRTY=3\n\t\t\t\t[[ \"${unstaged_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_GIT_UNSTAGED_CHAR}${unstaged_count}\" && SCM_DIRTY=2\n\t\t\t\t[[ \"${untracked_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_GIT_UNTRACKED_CHAR}${untracked_count}\" && SCM_DIRTY=1\n\t\t\tfi\n\t\t\tSCM_STATE=\"${GIT_THEME_PROMPT_DIRTY:-${SCM_THEME_PROMPT_DIRTY?}}\"\n\t\tfi\n\tfi\n\n\t# no if for gitstatus here, user extraction is not supported by it\n\t[[ \"${SCM_GIT_SHOW_CURRENT_USER}\" == \"true\" ]] && SCM_BRANCH+=\"$(git_user_info)\"\n\n\tSCM_PREFIX=\"${GIT_THEME_PROMPT_PREFIX:-${SCM_THEME_PROMPT_PREFIX-}}\"\n\tSCM_SUFFIX=\"${GIT_THEME_PROMPT_SUFFIX:-${SCM_THEME_PROMPT_SUFFIX-}}\"\n\n\tSCM_CHANGE=$(_git-short-sha 2> /dev/null || true)\n}\n\nfunction p4_prompt_vars() {\n\tlocal opened_count non_default_changes default_count \\\n\t\tadd_file_count edit_file_count delete_file_count\n\n\tIFS=$'\\t' read -r \\\n\t\topened_count non_default_changes default_count \\\n\t\tadd_file_count edit_file_count delete_file_count \\\n\t\t< <(_p4-opened-counts)\n\tif [[ \"${opened_count}\" -gt 0 ]]; then\n\t\tSCM_DIRTY=1\n\t\tSCM_STATE=\"${SCM_THEME_PROMPT_DIRTY?}\"\n\t\t[[ \"${opened_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_P4_OPENED_CHAR?}${opened_count}\"\n\t\t[[ \"${non_default_changes}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_P4_CHANGES_CHAR?}${non_default_changes}\"\n\t\t[[ \"${default_count}\" -gt 0 ]] && SCM_BRANCH+=\" ${SCM_P4_DEFAULT_CHAR?}${default_count}\"\n\telse\n\t\tSCM_DIRTY=0\n\t\tSCM_STATE=\"${SCM_THEME_PROMPT_CLEAN?}\"\n\tfi\n\n\tSCM_PREFIX=\"${P4_THEME_PROMPT_PREFIX:-${SCM_THEME_PROMPT_PREFIX-}}\"\n\tSCM_SUFFIX=\"${P4_THEME_PROMPT_SUFFIX:-${SCM_THEME_PROMPT_SUFFIX-}}\"\n}\n\nfunction svn_prompt_vars() {\n\tif [[ -n \"$(svn status | head -c1 2> /dev/null)\" ]]; then\n\t\tSCM_DIRTY=1\n\t\tSCM_STATE=\"${SVN_THEME_PROMPT_DIRTY:-${SCM_THEME_PROMPT_DIRTY?}}\"\n\telse\n\t\tSCM_DIRTY=0\n\t\tSCM_STATE=\"${SVN_THEME_PROMPT_CLEAN:-${SCM_THEME_PROMPT_CLEAN?}}\"\n\tfi\n\tSCM_PREFIX=\"${SVN_THEME_PROMPT_PREFIX:-${SCM_THEME_PROMPT_PREFIX-}}\"\n\tSCM_SUFFIX=\"${SVN_THEME_PROMPT_SUFFIX:-${SCM_THEME_PROMPT_SUFFIX-}}\"\n\tSCM_BRANCH=\"$(svn info --show-item=url 2> /dev/null | awk -F/ '{ for (i=0; i<=NF; i++) { if ($i == \"branches\" || $i == \"tags\" ) { print $(i+1); break }; if ($i == \"trunk\") { print $i; break } } }')\" || return\n\tSCM_CHANGE=\"$(svn info --show-item=revision 2> /dev/null)\"\n}\n\nfunction hg_prompt_vars() {\n\tlocal hg_root bookmark\n\tif [[ -n $(hg status 2> /dev/null) ]]; then\n\t\tSCM_DIRTY=1\n\t\tSCM_STATE=\"${HG_THEME_PROMPT_DIRTY:-${SCM_THEME_PROMPT_DIRTY?}}\"\n\telse\n\t\tSCM_DIRTY=0\n\t\tSCM_STATE=\"${HG_THEME_PROMPT_CLEAN:-${SCM_THEME_PROMPT_CLEAN?}}\"\n\tfi\n\tSCM_PREFIX=\"${HG_THEME_PROMPT_PREFIX:-${SCM_THEME_PROMPT_PREFIX-}}\"\n\tSCM_SUFFIX=\"${HG_THEME_PROMPT_SUFFIX:-${SCM_THEME_PROMPT_SUFFIX-}}\"\n\n\thg_root=\"$(_bash-it-find-in-ancestor \".hg\")/.hg\"\n\n\tif [[ -f \"$hg_root/branch\" ]]; then\n\t\t# Mercurial holds it's current branch in .hg/branch file\n\t\tSCM_BRANCH=$(< \"${hg_root}/branch\")\n\t\tbookmark=\"${hg_root}/bookmarks.current\"\n\t\t[[ -f \"${bookmark}\" ]] && SCM_BRANCH+=:$(< \"${bookmark}\")\n\telse\n\t\tSCM_BRANCH=$(hg summary 2> /dev/null | grep branch: | awk '{print $2}')\n\tfi\n\n\tif [[ -f \"$hg_root/dirstate\" ]]; then\n\t\t# Mercurial holds various information about the working directory in .hg/dirstate file. More on http://mercurial.selenic.com/wiki/DirState\n\t\tSCM_CHANGE=$(hexdump -vn 10 -e '1/1 \"%02x\"' \"$hg_root/dirstate\" | cut -c-12)\n\telse\n\t\tSCM_CHANGE=$(hg summary 2> /dev/null | grep parent: | awk '{print $2}')\n\tfi\n}\n\nfunction node_command_version_prompt() {\n\t# Set to 'true' to only show node version in directories with package.json\n\tNODE_VERSION_CHECK_PROJECT=\"${NODE_VERSION_CHECK_PROJECT:-false}\"\n\n\t# If NODE_VERSION_CHECK_PROJECT is enabled, only show version in Node.js projects\n\tif [[ \"${NODE_VERSION_CHECK_PROJECT}\" == \"true\" ]] && ! _is_node_project; then\n\t\treturn 0\n\tfi\n\n\tlocal node_version\n\tif _command_exists node; then\n\t\tnode_version=\"$(node --version 2> /dev/null)\"\n\t\tif [[ -n ${node_version} ]]; then\n\t\t\techo -e \"${NVM_THEME_PROMPT_PREFIX}${node_version}${NVM_THEME_PROMPT_SUFFIX}\"\n\t\tfi\n\tfi\n}\n\nfunction nvm_version_prompt() {\n\tlocal nvm_ver\n\tif _is_function nvm; then\n\t\tnvm_ver=$(nvm current 2> /dev/null)\n\t\t[[ \"${nvm_ver}\" == \"system\" ]] && return\n\t\techo -ne \"${NVM_THEME_PROMPT_PREFIX-}${nvm_ver}${NVM_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction node_native_version_prompt() {\n\tlocal node_ver\n\tif _command_exists node; then\n\t\tnode_ver=$(node --version 2> /dev/null)\n\t\techo -ne \"${NODE_THEME_PROMPT_PREFIX-}${node_ver}${NODE_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction _is_node_project() {\n\t# Check if we're in a Node.js project by looking for package.json\n\t# Search current directory and parent directories up to $HOME\n\tlocal dir=\"${PWD}\"\n\twhile [[ \"${dir}\" != \"${HOME-}\" && \"${dir}\" != \"/\" ]]; do\n\t\tif [[ -f \"${dir}/package.json\" ]]; then\n\t\t\treturn 0\n\t\tfi\n\t\tdir=$(dirname \"${dir}\")\n\tdone\n\t# Also check $HOME itself\n\t[[ -f \"${HOME-}/package.json\" ]] && return 0\n\treturn 1\n}\n\nfunction node_version_prompt() {\n\tNODE_VERSION_STRATEGY=\"${NODE_VERSION_STRATEGY:-nvm}\"\n\t# Set to 'true' to only show node version in directories with package.json\n\tNODE_VERSION_CHECK_PROJECT=\"${NODE_VERSION_CHECK_PROJECT:-false}\"\n\n\t_log_debug \"node: using version strategy '$NODE_VERSION_STRATEGY'\"\n\n\t# If NODE_VERSION_CHECK_PROJECT is enabled, only show version in Node.js projects\n\tif [[ \"${NODE_VERSION_CHECK_PROJECT}\" == \"true\" ]] && ! _is_node_project; then\n\t\treturn 0\n\tfi\n\n\tif [ \"$NODE_VERSION_STRATEGY\" == \"nvm\" ]; then\n\t\tnvm_version_prompt\n\telif [ \"$NODE_VERSION_STRATEGY\" == \"node\" ]; then\n\t\tnode_native_version_prompt\n\tfi\n}\n\nfunction rvm_version_prompt() {\n\tif _command_exists rvm; then\n\t\trvm=\"$(rvm-prompt)\" || return\n\t\tif [[ -n \"$rvm\" ]]; then\n\t\t\techo -ne \"${RVM_THEME_PROMPT_PREFIX-}${rvm}${RVM_THEME_PROMPT_SUFFIX-}\"\n\t\tfi\n\tfi\n}\n\nfunction rbenv_version_prompt() {\n\tif _command_exists rbenv; then\n\t\trbenv=$(rbenv version-name) || return\n\t\trbenv commands | grep -q gemset && gemset=$(rbenv gemset active 2> /dev/null) && rbenv=\"$rbenv@${gemset%% *}\"\n\t\tif [[ \"$rbenv\" != \"system\" ]]; then\n\t\t\techo -ne \"${RBENV_THEME_PROMPT_PREFIX-}${rbenv}${RBENV_THEME_PROMPT_SUFFIX-}\"\n\t\tfi\n\tfi\n}\n\nfunction rbfu_version_prompt() {\n\tif [[ -n \"${RBFU_RUBY_VERSION:-}\" ]]; then\n\t\techo -ne \"${RBFU_THEME_PROMPT_PREFIX-}${RBFU_RUBY_VERSION}${RBFU_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction chruby_version_prompt() {\n\tif _is_function chruby; then\n\t\tif _is_function chruby_auto; then\n\t\t\tchruby_auto\n\t\tfi\n\n\t\truby_version=$(ruby --version | awk '{print $1, $2;}') || return\n\n\t\tif ! chruby | grep -q '\\*'; then\n\t\t\truby_version=\"${ruby_version} (system)\"\n\t\tfi\n\t\techo -ne \"${CHRUBY_THEME_PROMPT_PREFIX-}${ruby_version}${CHRUBY_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction ruby_version_prompt() {\n\tif [[ \"${THEME_SHOW_RUBY_PROMPT:-}\" == \"true\" ]]; then\n\t\trbfu_version_prompt\n\t\trbenv_version_prompt\n\t\trvm_version_prompt\n\t\tchruby_version_prompt\n\tfi\n}\n\nfunction k8s_context_prompt() {\n\tkubectl config current-context 2> /dev/null\n}\n\nfunction k8s_namespace_prompt() {\n\tkubectl config view --minify --output 'jsonpath={..namespace}' 2> /dev/null\n}\n\nfunction virtualenv_prompt() {\n\tlocal virtualenv\n\tif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tvirtualenv=\"${VIRTUAL_ENV##*/}\"\n\t\techo -ne \"${VIRTUALENV_THEME_PROMPT_PREFIX-}${virtualenv}${VIRTUALENV_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction condaenv_prompt() {\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\techo -ne \"${CONDAENV_THEME_PROMPT_PREFIX-}${CONDA_DEFAULT_ENV}${CONDAENV_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction py_interp_prompt() {\n\tlocal py_version\n\tpy_version=\"$(python --version 2>&1 | awk 'NR==1{print \"py-\"$2;}')\" || return\n\techo -ne \"${PYTHON_THEME_PROMPT_PREFIX-}${py_version}${PYTHON_THEME_PROMPT_SUFFIX-}\"\n}\n\nfunction python_version_prompt() {\n\tvirtualenv_prompt\n\tcondaenv_prompt\n\tpy_interp_prompt\n}\n\nfunction git_user_info() {\n\tlocal current_user\n\t# support two or more initials, set by 'git pair' plugin\n\tcurrent_user=\"$(git config user.initials | sed 's% %+%')\"\n\t# if `user.initials` weren't set, attempt to extract initials from `user.name`\n\t[[ -z \"${current_user}\" ]] && current_user=$(printf \"%s\" \"$(for word in $(git config user.name | PERLIO=:utf8 perl -pe '$_=lc'); do printf \"%s\" \"${word:0:1}\"; done)\")\n\t[[ -n \"${current_user}\" ]] && printf \"%s\" \"${SCM_THEME_CURRENT_USER_PREFFIX-}${current_user}${SCM_THEME_CURRENT_USER_SUFFIX-}\"\n}\n\nfunction clock_char() {\n\tlocal clock_char clock_char_color show_clock_char\n\tclock_char=\"${THEME_CLOCK_CHAR:-⌚}\"\n\tclock_char_color=\"${THEME_CLOCK_CHAR_COLOR:-${normal:-}}\"\n\tshow_clock_char=\"${THEME_SHOW_CLOCK_CHAR:-\"true\"}\"\n\n\tif [[ \"${show_clock_char}\" == \"true\" ]]; then\n\t\techo -ne \"${clock_char_color}${CLOCK_CHAR_THEME_PROMPT_PREFIX-}${clock_char}${CLOCK_CHAR_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction clock_prompt() {\n\tlocal clock_color=\"${THEME_CLOCK_COLOR:-${normal?}}\"\n\tlocal clock_format=\"${THEME_CLOCK_FORMAT:-\"%H:%M:%S\"}\"\n\tlocal show_clock=\"${THEME_SHOW_CLOCK:-${THEME_CLOCK_CHECK:-true}}\"\n\tlocal clock_string=\"\\D{${clock_format}}\"\n\n\tif [[ \"${show_clock}\" == \"true\" ]]; then\n\t\techo -ne \"${clock_color}${CLOCK_THEME_PROMPT_PREFIX-}${clock_string}${CLOCK_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\nfunction user_host_prompt() {\n\tif [[ \"${THEME_SHOW_USER_HOST:-false}\" == \"true\" ]]; then\n\t\techo -ne \"${USER_HOST_THEME_PROMPT_PREFIX-}\\u@${THEME_PROMPT_HOST:-\\h}${USER_HOST_THEME_PROMPT_SUFFIX-}\"\n\tfi\n}\n\n# backwards-compatibility\nfunction git_prompt_info() {\n\t_git-hide-status && return\n\tgit_prompt_vars\n\techo -ne \"${SCM_PREFIX?}${SCM_BRANCH?}${SCM_STATE?}${SCM_SUFFIX?}\"\n}\n\nfunction p4_prompt_info() {\n\tp4_prompt_vars\n\techo -ne \"${SCM_PREFIX?}${SCM_BRANCH?}:${SCM_CHANGE?}${SCM_STATE?}${SCM_SUFFIX?}\"\n}\n\nfunction svn_prompt_info() {\n\tsvn_prompt_vars\n\techo -ne \"${SCM_PREFIX?}${SCM_BRANCH?}${SCM_STATE?}${SCM_SUFFIX?}\"\n}\n\nfunction hg_prompt_info() {\n\thg_prompt_vars\n\techo -ne \"${SCM_PREFIX?}${SCM_BRANCH?}:${SCM_CHANGE#*:}${SCM_STATE?}${SCM_SUFFIX?}\"\n}\n\nfunction scm_char() {\n\tscm_prompt_char\n\techo -ne \"${SCM_THEME_CHAR_PREFIX?}${SCM_CHAR?}${SCM_THEME_CHAR_SUFFIX?}\"\n}\n\nfunction prompt_char() {\n\tscm_char\n}\n\nfunction battery_char() {\n\tlocal battery_percentage\n\tif _is_function battery_percentage; then\n\t\tbattery_percentage=\"$(battery_percentage)\"\n\t\tif [[ \"${THEME_BATTERY_PERCENTAGE_CHECK}\" == true ]]; then\n\t\t\techo -e \"${bold_red?}${battery_percentage}%\"\n\t\telse\n\t\t\tfalse\n\t\tfi\n\telse\n\t\tfalse\n\tfi\n}\n\nif ! _command_exists battery_charge; then\n\tfunction battery_charge() {\n\t\t# Provide a stub that always returns empty - the real implementation is in lib/battery.bash\n\t\techo \"\"\n\t}\nfi\n\nfunction aws_profile() {\n\tif [[ -n \"${AWS_PROFILE:-}\" ]]; then\n\t\techo -ne \"${AWS_PROFILE}\"\n\telif [[ -n \"${AWS_DEFAULT_PROFILE:-}\" ]]; then\n\t\techo -ne \"${AWS_DEFAULT_PROFILE}\"\n\telse\n\t\techo -ne \"default\"\n\tfi\n}\n\nfunction _save-and-reload-history() {\n\tlocal autosave=\"${1:-${HISTORY_AUTOSAVE:-0}}\"\n\t[[ ${autosave} -eq 1 ]] && local HISTCONTROL=\"${HISTCONTROL:-}${HISTCONTROL:+:}autoshare\"\n\t_bash-it-history-auto-save && _bash-it-history-auto-load\n}\n\nfunction conda_or_venv_prompt() {\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\tcondaenv_prompt\n\telif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tvirtualenv_prompt\n\tfi\n}\n"
  },
  {
    "path": "themes/binaryanomaly/binaryanomaly.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Detect whether a reboot is required\nfunction show_reboot_required() {\n\tif [[ -n \"${_bf_prompt_reboot_info:-}\" ]]; then\n\t\tif [[ -f /var/run/reboot-required ]]; then\n\t\t\tprintf '%s' \"Reboot required!\"\n\t\tfi\n\tfi\n}\n\n# Set different host color for local and remote sessions\nfunction set_host_color() {\n\t# Detect if connection is through SSH\n\tif [[ -n \"${SSH_CLIENT:-}\" ]]; then\n\t\tprintf '%s' \"${lime_yellow?}\"\n\telse\n\t\tprintf '%s' \"${light_orange?}\"\n\tfi\n}\n\n# Set different username color for users and root\nfunction set_user_color() {\n\tcase ${EUID:-$UID} in\n\t\t0)\n\t\t\tprintf '%s' \"${red?}\"\n\t\t\t;;\n\t\t*)\n\t\t\tprintf '%s' \"${cyan?}\"\n\t\t\t;;\n\tesac\n}\n\n# Define custom colors we need\n# non-printable bytes in PS1 need to be contained within \\[ \\].\n# Otherwise, bash will count them in the length of the prompt\nfunction set_custom_colors() {\n\tdark_grey=\"\\[$(tput setaf 8)\\]\"\n\tlight_grey=\"\\[$(tput setaf 248)\\]\"\n\n\tlight_orange=\"\\[$(tput setaf 172)\\]\"\n\tbright_yellow=\"\\[$(tput setaf 220)\\]\"\n\tlime_yellow=\"\\[$(tput setaf 190)\\]\"\n\n\tpowder_blue=\"\\[$(tput setaf 153)\\]\"\n}\n\nfunction __ps_time() {\n\tlocal clock_prompt\n\tclock_prompt=\"$(clock_prompt)\"\n\tprintf '%s\\n' \"${clock_prompt}${normal?}\"\n}\n\nfunction prompt_command() {\n\tlocal show_reboot_required set_user_color set_host_color scm_prompt ps_time\n\tshow_reboot_required=\"$(show_reboot_required)\"\n\tps_reboot=\"${bright_yellow?}${show_reboot_required}${normal?}\\n\"\n\n\tset_user_color=\"$(set_user_color)\"\n\tps_username=\"${set_user_color}\\u${normal?}\"\n\tps_uh_separator=\"${dark_grey?}@${normal?}\"\n\tset_host_color=\"$(set_host_color)\"\n\tps_hostname=\"${set_host_color}\\h${normal?}\"\n\n\tps_path=\"${yellow?}\\w${normal?}\"\n\tscm_prompt=\"$(scm_prompt)\"\n\tps_scm_prompt=\"${light_grey?}${scm_prompt}\"\n\n\tps_user_mark=\"${normal?} ${normal?}\"\n\tps_user_input=\"${normal?}\"\n\n\t# Set prompt\n\tps_time=\"$(__ps_time)\"\n\tPS1=\"$ps_reboot${ps_time}$ps_username$ps_uh_separator$ps_hostname $ps_path $ps_scm_prompt$ps_user_mark$ps_user_input\"\n}\n\n# Initialize custom colors\nset_custom_colors\n\n: \"${THEME_CLOCK_COLOR:=\"$dark_grey\"}\"\n\n# scm theming\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${light_grey?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓${light_grey?}\"\nSCM_GIT_CHAR=\"${green?}±${light_grey?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${light_grey?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${light_grey?}\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/bira/bira.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\" ${yellow?}‹\"\nSCM_THEME_PROMPT_SUFFIX=\"›${reset_color?}\"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\" ${cyan?}‹\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"›${reset_color?}\"\nCONDAENV_THEME_PROMPT_PREFIX=\" ${cyan?}‹\"\nCONDAENV_THEME_PROMPT_SUFFIX=\"›${reset_color?}\"\n\nbold=\"\\[\\e[1m\\]\"\n\nif [[ ${UID} -eq 0 ]]; then\n\tuser_host=\"${bold_red?}\\u@\\h${normal?}${reset_color?}\"\nelse\n\tuser_host=\"${bold_green?}\\u@\\h${normal?}${reset_color?}\"\nfi\n\nfunction prompt_command() {\n\tlocal current_dir=\" ${bold_blue?}\\w${normal?}${reset_color?}\"\n\tlocal virtualenv_prompt scm_prompt_info\n\tvirtualenv_prompt=\"${virtualenv_prompt:-$(condaenv_prompt)}\"\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tPS1=\"╭─${user_host?}${current_dir}${virtualenv_prompt}${scm_prompt_info}\\n╰─${bold?}\\\\$ ${normal?}\"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/bobby/bobby.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${green?}|\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction __bobby_clock() {\n\tprintf '%s' \"$(clock_prompt) \"\n\n\tif [[ \"${THEME_SHOW_CLOCK_CHAR:-}\" == \"true\" ]]; then\n\t\tprintf '%s' \"$(clock_char) \"\n\tfi\n}\n\nfunction prompt_command() {\n\tPS1=\"\\n$(battery_char) $(__bobby_clock)\"\n\tPS1+=\"${yellow?}$(ruby_version_prompt) \"\n\tPS1+=\"${purple?}\\h \"\n\tPS1+=\"${reset_color?}in \"\n\tPS1+=\"${green?}\\w\\n\"\n\tPS1+=\"${bold_cyan?}$(scm_prompt_char_info) \"\n\tPS1+=\"${green?}→${reset_color?} \"\n}\n\n: \"${THEME_SHOW_CLOCK_CHAR:=\"true\"}\"\n: \"${THEME_CLOCK_CHAR_COLOR:=${red?}}\"\n: \"${THEME_CLOCK_COLOR:=${bold_cyan?}}\"\n: \"${THEME_CLOCK_FORMAT:=\"%Y-%m-%d %H:%M:%S\"}\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/bobby-python/bobby-python.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nCONDAENV_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction prompt_command() {\n\tPS1=\"\\n${yellow?}$(python_version_prompt) \" # Name of virtual env followed by python version\n\tPS1+=\"${purple?}\\h \"\n\tPS1+=\"${reset_color?}in \"\n\tPS1+=\"${green?}\\w\\n\"\n\tPS1+=\"${bold_cyan?}$(scm_char)\"\n\tPS1+=\"${green?}$(scm_prompt_info) \"\n\tPS1+=\"${green?}→${reset_color?} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/brainy/brainy.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck disable=SC2154 #TODO: fix these all.\n\n# Brainy Bash Prompt for Bash-it\n# by MunifTanjim\n\n#############\n## Parsers ##\n#############\n\n____brainy_top_left_parse() {\n\tifs_old=\"${IFS}\"\n\tIFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\tif [ -n \"${args[3]}\" ]; then\n\t\t_TOP_LEFT+=\"${args[2]}${args[3]}\"\n\tfi\n\t_TOP_LEFT+=\"${args[0]}${args[1]}\"\n\tif [ -n \"${args[4]}\" ]; then\n\t\t_TOP_LEFT+=\"${args[2]}${args[4]}\"\n\tfi\n\t_TOP_LEFT+=\" \"\n}\n\n____brainy_top_right_parse() {\n\tifs_old=\"${IFS}\"\n\tIFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\t_TOP_RIGHT+=\" \"\n\tif [ -n \"${args[3]}\" ]; then\n\t\t_TOP_RIGHT+=\"${args[2]}${args[3]}\"\n\tfi\n\t_TOP_RIGHT+=\"${args[0]}${args[1]}\"\n\tif [ -n \"${args[4]}\" ]; then\n\t\t_TOP_RIGHT+=\"${args[2]}${args[4]}\"\n\tfi\n\t__TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN + ${#args[1]} + ${#args[3]} + ${#args[4]} + 1))\n\t((__SEG_AT_RIGHT += 1))\n}\n\n____brainy_bottom_parse() {\n\tifs_old=\"${IFS}\"\n\tIFS=\"|\"\n\tread -r -a args <<< \"$@\"\n\tIFS=\"${ifs_old}\"\n\t_BOTTOM+=\"${args[0]}${args[1]}\"\n\t[ ${#args[1]} -gt 0 ] && _BOTTOM+=\" \"\n}\n\n____brainy_top() {\n\t_TOP_LEFT=\"\"\n\t_TOP_RIGHT=\"\"\n\t__TOP_RIGHT_LEN=0\n\t__SEG_AT_RIGHT=0\n\n\tfor seg in ${___BRAINY_TOP_LEFT}; do\n\t\tinfo=\"$(___brainy_prompt_\"${seg}\")\"\n\t\t[ -n \"${info}\" ] && ____brainy_top_left_parse \"${info}\"\n\tdone\n\n\t___cursor_right=\"\\033[500C\"\n\t_TOP_LEFT+=\"${___cursor_right}\"\n\n\tfor seg in ${___BRAINY_TOP_RIGHT}; do\n\t\tinfo=\"$(___brainy_prompt_\"${seg}\")\"\n\t\t[ -n \"${info}\" ] && ____brainy_top_right_parse \"${info}\"\n\tdone\n\n\t[ $__TOP_RIGHT_LEN -gt 0 ] && __TOP_RIGHT_LEN=$((__TOP_RIGHT_LEN - 1))\n\t___cursor_adjust=\"\\033[${__TOP_RIGHT_LEN}D\"\n\t_TOP_LEFT+=\"${___cursor_adjust}\"\n\n\tprintf \"%s%s\" \"${_TOP_LEFT}\" \"${_TOP_RIGHT}\"\n}\n\n____brainy_bottom() {\n\t_BOTTOM=\"\"\n\tfor seg in $___BRAINY_BOTTOM; do\n\t\tinfo=\"$(___brainy_prompt_\"${seg}\")\"\n\t\t[ -n \"${info}\" ] && ____brainy_bottom_parse \"${info}\"\n\tdone\n\tprintf \"\\n%s\" \"${_BOTTOM}\"\n}\n\n##############\n## Segments ##\n##############\n\n___brainy_prompt_user_info() {\n\tcolor=${bold_blue?}\n\tif [ \"${THEME_SHOW_SUDO}\" == \"true\" ]; then\n\t\tif sudo -vn 1> /dev/null 2>&1; then\n\t\t\tcolor=${bold_red?}\n\t\tfi\n\tfi\n\tbox=\"[|]\"\n\tinfo=\"\\u@\\H\"\n\tif [ -n \"${SSH_CLIENT}\" ]; then\n\t\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n\telse\n\t\tprintf \"%s|%s\" \"${color}\" \"${info}\"\n\tfi\n}\n\n___brainy_prompt_dir() {\n\tcolor=${bold_yellow?}\n\tbox=\"[|]\"\n\tinfo=\"\\w\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\n___brainy_prompt_scm() {\n\t[ \"${THEME_SHOW_SCM}\" != \"true\" ] && return\n\tcolor=${bold_green?}\n\tbox=\"$(scm_char) \"\n\tinfo=\"$(scm_prompt_info)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\n___brainy_prompt_python() {\n\t[ \"${THEME_SHOW_PYTHON}\" != \"true\" ] && return\n\tcolor=${bold_yellow?}\n\tbox=\"[|]\"\n\tinfo=\"$(python_version_prompt)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_blue?}\" \"${box}\"\n}\n\n___brainy_prompt_ruby() {\n\t[ \"${THEME_SHOW_RUBY}\" != \"true\" ] && return\n\tcolor=${bold_white?}\n\tbox=\"[|]\"\n\tinfo=\"rb-$(ruby_version_prompt)\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_red?}\" \"${box}\"\n}\n\n___brainy_prompt_todo() {\n\t[ \"${THEME_SHOW_TODO}\" != \"true\" ] \\\n\t\t|| [ -z \"$(which todo.sh)\" ] && return\n\tcolor=${bold_white?}\n\tbox=\"[|]\"\n\tinfo=\"t:$(todo.sh ls | grep -E \"TODO: [0-9]+ of ([0-9]+)\" | awk '{ print $4 }')\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_green?}\" \"${box}\"\n}\n\n___brainy_prompt_clock() {\n\t[ \"${THEME_SHOW_CLOCK}\" != \"true\" ] && return\n\tcolor=$THEME_CLOCK_COLOR\n\tbox=\"[|]\"\n\tinfo=\"$(date +\"${THEME_CLOCK_FORMAT}\")\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_purple?}\" \"${box}\"\n}\n\n___brainy_prompt_battery() {\n\t! _command_exists battery_percentage \\\n\t\t|| [ \"${THEME_SHOW_BATTERY}\" != \"true\" ] \\\n\t\t|| [ \"$(battery_percentage)\" = \"no\" ] && return\n\n\tinfo=$(battery_percentage)\n\tcolor=${bold_green?}\n\tif [ \"$info\" -lt 50 ]; then\n\t\tcolor=${bold_yellow?}\n\telif [ \"$info\" -lt 25 ]; then\n\t\tcolor=${bold_red?}\n\tfi\n\tbox=\"[|]\"\n\tac_adapter_connected && charging=\"+\"\n\tac_adapter_disconnected && charging=\"-\"\n\tinfo+=\"$charging\"\n\t[ \"$info\" == \"100+\" ] && info=\"AC\"\n\tprintf \"%s|%s|%s|%s\" \"${color}\" \"${info}\" \"${bold_white?}\" \"${box}\"\n}\n\n___brainy_prompt_exitcode() {\n\t[ \"${THEME_SHOW_EXITCODE}\" != \"true\" ] && return\n\tcolor=${bold_purple?}\n\t[ \"$exitcode\" -ne 0 ] && printf \"%s|%s\" \"${color}\" \"${exitcode}\"\n}\n\n___brainy_prompt_char() {\n\tcolor=${bold_white?}\n\tprompt_char=\"${__BRAINY_PROMPT_CHAR_PS1}\"\n\tprintf \"%s|%s\" \"${color}\" \"${prompt_char}\"\n}\n\n#########\n## cli ##\n#########\n\n__brainy_show() {\n\ttypeset _seg=${1:-}\n\tshift\n\texport \"THEME_SHOW_${_seg}\"=true\n}\n\n__brainy_hide() {\n\ttypeset _seg=${1:-}\n\tshift\n\texport \"THEME_SHOW_${_seg}\"=false\n}\n\n_brainy_completion() {\n\tlocal cur _action actions segments\n\tCOMPREPLY=()\n\tcur=\"${COMP_WORDS[COMP_CWORD]}\"\n\t_action=\"${COMP_WORDS[1]}\"\n\tactions=\"show hide\"\n\tsegments=\"battery clock exitcode python ruby scm sudo todo\"\n\tcase \"${_action}\" in\n\t\tshow | hide)\n\t\t\t# shellcheck disable=SC2207\n\t\t\tCOMPREPLY=($(compgen -W \"${segments}\" -- \"${cur}\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\n\t# shellcheck disable=SC2207\n\tCOMPREPLY=($(compgen -W \"${actions}\" -- \"${cur}\"))\n\treturn 0\n}\n\nbrainy() {\n\ttypeset action=${1:-}\n\tshift\n\ttypeset segs=${*:-}\n\ttypeset func\n\tcase $action in\n\t\tshow)\n\t\t\tfunc=__brainy_show\n\t\t\t;;\n\t\thide)\n\t\t\tfunc=__brainy_hide\n\t\t\t;;\n\tesac\n\tfor seg in ${segs}; do\n\t\tseg=$(printf \"%s\" \"${seg}\" | tr '[:lower:]' '[:upper:]')\n\t\t$func \"${seg}\"\n\tdone\n}\n\ncomplete -F _brainy_completion brainy\n\n###############\n## Variables ##\n###############\n\nexport SCM_THEME_PROMPT_PREFIX=\"\"\nexport SCM_THEME_PROMPT_SUFFIX=\"\"\n\nexport RBENV_THEME_PROMPT_PREFIX=\"\"\nexport RBENV_THEME_PROMPT_SUFFIX=\"\"\nexport RBFU_THEME_PROMPT_PREFIX=\"\"\nexport RBFU_THEME_PROMPT_SUFFIX=\"\"\nexport RVM_THEME_PROMPT_PREFIX=\"\"\nexport RVM_THEME_PROMPT_SUFFIX=\"\"\nexport VIRTUALENV_THEME_PROMPT_PREFIX=\"\"\nexport VIRTUALENV_THEME_PROMPT_SUFFIX=\"\"\n\nexport SCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nexport SCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\n\nTHEME_SHOW_SUDO=${THEME_SHOW_SUDO:-\"true\"}\nTHEME_SHOW_SCM=${THEME_SHOW_SCM:-\"true\"}\nTHEME_SHOW_RUBY=${THEME_SHOW_RUBY:-\"false\"}\nTHEME_SHOW_PYTHON=${THEME_SHOW_PYTHON:-\"false\"}\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_SHOW_TODO=${THEME_SHOW_TODO:-\"false\"}\nTHEME_SHOW_BATTERY=${THEME_SHOW_BATTERY:-\"false\"}\nTHEME_SHOW_EXITCODE=${THEME_SHOW_EXITCODE:-\"true\"}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${bold_white?}\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H:%M:%S\"}\n\n__BRAINY_PROMPT_CHAR_PS1=${THEME_PROMPT_CHAR_PS1:-\">\"}\n__BRAINY_PROMPT_CHAR_PS2=${THEME_PROMPT_CHAR_PS2:-\"\\\\\"}\n\n___BRAINY_TOP_LEFT=${___BRAINY_TOP_LEFT:-\"user_info dir scm\"}\n___BRAINY_TOP_RIGHT=${___BRAINY_TOP_RIGHT:-\"python ruby todo clock battery\"}\n___BRAINY_BOTTOM=${___BRAINY_BOTTOM:-\"exitcode char\"}\n\n############\n## Prompt ##\n############\n\n__brainy_ps1() {\n\tprintf \"%s%s%s\" \"$(____brainy_top)\" \"$(____brainy_bottom)\" \"${normal?}\"\n}\n\n__brainy_ps2() {\n\tcolor=${bold_white?}\n\tprintf \"%s%s%s\" \"${color}\" \"${__BRAINY_PROMPT_CHAR_PS2}  \" \"${normal?}\"\n}\n\n_brainy_prompt() {\n\texitcode=\"$?\"\n\n\tPS1=\"$(__brainy_ps1)\"\n\tPS2=\"$(__brainy_ps2)\"\n}\n\nsafe_append_prompt_command _brainy_prompt\n"
  },
  {
    "path": "themes/brunton/brunton.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\nfunction is_vim_shell() {\n\tif [[ -n \"${VIMRUNTIME:-}\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\nfunction prompt() {\n\tlocal SCM_PROMPT_FORMAT=' %s (%s)' clock_prompt battery_charge scm_prompt is_vim_shell\n\tclock_prompt=\"$(clock_prompt)\"\n\tbattery_charge=\"$(battery_charge)\"\n\tscm_prompt=\"$(scm_prompt)\"\n\tis_vim_shell=\"$(is_vim_shell)\"\n\tPS1=\"${white?}${background_blue?} \\u${normal?}${background_blue?}@${red?}${background_blue?}\\h ${clock_prompt} ${reset_color?}${normal?} ${battery_charge}\\n${bold_black?}${background_white?} \\w ${normal?}${scm_prompt}${is_vim_shell}\\n${white?}>${normal?} \"\n}\n\n: \"${THEME_CLOCK_COLOR:=${blue?}${background_white?}}\"\n: \"${THEME_CLOCK_FORMAT:=\" %H:%M:%S\"}\"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/candy/candy.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nfunction prompt_command() {\n\tlocal clock_prompt scm_prompt_info\n\tclock_prompt=\"$(clock_prompt)\"\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tPS1=\"${green?}\\u@\\h ${clock_prompt} ${reset_color?}${white?}\\w${reset_color?}${scm_prompt_info}${blue?} →${bold_blue?} ${reset_color?} ${normal?}\"\n}\n\n: \"${THEME_CLOCK_COLOR:=${blue?}}\"\n: \"${THEME_CLOCK_FORMAT:=\"%I:%M:%S\"}\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/clean/clean.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# git theming\nSCM_THEME_PROMPT_PREFIX=\"${bold_blue?}(${yellow?}\"\nSCM_THEME_PROMPT_SUFFIX=\"${bold_blue?})${reset_color?} \"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"${bold_red?}✗\"\n\n# LS colors, made with http://geoff.greer.fm/lscolors/\nexport LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\nexport LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'\n\nfunction prompt_command() {\n\tlocal no_color\n\tif [ \"$(whoami)\" = root ]; then\n\t\tno_color=${red?}\n\telse\n\t\tno_color=${white?}\n\tfi\n\n\tPS1=\"${no_color}\\u${reset_color?}:${blue?}\\W/${reset_color?} $(scm_prompt_info)${normal?}$ \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/codeword/codeword.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"${SCM_THEME_PROMPT_SUFFIX:-}\"\nSCM_THEME_PROMPT_DIRTY=\"${bold_red?} ✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\"${bold_green?} ✓${normal?}\"\nSCM_GIT_CHAR=\"${green?}±${normal?}\"\n\nfunction mark_prompt() {\n\techo \"${green?}\\$${normal?}\"\n}\n\nfunction user_host_path_prompt() {\n\tps_user=\"${green?}\\u${normal?}\"\n\tps_host=\"${blue?}\\H${normal?}\"\n\tps_path=\"${yellow?}\\w${normal?}\"\n\techo \"${ps_user?}@${ps_host?}:${ps_path?}\"\n}\n\nfunction prompt() {\n\tlocal SCM_PROMPT_FORMAT=' [%s%s]'\n\tPS1=\"$(user_host_path_prompt)$(virtualenv_prompt)$(scm_prompt) $(mark_prompt) \"\n}\n\nsafe_append_prompt_command '_save-and-reload-history 1'\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/cooperkid/cooperkid.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# ------------------------------------------------------------------#\n#          FILE: cooperkid.zsh-theme                                #\n#            BY: Alfredo Bejarano                                   #\n#      BASED ON: Mr Briggs by Matt Brigg (matt@mattbriggs.net)      #\n# ------------------------------------------------------------------#\n\nSCM_THEME_PROMPT_DIRTY=\"${red?} ✗${reset_color?}\"\nSCM_THEME_PROMPT_AHEAD=\"${yellow?} ↑${reset_color?}\"\nSCM_THEME_PROMPT_CLEAN=\"${green?} ✓${reset_color?}\"\nSCM_THEME_PROMPT_PREFIX=\" \"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nGIT_SHA_PREFIX=\"${blue?}\"\nGIT_SHA_SUFFIX=\"${reset_color?}\"\n\nfunction rvm_version_prompt {\n\tif which rvm &> /dev/null; then\n\t\trvm=$(rvm-prompt) || return\n\t\tif [ -n \"$rvm\" ]; then\n\t\t\techo -e \"$rvm\"\n\t\tfi\n\tfi\n}\n\nfunction git_short_sha() {\n\tSHA=$(git rev-parse --short HEAD 2> /dev/null) && echo \"$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX\"\n}\n\nfunction prompt() {\n\tlocal return_status=\"\"\n\tlocal ruby\n\truby=\"${red?}$(ruby_version_prompt)${reset_color?}\"\n\tlocal user_host=\"${green?}\\h @ \\w${reset_color?}\"\n\tlocal git_branch\n\tgit_branch=\"$(git_short_sha)${cyan?}$(scm_prompt_info)${reset_color?}\"\n\tlocal prompt_symbol=' '\n\tlocal prompt_char=\"${purple?}>_${reset_color?} \"\n\n\tPS1=\"\\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\\n${prompt_char}\"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/cupcake/cupcake.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Emoji-based theme to display source control management and\n# virtual environment info beside the ordinary bash prompt.\n\n# Theme inspired by:\n#  - Naming your Terminal tabs in OSX Lion - http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/\n#  - Bash_it sexy theme\n\n# Demo:\n# ┌ⓔ virtualenv 💁user @ 💻 host in 📁directory on 🌿branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗\n# └❯ cd .bash-it/themes/cupcake\n\n# virtualenv prompts\nVIRTUALENV_CHAR=\"ⓔ \"\nVIRTUALENV_THEME_PROMPT_PREFIX=\"\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"\"\n\n# SCM prompts\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=\"[±] \"\nSCM_GIT_BEHIND_CHAR=\"${red?}↓${normal?}\"\nSCM_GIT_AHEAD_CHAR=\"${bold_green?}↑${normal?}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${bold_yellow?}•${normal?}\"\nSCM_GIT_STAGED_CHAR=\"${bold_green?}+${normal?}\"\n\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# Git status prompts\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗${normal?}\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n# ICONS =======================================================================\n\nicon_start=\"┌\"\nicon_user=\"💁  \"\nicon_host=\" @ 💻  \"\nicon_directory=\" in 📁  \"\nicon_branch=\"🌿\"\nicon_end=\"└❯ \"\n\n# extra spaces ensure legiblity in prompt\n\n# FUNCTIONS ===================================================================\n\n# Display virtual environment info\nfunction virtualenv_prompt {\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tvirtualenv=$(basename \"$VIRTUAL_ENV\")\n\t\techo -e \"$VIRTUALENV_CHAR$virtualenv \"\n\tfi\n}\n\n# Rename tab\nfunction tabname {\n\tprintf \"\\e]1;%s\\a\" \"$1\"\n}\n\n# Rename window\nfunction winname {\n\tprintf \"\\e]2;%s\\a\" \"$1\"\n}\n\n# PROMPT OUTPUT ===============================================================\n\n# Displays the current prompt\nfunction prompt_command() {\n\tPS1=\"\\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_red?}\\u${normal?}${icon_host}${bold_cyan?}\\h${normal?}${icon_directory}${bold_purple?}\\W${normal?}\\$([[ -n \\$(git branch 2> /dev/null) ]] && echo \\\" on ${icon_branch}  \\\")${white?}$(scm_prompt_info)${normal?}\\n${icon_end}\"\n\tPS2=\"${icon_end}\"\n}\n\n# Runs prompt (this bypasses bash_it $PROMPT setting)\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/demula/demula.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Theme inspired on:\n#  - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n#  - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n#  - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n#  - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n#  - Bash_it modern theme\n#\n# Screenshot: http://goo.gl/VCmX5\n# by Jesus de Mula <jesus@demula.name>\n\n## For the real Monokai colors you should add these to your .XDefaults or\n## terminal configuration:\n## ! ----------------------------------------------------------- TERMINAL COLORS\n## ! monokai - http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/\n## *background: #272822\n## *foreground: #E2DA6E\n## *color0: black\n## ! mild red\n## *color1: #CD0000\n## ! light green\n## *color2: #A5E02D\n## ! orange (yellow)\n## *color3: #FB951F\n## ! \"dark\" blue\n## *color4: #076BCC\n## ! hot pink\n## *color5: #F6266C\n## ! cyan\n## *color6: #64D9ED\n## ! gray\n## *color7: #E5E5E5\n\n# ----------------------------------------------------------------- COLOR CONF\nD_DEFAULT_COLOR=\"${normal?}\"\nD_INTERMEDIATE_COLOR=\"${white?}\"\nD_USER_COLOR=\"${purple?}\"\nD_SUPERUSER_COLOR=\"${red?}\"\nD_MACHINE_COLOR=\"${cyan?}\"\nD_DIR_COLOR=\"${green?}\"\nD_SCM_COLOR=\"${yellow?}\"\nD_BRANCH_COLOR=\"${yellow?}\"\nD_CHANGES_COLOR=\"${white?}\"\nD_CMDFAIL_COLOR=\"${red?}\"\nD_VIMSHELL_COLOR=\"${cyan?}\"\n\n# ------------------------------------------------------------------ FUNCTIONS\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\033]0;\\w\\007\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nis_vim_shell() {\n\tif [ -n \"$VIMRUNTIME\" ]; then\n\t\techo \"${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}\\\nvim shell${D_DEFAULT_COLOR} \"\n\tfi\n}\n\nmitsuhikos_lastcommandfailed() {\n\tcode=$?\n\tif [ $code != 0 ]; then\n\t\techo \"${D_INTERMEDIATE_COLOR}exited ${D_CMDFAIL_COLOR}\\\n$code ${D_DEFAULT_COLOR}\"\n\tfi\n}\n\n# vcprompt for scm instead of bash_it default\ndemula_vcprompt() {\n\tif [ -n \"$VCPROMPT_EXECUTABLE\" ]; then\n\t\tlocal D_VCPROMPT_FORMAT=\"on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:\\\n${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}\"\n\t\t$VCPROMPT_EXECUTABLE -f \"$D_VCPROMPT_FORMAT\"\n\tfi\n}\n\n# -------------------------------------------------------------- PROMPT OUTPUT\nprompt() {\n\tlocal LAST_COMMAND_FAILED\n\tLAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)\n\tlocal SAVE_CURSOR='\\033[s'\n\tlocal RESTORE_CURSOR='\\033[u'\n\tlocal MOVE_CURSOR_RIGHTMOST='\\033[500C'\n\tlocal MOVE_CURSOR_5_LEFT='\\033[5D'\n\n\tif [[ \"$OSTYPE\" = 'linux'* ]]; then\n\t\tPS1=\"${TITLEBAR}${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\n$(battery_charge)${RESTORE_CURSOR}\\\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n\telse\n\t\tPS1=\"${TITLEBAR}\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h  ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\\\n$(battery_charge)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n\tfi\n\n\tPS2=\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n}\n\n# Runs prompt (this bypasses bash_it $PROMPT setting)\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/dos/dos.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\nPROMPT=\"\\w>>\"\n"
  },
  {
    "path": "themes/doubletime/doubletime.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC2154\n\nSCM_THEME_PROMPT_DIRTY=''\nSCM_THEME_PROMPT_CLEAN=''\nSCM_GIT_CHAR=\"${bold_cyan?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nif [[ -n \"$RVM_THEME_PROMPT_COLOR\" ]]; then\n\tRVM_THEME_PROMPT_COLOR=$(eval \"echo $$(echo ${RVM_THEME_PROMPT_COLOR})\")\nelse\n\tRVM_THEME_PROMPT_COLOR=\"${red?}\"\nfi\nRVM_THEME_PROMPT_PREFIX=\"(${RVM_THEME_PROMPT_COLOR}rb${normal?}: \"\nRVM_THEME_PROMPT_SUFFIX=\") \"\nif [[ -n \"$VIRTUALENV_THEME_PROMPT_COLOR\" ]]; then\n\tVIRTUALENV_THEME_PROMPT_COLOR=$(eval \"echo $$(echo ${VIRTUALENV_THEME_PROMPT_COLOR})\")\nelse\n\tVIRTUALENV_THEME_PROMPT_COLOR=\"${green?}\"\nfi\nVIRTUALENV_THEME_PROMPT_PREFIX=\"(${VIRTUALENV_THEME_PROMPT_COLOR}py${normal?}: \"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\") \"\n\nif [[ -n \"$THEME_PROMPT_HOST_COLOR\" ]]; then\n\tTHEME_PROMPT_HOST_COLOR=$(eval \"echo $$(echo ${THEME_PROMPT_HOST_COLOR})\")\nelse\n\tTHEME_PROMPT_HOST_COLOR=\"${blue?}\"\nfi\n\nfunction prompt_setter() {\n\t# Save history\n\t_save-and-reload-history 1\n\tPS1=\"\n$(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\\u@${THEME_PROMPT_HOST}${reset_color?}] $(virtualenv_prompt)$(ruby_version_prompt)\\w\n$(scm_prompt)${reset_color?} $ \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n"
  },
  {
    "path": "themes/doubletime_multiline/doubletime_multiline.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nsource \"$BASH_IT/themes/doubletime/doubletime.theme.bash\"\n\nfunction prompt_setter() {\n\t# Save history\n\t_save-and-reload-history 1\n\tPS1=\"\n$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\\u@${THEME_PROMPT_HOST}${reset_color?}] $(virtualenv_prompt)$(ruby_version_prompt)\n\\w\n$(scm_prompt)${reset_color?} $ \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n"
  },
  {
    "path": "themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nsource \"$BASH_IT/themes/doubletime/doubletime.theme.bash\"\n\nfunction prompt_setter() {\n\t# Save history\n\t_save-and-reload-history 1\n\tPS1=\"\n$(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\\u@${THEME_PROMPT_HOST}${reset_color?}] $(virtualenv_prompt)\n\\w\n$(scm_prompt)${reset_color?} $ \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n"
  },
  {
    "path": "themes/dulcie/dulcie.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Simplistic one-liner theme to display source control management info beside\n# the ordinary Linux bash prompt.\n#\n# Demo:\n#\n# [ritola@localhost ~]$ cd .bash-it/themes/dulcie\n# [ritola@localhost |master ✓| dulcie]$ # This is single line mode\n# |bash-it|± master ✓|\n# [ritola@localhost dulcie]$ # In multi line, the SCM info is in the separate line\n#\n# Configuration. Change these by adding them in your .bash_profile\n\nDULCIE_COLOR=${DULCIE_COLOR:=1}         # 0 = monochrome, 1 = colorful\nDULCIE_MULTILINE=${DULCIE_MULTILINE:=1} # 0 = Single line, 1 = SCM in separate line\n\ndulcie_color() {\n\techo -en \"\\[\\e[38;5;${1}m\\]\"\n}\n\ndulcie_background() {\n\techo -en \"\\[\\e[48;5;${1}m\\]\"\n}\n\ndulcie_prompt() {\n\tcolor_user_root=$(dulcie_color 169)\n\tcolor_user_nonroot=\"${green?}\"\n\tcolor_host_local=$(dulcie_color 230)\n\tcolor_host_remote=$(dulcie_color 214)\n\tcolor_rootdir=$(dulcie_color 117)\n\tcolor_workingdir=$(dulcie_color 117)\n\tbackground_scm=$(dulcie_background 238)\n\n\tSCM_THEME_ROOT_SUFFIX=\"|$(scm_char) \"\n\n\t# Set colors\n\tif [ \"${DULCIE_COLOR}\" -eq \"1\" ]; then\n\t\tif [[ $EUID -ne 0 ]]; then\n\t\t\tcolor_user=\"${color_user_nonroot}\"\n\t\telse\n\t\t\tcolor_user=\"${color_user_root}\"\n\t\tfi\n\n\t\tif [[ -n \"${SSH_CLIENT}\" ]]; then\n\t\t\tcolor_host=\"${color_host_remote}\"\n\t\telse\n\t\t\tcolor_host=\"${color_host_local}\"\n\t\tfi\n\n\t\tDULCIE_USER=\"${color_user?}\\u${reset_color?}\"\n\t\tDULCIE_HOST=\"${color_host?}\\h${reset_color?}\"\n\t\tDULCIE_WORKINGDIR=\"${color_workingdir?}\\W${reset_color?}\"\n\t\tDULCIE_PROMPTCHAR=\"${color_user?}\"'\\$'\"${reset_color?}\"\n\n\t\tSCM_THEME_PROMPT_DIRTY=\" ${red?}✗${reset_color?}\"\n\t\tSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\n\t\tDULCIE_SCM_BACKGROUND=\"${background_scm}\"\n\t\tDULCIE_SCM_DIR_COLOR=\"${color_rootdir}\"\n\t\tSCM_THEME_ROOT_SUFFIX=\"${reset_color?}${SCM_THEME_ROOT_SUFFIX}\"\n\t\tSCM_THEME_PROMPT_DIRTY=\" $(dulcie_color 1)✗${reset_color?}\"\n\t\tSCM_THEME_PROMPT_CLEAN=\" $(dulcie_color 10)✓${reset_color?}\"\n\telse\n\t\tDULCIE_USER='\\u'\n\t\tDULCIE_HOST='\\h'\n\t\tDULCIE_WORKINGDIR='\\W'\n\t\tDULCIE_PROMPTCHAR='\\$'\n\n\t\tDULCIE_SCM_BACKGROUND=\"\"\n\t\tDULCIE_SCM_DIR_COLOR=\"\"\n\t\tSCM_THEME_DIR_COLOR=\"\"\n\t\tSCM_THEME_PROMPT_DIRTY=\" ✗\"\n\t\tSCM_THEME_PROMPT_CLEAN=\" ✓\"\n\tfi\n\n\t# Change terminal title\n\tprintf \"\\033]0;%s@%s:%s\\007\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/\\~}\"\n\n\t# Open the new terminal in the same directory\n\t_is_function __vte_osc7 && __vte_osc7\n\n\tPS1=\"${reset_color?}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${reset_color?} ${DULCIE_WORKINGDIR}]\"\n\tif [[ \"${DULCIE_MULTILINE}\" -eq \"1\" ]]; then\n\t\tPS1=\"${reset_color?}[${DULCIE_USER}@${DULCIE_HOST}${reset_color?} ${DULCIE_WORKINGDIR}]\"\n\t\tif [[ \"$(scm_prompt_info)\" ]]; then\n\t\t\tSCM_THEME_PROMPT_PREFIX=\"${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}\"\n\t\t\tSCM_THEME_PROMPT_SUFFIX=\"|${normal?}\"\n\t\t\tPS1=\"$(scm_prompt_info)\\n${PS1}\"\n\t\tfi\n\telse\n\t\tSCM_THEME_PROMPT_PREFIX=\" ${DULCIE_SCM_BACKGROUND}|${DULCIE_SCM_DIR_COLOR}\"\n\t\tSCM_THEME_PROMPT_SUFFIX=\"|${normal?}\"\n\t\tPS1=\"${reset_color?}[${DULCIE_USER}@${DULCIE_HOST}$(scm_prompt_info)${reset_color?} ${DULCIE_WORKINGDIR}]\"\n\tfi\n\tPS1=\"${PS1}${DULCIE_PROMPTCHAR} \"\n}\n\nsafe_append_prompt_command dulcie_prompt\n"
  },
  {
    "path": "themes/duru/duru.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"${cyan?} on ${green?}\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nSCM_THEME_PROMPT_DIRTY=\" ${red?}with changes\"\nSCM_THEME_PROMPT_CLEAN=\"\"\n\nvenv() {\n\tif [ -n \"$VIRTUAL_ENV\" ]; then\n\t\tlocal env=$VIRTUAL_ENV\n\t\techo \"${gray?} in ${orange?}${env##*/} \"\n\tfi\n}\n\nlast_two_dirs() {\n\t# shellcheck disable=SC2001\n\tpwd | rev | awk -F / '{print $1,$2}' | rev | sed s_\\ _/_ | sed \"s|$(sed 's,\\/,,' <<< \"$HOME\")|~|g\"\n}\n\nprompt() {\n\tPS1=\"${yellow?}# ${reset_color?}$(last_two_dirs)$(scm_prompt_info)${reset_color?}$(venv)${reset_color?} ${cyan?}\\n> ${reset_color?}\"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/easy/easy.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"${bold_green?}[ ${normal?}\"\nSCM_THEME_PROMPT_SUFFIX=\"${bold_green?} ] \"\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\n\nfunction prompt_command() {\n\tlocal scm_prompt_info\n\tif [ \"${USER:-${LOGNAME?}}\" = root ]; then\n\t\tcursor_color=\"${bold_red?}\"\n\t\tuser_color=\"${green?}\"\n\telse\n\t\tcursor_color=\"${bold_green?}\"\n\t\tuser_color=\"${white?}\"\n\tfi\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tPS1=\"${user_color}\\u${normal?}@${white?}\\h ${bold_black?}\\w\\n${reset_color?}${scm_prompt_info}${cursor_color}❯ ${normal?}\"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/elixr/elixr.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${green?}| \"\nSCM_THEME_PROMPT_SUFFIX=\"${green?} |\"\nSCM_NONE_CHAR='◐ '\nSCM_GIT_SHOW_MINIMAL_INFO=true\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\" d|\"\n\nBOLD=\"\\[\\e[1m\\]\"\n\nfunction prompt_command() {\n\tPS1=\"\\n${bold_cyan?}$(scm_prompt_char_info)$(virtualenv_prompt) ${bold_cyan?}\\w :${reset_color?}${normal?}${BOLD} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/emperor/emperor.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction get_hour_color {\n\thour_color=${red?}\n\tmin=$(date +%M)\n\tif [ \"$min\" -lt \"15\" ]; then\n\t\thour_color=${white?}\n\telif [ \"$min\" -lt \"30\" ]; then\n\t\thour_color=${green?}\n\telif [ \"$min\" -lt \"45\" ]; then\n\t\thour_color=${yellow?}\n\telse\n\t\thour_color=${red?}\n\tfi\n\techo \"$hour_color\"\n}\n\n__emperor_clock() {\n\tTHEME_CLOCK_COLOR=$(get_hour_color)\n\tclock_prompt\n}\n\nfunction prompt_command() {\n\tPS1=\"\\n$(__emperor_clock)${purple?}\\h ${reset_color?}in ${prompt_color?}\\w\\n${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info) ${green?}→${reset_color?} \"\n}\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%H \"}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/envy/envy.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\"${green?}ⓔ  \"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"\"\n\nfunction prompt_command() {\n\tPS1=\"\\n$(virtualenv_prompt)${yellow?}$(ruby_version_prompt) ${purple?}\\h ${reset_color?}in ${green?}\\w\\n${bold_cyan?}$(scm_char)${green?}$(scm_prompt_info) ${green?}→${reset_color?} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/essential/essential.theme.bash",
    "content": "# shellcheck shell=bash\n\nfunction _user-prompt() {\n\tlocal -r user='\\u'\n\n\tif [[ \"${EUID}\" -eq 0 ]]; then\n\t\t# Privileged users:\n\t\tlocal -r user_color=\"${bold_red?}\"\n\telse\n\t\t# Standard users:\n\t\tlocal -r user_color=\"${bold_green?}\"\n\tfi\n\n\t# Print the current user's name (colored according to their current EUID):\n\tprintf '%b%s%b' \"${user_color}\" \"${user}\" \"${normal?}\"\n}\n\nfunction _host-prompt() {\n\tlocal -r host='\\h'\n\n\t# Check whether or not $SSH_TTY is set:\n\tif [[ -z \"${SSH_TTY:-}\" ]]; then\n\t\t# For local hosts, set the host's prompt color to blue:\n\t\tlocal -r host_color=\"${bold_blue?}\"\n\telse\n\t\t# For remote hosts, set the host's prompt color to red:\n\t\tlocal -r host_color=\"${bold_red?}\"\n\tfi\n\n\t# Print the current hostname (colored according to $SSH_TTY's status):\n\tprintf '%b%s%b' \"${host_color}\" \"${host}\" \"${normal?}\"\n}\n\nfunction _user-at-host-prompt() {\n\t# Concatenate the user and host prompts into: user@host:\n\t_user-prompt\n\tprintf '%b@' \"${bold_white?}\"\n\t_host-prompt\n}\n\nfunction _exit-status-prompt() {\n\tlocal -r prompt_string=\"${1}\"\n\tlocal -r exit_status=\"${2}\"\n\n\t# Check the exit status of the last command captured by $exit_status:\n\tif [[ \"${exit_status}\" -eq 0 ]]; then\n\t\t# For commands that return an exit status of zero, set the exit status's\n\t\t# notifier to green:\n\t\tlocal -r exit_status_color=\"${bold_green?}\"\n\telse\n\t\t# For commands that return a non-zero exit status, set the exit status's\n\t\t# notifier to red:\n\t\tlocal -r exit_status_color=\"${bold_red?}\"\n\tfi\n\n\tif [[ \"${prompt_string}\" -eq 1 ]]; then\n\t\t# $PS1:\n\t\tprintf '%b +%b' \"${exit_status_color}\" \"${normal?} \"\n\telif [[ \"${prompt_string}\" -eq 2 ]]; then\n\t\t# $PS2:\n\t\tprintf '%b |%b' \"${exit_status_color}\" \"${normal?} \"\n\telse\n\t\t# Default:\n\t\tprintf '%b ?%b' \"${exit_status_color}\" \"${normal?} \"\n\tfi\n}\n\nfunction _ps1() {\n\tlocal -r time='\\t'\n\tlocal -r pwd='\\w'\n\n\tprintf '%b%s ' \"${bold_white?}\" \"${time}\"\n\t_user-at-host-prompt\n\tprintf '%b:%b%s\\n' \"${bold_white?}\" \"${normal?}\" \"${pwd}\"\n\t_exit-status-prompt 1 \"${exit_status}\"\n}\n\nfunction _ps2() {\n\t_exit-status-prompt 2 \"${exit_status}\"\n}\n\nfunction prompt_command() {\n\t# Capture the exit status of the last command:\n\tlocal -r exit_status=\"${?}\"\n\n\t# Build the $PS1 prompt:\n\tPS1=\"$(_ps1)\"\n\n\t# Build the $PS2 prompt:\n\tPS2=\"$(_ps2)\"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/font/font.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n#\n# One line prompt showing the following configurable information\n# for git:\n# time (virtual_env) username@hostname pwd git_char|git_branch git_dirty_status|→\n#\n# The → arrow shows the exit status of the last command:\n# - bold green: 0 exit status\n# - bold red: non-zero exit status\n#\n# Example outside git repo:\n# 07:45:05 user@host ~ →\n#\n# Example inside clean git repo:\n# 07:45:05 user@host .bash_it ±|master|→\n#\n# Example inside dirty git repo:\n# 07:45:05 user@host .bash_it ±|master ✗|→\n#\n# Example with virtual environment:\n# 07:45:05 (venv) user@host ~ →\n#\n\nSCM_NONE_CHAR=''\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"${green?}|\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\nSCM_GIT_SHOW_MINIMAL_INFO=true\n\nCLOCK_THEME_PROMPT_PREFIX=''\nCLOCK_THEME_PROMPT_SUFFIX=' '\nTHEME_SHOW_CLOCK=false\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${bold_blue?}\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%I:%M:%S\"}\n\nTHEME_SHOW_USER_HOST=true\nUSER_HOST_THEME_PROMPT_PREFIX=\"${bold_black?}\"\nUSER_HOST_THEME_PROMPT_SUFFIX=\" \"\n\nVIRTUALENV_THEME_PROMPT_PREFIX='('\nVIRTUALENV_THEME_PROMPT_SUFFIX=') '\n\nfunction prompt_command() {\n\t# This needs to be first to save last command return code\n\tlocal RC=\"$?\"\n\n\thostname=\"${bold_black?}\\u@\\h\"\n\tvirtualenv=\"${white?}$(virtualenv_prompt)\"\n\n\t# Set return status color\n\tif [[ ${RC} == 0 ]]; then\n\t\tret_status=\"${bold_green?}\"\n\telse\n\t\tret_status=\"${bold_red?}\"\n\tfi\n\n\t# Append new history lines to history file\n\thistory -a\n\n\tPS1=\"$(clock_prompt)${virtualenv}$(user_host_prompt)${bold_cyan?}\\W $(scm_prompt_char_info)${ret_status}→ ${normal?}\"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/gallifrey/gallifrey.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"${yellow?}(\"\nSCM_THEME_PROMPT_SUFFIX=\")${normal?}\"\n\nSCM_THEME_PROMPT_DIRTY=\"*\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_GIT_CHAR=\"${green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n### TODO: openSUSE has already colors enabled, check if those differs from stock\n# LS colors, made with http://geoff.greer.fm/lscolors/\n# export LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\n# export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'\n\ngallifrey_prompt() {\n\tSCM_PROMPT_FORMAT='%s%s'\n\n\tps_host=\"${green?}\\h${normal?}\"\n\tps_user_mark=\"${bold?}\\$${normal?}\"\n\tps_root_mark=\"${normal?}§\"\n\tps_path=\"${normal?}\\w\"\n\n\t# make it work\n\tcase $(id -u) in\n\t\t0)\n\t\t\tPS1=\"$ps_host $ps_path $(scm_prompt)$ps_root_mark \"\n\t\t\t;;\n\t\t*)\n\t\t\tPS1=\"$ps_host $ps_path $(scm_prompt)$ps_user_mark \"\n\t\t\t;;\n\tesac\n}\n\nsafe_append_prompt_command gallifrey_prompt\n"
  },
  {
    "path": "themes/githelpers.theme.bash",
    "content": "# shellcheck shell=bash\n\nfunction _git-symbolic-ref() {\n\tgit symbolic-ref -q HEAD 2> /dev/null\n}\n\n# When on a branch, this is often the same as _git-commit-description,\n# but this can be different when two branches are pointing to the\n# same commit. _git-branch is used to explicitly choose the checked-out\n# branch.\nfunction _git-branch() {\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\tif [[ -n \"${VCS_STATUS_LOCAL_BRANCH:-}\" ]]; then\n\t\t\techo \"${VCS_STATUS_LOCAL_BRANCH}\"\n\t\telse\n\t\t\treturn 1\n\t\tfi\n\telse\n\t\tgit symbolic-ref -q --short HEAD 2> /dev/null || return 1\n\tfi\n}\n\nfunction _git-tag() {\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\tif [[ -n \"${VCS_STATUS_TAG:-}\" ]]; then\n\t\t\techo \"${VCS_STATUS_TAG}\"\n\t\tfi\n\telse\n\t\tgit describe --tags --exact-match 2> /dev/null\n\tfi\n}\n\nfunction _git-commit-description() {\n\tgit describe --contains --all 2> /dev/null\n}\n\nfunction _git-short-sha() {\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\techo \"${VCS_STATUS_COMMIT:0:7}\"\n\telse\n\t\tgit rev-parse --short HEAD\n\tfi\n}\n\n# Try the checked-out branch first to avoid collision with branches pointing to the same ref.\nfunction _git-friendly-ref() {\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\t_git-branch || _git-tag || _git-short-sha # there is no tag based describe output in gitstatus\n\telse\n\t\t_git-branch || _git-tag || _git-commit-description || _git-short-sha\n\tfi\n}\n\nfunction _git-num-remotes() {\n\tgit remote | wc -l\n}\n\nfunction _git-upstream() {\n\tlocal ref\n\tref=\"$(_git-symbolic-ref)\" || return 1\n\tgit for-each-ref --format=\"%(upstream:short)\" \"${ref}\"\n}\n\nfunction _git-upstream-remote() {\n\tlocal upstream branch\n\tupstream=\"$(_git-upstream)\" || return 1\n\n\tbranch=\"$(_git-upstream-branch)\" || return 1\n\techo \"${upstream%\"/${branch}\"}\"\n}\n\nfunction _git-upstream-branch() {\n\tlocal ref\n\tref=\"$(_git-symbolic-ref)\" || return 1\n\n\t# git versions < 2.13.0 do not support \"strip\" for upstream format\n\t# regex replacement gives the wrong result for any remotes with slashes in the name,\n\t# so only use when the strip format fails.\n\tgit for-each-ref --format=\"%(upstream:strip=3)\" \"${ref}\" 2> /dev/null || git for-each-ref --format=\"%(upstream)\" \"${ref}\" | sed -e \"s/.*\\/.*\\/.*\\///\"\n}\n\nfunction _git-upstream-behind-ahead() {\n\tgit rev-list --left-right --count \"$(_git-upstream)...HEAD\" 2> /dev/null\n}\n\nfunction _git-upstream-branch-gone() {\n\t[[ \"$(git status -s -b | sed -e 's/.* //')\" == \"[gone]\" ]]\n}\n\nfunction _git-hide-status() {\n\t[[ \"$(git config --get bash-it.hide-status)\" == \"1\" ]]\n}\n\nfunction _git-status() {\n\tlocal git_status_flags=\n\tif [[ \"${SCM_GIT_IGNORE_UNTRACKED:-}\" == \"true\" ]]; then\n\t\tgit_status_flags='-uno'\n\tfi\n\tgit status --porcelain \"${git_status_flags:---}\" 2> /dev/null\n}\n\nfunction _git-status-counts() {\n\t_git-status | awk '\n  BEGIN {\n    untracked=0;\n    unstaged=0;\n    staged=0;\n  }\n  {\n    if ($0 ~ /^\\?\\? .+/) {\n      untracked += 1\n    } else {\n      if ($0 ~ /^.[^ ] .+/) {\n        unstaged += 1\n      }\n      if ($0 ~ /^[^ ]. .+/) {\n        staged += 1\n      }\n    }\n  }\n  END {\n    print untracked \"\\t\" unstaged \"\\t\" staged\n  }'\n}\n\nfunction _git-remote-info() {\n\tlocal same_branch_name=\"\" branch_prefix\n\t# prompt handling only, reimplement because patching the routine below gets ugly\n\tif [[ \"${SCM_GIT_GITSTATUS_RAN:-}\" == \"true\" ]]; then\n\t\t[[ \"${VCS_STATUS_REMOTE_NAME?}\" == \"\" ]] && return\n\t\t[[ \"${VCS_STATUS_LOCAL_BRANCH?}\" == \"${VCS_STATUS_REMOTE_BRANCH?}\" ]] && same_branch_name=true\n\t\t# no multiple remote support in gitstatusd\n\t\tif [[ \"${SCM_GIT_SHOW_REMOTE_INFO:-}\" == \"true\" || \"${SCM_GIT_SHOW_REMOTE_INFO:-}\" == \"auto\" ]]; then\n\t\t\tif [[ ${same_branch_name:-} != \"true\" ]]; then\n\t\t\t\tremote_info=\"${VCS_STATUS_REMOTE_NAME?}/${VCS_STATUS_REMOTE_BRANCH?}\"\n\t\t\telse\n\t\t\t\tremote_info=\"${VCS_STATUS_REMOTE_NAME?}\"\n\t\t\tfi\n\t\telif [[ ${same_branch_name:-} != \"true\" ]]; then\n\t\t\tremote_info=\"${VCS_STATUS_REMOTE_BRANCH?}\"\n\t\tfi\n\t\tif [[ -n \"${remote_info:-}\" ]]; then\n\t\t\t# no support for gone remote branches in gitstatusd\n\t\t\tbranch_prefix=\"${SCM_THEME_BRANCH_TRACK_PREFIX:-}\"\n\t\t\techo \"${branch_prefix}${remote_info:-}\"\n\t\tfi\n\telse\n\t\t[[ \"$(_git-upstream)\" == \"\" ]] && return\n\n\t\t[[ \"$(_git-branch)\" == \"$(_git-upstream-branch)\" ]] && same_branch_name=true\n\t\tif [[ (\"${SCM_GIT_SHOW_REMOTE_INFO}\" == \"auto\" && \"$(_git-num-remotes)\" -ge 2) ||\n\t\t\"${SCM_GIT_SHOW_REMOTE_INFO}\" == \"true\" ]]; then\n\t\t\tif [[ ${same_branch_name:-} != \"true\" ]]; then\n\t\t\t\t# shellcheck disable=SC2016\n\t\t\t\tremote_info='$(_git-upstream)'\n\t\t\telse\n\t\t\t\tremote_info=\"$(_git-upstream-remote)\"\n\t\t\tfi\n\t\telif [[ ${same_branch_name:-} != \"true\" ]]; then\n\t\t\t# shellcheck disable=SC2016\n\t\t\tremote_info='$(_git-upstream-branch)'\n\t\tfi\n\t\tif [[ -n \"${remote_info:-}\" ]]; then\n\t\t\tlocal branch_prefix\n\t\t\tif _git-upstream-branch-gone; then\n\t\t\t\tbranch_prefix=\"${SCM_THEME_BRANCH_GONE_PREFIX:-}\"\n\t\t\telse\n\t\t\t\tbranch_prefix=\"${SCM_THEME_BRANCH_TRACK_PREFIX:-}\"\n\t\t\tfi\n\t\t\techo \"${branch_prefix}${remote_info:-}\"\n\t\tfi\n\tfi\n}\n"
  },
  {
    "path": "themes/gitline/gitline.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck source-path=SCRIPTDIR/../gitline\nsource \"${BASH_IT?}/themes/gitline/powerline.base.bash\"\n\n#For the logo(Uncomment if you want a logo before your name)\n#PROMPT_DISTRO_LOGO=\"💻\"\nPROMPT_DISTRO_LOGO_COLOR=15\nPROMPT_DISTRO_LOGO_COLORBG=52\n\n#Prompt Seperator Charactors\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\n: \"${POWERLINE_LEFT_SEPARATOR:=\"\"}\"\n\n#USER INFO CHARACTERS\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_SUDO_CHAR=${POWERLINE_USER_INFO_SUDO_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=91\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=1\n\n#PYTHON VENV\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\" \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=17\n\n#GIT Prompt Symbols\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:=\"☿ \"}\nSCM_THEME_PROMPT_CLEAN=\" ✓ \"\nSCM_THEME_PROMPT_DIRTY=\" ⨯ \"\nSCM_THEME_PROMPT_COLOR=91\nSCM_THEME_PROMPT_CLEAN_COLOR=41\nSCM_THEME_PROMPT_DIRTY_COLOR=94\nSCM_THEME_PROMPT_STAGED_COLOR=220 #52\nSCM_THEME_PROMPT_UNSTAGED_COLOR=81\n\n#Ruby Prompt Symbols\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nCWD_THEME_DIR_SEPARATOR=\"\"\nCWD_THEME_DIR_SEPARATOR_COLOR=52\nCWD_THEME_PROMPT_COLOR=252\n\nHOST_THEME_PROMPT_COLOR=88\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\n\n#Clock\nCLOCK_THEME_PROMPT_COLOR=240\n\n#For Battery Plugin\n: \"${BATTERY_AC_CHAR:=\"⚡\"}\"\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\n: \"${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\"\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=125\nIN_TOOLBOX_THEME_PROMPT_TEXT=\"⬢ \"\n\n: \"${POWERLINE_PROMPT:=\"user_info scm python_venv ruby node cwd\"}\"\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/gitline/powerline.base.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n#To set color for foreground and background\nfunction set_color() {\n\tlocal fg='' bg=''\n\tif [[ \"${1:-}\" != \"-\" ]]; then\n\t\tfg=\"38;5;${1}\"\n\tfi\n\tif [[ \"${2:-}\" != \"-\" ]]; then\n\t\tbg=\"48;5;${2}\"\n\t\t[[ -n \"${fg}\" ]] && bg=\";${bg}\"\n\tfi\n\techo -e \"\\[\\033[${fg}${bg}m\\]\"\n}\n\n#Customising User Info Segment\nfunction __powerline_user_info_prompt() {\n\tlocal user_info=\"${SHORT_USER:-${USER}}\"\n\tlocal color=${USER_INFO_THEME_PROMPT_COLOR-${POWERLINE_USER_INFO_COLOR-\"32\"}}\n\tlocal -i fg_color=15\n\n\tif [[ \"${THEME_CHECK_SUDO:-false}\" == true ]]; then\n\t\tif sudo -vn 2> /dev/null; then\n\t\t\tcolor=${USER_INFO_THEME_PROMPT_COLOR_SUDO-${POWERLINE_USER_INFO_COLOR_SUDO-\"202\"}}\n\t\tfi\n\tfi\n\n\tcase \"${POWERLINE_PROMPT_USER_INFO_MODE:-}\" in\n\t\t\"sudo\")\n\t\t\tif [[ \"${color}\" == \"${USER_INFO_THEME_PROMPT_COLOR_SUDO?}\" ]]; then\n\t\t\t\tuser_info=\"👑 ${USER}\"\n\t\t\t\tfg_color=227\n\t\t\tfi\n\t\t\t;;\n\t\t*)\n\t\t\tif [[ -n \"${SSH_CLIENT:-}\" ]] || [[ -n \"${SSH_CONNECTION:-}\" ]]; then\n\t\t\t\tuser_info=\"${USER_INFO_SSH_CHAR-${POWERLINE_USER_INFO_SSH_CHAR-\"⌁ \"}}${user_info}\"\n\t\t\tfi\n\t\t\t;;\n\tesac\n\techo \"${user_info}|${color}|${fg_color}\"\n}\n\nfunction __powerline_terraform_prompt() {\n\tlocal terraform_workspace=\"\"\n\n\tif [[ -d .terraform ]]; then\n\t\tterraform_workspace=\"$(terraform_workspace_prompt)\"\n\t\t[[ -n \"${terraform_workspace}\" ]] && echo \"${TERRAFORM_CHAR-${POWERLINE_TERRAFORM_CHAR-\"❲t❳ \"}}${terraform_workspace}|${TERRAFORM_THEME_PROMPT_COLOR-${POWERLINE_TERRAFORM_COLOR-\"161\"}}\"\n\tfi\n}\n\nfunction __powerline_gcloud_prompt() {\n\tlocal active_gcloud_account=\"\"\n\n\tactive_gcloud_account=\"$(active_gcloud_account_prompt)\"\n\t[[ -n \"${active_gcloud_account}\" ]] && echo \"${GCLOUD_CHAR-${POWERLINE_GCLOUD_CHAR-\"❲G❳ \"}}${active_gcloud_account}|${GCLOUD_THEME_PROMPT_COLOR-${POWERLINE_GCLOUD_COLOR-\"161\"}}\"\n}\n\nfunction __powerline_node_prompt() {\n\tlocal node_version=\"\"\n\n\tnode_version=\"$(node_version_prompt)\"\n\t[[ -n \"${node_version}\" ]] && echo \"${NODE_CHAR-${POWERLINE_NODE_CHAR-=\"❲n❳ \"}}${node_version}|${NODE_THEME_PROMPT_COLOR-${POWERLINE_NODE_COLOR-\"22\"}}\"\n}\n\n#Customising Ruby Prompt\nfunction __powerline_ruby_prompt() {\n\tlocal ruby_version\n\tlocal -i fg_color=206\n\n\tif _command_exists rvm; then\n\t\truby_version=\"$(rvm_version_prompt)\"\n\telif _command_exists rbenv; then\n\t\truby_version=$(rbenv_version_prompt)\n\tfi\n\n\tif [[ -n \"${ruby_version:-}\" ]]; then\n\t\techo \"${RUBY_CHAR?}${ruby_version}|${RUBY_THEME_PROMPT_COLOR?}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_k8s_context_prompt() {\n\tlocal kubernetes_context=\"\"\n\n\tif _command_exists kubectl; then\n\t\tkubernetes_context=\"$(k8s_context_prompt)\"\n\tfi\n\n\t[[ -n \"${kubernetes_context}\" ]] && echo \"${KUBERNETES_CONTEXT_THEME_CHAR-${POWERLINE_KUBERNETES_CONTEXT_CHAR-\"⎈ \"}}${kubernetes_context}|${KUBERNETES_CONTEXT_THEME_PROMPT_COLOR-${POWERLINE_KUBERNETES_CONTEXT_COLOR-\"26\"}}\"\n}\n\nfunction __powerline_k8s_namespace_prompt() {\n\tlocal kubernetes_namespace=\"\"\n\n\tif _command_exists kubectl; then\n\t\tkubernetes_namespace=\"$(k8s_namespace_prompt)\"\n\tfi\n\n\t[[ -n \"${kubernetes_namespace}\" ]] && echo \"${KUBERNETES_NAMESPACE_THEME_CHAR-${POWERLINE_KUBERNETES_NAMESPACE_CHAR-\"⎈ \"}}${kubernetes_namespace}|${KUBERNETES_NAMESPACE_THEME_PROMPT_COLOR-${POWERLINE_KUBERNETES_NAMESPACE_COLOR-\"60\"}}\"\n}\n\n#Customising Python (venv) Prompt\nfunction __powerline_python_venv_prompt() {\n\tlocal python_venv=\"\"\n\tlocal -i fg_color=206\n\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\tpython_venv=\"${CONDA_DEFAULT_ENV}\"\n\t\tlocal PYTHON_VENV_CHAR=${CONDA_PYTHON_VENV_CHAR-${POWERLINE_CONDA_PYTHON_VENV_CHAR-\"ⓔ \"}}\n\telif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tpython_venv=\"${VIRTUAL_ENV##*/}\"\n\tfi\n\n\t[[ -n \"${python_venv}\" ]] && echo \"${PYTHON_VENV_CHAR?}${python_venv}|${PYTHON_VENV_THEME_PROMPT_COLOR?}|${fg_color}\"\n}\n\n#Customising SCM(GIT) Prompt\nfunction __powerline_scm_prompt() {\n\tlocal color=\"\"\n\tlocal scm_prompt=\"\"\n\tlocal -i fg_color=206\n\n\tscm_prompt_vars\n\n\tif [[ \"${SCM_NONE_CHAR?}\" != \"${SCM_CHAR?}\" ]]; then\n\t\tif [[ \"${SCM_DIRTY?}\" -eq 3 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_STAGED_COLOR-${POWERLINE_SCM_STAGED_COLOR-\"30\"}}\n\t\t\tfg_color=124\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 2 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_UNSTAGED_COLOR-${POWERLINE_SCM_UNSTAGED_COLOR-\"92\"}}\n\t\t\tfg_color=56\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 1 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_DIRTY_COLOR-${POWERLINE_SCM_DIRTY_COLOR-\"88\"}}\n\t\t\tfg_color=118\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 0 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_CLEAN_COLOR-${POWERLINE_SCM_CLEAN_COLOR-\"25\"}}\n\t\t\tfg_color=16\n\t\telse\n\t\t\tcolor=${SCM_THEME_PROMPT_COLOR-${POWERLINE_SCM_CLEAN_COLOR-\"25\"}}\n\t\t\tfg_color=255\n\t\tfi\n\t\tif [[ \"${SCM_GIT_CHAR?}\" == \"${SCM_CHAR?}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_P4_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_HG_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_SVN_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\tfi\n\t\techo \"${scm_prompt?}|${color}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_cwd_prompt() {\n\tlocal -i fg_color=16\n\n\techo \"\\w|${CWD_THEME_PROMPT_COLOR?}|${fg_color}\"\n}\n\nfunction __powerline_hostname_prompt() {\n\tlocal -i fg_color=206\n\n\techo \"\\h|${HOST_THEME_PROMPT_COLOR?}|${fg_color}\"\n}\n\nfunction __powerline_wd_prompt() {\n\tlocal -i fg_color=206\n\n\techo \"\\W|${CWD_THEME_PROMPT_COLOR?}|${fg_color}\"\n}\n\nfunction __powerline_clock_prompt() {\n\tlocal -i fg_color=206\n\n\techo \"\\D{${THEME_CLOCK_FORMAT?}}|${CLOCK_THEME_PROMPT_COLOR?}|${fg_color}\"\n}\n\nfunction __powerline_battery_prompt() {\n\tlocal color=\"\" battery_status\n\tbattery_status=\"$(battery_percentage 2> /dev/null)\"\n\tlocal -i fg_color=255\n\n\tif [[ -z \"${battery_status}\" || \"${battery_status}\" == \"-1\" || \"${battery_status}\" == \"no\" ]]; then\n\t\ttrue\n\telse\n\t\tif [[ \"$((10#${battery_status}))\" -le 5 ]]; then\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR-\"160\"}\"\n\t\telif [[ \"$((10#${battery_status}))\" -le 25 ]]; then\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_LOW_COLOR-\"208\"}\"\n\t\telse\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR-\"70\"}\"\n\t\tfi\n\t\tac_adapter_connected && battery_status=\"${BATTERY_AC_CHAR?}${battery_status}\"\n\t\techo \"${battery_status}%|${color}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_in_vim_prompt() {\n\tlocal -i fg_color=206\n\n\tif [[ -n \"${VIMRUNTIME:-}\" ]]; then\n\t\techo \"${IN_VIM_THEME_PROMPT_TEXT?}|${IN_VIM_THEME_PROMPT_COLOR?}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_aws_profile_prompt() {\n\tlocal -i fg_color=206\n\n\tif [[ -n \"${AWS_PROFILE:-}\" ]]; then\n\t\techo \"${AWS_PROFILE_CHAR?}${AWS_PROFILE?}|${AWS_PROFILE_PROMPT_COLOR?}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_in_toolbox_prompt() {\n\tlocal -i fg_color=206\n\n\tif [[ -f /run/.containerenv ]] && [[ -f /run/.toolboxenv ]]; then\n\t\techo \"${IN_TOOLBOX_THEME_PROMPT_TEXT?}|${IN_TOOLBOX_THEME_PROMPT_COLOR?}|${fg_color}\"\n\tfi\n}\n\nfunction __powerline_shlvl_prompt() {\n\tif [[ \"${SHLVL}\" -gt 1 ]]; then\n\t\tlocal prompt=\"${SHLVL_THEME_PROMPT_CHAR-\"§\"}\"\n\t\tlocal level=$((SHLVL - 1))\n\t\techo \"${prompt}${level}|${SHLVL_THEME_PROMPT_COLOR-${HOST_THEME_PROMPT_COLOR-\"0\"}}\"\n\tfi\n}\n\nfunction __powerline_dirstack_prompt() {\n\tif [[ \"${#DIRSTACK[@]}\" -gt 1 ]]; then\n\t\tlocal depth=$((${#DIRSTACK[@]} - 1))\n\t\tlocal prompt=\"${DIRSTACK_THEME_PROMPT_CHAR-${POWERLINE_DIRSTACK_CHAR-\"←\"}}\"\n\t\tif [[ \"${depth}\" -ge 2 ]]; then\n\t\t\tprompt+=\"${depth}\"\n\t\tfi\n\t\techo \"${prompt}|${DIRSTACK_THEME_PROMPT_COLOR-${POWERLINE_DIRSTACK_COLOR-${CWD_THEME_PROMPT_COLOR-${POWERLINE_CWD_COLOR-\"240\"}}}}\"\n\tfi\n}\n\nfunction __powerline_history_number_prompt() {\n\techo \"${HISTORY_NUMBER_THEME_PROMPT_CHAR-${POWERLINE_HISTORY_NUMBER_CHAR-\"#\"}}\\!|${HISTORY_NUMBER_THEME_PROMPT_COLOR-${POWERLINE_HISTORY_NUMBER_COLOR-\"0\"}}\"\n}\n\nfunction __powerline_command_number_prompt() {\n\techo \"${COMMAND_NUMBER_THEME_PROMPT_CHAR-${POWERLINE_COMMAND_NUMBER_CHAR-\"#\"}}\\#|${COMMAND_NUMBER_THEME_PROMPT_COLOR-${POWERLINE_COMMAND_NUMBER_COLOR-\"0\"}}\"\n}\n\nfunction __powerline_duration_prompt() {\n\tlocal duration\n\tduration=$(_command_duration)\n\t[[ -n \"$duration\" ]] && echo \"${duration}|${COMMAND_DURATION_PROMPT_COLOR?}\"\n}\n\nfunction __powerline_left_segment() {\n\tlocal -a params\n\tIFS=\"|\" read -ra params <<< \"${1}\"\n\tlocal pad_before_segment=\" \"\n\tlocal -i fg_color=206\n\n\t#for seperator character\n\tif [[ \"${SEGMENTS_AT_LEFT?}\" -eq 0 ]]; then\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:-0}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\telse\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_SEPARATOR:-0}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\t# Since the previous segment wasn't the last segment, add padding, if needed\n\t\t#\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:-0}\" -eq 0 ]]; then\n\t\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n\t\tfi\n\t\tif [[ \"${LAST_SEGMENT_COLOR?}\" -eq \"${params[1]:-}\" ]]; then\n\t\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_LEFT_SEPARATOR_SOFT:- }${normal?}\"\n\t\telse\n\t\t\tLEFT_PROMPT+=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" \"${params[1]:-}\")${POWERLINE_LEFT_SEPARATOR:- }${normal?}\"\n\t\tfi\n\tfi\n\n\t#change here to cahnge fg color\n\tLEFT_PROMPT+=\"$(set_color \"${params[2]:-}\" \"${params[1]:-}\")${pad_before_segment}${params[0]}${normal?}\"\n\t#seperator char color == current bg\n\tLAST_SEGMENT_COLOR=\"${params[1]:-}\"\n\t((SEGMENTS_AT_LEFT += 1))\n}\n\nfunction __powerline_left_last_segment_padding() {\n\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n}\n\nfunction __powerline_last_status_prompt() {\n\t[[ \"$1\" -ne 0 ]] && echo \"${1}|${LAST_STATUS_THEME_PROMPT_COLOR-\"52\"}\"\n}\n\nfunction __powerline_prompt_command() {\n\tlocal last_status=\"$?\" ## always the first\n\tlocal info prompt_color\n\n\tlocal LEFT_PROMPT=\"\"\n\tlocal SEGMENTS_AT_LEFT=0\n\tlocal LAST_SEGMENT_COLOR=\"\"\n\n\t_save-and-reload-history \"${HISTORY_AUTOSAVE:-0}\"\n\n\tif [[ -n \"${POWERLINE_PROMPT_DISTRO_LOGO:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color \"${PROMPT_DISTRO_LOGO_COLOR?}\" \"${PROMPT_DISTRO_LOGO_COLORBG?}\")${PROMPT_DISTRO_LOGO?}$(set_color - -)\"\n\tfi\n\n\t## left prompt ##\n\tfor segment in ${POWERLINE_PROMPT-\"user_info\" \"scm\" \"python_venv\" \"ruby\" \"node\" \"cwd\"}; do\n\t\tinfo=\"$(\"__powerline_${segment}_prompt\")\"\n\t\t[[ -n \"${info}\" ]] && __powerline_left_segment \"${info}\"\n\tdone\n\n\t[[ \"${last_status}\" -ne 0 ]] && __powerline_left_segment \"$(__powerline_last_status_prompt \"${last_status}\")\"\n\n\tif [[ -n \"${LEFT_PROMPT:-}\" ]] && [[ \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-0}\" -eq 0 ]]; then\n\t\t__powerline_left_last_segment_padding\n\tfi\n\n\t# By default we try to match the prompt to the adjacent segment's background color,\n\t# but when part of the prompt exists within that segment, we instead match the foreground color.\n\tprompt_color=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" -)\"\n\tif [[ -n \"${LEFT_PROMPT:-}\" ]] && [[ -n \"${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR}\"\n\t\tprompt_color=\"${normal?}\"\n\tfi\n\t[[ -n \"${LEFT_PROMPT:-}\" ]] && LEFT_PROMPT+=\"${prompt_color}${POWERLINE_PROMPT_CHAR-\\\\$}${normal?}\"\n\n\tif [[ \"${POWERLINE_COMPACT_PROMPT:-0}\" -eq 0 ]]; then\n\t\tLEFT_PROMPT+=\" \"\n\tfi\n\n\tPS1=\"${LEFT_PROMPT?}\"\n\n\t## cleanup ##\n\tunset LAST_SEGMENT_COLOR \\\n\t\tLEFT_PROMPT \\\n\t\tSEGMENTS_AT_LEFT\n}\n"
  },
  {
    "path": "themes/hawaii50/hawaii50.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n#\n# This theme was obviously inspired a lot by\n#\n# - Demula theme\n#\n# which in itself was inspired by :\n#\n# - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n# - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n# - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n# - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n# - Bash_it modern theme\n#\n# Hawaii50 theme supports :\n#\n# - configurable directory length\n# - hg, svn, git detection (I work in all of them)\n# - virtualenv, rvm + gemsets\n#\n# Screenshot: http://i.imgur.com/4IAMJ.png\n#\n# by Ryan Kanno <ryankanno@localkinegrinds.com>\n#\n# And yes, we code out in Hawaii. :D\n#\n# Note: I also am really new to this bash scripting game, so if you see things\n# that are flat out wrong, or if you think of something neat, just send a pull\n# request.  This probably only works on a Mac - as some functions are OS\n# specific like getting ip, etc.\n#\n\n# IMPORTANT THINGS TO CHANGE ==================================================\n\n# Show IP in prompt\n# One thing to be weary about if you have slow Internets\nIP_ENABLED=1\n\n# virtual prompts\nVIRTUAL_PROMPT_ENABLED=1\n\n# COLORS ======================================================================\nORANGE='\\[\\e[0;33m\\]'\n\nDEFAULT_COLOR=\"${white?}\"\n\nUSER_COLOR=\"${purple?}\"\nSUPERUSER_COLOR=\"${red?}\"\nMACHINE_COLOR=$ORANGE\nIP_COLOR=$ORANGE\nDIRECTORY_COLOR=\"${green?}\"\n\nVE_COLOR=\"${cyan?}\"\nRVM_COLOR=\"${cyan?}\"\n\nREF_COLOR=\"${purple?}\"\n\n# SCM prompts\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_THEME_PROMPT_PREFIX=' on '\nSCM_THEME_PROMPT_SUFFIX=''\n\n# rvm prompts\nRVM_THEME_PROMPT_PREFIX=''\nRVM_THEME_PROMPT_SUFFIX=''\n\n# virtualenv prompts\nVIRTUALENV_THEME_PROMPT_PREFIX=''\nVIRTUALENV_THEME_PROMPT_SUFFIX=''\n\nVIRTUAL_THEME_PROMPT_PREFIX=' using '\nVIRTUAL_THEME_PROMPT_SUFFIX=''\n\n# Max length of PWD to display\nMAX_PWD_LENGTH=20\n\n# Max length of Git Hex to display\nMAX_GIT_HEX_LENGTH=5\n\n# IP address\nIP_SEPARATOR=', '\n\n# FUNCS =======================================================================\n\nfunction get_ip_info {\n\tmyip=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\\.]+')\n\techo -e \"$(ips | sed -e :a -e \"\\$!N;s/\\\\n/${IP_SEPARATOR}/;ta\" | sed -e \"s/127\\\\.0\\\\.0\\\\.1\\\\${IP_SEPARATOR}//g\"), ${myip}\"\n}\n\n# Displays ip prompt\nfunction ip_prompt_info() {\n\tif [[ $IP_ENABLED == 1 ]]; then\n\t\techo -e \" ${DEFAULT_COLOR}(${IP_COLOR}$(get_ip_info)${DEFAULT_COLOR})\"\n\tfi\n}\n\n# Displays virtual info prompt (virtualenv/rvm)\nfunction virtual_prompt_info() {\n\tlocal virtual_env_info rvm_info virtual_prompt\n\tvirtual_env_info=$(virtualenv_prompt)\n\trvm_info=$(ruby_version_prompt)\n\tvirtual_prompt=\"\"\n\n\tlocal prefix=${VIRTUAL_THEME_PROMPT_PREFIX}\n\tlocal suffix=${VIRTUAL_THEME_PROMPT_SUFFIX}\n\n\t# If no virtual info, just return\n\t[[ -z \"$virtual_env_info\" && -z \"$rvm_info\" ]] && return\n\n\t# If virtual_env info present, append to prompt\n\t[[ -n \"$virtual_env_info\" ]] && virtual_prompt=\"virtualenv: ${VE_COLOR}$virtual_env_info${DEFAULT_COLOR}\"\n\n\tif [[ -n \"$rvm_info\" ]]; then\n\t\t[[ -n \"$virtual_env_info\" ]] && virtual_prompt=\"$virtual_prompt, \"\n\t\tvirtual_prompt=\"${virtual_prompt}rvm: ${RVM_COLOR}$rvm_info${DEFAULT_COLOR}\"\n\tfi\n\techo -e \"$prefix$virtual_prompt$suffix\"\n}\n\n# Parse git info\nfunction git_prompt_info() {\n\tlocal dirty\n\tdirty=$(git status --porcelain 2> /dev/null | tail -n 1)\n\n\tif [[ -n $dirty ]]; then\n\t\tstate=${GIT_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n\telse\n\t\tstate=${GIT_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n\tfi\n\tprefix=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n\tsuffix=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n\tref=$(git symbolic-ref HEAD 2> /dev/null) || return\n\tcommit_id=$(git rev-parse HEAD 2> /dev/null) || return\n\n\techo -e \"$prefix${REF_COLOR}${ref#refs/heads/}${DEFAULT_COLOR}:${commit_id:0:$MAX_GIT_HEX_LENGTH}$state$suffix\"\n}\n\n# Parse hg info\nfunction hg_prompt_info() {\n\tif [[ -n $(hg status 2> /dev/null) ]]; then\n\t\tstate=${HG_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n\telse\n\t\tstate=${HG_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n\tfi\n\tprefix=${HG_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n\tsuffix=${HG_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n\tbranch=$(hg summary 2> /dev/null | grep branch | awk '{print $2}')\n\tchangeset=$(hg summary 2> /dev/null | grep parent | awk '{print $2}')\n\n\techo -e \"$prefix${REF_COLOR}${branch}${DEFAULT_COLOR}:${changeset#*:}$state$suffix\"\n}\n\n# Parse svn info\nfunction svn_prompt_info() {\n\tif [[ -n $(svn status --ignore-externals -q 2> /dev/null) ]]; then\n\t\tstate=${SVN_THEME_PROMPT_DIRTY:-$SCM_THEME_PROMPT_DIRTY}\n\telse\n\t\tstate=${SVN_THEME_PROMPT_CLEAN:-$SCM_THEME_PROMPT_CLEAN}\n\tfi\n\tprefix=${SVN_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}\n\tsuffix=${SVN_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}\n\tref=$(svn info 2> /dev/null | awk -F/ '/^URL:/ { for (i=0; i<=NF; i++) { if ($i == \"branches\" || $i == \"tags\" ) { print $(i+1); break }; if ($i == \"trunk\") { print $i; break } } }') || return\n\t[[ -z $ref ]] && return\n\n\trevision=$(svn info 2> /dev/null | sed -ne 's#^Revision: ##p')\n\n\techo -e \"$prefix${REF_COLOR}$ref${DEFAULT_COLOR}:$revision$state$suffix\"\n}\n\n# Displays last X characters of pwd\nfunction limited_pwd() {\n\n\t# Replace $HOME with ~ if possible\n\tRELATIVE_PWD=${PWD/#$HOME/\\~}\n\n\tlocal offset=$((${#RELATIVE_PWD} - MAX_PWD_LENGTH))\n\n\tif [ $offset -gt \"0\" ]; then\n\t\tlocal truncated_symbol=\"...\"\n\t\tTRUNCATED_PWD=${RELATIVE_PWD:$offset:$MAX_PWD_LENGTH}\n\t\techo -e \"${truncated_symbol}/${TRUNCATED_PWD#*/}\"\n\telse\n\t\techo -e \"${RELATIVE_PWD}\"\n\tfi\n}\n\n# Displays the current prompt\nfunction prompt() {\n\tlocal UC=$USER_COLOR\n\t[ $UID -eq \"0\" ] && UC=$SUPERUSER_COLOR\n\n\tif [[ $VIRTUAL_PROMPT_ENABLED == 1 ]]; then\n\t\tPS1=\"$(scm_char) ${UC}\\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(virtual_prompt_info)$(scm_prompt_info)${reset_color?} \\$ \"\n\telse\n\t\tPS1=\"$(scm_char) ${UC}\\u ${DEFAULT_COLOR}at ${MACHINE_COLOR}\\h$(ip_prompt_info) ${DEFAULT_COLOR}in ${DIRECTORY_COLOR}$(limited_pwd)${DEFAULT_COLOR}$(scm_prompt_info)${reset_color?} \\$ \"\n\tfi\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/inretio/inretio.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Inretio theme for Bash-it\n# Contact: bashit@inretio.eu\n\n# Inspired by existing themes:\n# - metal\n# - bobby\n\n# virtualenv prompts\nVIRTUALENV_CHAR=\" ⓔ\"\nVIRTUALENV_THEME_PROMPT_PREFIX=\"\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"\"\n\n# SCM prompts\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=\"[±] \"\nSCM_GIT_BEHIND_CHAR=\"${red?}↓${normal?}\"\nSCM_GIT_AHEAD_CHAR=\"${bold_green?}↑${normal?}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${bold_yellow?}•${normal?}\"\nSCM_GIT_STAGED_CHAR=\"${bold_green?}+${normal?}\"\n\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# Git status prompts\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗${normal?}\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n# ICONS =======================================================================\n\nicon_start=\"┌──\"\nicon_user=\" 🐧 \"\nicon_host=\" 💻 \"\nicon_directory=\" 📂 \"\nicon_branch=\"🌵\"\nicon_end=\"└> \"\n\n# extra spaces ensure legiblity in prompt\n\n# FUNCTIONS ===================================================================\n\n# Display virtual environment info\nfunction _virtualenv_prompt {\n\tVIRTUALENV_DETAILS=\"\"\n\tVIRTUALENV_CHAR=\"\"\n\n\t# $VIRTUAL_ENV is set and is non-zero length\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\t# Check if Python 3 exists\n\t\tif command -v python3 > /dev/null 2>&1; then\n\t\t\tVIRTUALENV_DETAILS=\"$(\"$VIRTUAL_ENV/bin/python\" --version | sed 's,Python ,,') on [$(basename \"$VIRTUAL_ENV\")]\"\n\t\t\tVIRTUALENV_CHAR=\" 🐍\"\n\t\telse\n\t\t\tVIRTUALENV_DETAILS=\"[$(basename \"$VIRTUAL_ENV\")]\"\n\t\t\tVIRTUALENV_CHAR=\" ⓔ\"\n\t\tfi\n\tfi\n\n\techo \"$VIRTUALENV_CHAR $VIRTUALENV_DETAILS\"\n}\n\n# Rename tab\nfunction tabname {\n\tprintf \"\\e]1;%s\\a\" \"$1\"\n}\n\n# Rename window\nfunction winname {\n\tprintf \"\\e]2;%s\\a\" \"$1\"\n}\n\n_theme_clock() {\n\tprintf '[%s]' \"$(clock_prompt)\"\n\n\tif [ \"${THEME_SHOW_CLOCK_CHAR}\" == \"true\" ]; then\n\t\tprintf '%s' \"$(clock_char) \"\n\tfi\n}\nTHEME_SHOW_CLOCK_CHAR=${THEME_SHOW_CLOCK_CHAR:-\"false\"}\nTHEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-\"${red?}\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${normal?}\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%Y-%m-%d %H:%M:%S\"}\n\n# PROMPT OUTPUT ===============================================================\n\n# Displays the current prompt\nfunction prompt_command() {\n\tPS1=\"\\n${icon_start}$(_theme_clock)${icon_user}${bold_green?}\\u${normal?}${icon_host}${bold_cyan?}\\h${normal?}${green?}$(_virtualenv_prompt)${normal?}${icon_directory}${bold_purple?}\\W${normal?}\\$([[ -n \\$(git branch 2> /dev/null) ]] && echo \\\" on ${icon_branch} $(scm_prompt_info) \\\")${white?}${normal}\\n${icon_end}\"\n\tPS2=\"${icon_end}\"\n}\n\n# Runs prompt (this bypasses bash_it $PROMPT setting)\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/iterate/iterate.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_GIT_CHAR=\"± \"\nSCM_HG_CHAR=\"☿ \"\nSCM_SVN_CHAR=\"⑆ \"\nSCM_NONE_CHAR=\"\"\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\"|\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}| \"\nSCM_GIT_AHEAD_CHAR=\"${green?}+\"\nSCM_GIT_BEHIND_CHAR=\"${red?}-\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${bold_red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${cyan?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${cyan?}| \"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"| \"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\"|\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"| \"\n\nRBENV_THEME_PROMPT_PREFIX=\"|\"\nRBENV_THEME_PROMPT_SUFFIX=\"| \"\n\nRBFU_THEME_PROMPT_PREFIX=\"|\"\nRBFU_THEME_PROMPT_SUFFIX=\"| \"\n\nfunction rvm_version_prompt {\n\tif which rvm &> /dev/null; then\n\t\trvm_current=$(rvm tools identifier) || return\n\t\trvm_default=$(rvm strings default) || return\n\t\t[ \"$rvm_current\" != \"$rvm_default\" ] && (echo -e \"$RVM_THEME_PROMPT_PREFIX$rvm_current$RVM_THEME_PROMPT_SUFFIX\")\n\tfi\n}\n\nfunction git_prompt_info {\n\tgit_prompt_vars\n\techo -e \"$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_GIT_AHEAD$SCM_GIT_BEHIND$SCM_GIT_STASH$SCM_SUFFIX\"\n}\n\nLAST_PROMPT=\"\"\nfunction prompt_command() {\n\tlocal new_PS1 new_prompt\n\tnew_PS1=\"${bold_cyan?}$(scm_char)${yellow?}$(ruby_version_prompt)${green?}\\w $(scm_prompt_info)\"\n\tnew_prompt=$(PS1=\"$new_PS1\" \"$BASH\" --norc -i < /dev/null 2>&1 | sed -n \"\\${s/^\\(.*\\)exit\\$/\\1/p;}\")\n\n\tif [ \"$LAST_PROMPT\" = \"$new_prompt\" ]; then\n\t\tnew_PS1=\"\"\n\telse\n\t\tLAST_PROMPT=\"$new_prompt\"\n\tfi\n\n\tlocal wrap_char=\"\"\n\t[[ $COLUMNS && ${#new_PS1} -gt COLUMNS ]] && wrap_char=\"\\n\"\n\tPS1=\"${new_PS1}${green?}${wrap_char}→${reset_color?} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/kitsune/kitsune.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# This is combination of works from two different people which I combined for my requirement.\n# Original PS1 was from reddit user /u/Allevil669 which I found in thread: https://www.reddit.com/r/linux/comments/1z33lj/linux_users_whats_your_favourite_bash_prompt/\n# I used that PS1 to the bash-it theme 'morris', and customized it to my liking. All credits to /u/Allevil669 and morris.\n#\n# prompt theming\n\n# added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\007\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\tscreen)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\033\\\\\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n# shellcheck disable=SC2181\nif [ \"$?\" == \"0\" ]; then\n\tSC=\"${green?}^_^\"\nelse\n\tSC=\"${red?}T_T\"\nfi\nBC=$(battery_percentage)\nfunction prompt_command() {\n\t#PS1=\"${TITLEBAR}[\\u@\\h \\W $(scm_prompt_info)]\\$ \"\n\tPS1=\"\\n${cyan?}┌─${bold_white?}[\\u@\\h]${cyan?}─${bold_yellow?}(\\w)$(scm_prompt_info)\\n${cyan?}└─${bold_green?}[\\A]-${green?}($BC%)${bold_cyan?}-[${green?}${bold_green?}\\$${bold_cyan?}]${green?} \"\n}\n\n# scm theming\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\"${bold_cyan?}(\"\nSCM_THEME_PROMPT_SUFFIX=\"${bold_cyan?})${reset_color?}\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/lambda/lambda.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC1090,SC2034\n\nfunction set_prompt {\n\tlocal user_color=\"\\[\\033[1;31m\\]\"          # bold red for username\n\tlocal at_color=\"\\[\\033[1;37m\\]\"            # bold white for @ symbol\n\tlocal host_color=\"\\[\\033[1;31m\\]\"          # bold red for hostname\n\tlocal in_color=\"\\[\\033[1;37m\\]\"            # bold white for \"in\"\n\tlocal dir_color=\"\\[\\033[1;35m\\]\"           # bold purple for current working directory\n\tlocal git_color=\"\\[\\033[1;36m\\]\"           # bold cyan for Git information\n\tlocal time_color=\"\\[\\033[1;32m\\]\"          # bold green for time taken\n\tlocal reset_color=\"\\[\\033[0m\\]\"            # reset color\n\tlocal prompt_symbol_color=\"\\[\\033[1;31m\\]\" # bold red for the prompt symbol\n\n\tlocal end_time time_taken\n\tend_time=$(date +%s%3N) # current time in milliseconds\n\t# shellcheck disable=SC2154\n\ttime_taken=$((end_time - start_time)) # time in milliseconds\n\n\tPS1=\"${user_color}╭─\\\\u\"            # username\n\tPS1+=\"${at_color}@${host_color}\\\\h\" # @ symbol and hostname\n\tPS1+=\"${in_color} in\"               # \"in\" between hostname and current directory\n\tPS1+=\"${dir_color} \\\\w\"             # current working directory\n\n\t# Git information (status symbol)\n\tPS1+=\" ${git_color}$(__git_ps1 \"[%s]\")${reset_color?}\"\n\n\tif [ $time_taken -gt 0 ]; then\n\t\tPS1+=\" ${time_color}took ${time_taken}ms\" # time taken in milliseconds\n\tfi\n\n\tPS1+=\"\\n${prompt_symbol_color}╰─λ${reset_color?} \" # red color for the prompt symbol, reset color after\n}\n\nPROMPT_COMMAND='start_time=$(date +%s%3N); set_prompt'\n"
  },
  {
    "path": "themes/luan/luan.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\"(${yellow?}\"\nSCM_THEME_PROMPT_SUFFIX=\"${normal?})\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\"(${yellow?}\"\nGIT_THEME_PROMPT_SUFFIX=\"${normal?})\"\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\n\nfunction prompt_command() {\n\tdtime=\"$(clock_prompt)\"\n\tuser_host=\"${green?}\\u@${cyan?}\\h${normal?}\"\n\tcurrent_dir=\"${bold_blue?}\\w${normal?}\"\n\trvm_ruby=\"${bold_red?}$(ruby_version_prompt)${normal?}\"\n\tgit_branch=\"$(scm_prompt_info)${normal?}\"\n\tprompt=\"${bold_green?}\\$${normal?} \"\n\tarrow=\"${bold_white?}▶${normal?} \"\n\tprompt=\"${bold_green?}\\$${normal?} \"\n\n\tPS1=\"${dtime}${user_host}:${current_dir} ${rvm_ruby} ${git_branch}\n      $arrow $prompt\"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${yellow?}\"}\nTHEME_CLOCK_FORMAT=${THEME_TIME_FORMAT:-\"%I:%M:%S \"}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/mairan/mairan.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Mairan Bash Prompt, inspired by \"Zork\"\n\nif tput setaf 1 &> /dev/null; then\n\tif [[ $(tput colors) -ge 256 ]] 2> /dev/null; then\n\t\tMAGENTA=$(tput setaf 9)\n\t\tORANGE=$(tput setaf 172)\n\t\tGREEN=$(tput setaf 190)\n\t\tPURPLE=$(tput setaf 141)\n\t\tWHITE=$(tput setaf 0)\n\telse\n\t\tMAGENTA=$(tput setaf 5)\n\t\tORANGE=$(tput setaf 4)\n\t\tGREEN=$(tput setaf 2)\n\t\tPURPLE=$(tput setaf 1)\n\t\tWHITE=$(tput setaf 7)\n\tfi\n\tBOLD=$(tput bold)\n\tRESET=$(tput sgr0)\nelse\n\tMAGENTA=\"\\033[1;31m\"\n\tORANGE=\"\\033[1;33m\"\n\tGREEN=\"\\033[1;32m\"\n\tPURPLE=\"\\033[1;35m\"\n\tWHITE=\"\\033[1;37m\"\n\tBOLD=\"\"\n\tRESET=\"\\033[m\"\nfi\n\n# prompt_symbol='λ'\n# prompt_symbol='⚡'\nprompt_symbol=''\nBRACKET_COLOR=$ORANGE\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\n__my_rvm_ruby_version() {\n\tlocal version gemset\n\tgemset=$(echo \"${GEM_HOME}\" | awk -F'@' '{print $2}')\n\t[[ -n \"${gemset}\" ]] && gemset=\"@${gemset}\"\n\tversion=$(echo \"${MY_RUBY_HOME}\" | awk -F'-' '{print $2}')\n\tlocal full=\"${version}${gemset}\"\n\t[[ -n \"${full}\" ]] && echo \"[${full}]\"\n}\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\n# show chroot if exist\nchroot() {\n\tif [[ -n \"$debian_chroot\" ]]; then\n\t\tmy_ps_chroot=\"${bold_cyan?}$debian_chroot${normal?}\"\n\t\techo \"($my_ps_chroot)\"\n\tfi\n}\n\n# show virtualenvwrapper\nmy_ve() {\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tmy_ps_ve=\"${bold_purple?}$ve${normal?}\"\n\t\techo \"($my_ps_ve)\"\n\tfi\n\techo \"\"\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT=\"[%s${GREEN}%s]\"\n\tmy_ps_host=\"${BOLD}${ORANGE}\\h${normal?}\"\n\t# yes, these are the the same for now ...\n\tmy_ps_host_root=\"${ORANGE}\\h${normal?}\"\n\n\tmy_ps_user=\"${BOLD}${GREEN}\\u${normal?}\"\n\tmy_ps_root=\"${bold_red?}\\u${normal?}\"\n\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tve=$(basename \"${VIRTUAL_ENV}\")\n\tfi\n\n\t# nice prompt\n\tcase \"$(id -u)\" in\n\t\t0)\n\t\t\t# shellcheck disable=SC2312\n\t\t\tPS1=\"\\n${TITLEBAR}${BRACKET_COLOR}┌─${normal?}$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(scm_prompt)$(__my_rvm_ruby_version)[${green?}\\w${normal?}]$(is_vim_shell)${BRACKET_COLOR}\n└─▪ ${prompt_symbol} ${normal?}\"\n\t\t\t;;\n\t\t*)\n\t\t\t# shellcheck disable=SC2312\n\t\t\tPS1=\"\\n${TITLEBAR}${BRACKET_COLOR}┌─${normal?}$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(scm_prompt)${normal?}$(__my_rvm_ruby_version)[${green?}\\w${normal?}]$(is_vim_shell)${BRACKET_COLOR}\n└─▪ ${prompt_symbol} ${normal?}\"\n\t\t\t;;\n\tesac\n}\n\nPS2=\"└─▪ \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/mbriggs/mbriggs.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# ------------------------------------------------------------------#\n#          FILE: mbriggs.zsh-theme                                  #\n#            BY: Matt Briggs (matt@mattbriggs.net)                  #\n#      BASED ON: smt by Stephen Tudor (stephen@tudorstudio.com)     #\n# ------------------------------------------------------------------#\n\nSCM_THEME_PROMPT_DIRTY=\"${red?}⚡${reset_color?}\"\nSCM_THEME_PROMPT_AHEAD=\"${red?}!${reset_color?}\"\nSCM_THEME_PROMPT_CLEAN=\"${green?}✓${reset_color?}\"\nSCM_THEME_PROMPT_PREFIX=\" \"\nSCM_THEME_PROMPT_SUFFIX=\"\"\nGIT_SHA_PREFIX=\" ${yellow?}\"\nGIT_SHA_SUFFIX=\"${reset_color?}\"\n\nfunction git_short_sha() {\n\tSHA=$(git rev-parse --short HEAD 2> /dev/null) && echo \"$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX\"\n}\n\nfunction prompt() {\n\tlocal return_status=\"\"\n\tlocal ruby\n\truby=\"${red?}$(ruby_version_prompt)${reset_color?}\"\n\tlocal user_host=\"${green?}\\h${reset_color?}\"\n\tlocal current_path=\"\\w\"\n\tlocal n_commands=\"\\!\"\n\tlocal git_branch\n\tgit_branch=\"$(git_short_sha)$(scm_prompt_info)\"\n\tlocal prompt_symbol='λ'\n\tlocal open='('\n\tlocal close=')'\n\tlocal prompt_char=' \\$ '\n\n\tPS1=\"\\n${n_commands} ${user_host} ${prompt_symbol} ${ruby} ${open}${current_path}${git_branch}${close}${return_status}\\n${prompt_char}\"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/metal/metal.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Emoji-based theme to display source control management and\n# virtual environment info beside the ordinary bash prompt.\n\n# Theme inspired by:\n#  - Naming your Terminal tabs in OSX Lion - http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/\n#  - Bash_it sexy theme\n\n# inspired by previous bash_it theme : cupcake\n\n# Demo:\n# ┌ⓔ virtualenv 🐲🤘user @ 💻 host in 🗂️ directory on 🌵 branch {1} ↑1 ↓1 +1 •1 ⌀1 ✗\n# └❯ cd .bash-it/themes/cupcake\n\n# virtualenv prompts\nVIRTUALENV_CHAR=\"ⓔ \"\nVIRTUALENV_THEME_PROMPT_PREFIX=\"\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"\"\n\n# SCM prompts\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=\"[±] \"\nSCM_GIT_BEHIND_CHAR=\"${red?}↓${normal?}\"\nSCM_GIT_AHEAD_CHAR=\"${bold_green?}↑${normal?}\"\nSCM_GIT_UNTRACKED_CHAR=\"⌀\"\nSCM_GIT_UNSTAGED_CHAR=\"${bold_yellow?}•${normal?}\"\nSCM_GIT_STAGED_CHAR=\"${bold_green?}+${normal?}\"\n\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# Git status prompts\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗${normal?}\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n# ICONS =======================================================================\n\nicon_start=\"┌\"\nicon_user=\"🤘-🐧\"\nicon_host=\"@ 💻 \"\nicon_directory=\" - 🧱 \"\nicon_branch=\"🌵\"\nicon_end=\"└🤘-> \"\n\n# extra spaces ensure legiblity in prompt\n\n# FUNCTIONS ===================================================================\n\n# Display virtual environment info\nfunction virtualenv_prompt {\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tvirtualenv=$(basename \"$VIRTUAL_ENV\")\n\t\techo -e \"$VIRTUALENV_CHAR$virtualenv \"\n\tfi\n}\n\n# Rename tab\nfunction tabname {\n\t# shellcheck disable=SC2059\n\tprintf \"\\e]1;$1\\a\"\n}\n\n# Rename window\nfunction winname {\n\t# shellcheck disable=SC2059\n\tprintf \"\\e]2;$1\\a\"\n}\n\n# PROMPT OUTPUT ===============================================================\n\n# Displays the current prompt\nfunction prompt_command() {\n\tPS1=\"\\n${icon_start}$(virtualenv_prompt)${icon_user}${bold_green?}\\u${normal?}${icon_host}${bold_cyan?}\\h${normal?}${icon_directory}${bold_purple?}\\W${normal?}\\$([[ -n \\$(git branch 2> /dev/null) ]] && echo \\\" on ${icon_branch}  \\\")${white?}$(scm_prompt_info)${normal?}\\n${icon_end}\"\n\tPS2=\"${icon_end}\"\n}\n\n# Runs prompt (this bypasses bash_it $PROMPT setting)\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/minimal/minimal.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"${cyan?}(${green?}\"\nSCM_THEME_PROMPT_SUFFIX=\"${cyan?})\"\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\n\nprompt() {\n\tPS1=\"$(scm_prompt_info)${reset_color?} ${cyan?}\\W${reset_color?} \"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/modern/modern.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\ncase \"${TERM:-dumb}\" in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\nfunction is_vim_shell() {\n\tif [[ -n \"${VIMRUNTIME:-}\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\nfunction detect_venv() {\n\tlocal python_venv=\"\"\n\t# Detect python venv\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\tpython_venv=\"(${PYTHON_VENV_CHAR}${CONDA_DEFAULT_ENV}) \"\n\telif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tpython_venv=\"(${PYTHON_VENV_CHAR}${VIRTUAL_ENV##*/}) \"\n\tfi\n}\n\nfunction prompt() {\n\tlocal retval=$? scm_prompt is_vim_shell python_venv\n\tlocal SCM_PROMPT_FORMAT='[%s][%s]'\n\tscm_prompt=\"$(scm_prompt)\"\n\tis_vim_shell=\"$(is_vim_shell)\"\n\tif [[ retval -ne 0 ]]; then\n\t\tPS1=\"${TITLEBAR:-}${bold_red?}┌─${reset_color?}${scm_prompt}[${cyan?}\\u${normal?}][${cyan?}\\w${normal?}]${is_vim_shell}\\n${bold_red?}└─▪${normal?} \"\n\telse\n\t\tPS1=\"${TITLEBAR:-}┌─${scm_prompt}[${cyan?}\\u${normal?}][${cyan?}\\w${normal?}]${is_vim_shell}\\n└─▪ \"\n\tfi\n\tdetect_venv\n\tPS1+=\"${python_venv?}${dir_color?}\"\n}\n\nPS2=\"└─▪ \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/modern-t/modern-t.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# The \"modern-t\" theme is a \"modern\" theme variant with support\n# for \"t\", the minimalist python todo list utility by Steve Losh.\n# Get and install \"t\" at https://github.com/sjl/t#installing-t\n#\n# Warning: The Bash-it plugin \"todo.plugin\" breaks the \"t\"\n# prompt integration, please disable it while using this theme.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\nis_vim_shell() {\n\tif [ ! -z \"$VIMRUNTIME\" ]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT='[%s][%s]'\n\t# shellcheck disable=SC2181 # How can this assignment fail? an immutable VAR name?\n\tif [[ $? -ne 0 ]]; then\n\t\t# Yes, the indenting on these is weird, but it has to be like\n\t\t# this otherwise it won't display properly.\n\n\t\tPS1=\"${TITLEBAR}${bold_red?}┌─[${cyan?}$(t | wc -l | sed -e's/ *//')${reset_color?}]${reset_color?}$(scm_prompt)[${cyan?}\\W${normal?}]$(is_vim_shell)\n${bold_red?}└─▪${normal?} \"\n\telse\n\t\tPS1=\"${TITLEBAR}┌─[${cyan?}$(t | wc -l | sed -e's/ *//')${reset_color?}]$(scm_prompt)[${cyan?}\\W${normal?}]$(is_vim_shell)\n└─▪ \"\n\tfi\n}\n\nPS2=\"└─▪ \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/modern-time/modern-time.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Modified version of the original modern theme in bash-it\n# Removes the battery charge and adds the current time\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\ncase ${TERM} in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\nmodern_current_time_prompt() {\n\techo \"[$(date '+%l:%M%p')]\"\n}\n\nprompt() {\n\tif [ $? -ne 0 ]; then\n\t\tSCM_PROMPT_FORMAT='[%s][%s]'\n\t\t# Yes, the indenting on these is weird, but it has to be like\n\t\t# this otherwise it won't display properly.\n\n\t\tPS1=\"${TITLEBAR}${bold_red?}┌─${reset_color?}$(scm_prompt)$(modern_current_time_prompt)[${cyan?}\\W${normal?}]$(is_vim_shell)\n${bold_red?}└─▪${normal?} \"\n\telse\n\t\tSCM_PROMPT_FORMAT='[%s][%s]'\n\t\tPS1=\"${TITLEBAR}┌─$(scm_prompt)$(modern_current_time_prompt)[${cyan?}\\W${normal?}]$(is_vim_shell)\n└─▪ \"\n\tfi\n}\n\nPS2=\"└─▪ \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/morris/morris.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# prompt theming\n\n# added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\007\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\tscreen)\n\t\tTITLEBAR=$(printf \"\\033]0;%s@%s:%s\\033\\\\\" \"${USER}\" \"${HOSTNAME%%.*}\" \"${PWD/#$HOME/~}\")\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nfunction prompt_command() {\n\tPS1=\"${TITLEBAR}[\\u@\\h \\W $(scm_prompt_info)]\\$ \"\n}\n\n# scm theming\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\"${green?}(\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?})${reset_color?}\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/n0qorg/n0qorg.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# n0qorg theme by Florian Baumann <flo@noqqe.de>\n\n## look-a-like\n# host directory (branch*)»\n# for example:\n# ananas ~/Code/bash-it/themes (master*)»\nfunction prompt_command() {\n\tPS1=\"${bold_blue?}[$(hostname)]${normal?} \\w${normal?} ${bold_white?}[$(git_prompt_info)]${normal?}» \"\n}\n\nsafe_append_prompt_command prompt_command\n\n## git-theme\n# feel free to change git chars.\nGIT_THEME_PROMPT_DIRTY=\"${bold_blue?}*${bold_white?}\"\nGIT_THEME_PROMPT_CLEAN=\"\"\nGIT_THEME_PROMPT_PREFIX=\"${bold_blue?}(${bold_white?}\"\nGIT_THEME_PROMPT_SUFFIX=\"${bold_blue?})\"\n\n## alternate chars\n#\nSCM_THEME_PROMPT_DIRTY=\"*\"\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_PREFIX=\"(\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/newin/newin.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${purple?}|${green?} \"\nSCM_THEME_PROMPT_SUFFIX=\"${purple?} |\"\n\nprompt() {\n\texit_code=$?\n\tPS1=\"$(if [[ ${exit_code} = 0 ]]; then echo \"${green?}${exit_code}\"; else echo \"${red?}${exit_code}\"; fi) ${yellow?}\\t ${cyan?}\\w$(scm_prompt_info)${reset_color?}\\n${orange?}$ ${reset_color?}\"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/norbu/norbu.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nfunction set_prompt_symbol() {\n\tif [[ $1 -eq 0 ]]; then\n\t\tprompt_symbol=\">_\"\n\telse\n\t\tprompt_symbol=\"${orange?}>_${normal?}\"\n\tfi\n}\n\nfunction prompt_command() {\n\tlocal ret_val=\"$?\" prompt_symbol scm_prompt_info\n\tif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tPYTHON_VIRTUALENV=\"${bold_yellow?}[${VIRTUAL_ENV##*/}]\"\n\tfi\n\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tset_prompt_symbol \"${ret_val}\"\n\tPS1=\"${bold_orange?}${PYTHON_VIRTUALENV:-}${reset_color?}${bold_green?}[\\w]${bold_blue?}[${scm_prompt_info}]${normal?} \\n${prompt_symbol} \"\n}\n\n# scm themeing\nSCM_THEME_PROMPT_DIRTY=\" ✗\"\nSCM_THEME_PROMPT_CLEAN=\" ✓\"\nSCM_THEME_PROMPT_PREFIX=\"[\"\nSCM_THEME_PROMPT_SUFFIX=\"]\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/nwinkler/nwinkler.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Two line prompt showing the following information:\n# (time) SCM [username@hostname] pwd (SCM branch SCM status)\n# →\n#\n# Example:\n# (14:00:26) ± [foo@bar] ~/.bash_it (master ✓)\n# →\n#\n# The arrow on the second line is showing the exit status of the last command:\n# * Green: 0 exit status\n# * Red: non-zero exit status\n#\n# The exit code functionality currently doesn't work if you are using the 'fasd' plugin,\n# since 'fasd' is messing with the $PROMPT_COMMAND\n\nPROMPT_END_CLEAN=\"${green?}→${reset_color?}\"\nPROMPT_END_DIRTY=\"${red?}→${reset_color?}\"\n\nfunction prompt_end() {\n\techo -e \"$PROMPT_END\"\n}\n\nprompt_setter() {\n\tlocal exit_status=$?\n\tif [[ $exit_status -eq 0 ]]; then\n\t\tPROMPT_END=$PROMPT_END_CLEAN\n\telse\n\t\tPROMPT_END=$PROMPT_END_DIRTY\n\tfi\n\t# Save history\n\t_save-and-reload-history 1\n\tPS1=\"($(clock_prompt)) $(scm_char) [${blue?}\\u${reset_color?}@${green?}\\H${reset_color?}] ${yellow?}\\w${reset_color?}$(scm_prompt_info) ${reset_color?}\\n$(prompt_end) \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Two line prompt showing the following information:\n# (time) SCM [username@hostname] pwd (SCM branch SCM status)\n# →\n#\n# Example:\n# (14:00:26) ± [foo@bar] ~/.bash_it (master ✓)\n# →\n#\n# The arrow on the second line is showing the exit status of the last command:\n# * Green: 0 exit status\n# * Red: non-zero exit status\n#\n# The exit code functionality currently doesn't work if you are using the 'fasd' plugin,\n# since 'fasd' is messing with the $PROMPT_COMMAND\n\nRANDOM_COLOR_FILE=$HOME/.nwinkler_random_colors\n\nfunction randomize_nwinkler {\n\tdeclare -a AVAILABLE_COLORS\n\n\t# shellcheck disable=SC2206 # Expected behavior but fine for this theme.\n\tAVAILABLE_COLORS=(\n\t\t\"${black?}\"\n\t\t\"${red?}\"\n\t\t\"${green?}\"\n\t\t\"${yellow?}\"\n\t\t\"${blue?}\"\n\t\t\"${purple?}\"\n\t\t\"${cyan?}\"\n\t\t\"${white?}\"\n\t\t\"${orange?}\"\n\t\t\"${bold_black?}\"\n\t\t\"${bold_red?}\"\n\t\t\"${bold_green?}\"\n\t\t\"${bold_yellow?}\"\n\t\t\"${bold_blue?}\"\n\t\t\"${bold_purple?}\"\n\t\t\"${bold_cyan?}\"\n\t\t\"${bold_white?}\"\n\t\t\"${bold_orange?}\"\n\t)\n\t# Uncomment these to allow underlines:\n\t#$underline_black\n\t#$underline_red\n\t#$underline_green\n\t#$underline_yellow\n\t#$underline_blue\n\t#$underline_purple\n\t#$underline_cyan\n\t#$underline_white\n\t#$underline_orange\n\t#)\n\n\tUSERNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]}]}\n\tHOSTNAME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]}]}\n\tTIME_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]}]}\n\tTHEME_CLOCK_COLOR=$TIME_COLOR\n\tPATH_COLOR=${AVAILABLE_COLORS[$RANDOM % ${#AVAILABLE_COLORS[@]}]}\n\n\techo \"$USERNAME_COLOR,$HOSTNAME_COLOR,$TIME_COLOR,$PATH_COLOR,\" > \"$RANDOM_COLOR_FILE\"\n}\n\nif [ -f \"$RANDOM_COLOR_FILE\" ]; then\n\t# read the colors already stored in the file\n\tIFS=',' read -ra COLORS < \"$RANDOM_COLOR_FILE\"\n\tUSERNAME_COLOR=${COLORS[0]}\n\tHOSTNAME_COLOR=${COLORS[1]}\n\tTIME_COLOR=${COLORS[2]}\n\tTHEME_CLOCK_COLOR=$TIME_COLOR\n\tPATH_COLOR=${COLORS[3]}\nelse\n\t# No colors stored yet. Generate them!\n\trandomize_nwinkler\n\n\techo\n\techo \"Looks like you are using the nwinkler_random_color bashit theme for the first time.\"\n\techo \"Random colors have been generated to be used in your prompt.\"\n\techo \"If you don't like them, run the command:\"\n\techo \"  randomize_nwinkler\"\n\techo \"until you get a combination that you like.\"\n\techo\nfi\n\nPROMPT_END_CLEAN=\"${green?}→${reset_color?}\"\nPROMPT_END_DIRTY=\"${red?}→${reset_color?}\"\n\nfunction prompt_end() {\n\techo -e \"$PROMPT_END\"\n}\n\nprompt_setter() {\n\tlocal exit_status=$?\n\tif [[ $exit_status -eq 0 ]]; then\n\t\tPROMPT_END=$PROMPT_END_CLEAN\n\telse\n\t\tPROMPT_END=$PROMPT_END_DIRTY\n\tfi\n\t# Save history\n\t_save-and-reload-history 1\n\tPS1=\"($(clock_prompt)${reset_color?}) $(scm_char) [${USERNAME_COLOR}\\u${reset_color?}@${HOSTNAME_COLOR}\\H${reset_color?}] ${PATH_COLOR}\\w${reset_color?}$(scm_prompt_info) ${reset_color}\\n$(prompt_end) \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/oh-my-posh/oh-my-posh.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nif _command_exists oh-my-posh; then\n\texport POSH_THEME=${POSH_THEME:-https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json}\n\teval \"$(oh-my-posh init bash --config \"${POSH_THEME}\")\"\nelse\n\t_log_warning \"The oh-my-posh binary was not found on your PATH. Falling back to your existing PS1, please see the docs for more info.\"\nfi\n"
  },
  {
    "path": "themes/p4helpers.theme.bash",
    "content": "# shellcheck shell=bash\n\nfunction _p4-opened {\n\ttimeout 2.0s p4 opened -s 2> /dev/null\n}\n\nfunction _p4-opened-counts {\n\t# Return the following counts seperated by tabs:\n\t#  - count of opened files\n\t#  - count of pending changesets (other than defaults)\n\t#  - count of files in the default changeset\n\t#  - count of opened files in add mode\n\t#  - count of opened files in edit mode\n\t#  - count of opened files in delete mode\n\t_p4-opened | awk '\n  BEGIN {\n    opened=0;\n    type_array[\"edit\"]=0;\n    type_array[\"add\"]=0;\n    type_array[\"delete\"]=0;\n    change_array[\"change\"]=0;\n  }\n  {\n    # p4 opened prints one file per line, and all lines begin with \"//\"\n    # Here is an examples:\n    #\n    #   $ p4 opened\n    #   //depot/some/file.py#4 - edit change 716431 (text)\n    #   //depot/another/file.py - edit default change (text)\n    #   //now/add/a/newfile.sh -  add change 435645 (text+k)\n    #\n    #\n    if ($1 ~ /^\\/\\//) {\n        opened += 1\n        change_array[$5] += 1\n        type_array[$3] += 1\n    }\n  }\n  END {\n    default_changes=change_array[\"change\"];\n    non_default_changes=length(change_array) - 1;\n    print opened \"\\t\" non_default_changes \"\\t\" default_changes \"\\t\" type_array[\"add\"] \"\\t\" type_array[\"edit\"] \"\\t\" type_array[\"delete\"]\n  }\n'\n}\n"
  },
  {
    "path": "themes/parrot/parrot.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# git branch parser\nfunction parse_git_branch() {\n\techo -e \"\\[\\033[1;34m\\]$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/(\\1)/')\\[\\033[0m\\]\"\n}\n\nfunction parse_git_branch_no_color() {\n\techo -e \"$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/(\\1)/')\"\n}\n\nfunction prompt() {\n\t# If not running interactively, don't do anything\n\t[[ $- != *i* ]] && return\n\n\tlocal force_color_prompt=yes\n\n\tif [ -n \"$force_color_prompt\" ]; then\n\t\tif [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then\n\t\t\t# We have color support; assume it's compliant with Ecma-48\n\t\t\t# (ISO/IEC-6429). (Lack of such support is extremely rare, and such\n\t\t\t# a case would tend to support setf rather than setaf.)\n\t\t\tlocal color_prompt=yes\n\t\telse\n\t\t\tlocal color_prompt=\n\t\tfi\n\tfi\n\n\tif [ \"$color_prompt\" = yes ]; then\n\t\t# shellcheck disable=SC2028\n\t\tPS1=\"\\[\\033[0;31m\\]\\342\\224\\214\\342\\224\\200\\$([[ \\$? != 0 ]] && echo \\\"[\\[\\033[0;31m\\]\\342\\234\\227\\[\\033[0;37m\\]]\\342\\224\\200\\\")[$(if [[ ${EUID} == 0 ]]; then echo '\\[\\033[01;31m\\]root\\[\\033[01;33m\\]@\\[\\033[01;96m\\]\\h'; else echo '\\[\\033[0;39m\\]\\u\\[\\033[01;33m\\]@\\[\\033[01;96m\\]\\h'; fi)\\[\\033[0;31m\\]]\\342\\224\\200[\\[\\033[0;32m\\]\\w\\[\\033[0;31m\\]]\\n\\[\\033[0;31m\\]\\342\\224\\224\\342\\224\\200\\342\\224\\200\\342\\225\\274 \\[\\033[0m\\]\\[\\e[01;33m\\]$(parse_git_branch) $\\[\\e[0m\\] \"\n\n\telse\n\t\tPS1='┌──[\\u@\\h]─[\\w]\\n└──╼ $(parse_git_branch_no_color) $ '\n\tfi\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/pete/pete.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nfunction prompt_setter() {\n\tlocal clock_prompt scm_char scm_prompt_info ruby_version_prompt\n\tclock_prompt=\"$(clock_prompt)\"\n\tscm_char=\"$(scm_char)\"\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\truby_version_prompt=\"$(ruby_version_prompt)\"\n\t_save-and-reload-history 1 # Save history\n\tPS1=\"(${clock_prompt}) ${scm_char} [${blue?}\\u${reset_color?}@${green?}\\H${reset_color?}] ${yellow?}\\w${reset_color?}${scm_prompt_info}${ruby_version_prompt} ${reset_color?} \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n\nSCM_THEME_PROMPT_DIRTY=\" ✗\"\nSCM_THEME_PROMPT_CLEAN=\" ✓\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/powerline/powerline.base.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n#To set color for foreground and background\nfunction set_color() {\n\tlocal fg='' bg=''\n\tif [[ \"${1:-}\" != \"-\" ]]; then\n\t\tfg=\"38;5;${1}\"\n\tfi\n\tif [[ \"${2:-}\" != \"-\" ]]; then\n\t\tbg=\"48;5;${2}\"\n\t\tif [[ -n \"${fg}\" ]]; then\n\t\t\tbg=\";${bg}\"\n\t\tfi\n\tfi\n\tprintf '\\[\\\\e[%s%sm\\]' \"${fg}\" \"${bg}\"\n}\n\n#Customising User Info Segment\nfunction __powerline_user_info_prompt() {\n\tlocal user_info='\\u'\n\tlocal color=${USER_INFO_THEME_PROMPT_COLOR-${POWERLINE_USER_INFO_COLOR-\"32\"}}\n\n\tif [[ \"${THEME_CHECK_SUDO:-false}\" == true ]]; then\n\t\tif sudo -vn 2> /dev/null; then\n\t\t\tcolor=${USER_INFO_THEME_PROMPT_COLOR_SUDO-${POWERLINE_USER_INFO_COLOR_SUDO-\"202\"}}\n\t\t\tif [[ \"${POWERLINE_PROMPT_USER_INFO_MODE:-}\" == \"sudo\" ]]; then\n\t\t\t\tuser_info=\"!\"\n\t\t\tfi\n\t\tfi\n\tfi\n\n\tif [[ -n \"${SSH_CLIENT:-}\" || -n \"${SSH_CONNECTION:-}\" ]]; then\n\t\tuser_info=\"${USER_INFO_SSH_CHAR-${POWERLINE_USER_INFO_SSH_CHAR-\"⌁\"}}${user_info}\"\n\tfi\n\tprintf '%s|%s' \"${user_info}\" \"${color}\"\n}\n\nfunction __powerline_terraform_prompt() {\n\tlocal terraform_workspace=\"\"\n\n\tif [[ -d .terraform ]]; then\n\t\tterraform_workspace=\"$(terraform_workspace_prompt)\"\n\t\tif [[ -n \"${terraform_workspace}\" ]]; then\n\t\t\tprintf '%s%s|%s' \"${TERRAFORM_CHAR-${POWERLINE_TERRAFORM_CHAR-\"❲t❳\"}}\" \"${terraform_workspace}\" \"${TERRAFORM_THEME_PROMPT_COLOR-${POWERLINE_TERRAFORM_COLOR-\"161\"}}\"\n\t\tfi\n\tfi\n}\n\nfunction __powerline_gcloud_prompt() {\n\tlocal active_gcloud_account=\"\"\n\n\tactive_gcloud_account=\"$(active_gcloud_account_prompt)\"\n\tif [[ -n \"${active_gcloud_account}\" ]]; then\n\t\tprintf '%s%s|%s' \"${GCLOUD_CHAR-${POWERLINE_GCLOUD_CHAR-\"❲G❳\"}}\" \"${active_gcloud_account}\" \"${GCLOUD_THEME_PROMPT_COLOR-${POWERLINE_GCLOUD_COLOR-\"161\"}}\"\n\tfi\n}\n\nfunction __powerline_node_prompt() {\n\tlocal node_version=\"\"\n\n\tnode_version=\"$(node_version_prompt)\"\n\tif [[ -n \"${node_version}\" ]]; then\n\t\tprintf '%s%s|%s' \"${NODE_CHAR-${POWERLINE_NODE_CHAR-=\"❲n❳\"}}\" \"${node_version}\" \"${NODE_THEME_PROMPT_COLOR-${POWERLINE_NODE_COLOR-\"22\"}}\"\n\tfi\n}\n\n#Customising Ruby Prompt\nfunction __powerline_ruby_prompt() {\n\tlocal ruby_version\n\n\tif _command_exists rvm; then\n\t\truby_version=\"$(rvm_version_prompt)\"\n\telif _command_exists rbenv; then\n\t\truby_version=$(rbenv_version_prompt)\n\tfi\n\n\tif [[ -n \"${ruby_version:-}\" ]]; then\n\t\tprintf '%s%s|%s' \"${RUBY_CHAR-${POWERLINE_RUBY_CHAR-\"💎\"}}\" \"${ruby_version}\" \"${RUBY_THEME_PROMPT_COLOR-${POWERLINE_RUBY_COLOR-\"161\"}}\"\n\tfi\n}\n\nfunction __powerline_k8s_context_prompt() {\n\tlocal kubernetes_context=\"\"\n\n\tif _command_exists kubectl; then\n\t\tkubernetes_context=\"$(k8s_context_prompt)\"\n\tfi\n\n\tif [[ -n \"${kubernetes_context}\" ]]; then\n\t\tprintf '%s%s|%s' \"${KUBERNETES_CONTEXT_THEME_CHAR-${POWERLINE_KUBERNETES_CONTEXT_CHAR-\"⎈\"}}\" \"${kubernetes_context}\" \"${KUBERNETES_CONTEXT_THEME_PROMPT_COLOR-${POWERLINE_KUBERNETES_CONTEXT_COLOR-\"26\"}}\"\n\tfi\n}\n\nfunction __powerline_k8s_namespace_prompt() {\n\tlocal kubernetes_namespace=\"\"\n\n\tif _command_exists kubectl; then\n\t\tkubernetes_namespace=\"$(k8s_namespace_prompt)\"\n\tfi\n\n\tif [[ -n \"${kubernetes_namespace}\" ]]; then\n\t\tprintf '%s%s|%s' \"${KUBERNETES_NAMESPACE_THEME_CHAR-${POWERLINE_KUBERNETES_NAMESPACE_CHAR-\"⎈\"}}\" \"${kubernetes_namespace}\" \"${KUBERNETES_NAMESPACE_THEME_PROMPT_COLOR-${POWERLINE_KUBERNETES_NAMESPACE_COLOR-\"60\"}}\"\n\tfi\n}\n\n#Customising Python (venv) Prompt\nfunction __powerline_python_venv_prompt() {\n\tlocal python_venv=\"\"\n\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\tpython_venv=\"${CONDA_DEFAULT_ENV}\"\n\t\tlocal PYTHON_VENV_CHAR=${CONDA_PYTHON_VENV_CHAR-${POWERLINE_CONDA_PYTHON_VENV_CHAR-\"ⓔ\"}}\n\telif [[ -n \"${VIRTUAL_ENV:-}\" ]]; then\n\t\tpython_venv=\"${VIRTUAL_ENV##*/}\"\n\tfi\n\n\tif [[ -n \"${python_venv}\" ]]; then\n\t\tprintf '%s%s|%s' \"${PYTHON_VENV_CHAR-${POWERLINE_PYTHON_VENV_CHAR-\"ⓔ\"}}\" \"${python_venv}\" \"${PYTHON_VENV_THEME_PROMPT_COLOR-${POWERLINE_PYTHON_VENV_COLOR-\"35\"}}\"\n\tfi\n}\n\n#Customising SCM(GIT) Prompt\nfunction __powerline_scm_prompt() {\n\tlocal color=\"\"\n\tlocal scm_prompt=\"\"\n\n\tscm_prompt_vars\n\n\tif [[ \"${SCM_NONE_CHAR?}\" != \"${SCM_CHAR?}\" ]]; then\n\t\tif [[ \"${SCM_DIRTY?}\" -eq 3 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_STAGED_COLOR-${POWERLINE_SCM_STAGED_COLOR-\"30\"}}\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 2 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_UNSTAGED_COLOR-${POWERLINE_SCM_UNSTAGED_COLOR-\"92\"}}\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 1 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_DIRTY_COLOR-${POWERLINE_SCM_DIRTY_COLOR-\"88\"}}\n\t\telif [[ \"${SCM_DIRTY?}\" -eq 0 ]]; then\n\t\t\tcolor=${SCM_THEME_PROMPT_CLEAN_COLOR-${POWERLINE_SCM_CLEAN_COLOR-\"25\"}}\n\t\telse\n\t\t\tcolor=${SCM_THEME_PROMPT_COLOR-${POWERLINE_SCM_CLEAN_COLOR-\"25\"}}\n\t\tfi\n\t\tif [[ \"${SCM_GIT_CHAR?}\" == \"${SCM_CHAR?}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_P4_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_HG_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\telif [[ \"${SCM_SVN_CHAR?}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tscm_prompt+=\"${SCM_CHAR}${SCM_BRANCH?}${SCM_STATE?}\"\n\t\tfi\n\t\tprintf '%s|%s' \"${scm_prompt}\" \"${color}\"\n\tfi\n}\n\nfunction __powerline_cwd_prompt() {\n\tprintf '%s|%s' \"\\w\" \"${CWD_THEME_PROMPT_COLOR-\"240\"}\"\n}\n\nfunction __powerline_hostname_prompt() {\n\tprintf '%s|%s' \"\\h\" \"${HOST_THEME_PROMPT_COLOR-\"0\"}\"\n}\n\nfunction __powerline_wd_prompt() {\n\tprintf '%s|%s' \"\\W\" \"${CWD_THEME_PROMPT_COLOR-\"240\"}\"\n}\n\nfunction __powerline_clock_prompt() {\n\tprintf '%s|%s' \"\\D{${THEME_CLOCK_FORMAT-\"%H:%M:%S\"}}\" \"${CLOCK_THEME_PROMPT_COLOR-\"240\"}\"\n}\n\nfunction __powerline_battery_prompt() {\n\tlocal color=\"\" battery_status\n\tbattery_status=\"$(battery_percentage 2> /dev/null)\"\n\n\tif [[ -z \"${battery_status}\" || \"${battery_status}\" == \"-1\" || \"${battery_status}\" == \"no\" ]]; then\n\t\ttrue\n\telse\n\t\tif [[ \"$((10#${battery_status}))\" -le 5 ]]; then\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR-\"160\"}\"\n\t\telif [[ \"$((10#${battery_status}))\" -le 25 ]]; then\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_LOW_COLOR-\"208\"}\"\n\t\telse\n\t\t\tcolor=\"${BATTERY_STATUS_THEME_PROMPT_GOOD_COLOR-\"70\"}\"\n\t\tfi\n\t\tif ac_adapter_connected; then\n\t\t\tbattery_status=\"${BATTERY_AC_CHAR-\"+\"}${battery_status}\"\n\t\tfi\n\t\tprintf '%s|%s' \"${battery_status}%\" \"${color}\"\n\tfi\n}\n\nfunction __powerline_in_vim_prompt() {\n\tif [[ -n \"${VIMRUNTIME:-}\" ]]; then\n\t\tprintf '%s|%s' \"${IN_VIM_THEME_PROMPT_TEXT-\"vim\"}\" \"${IN_VIM_THEME_PROMPT_COLOR-\"245\"}\"\n\tfi\n}\n\nfunction __powerline_aws_profile_prompt() {\n\tif [[ -n \"${AWS_PROFILE:-}\" ]]; then\n\t\tprintf '%s%s|%s' \"${AWS_PROFILE_CHAR-${POWERLINE_AWS_PROFILE_CHAR-\"❲aws❳\"}}\" \"${AWS_PROFILE}\" \"${AWS_PROFILE_PROMPT_COLOR-${POWERLINE_AWS_PROFILE_COLOR-\"208\"}}\"\n\tfi\n}\n\nfunction __powerline_in_toolbox_prompt() {\n\tif [[ -f /run/.containerenv && -f /run/.toolboxenv ]]; then\n\t\tprintf '%s|%s' \"${IN_TOOLBOX_THEME_PROMPT_TEXT-\"⬢\"}\" \"${IN_TOOLBOX_THEME_PROMPT_COLOR-\"125\"}\"\n\tfi\n}\n\nfunction __powerline_shlvl_prompt() {\n\tif [[ \"${SHLVL}\" -gt 1 ]]; then\n\t\tlocal prompt=\"${SHLVL_THEME_PROMPT_CHAR-\"§\"}\"\n\t\tlocal level=$((SHLVL - 1))\n\t\tprintf '%s|%s' \"${prompt}${level}\" \"${SHLVL_THEME_PROMPT_COLOR-${HOST_THEME_PROMPT_COLOR-\"0\"}}\"\n\tfi\n}\n\nfunction __powerline_dirstack_prompt() {\n\tif [[ \"${#DIRSTACK[@]}\" -gt 1 ]]; then\n\t\tlocal depth=$((${#DIRSTACK[@]} - 1))\n\t\tlocal prompt=\"${DIRSTACK_THEME_PROMPT_CHAR-${POWERLINE_DIRSTACK_CHAR-\"←\"}}\"\n\t\tif [[ \"${depth}\" -ge 2 ]]; then\n\t\t\tprompt+=\"${depth}\"\n\t\tfi\n\t\tprintf '%s|%s' \"${prompt}\" \"${DIRSTACK_THEME_PROMPT_COLOR-${POWERLINE_DIRSTACK_COLOR-${CWD_THEME_PROMPT_COLOR-${POWERLINE_CWD_COLOR-\"240\"}}}}\"\n\tfi\n}\n\nfunction __powerline_history_number_prompt() {\n\tprintf '%s%s|%s' \"${HISTORY_NUMBER_THEME_PROMPT_CHAR-${POWERLINE_HISTORY_NUMBER_CHAR-\"#\"}}\" '\\!' \"${HISTORY_NUMBER_THEME_PROMPT_COLOR-${POWERLINE_HISTORY_NUMBER_COLOR-\"0\"}}\"\n}\n\nfunction __powerline_command_number_prompt() {\n\tprintf '%s%s|%s' \"${COMMAND_NUMBER_THEME_PROMPT_CHAR-${POWERLINE_COMMAND_NUMBER_CHAR-\"#\"}}\" '\\#' \"${COMMAND_NUMBER_THEME_PROMPT_COLOR-${POWERLINE_COMMAND_NUMBER_COLOR-\"0\"}}\"\n}\n\nfunction __powerline_duration_prompt() {\n\tlocal duration\n\tduration=$(_command_duration)\n\tif [[ -n \"$duration\" ]]; then\n\t\tprintf '%s|%s' \"${duration}\" \"${COMMAND_DURATION_PROMPT_COLOR?}\"\n\tfi\n}\n\nfunction __powerline_left_segment() {\n\tlocal -a params\n\tIFS=\"|\" read -ra params <<< \"${1}\"\n\tlocal pad_before_segment=\" \"\n\n\t#for seperator character\n\tif [[ \"${SEGMENTS_AT_LEFT?}\" -eq 0 ]]; then\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:-${POWERLINE_COMPACT:-0}}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\telse\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_SEPARATOR:-${POWERLINE_COMPACT:-0}}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\t# Since the previous segment wasn't the last segment, add padding, if needed\n\t\t#\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n\t\tfi\n\t\tif [[ \"${LAST_SEGMENT_COLOR?}\" -eq \"${params[1]:-}\" ]]; then\n\t\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_LEFT_SEPARATOR_SOFT- }${normal?}\"\n\t\telse\n\t\t\tLEFT_PROMPT+=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" \"${params[1]:-}\")${POWERLINE_LEFT_SEPARATOR- }${normal?}\"\n\t\tfi\n\tfi\n\n\t#change here to cahnge fg color\n\tLEFT_PROMPT+=\"$(set_color - \"${params[1]:-}\")${pad_before_segment}${params[0]}${normal?}\"\n\t#seperator char color == current bg\n\tLAST_SEGMENT_COLOR=\"${params[1]:-}\"\n\t((SEGMENTS_AT_LEFT += 1))\n}\n\nfunction __powerline_left_last_segment_padding() {\n\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n}\n\nfunction __powerline_last_status_prompt() {\n\tif [[ \"${1:-0}\" -ne 0 ]]; then\n\t\tprintf '%s|%s' \"${1}\" \"${LAST_STATUS_THEME_PROMPT_COLOR-\"52\"}\"\n\tfi\n}\n\nfunction __powerline_prompt_command() {\n\tlocal last_status=\"$?\" ## always the first\n\tlocal beginning_of_line='\\[\\e[G\\]'\n\tlocal info prompt_color segment prompt\n\n\tlocal LEFT_PROMPT=\"\"\n\tlocal SEGMENTS_AT_LEFT=0\n\tlocal LAST_SEGMENT_COLOR=\"\"\n\n\t_save-and-reload-history \"${HISTORY_AUTOSAVE:-0}\"\n\n\tif [[ -n \"${POWERLINE_PROMPT_DISTRO_LOGO:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color \"${PROMPT_DISTRO_LOGO_COLOR?}\" \"${PROMPT_DISTRO_LOGO_COLORBG?}\")${PROMPT_DISTRO_LOGO?}$(set_color - -)\"\n\tfi\n\n\t## left prompt ##\n\t# shellcheck disable=SC2068 # intended behavior\n\tfor segment in ${POWERLINE_PROMPT[@]-\"user_info\" \"scm\" \"python_venv\" \"ruby\" \"node\" \"cwd\"}; do\n\t\tinfo=\"$(\"__powerline_${segment}_prompt\")\"\n\t\tif [[ -n \"${info}\" ]]; then\n\t\t\t__powerline_left_segment \"${info}\"\n\t\tfi\n\tdone\n\n\tif [[ \"${last_status}\" -ne 0 ]]; then\n\t\t__powerline_left_segment \"$(__powerline_last_status_prompt \"${last_status}\")\"\n\tfi\n\n\tif [[ -n \"${LEFT_PROMPT:-}\" && \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\t__powerline_left_last_segment_padding\n\tfi\n\n\t# By default we try to match the prompt to the adjacent segment's background color,\n\t# but when part of the prompt exists within that segment, we instead match the foreground color.\n\tprompt_color=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" -)\"\n\tif [[ -n \"${LEFT_PROMPT:-}\" && -n \"${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR}\"\n\t\tprompt_color=\"${normal?}\"\n\tfi\n\n\tprompt=\"${prompt_color}${PROMPT_CHAR-${POWERLINE_PROMPT_CHAR-\\\\$}}${normal?}\"\n\tif [[ \"${POWERLINE_COMPACT_PROMPT:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\tprompt+=\" \"\n\tfi\n\n\tPS1=\"${beginning_of_line}${normal?}${LEFT_PROMPT}${prompt}\"\n}\n"
  },
  {
    "path": "themes/powerline/powerline.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck source-path=SCRIPTDIR/../powerline\nsource \"${BASH_IT?}/themes/powerline/powerline.base.bash\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\n: \"${POWERLINE_LEFT_SEPARATOR:=\"\"}\"\n: \"${POWERLINE_LEFT_SEPARATOR_SOFT:=\"\"}\"\n: \"${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR:=\"\"}\"\n\n: \"${POWERLINE_COMPACT:=0}\"\n: \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}\"\n\nPOWERLINE_PROMPT_FOREGROUND_COLOR=${POWERLINE_PROMPT_FOREGROUND_COLOR:=-}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=${POWERLINE_USER_INFO_COLOR:=32}\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=${POWERLINE_USER_INFO_COLOR_SUDO:=202}\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=${POWERLINE_PYTHON_VENV_COLOR:=35}\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:=\"☿ \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=${POWERLINE_SCM_CLEAN_COLOR:=25}\nSCM_THEME_PROMPT_DIRTY_COLOR=${POWERLINE_SCM_DIRTY_COLOR:=88}\nSCM_THEME_PROMPT_STAGED_COLOR=${POWERLINE_SCM_STAGED_COLOR:=30}\nSCM_THEME_PROMPT_UNSTAGED_COLOR=${POWERLINE_SCM_UNSTAGED_COLOR:=92}\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nNVM_THEME_PROMPT_PREFIX=\"\"\nNVM_THEME_PROMPT_SUFFIX=\"\"\nNODE_THEME_PROMPT_PREFIX=\"\"\nNODE_THEME_PROMPT_SUFFIX=\"\"\nNODE_CHAR=${POWERLINE_NODE_CHAR:=\"❲n❳ \"}\nNODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:=22}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nTERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}\nTERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:=\"❲t❳ \"}\n\nKUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:=\"⎈ \"}\nKUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}\n\nKUBERNETES_NAMESPACE_THEME_CHAR=${POWERLINE_KUBERNETES_NAMESPACE_CHAR:=\"⎈ \"}\nKUBERNETES_NAMESPACE_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_NAMESPACE_COLOR:=64}\n\nAWS_PROFILE_CHAR=${POWERLINE_AWS_PROFILE_CHAR:=\"❲aws❳ \"}\nAWS_PROFILE_PROMPT_COLOR=${POWERLINE_AWS_PROFILE_COLOR:=208}\n\nCWD_THEME_PROMPT_COLOR=${POWERLINE_CWD_COLOR:=240}\n\nLAST_STATUS_THEME_PROMPT_COLOR=${POWERLINE_LAST_STATUS_COLOR:=52}\n\nCLOCK_THEME_PROMPT_COLOR=${POWERLINE_CLOCK_COLOR:=240}\n\n: \"${BATTERY_AC_CHAR:=\"⚡\"}\"\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=${POWERLINE_BATTERY_GOOD_COLOR:=70}\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=${POWERLINE_BATTERY_LOW_COLOR:=208}\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=${POWERLINE_BATTERY_CRITICAL_COLOR:=160}\n\n: \"${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\"\n\nIN_VIM_THEME_PROMPT_COLOR=${POWERLINE_IN_VIM_COLOR:=245}\nIN_VIM_THEME_PROMPT_TEXT=${POWERLINE_IN_VIM_TEXT:=\"vim\"}\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=${POWERLINE_IN_TOOLBOX_COLOR:=125}\nIN_TOOLBOX_THEME_PROMPT_TEXT=${POWERLINE_IN_TOOLBOX_TEXT:=\"⬢ \"}\n\nHOST_THEME_PROMPT_COLOR=${POWERLINE_HOST_COLOR:=0}\n\nSHLVL_THEME_PROMPT_COLOR=${POWERLINE_SHLVL_COLOR:=${HOST_THEME_PROMPT_COLOR}}\nSHLVL_THEME_PROMPT_CHAR=${POWERLINE_SHLVL_CHAR:=\"§\"}\n\nDIRSTACK_THEME_PROMPT_COLOR=${POWERLINE_DIRSTACK_COLOR:=${CWD_THEME_PROMPT_COLOR}}\nDIRSTACK_THEME_PROMPT_CHAR=${POWERLINE_DIRSTACK_CHAR:=\"←\"}\n\nHISTORY_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_HISTORY_NUMBER_COLOR:=0}\nHISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:=\"#\"}\n\nCOMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}\nCOMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:=\"#\"}\n\nGCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}\nGCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:=\"❲G❳ \"}\n\nCOMMAND_DURATION_PROMPT_COLOR=${POWERLINE_COMMAND_DURATION_COLOR:=129}\n\n: \"${POWERLINE_PROMPT:=\"user_info scm python_venv ruby node cwd\"}\"\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/powerline-multiline/powerline-multiline.base.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck source-path=SCRIPTDIR/../powerline\nsource \"${BASH_IT?}/themes/powerline/powerline.base.bash\"\n\nfunction __powerline_right_segment() {\n\tlocal -a params\n\tIFS=\"|\" read -ra params <<< \"${1}\"\n\tlocal pad_before_segment=\" \"\n\tlocal padding=0\n\n\tif [[ \"${SEGMENTS_AT_RIGHT}\" -eq 0 ]]; then\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-${POWERLINE_COMPACT:-0}}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\tRIGHT_PROMPT+=\"$(set_color \"${params[1]:-}\" -)${POWERLINE_RIGHT_LAST_SEGMENT_END_CHAR:-}${normal?}\"\n\t\t((padding += 1))\n\telse\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:-}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\t# Since the previous segment wasn't the last segment, add padding, if needed\n\t\t#\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_SEPARATOR:-0}\" -eq 0 ]]; then\n\t\t\tRIGHT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n\t\t\t((padding += 1))\n\t\tfi\n\t\tif [[ \"${LAST_SEGMENT_COLOR}\" -eq \"${params[1]:-}\" ]]; then\n\t\t\tRIGHT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_RIGHT_SEPARATOR_SOFT- }${normal?}\"\n\t\telse\n\t\t\tRIGHT_PROMPT+=\"$(set_color \"${params[1]:-}\" \"${LAST_SEGMENT_COLOR?}\")${POWERLINE_RIGHT_SEPARATOR- }${normal?}\"\n\t\tfi\n\t\t((padding += 1))\n\tfi\n\n\tRIGHT_PROMPT+=\"$(set_color - \"${params[1]:-}\")${pad_before_segment}${params[0]}${normal?}\"\n\n\t((padding += ${#pad_before_segment}))\n\t((padding += ${#params[0]}))\n\n\t((RIGHT_PROMPT_LENGTH += padding))\n\tLAST_SEGMENT_COLOR=\"${params[1]:-}\"\n\t((SEGMENTS_AT_RIGHT += 1))\n}\n\nfunction __powerline_right_first_segment_padding() {\n\tRIGHT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR?}\") ${normal?}\"\n\t((RIGHT_PROMPT_LENGTH += 1))\n}\n\nfunction __powerline_last_status_prompt() {\n\tif [[ \"${1}\" -ne 0 ]]; then\n\t\tprintf '%b %s %b' \"$(set_color \"${LAST_STATUS_THEME_PROMPT_COLOR-\"52\"}\" -)\" \"${1}\" \"${normal?}\"\n\tfi\n}\n\nfunction __powerline_prompt_command() {\n\tlocal last_status=\"$?\" ## always the first\n\tlocal beginning_of_line='\\[\\e[B\\]'\n\tlocal move_cursor_rightmost='\\e[500C'\n\tlocal info prompt_color segment prompt\n\n\tlocal LEFT_PROMPT=\"\"\n\tlocal RIGHT_PROMPT=\"\"\n\tlocal RIGHT_PROMPT_LENGTH=${POWERLINE_PADDING:-2}\n\tlocal SEGMENTS_AT_LEFT=0\n\tlocal SEGMENTS_AT_RIGHT=0\n\tlocal LAST_SEGMENT_COLOR=\"\"\n\n\t_save-and-reload-history \"${HISTORY_AUTOSAVE:-0}\"\n\n\tif [[ -n \"${POWERLINE_PROMPT_DISTRO_LOGO:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color \"${PROMPT_DISTRO_LOGO_COLOR?}\" \"${PROMPT_DISTRO_LOGO_COLORBG?}\")${PROMPT_DISTRO_LOGO?}$(set_color - -)\"\n\tfi\n\n\t## left prompt ##\n\t# shellcheck disable=SC2068 # intended behavior\n\tfor segment in ${POWERLINE_LEFT_PROMPT[@]:-${POWERLINE_PROMPT[@]:-\"user_info\" \"scm\" \"python_venv\" \"ruby node\" \"cwd\"}}; do\n\t\tinfo=\"$(\"__powerline_${segment}_prompt\")\"\n\t\tif [[ -n \"${info}\" ]]; then\n\t\t\t__powerline_left_segment \"${info}\"\n\t\tfi\n\tdone\n\n\tif [[ -n \"${LEFT_PROMPT:-}\" && \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\t__powerline_left_last_segment_padding\n\tfi\n\n\t# By default we try to match the prompt to the adjacent segment's background color,\n\t# but when part of the prompt exists within that segment, we instead match the foreground color.\n\tprompt_color=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" -)\"\n\tif [[ -n \"${LEFT_PROMPT:-}\" && -n \"${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR:-}\" ]]; then\n\t\tLEFT_PROMPT+=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" -)${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR}\"\n\t\tprompt_color=\"${normal?}\"\n\tfi\n\n\t## right prompt ##\n\tif [[ -n \"${POWERLINE_RIGHT_PROMPT[*]:-}\" ]]; then\n\t\t# LEFT_PROMPT+=\"${move_cursor_rightmost}\"\n\t\t# shellcheck disable=SC2068 # intended behavior\n\t\tfor segment in ${POWERLINE_RIGHT_PROMPT[@]}; do\n\t\t\tinfo=\"$(\"__powerline_${segment}_prompt\")\"\n\t\t\t[[ -n \"${info}\" ]] && __powerline_right_segment \"${info}\"\n\t\tdone\n\n\t\tif [[ -n \"${RIGHT_PROMPT:-}\" && \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\t\t__powerline_right_first_segment_padding\n\t\tfi\n\n\t\tRIGHT_PAD=$(printf \"%.s \" $(seq 1 \"${RIGHT_PROMPT_LENGTH}\"))\n\t\tLEFT_PROMPT+=\"${RIGHT_PAD}${move_cursor_rightmost}\"\n\t\tLEFT_PROMPT+=\"\\033[$((${#RIGHT_PAD} - 1))D\"\n\tfi\n\n\tprompt=\"${prompt_color}${PROMPT_CHAR-${POWERLINE_PROMPT_CHAR-\\\\$}}${normal?}\"\n\tif [[ \"${POWERLINE_COMPACT_PROMPT:-${POWERLINE_COMPACT:-0}}\" -eq 0 ]]; then\n\t\tprompt+=\" \"\n\tfi\n\n\tPS1=\"${beginning_of_line}${normal?}${LEFT_PROMPT}${RIGHT_PROMPT}\\n$(__powerline_last_status_prompt \"${last_status}\")${prompt}\"\n}\n"
  },
  {
    "path": "themes/powerline-multiline/powerline-multiline.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck source-path=SCRIPTDIR/../powerline-multiline\nsource \"${BASH_IT?}/themes/powerline-multiline/powerline-multiline.base.bash\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"❯\"}\n: \"${POWERLINE_LEFT_SEPARATOR:=\"\"}\"\n: \"${POWERLINE_LEFT_SEPARATOR_SOFT:=\"\"}\"\n: \"${POWERLINE_RIGHT_SEPARATOR:=\"\"}\"\n: \"${POWERLINE_RIGHT_SEPARATOR_SOFT:=\"\"}\"\n: \"${POWERLINE_LEFT_LAST_SEGMENT_END_CHAR:=\"\"}\"\n: \"${POWERLINE_RIGHT_LAST_SEGMENT_END_CHAR:=\"\"}\"\n: \"${POWERLINE_PADDING:=2}\"\n\n: \"${POWERLINE_COMPACT:=0}\"\n: \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}\"\n\nPOWERLINE_PROMPT_FOREGROUND_COLOR=${POWERLINE_PROMPT_FOREGROUND_COLOR:=-}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=${POWERLINE_USER_INFO_COLOR:=32}\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=${POWERLINE_USER_INFO_COLOR_SUDO:=202}\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=${POWERLINE_PYTHON_VENV_COLOR:=35}\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:=\"☿ \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=${POWERLINE_SCM_CLEAN_COLOR:=25}\nSCM_THEME_PROMPT_DIRTY_COLOR=${POWERLINE_SCM_DIRTY_COLOR:=88}\nSCM_THEME_PROMPT_STAGED_COLOR=${POWERLINE_SCM_STAGED_COLOR:=30}\nSCM_THEME_PROMPT_UNSTAGED_COLOR=${POWERLINE_SCM_UNSTAGED_COLOR:=92}\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nNVM_THEME_PROMPT_PREFIX=\"\"\nNVM_THEME_PROMPT_SUFFIX=\"\"\nNODE_THEME_PROMPT_PREFIX=\"\"\nNODE_THEME_PROMPT_SUFFIX=\"\"\nNODE_CHAR=${POWERLINE_NODE_CHAR:=\"❲n❳ \"}\nNODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:=28}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=1}\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nTERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}\nTERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:=\"❲t❳ \"}\n\nKUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:=\"⎈ \"}\nKUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}\n\nKUBERNETES_NAMESPACE_THEME_CHAR=${POWERLINE_KUBERNETES_NAMESPACE_CHAR:=\"⎈ \"}\nKUBERNETES_NAMESPACE_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_NAMESPACE_COLOR:=64}\n\nAWS_PROFILE_CHAR=${POWERLINE_AWS_PROFILE_CHAR:=\"❲aws❳ \"}\nAWS_PROFILE_PROMPT_COLOR=${POWERLINE_AWS_PROFILE_COLOR:=208}\n\nCWD_THEME_PROMPT_COLOR=${POWERLINE_CWD_COLOR:=240}\n\nLAST_STATUS_THEME_PROMPT_COLOR=${POWERLINE_LAST_STATUS_COLOR:=196}\n\nCLOCK_THEME_PROMPT_COLOR=${POWERLINE_CLOCK_COLOR:=240}\n\n: \"${BATTERY_AC_CHAR:=\"⚡\"}\"\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=${POWERLINE_BATTERY_GOOD_COLOR:=70}\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=${POWERLINE_BATTERY_LOW_COLOR:=208}\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=${POWERLINE_BATTERY_CRITICAL_COLOR:=160}\n\n: \"${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\"\n\nIN_VIM_THEME_PROMPT_COLOR=${POWERLINE_IN_VIM_COLOR:=245}\nIN_VIM_THEME_PROMPT_TEXT=${POWERLINE_IN_VIM_TEXT:=\"vim\"}\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=${POWERLINE_IN_TOOLBOX_COLOR:=125}\nIN_TOOLBOX_THEME_PROMPT_TEXT=${POWERLINE_IN_TOOLBOX_TEXT:=\"⬢ \"}\n\nHOST_THEME_PROMPT_COLOR=${POWERLINE_HOST_COLOR:=0}\n\nSHLVL_THEME_PROMPT_COLOR=${POWERLINE_SHLVL_COLOR:=${HOST_THEME_PROMPT_COLOR}}\nSHLVL_THEME_PROMPT_CHAR=${POWERLINE_SHLVL_CHAR:=\"§\"}\n\nDIRSTACK_THEME_PROMPT_COLOR=${POWERLINE_DIRSTACK_COLOR:=${CWD_THEME_PROMPT_COLOR}}\nDIRSTACK_THEME_PROMPT_CHAR=${POWERLINE_DIRSTACK_CHAR:=\"←\"}\n\nHISTORY_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_HISTORY_NUMBER_COLOR:=0}\nHISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:=\"#\"}\n\nCOMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}\nCOMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:=\"#\"}\n\nGCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}\nGCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:=\"❲G❳ \"}\n\nCOMMAND_DURATION_PROMPT_COLOR=${POWERLINE_COMMAND_DURATION_COLOR:=129}\n\n: \"${POWERLINE_LEFT_PROMPT:=\"scm python_venv ruby node cwd\"}\"\n: \"${POWERLINE_RIGHT_PROMPT:=\"in_vim clock battery user_info\"}\"\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/powerline-naked/powerline-naked.base.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC1091 # Expected behavior for themes.\nsource \"${BASH_IT?}/themes/powerline/powerline.base.bash\"\n\nfunction __powerline_left_segment {\n\tlocal OLD_IFS=\"${IFS}\" params=()\n\t# shellcheck disable=SC2206 # not needed because we are splitting on \"|\"\n\tIFS=\"|\" params=($1)\n\tIFS=\"${OLD_IFS}\"\n\tlocal separator=\"\"\n\tlocal pad_before_segment=\" \"\n\n\tif [[ \"${SEGMENTS_AT_LEFT}\" -eq 0 ]]; then\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\telse\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_SEPARATOR}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\t# Since the previous segment wasn't the last segment, add padding, if needed\n\t\t#\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:-0}\" -eq 0 ]]; then\n\t\t\tLEFT_PROMPT+=\" \"\n\t\tfi\n\t\tLEFT_PROMPT+=\"${POWERLINE_LEFT_SEPARATOR}\"\n\tfi\n\n\t#change here to cahnge fg color\n\tLEFT_PROMPT+=\"$(set_color \"${params[1]:-}\" -)${pad_before_segment}${params[0]}${normal?}\"\n\t#seperator char color == current bg\n\tLAST_SEGMENT_COLOR=\"${params[1]:-}\"\n\t((SEGMENTS_AT_LEFT += 1))\n\n\t_save-and-reload-history \"${HISTORY_AUTOSAVE:-0}\"\n}\n\nfunction __powerline_left_last_segment_padding {\n\tLEFT_PROMPT+=\"$(set_color \"${LAST_SEGMENT_COLOR?}\" -) ${normal?}\"\n}\n"
  },
  {
    "path": "themes/powerline-naked/powerline-naked.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n# shellcheck source-path=SCRIPTDIR/../powerline\nsource \"${BASH_IT?}/themes/powerline/powerline.base.bash\"\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\n: \"${POWERLINE_LEFT_SEPARATOR:=\"\"}\"\nPOWERLINE_LEFT_LAST_SEGMENT_PROMPT_CHAR=\"\"\n\n: \"${POWERLINE_COMPACT:=0}\"\n: \"${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}\"\n: \"${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}\"\n\nPOWERLINE_PROMPT_FOREGROUND_COLOR=${POWERLINE_PROMPT_FOREGROUND_COLOR:=-}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=${POWERLINE_USER_INFO_COLOR:=240}\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=${POWERLINE_USER_INFO_COLOR_SUDO:=202}\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"❲p❳ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=${POWERLINE_PYTHON_VENV_COLOR:=35}\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:=\"☿ \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=${POWERLINE_SCM_CLEAN_COLOR:=25}\nSCM_THEME_PROMPT_DIRTY_COLOR=${POWERLINE_SCM_DIRTY_COLOR:=88}\nSCM_THEME_PROMPT_STAGED_COLOR=${POWERLINE_SCM_STAGED_COLOR:=30}\nSCM_THEME_PROMPT_UNSTAGED_COLOR=${POWERLINE_SCM_UNSTAGED_COLOR:=92}\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nNVM_THEME_PROMPT_PREFIX=\"\"\nNVM_THEME_PROMPT_SUFFIX=\"\"\nNODE_THEME_PROMPT_PREFIX=\"\"\nNODE_THEME_PROMPT_SUFFIX=\"\"\nNODE_CHAR=${POWERLINE_NODE_CHAR:=\"❲n❳ \"}\nNODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:=22}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"❲r❳ \"}\n\nTERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}\nTERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:=\"❲t❳ \"}\n\nKUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:=\"⎈ \"}\nKUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}\n\nKUBERNETES_NAMESPACE_THEME_CHAR=${POWERLINE_KUBERNETES_NAMESPACE_CHAR:=\"⎈ \"}\nKUBERNETES_NAMESPACE_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_NAMESPACE_COLOR:=64}\n\nAWS_PROFILE_CHAR=${POWERLINE_AWS_PROFILE_CHAR:=\"❲aws❳ \"}\nAWS_PROFILE_PROMPT_COLOR=${POWERLINE_AWS_PROFILE_COLOR:=208}\n\nCWD_THEME_PROMPT_COLOR=${POWERLINE_CWD_COLOR:=254}\n\nLAST_STATUS_THEME_PROMPT_COLOR=${POWERLINE_LAST_STATUS_COLOR:=124}\n\nCLOCK_THEME_PROMPT_COLOR=${POWERLINE_CLOCK_COLOR:=240}\n\n: \"${BATTERY_AC_CHAR:=\"⚡\"}\"\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=${POWERLINE_BATTERY_GOOD_COLOR:=70}\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=${POWERLINE_BATTERY_LOW_COLOR:=208}\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=${POWERLINE_BATTERY_CRITICAL_COLOR:=160}\n\n: \"${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\"\n\nIN_VIM_THEME_PROMPT_COLOR=${POWERLINE_IN_VIM_COLOR:=245}\nIN_VIM_THEME_PROMPT_TEXT=${POWERLINE_IN_VIM_TEXT:=\"vim\"}\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=${POWERLINE_IN_TOOLBOX_COLOR:=125}\nIN_TOOLBOX_THEME_PROMPT_TEXT=${POWERLINE_IN_TOOLBOX_TEXT:=\"⬢ \"}\n\nHOST_THEME_PROMPT_COLOR=${POWERLINE_HOST_COLOR:=254}\n\nSHLVL_THEME_PROMPT_COLOR=${POWERLINE_SHLVL_COLOR:=${HOST_THEME_PROMPT_COLOR}}\nSHLVL_THEME_PROMPT_CHAR=${POWERLINE_SHLVL_CHAR:=\"§\"}\n\nDIRSTACK_THEME_PROMPT_COLOR=${POWERLINE_DIRSTACK_COLOR:=${CWD_THEME_PROMPT_COLOR}}\nDIRSTACK_THEME_PROMPT_CHAR=${POWERLINE_DIRSTACK_CHAR:=\"←\"}\n\nHISTORY_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_HISTORY_NUMBER_COLOR:=254}\nHISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:=\"#\"}\n\nCOMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=254}\nCOMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:=\"#\"}\n\nGCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}\nGCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:=\"❲G❳ \"}\n\n: \"${POWERLINE_PROMPT:=\"user_info scm python_venv ruby node cwd\"}\"\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/powerline-plain/powerline-plain.base.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n. \"$BASH_IT/themes/powerline/powerline.base.bash\"\n\nfunction __powerline_left_segment {\n\tlocal OLD_IFS=\"${IFS}\"\n\tIFS=\"|\"\n\t# shellcheck disable=SC2206\n\tlocal params=($1)\n\tIFS=\"${OLD_IFS}\"\n\tlocal pad_before_segment=\" \"\n\n\tif [[ \"${SEGMENTS_AT_LEFT}\" -eq 0 ]]; then\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\telse\n\t\tif [[ \"${POWERLINE_COMPACT_AFTER_SEPARATOR}\" -ne 0 ]]; then\n\t\t\tpad_before_segment=\"\"\n\t\tfi\n\t\t# Since the previous segment wasn't the last segment, add padding, if needed\n\t\t#\n\t\tif [[ \"${POWERLINE_COMPACT_BEFORE_SEPARATOR}\" -eq 0 ]]; then\n\t\t\tLEFT_PROMPT+=\"$(set_color - \"${LAST_SEGMENT_COLOR}\") ${normal?}\"\n\t\tfi\n\tfi\n\n\tLEFT_PROMPT+=\"$(set_color - \"${params[1]}\")${pad_before_segment}${params[0]}${normal?}\"\n\tLAST_SEGMENT_COLOR=${params[1]}\n\t((SEGMENTS_AT_LEFT += 1))\n}\n\nfunction __powerline_prompt_command {\n\tlocal last_status=\"$?\" ## always the first\n\n\tLEFT_PROMPT=\"\"\n\tSEGMENTS_AT_LEFT=0\n\tLAST_SEGMENT_COLOR=\"\"\n\tPROMPT_AFTER=\"${POWERLINE_PROMPT_AFTER}\"\n\n\t_save-and-reload-history \"${HISTORY_AUTOSAVE:-0}\"\n\n\t## left prompt ##\n\tfor segment in $POWERLINE_PROMPT; do\n\t\tlocal info\n\t\tinfo=\"$(__powerline_\"${segment}\"_prompt)\"\n\t\t[[ -n \"${info}\" ]] && __powerline_left_segment \"${info}\"\n\tdone\n\n\t[[ \"${last_status}\" -ne 0 ]] && __powerline_left_segment \"$(__powerline_last_status_prompt \"${last_status}\")\"\n\n\tif [[ -n \"${LEFT_PROMPT}\" ]] && [[ \"${POWERLINE_COMPACT_AFTER_LAST_SEGMENT}\" -eq 0 ]]; then\n\t\t__powerline_left_last_segment_padding\n\tfi\n\n\tif [[ \"${POWERLINE_COMPACT_PROMPT}\" -eq 0 ]]; then\n\t\tLEFT_PROMPT+=\" \"\n\tfi\n\n\tPS1=\"${LEFT_PROMPT}${PROMPT_AFTER}\"\n\n\t## cleanup ##\n\tunset LAST_SEGMENT_COLOR \\\n\t\tLEFT_PROMPT \\\n\t\tSEGMENTS_AT_LEFT\n}\n"
  },
  {
    "path": "themes/powerline-plain/powerline-plain.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n. \"$BASH_IT/themes/powerline-plain/powerline-plain.base.bash\"\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\"⌁ \"}\nUSER_INFO_THEME_PROMPT_COLOR=${POWERLINE_USER_INFO_COLOR:=32}\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=${POWERLINE_USER_INFO_COLOR_SUDO:=202}\n\nPOWERLINE_COMPACT=${POWERLINE_COMPACT:=0}\nPOWERLINE_COMPACT_BEFORE_SEPARATOR=${POWERLINE_COMPACT_BEFORE_SEPARATOR:=${POWERLINE_COMPACT}}\nPOWERLINE_COMPACT_AFTER_SEPARATOR=${POWERLINE_COMPACT_AFTER_SEPARATOR:=${POWERLINE_COMPACT}}\nPOWERLINE_COMPACT_BEFOR_FIRST_SEGMENT=${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT:=${POWERLINE_COMPACT}}\nPOWERLINE_COMPACT_AFTER_LAST_SEGMENT=${POWERLINE_COMPACT_AFTER_LAST_SEGMENT:=${POWERLINE_COMPACT}}\nPOWERLINE_COMPACT_PROMPT=${POWERLINE_COMPACT_PROMPT:=${POWERLINE_COMPACT}}\nPOWERLINE_PROMPT_AFTER=${POWERLINE_PROMPT_AFTER:-\"\"}\n\nPOWERLINE_PROMPT_FOREGROUND_COLOR=${POWERLINE_PROMPT_FOREGROUND_COLOR:=-}\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\"ⓔ \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"ⓔ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=${POWERLINE_PYTHON_VENV_COLOR:=35}\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\"⎇  \"}\nSCM_HG_CHAR=${POWERLINE_SCM_HG_CHAR:=\"☿ \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=${POWERLINE_SCM_CLEAN_COLOR:=25}\nSCM_THEME_PROMPT_DIRTY_COLOR=${POWERLINE_SCM_DIRTY_COLOR:=88}\nSCM_THEME_PROMPT_STAGED_COLOR=${POWERLINE_SCM_STAGED_COLOR:=30}\nSCM_THEME_PROMPT_UNSTAGED_COLOR=${POWERLINE_SCM_UNSTAGED_COLOR:=92}\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nNVM_THEME_PROMPT_PREFIX=\"\"\nNVM_THEME_PROMPT_SUFFIX=\"\"\nNODE_THEME_PROMPT_PREFIX=\"\"\nNODE_THEME_PROMPT_SUFFIX=\"\"\nNODE_CHAR=${POWERLINE_NODE_CHAR:=\"❲n❳ \"}\nNODE_THEME_PROMPT_COLOR=${POWERLINE_NODE_COLOR:=22}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\"💎 \"}\n\nTERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}\nTERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:=\"❲t❳ \"}\n\nKUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:=\"⎈ \"}\nKUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}\n\nKUBERNETES_NAMESPACE_THEME_CHAR=${POWERLINE_KUBERNETES_NAMESPACE_CHAR:=\"⎈ \"}\nKUBERNETES_NAMESPACE_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_NAMESPACE_COLOR:=60}\n\nAWS_PROFILE_CHAR=${POWERLINE_AWS_PROFILE_CHAR:=\"❲aws❳ \"}\nAWS_PROFILE_PROMPT_COLOR=${POWERLINE_AWS_PROFILE_COLOR:=208}\n\nCWD_THEME_PROMPT_COLOR=${POWERLINE_CWD_COLOR:=240}\n\nLAST_STATUS_THEME_PROMPT_COLOR=${POWERLINE_LAST_STATUS_COLOR:=52}\n\nCLOCK_THEME_PROMPT_COLOR=${POWERLINE_CLOCK_COLOR:=240}\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"+ \"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=${POWERLINE_BATTERY_GOOD_COLOR:=70}\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=${POWERLINE_BATTERY_LOW_COLOR:=208}\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=${POWERLINE_BATTERY_CRITICAL_COLOR:=160}\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=${POWERLINE_IN_VIM_COLOR:=245}\nIN_VIM_THEME_PROMPT_TEXT=${POWERLINE_IN_VIM_TEXT:=\"vim\"}\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=${POWERLINE_IN_TOOLBOX_COLOR:=125}\nIN_TOOLBOX_THEME_PROMPT_TEXT=${POWERLINE_IN_TOOLBOX_TEXT:=\"⬢ \"}\n\nHOST_THEME_PROMPT_COLOR=${POWERLINE_HOST_COLOR:=0}\n\nSHLVL_THEME_PROMPT_COLOR=${POWERLINE_SHLVL_COLOR:=${HOST_THEME_PROMPT_COLOR}}\nSHLVL_THEME_PROMPT_CHAR=${POWERLINE_SHLVL_CHAR:=\"§\"}\n\nDIRSTACK_THEME_PROMPT_COLOR=${POWERLINE_DIRSTACK_COLOR:=${CWD_THEME_PROMPT_COLOR}}\nDIRSTACK_THEME_PROMPT_CHAR=${POWERLINE_DIRSTACK_CHAR:=\"←\"}\n\nHISTORY_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_HISTORY_NUMBER_COLOR:=0}\nHISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:=\"#\"}\n\nCOMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}\nCOMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:=\"#\"}\n\nGCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}\nGCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:=\"❲G❳ \"}\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"user_info scm python_venv ruby node cwd\"}\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/powerturk/powerturk.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Power-Turk theme for bash-it\n# Author (C) 2015 Ahmed Seref Guneysu\n\nTHEME_PROMPT_SEPARATOR=\"\"\n\nSHELL_SSH_CHAR=\" \"\nSHELL_THEME_PROMPT_COLOR=2\nSHELL_SSH_THEME_PROMPT_COLOR=208\n\nVIRTUALENV_CHAR=\"ⓔ \"\nVIRTUALENV_THEME_PROMPT_COLOR=35\n\nSCM_NONE_CHAR=\"\"\n\nSCM_GIT_CHAR=\" \" # \" \"\n\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\n\nSCM_THEME_PROMPT_COLOR=16\nSCM_THEME_PROMPT_CLEAN_COLOR=231\nSCM_THEME_PROMPT_DIRTY_COLOR=196\nSCM_THEME_PROMPT_STAGED_COLOR=220\nSCM_THEME_PROMPT_UNSTAGED_COLOR=166\n\nCWD_THEME_PROMPT_COLOR=240\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\n\n_collapsed_wd() {\n\t# echo -e \"\\u2771\\u276d\\u276f\"\n\t# shellcheck disable=SC2005\n\techo \"$(pwd | perl -pe \"\n   BEGIN {\n      binmode STDIN,  ':encoding(UTF-8)';\n      binmode STDOUT, ':encoding(UTF-8)';\n   }; s|^$HOME|<HOME>|g; s|/([^/])[^/]*(?=/)|/\\$1|g\")\" \\\n\t\t| sed -re \"s/\\//  /g\"\n}\n\n_swd() {\n\t# Adapted from http://stackoverflow.com/a/2951707/1766716\n\tbegin=\"\"            # The unshortened beginning of the path.\n\tshortbegin=\"\"       # The shortened beginning of the path.\n\tcurrent=\"\"          # The section of the path we're currently working on.\n\tend=\"${2:-${PWD}}/\" # The unmodified rest of the path.\n\n\tif [[ \"$end\" == \"$HOME\"* ]]; then\n\t\tINHOME=1\n\t\tend=\"${end#\"$HOME\"}\" #strip /home/username from start of string\n\t\tbegin=\"${HOME}\"      #start expansion from the right spot\n\telse\n\t\tINHOME=0\n\tfi\n\n\tend=\"${end#/}\"         # Strip the first /\n\tshortenedpath=\"${end}\" # The whole path, to check the length.\n\tmaxlength=\"${1:-0}\"\n\n\tshopt -q nullglob && NGV=\"-s\" || NGV=\"-u\" # Store the value for later.\n\tshopt -s nullglob                         # Without this, anything that doesn't exist in the filesystem turns into */*/*/...\n\n\twhile [[ \"${end}\" ]] && ((${#shortenedpath} > maxlength)); do\n\t\tcurrent=\"${end%%/*}\" # everything before the first /\n\t\tend=\"${end#*/}\"      # everything after the first /\n\n\t\tshortcur=\"$current\"\n\t\tshortcurstar=\"$current\" # No star if we don't shorten it.\n\n\t\tfor ((i = ${#current} - 2; i >= 0; i--)); do\n\t\t\tsubcurrent=\"${current:0:i}\"\n\t\t\tmatching=(\"${begin}/${subcurrent}\"*) # Array of all files that start with $subcurrent.\n\t\t\t((${#matching[*]} != 1)) && break    # Stop shortening if more than one file matches.\n\t\t\tshortcur=\"${subcurrent}\"\n\t\t\tshortcurstar=\"${subcurrent}*\"\n\t\tdone\n\n\t\t#advance\n\t\tbegin=\"$begin/$current\"\n\t\tshortbegin=\"$shortbegin/$shortcurstar\"\n\t\tshortenedpath=\"$shortbegin/$end\"\n\tdone\n\n\tshortenedpath=\"${shortenedpath%/}\" # strip trailing /\n\tshortenedpath=\"${shortenedpath#/}\" # strip leading /\n\n\t# Replaces slashes with  except first occurence.\n\tif [ $INHOME -eq 1 ]; then\n\t\t# shellcheck disable=SC2088\n\t\techo \"~/$shortenedpath\" | sed \"s/\\///2g\" # make sure it starts with ~/\n\telse\n\t\techo \"/$shortenedpath\" | sed \"s/\\///2g\" # Make sure it starts with /\n\tfi\n\n\tshopt \"$NGV\" nullglob # Reset nullglob in case this is being used as a function.\n\n}\nfunction set_rgb_color {\n\tif [[ \"${1}\" != \"-\" ]]; then\n\t\tfg=\"38;5;${1}\"\n\tfi\n\tif [[ \"${2}\" != \"-\" ]]; then\n\t\tbg=\"48;5;${2}\"\n\t\t[[ -n \"${fg}\" ]] && bg=\";${bg}\"\n\tfi\n\techo -e \"\\[\\033[${fg}${bg}m\\]\"\n}\n\nfunction powerline_shell_prompt {\n\tif [[ -n \"${SSH_CLIENT}\" ]]; then\n\t\tSHELL_PROMPT=\"${bold_white?}$(set_rgb_color - ${SHELL_SSH_THEME_PROMPT_COLOR}) ${SHELL_SSH_CHAR}\\u@\\h ${normal?}\"\n\t\tLAST_THEME_COLOR=${SHELL_SSH_THEME_PROMPT_COLOR}\n\telse\n\t\tSHELL_PROMPT=\"${bold_white?}$(set_rgb_color - ${SHELL_THEME_PROMPT_COLOR}) ${normal?}\"\n\t\tLAST_THEME_COLOR=${SHELL_THEME_PROMPT_COLOR}\n\tfi\n}\n\nfunction powerline_virtualenv_prompt {\n\tlocal environ=\"\"\n\n\tif [[ -n \"$CONDA_DEFAULT_ENV\" ]]; then\n\t\tenviron=\"conda: $CONDA_DEFAULT_ENV\"\n\telif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tenviron=$(basename \"$VIRTUAL_ENV\")\n\tfi\n\n\tif [[ -n \"$environ\" ]]; then\n\t\tVIRTUALENV_PROMPT=\"$(set_rgb_color \"${LAST_THEME_COLOR}\" \"${VIRTUALENV_THEME_PROMPT_COLOR}\")${THEME_PROMPT_SEPARATOR}${normal?}$(set_rgb_color - \"${VIRTUALENV_THEME_PROMPT_COLOR}\") ${VIRTUALENV_CHAR}$environ ${normal?}\"\n\t\tLAST_THEME_COLOR=${VIRTUALENV_THEME_PROMPT_COLOR}\n\telse\n\t\tVIRTUALENV_PROMPT=\"\"\n\tfi\n}\n\nfunction powerline_scm_prompt {\n\tscm_prompt_vars\n\n\tif [[ \"${SCM_NONE_CHAR}\" != \"${SCM_CHAR}\" ]]; then\n\t\tif [[ \"${SCM_DIRTY}\" -eq 3 ]]; then\n\t\t\tSCM_PROMPT=\"$(set_rgb_color \"${SCM_THEME_PROMPT_STAGED_COLOR}\" \"${SCM_THEME_PROMPT_COLOR}\")\"\n\t\telif [[ \"${SCM_DIRTY}\" -eq 2 ]]; then\n\t\t\tSCM_PROMPT=\"$(set_rgb_color \"${SCM_THEME_PROMPT_UNSTAGED_COLOR}\" \"${SCM_THEME_PROMPT_COLOR}\")\"\n\t\telif [[ \"${SCM_DIRTY}\" -eq 1 ]]; then\n\t\t\tSCM_PROMPT=\"$(set_rgb_color \"${SCM_THEME_PROMPT_DIRTY_COLOR}\" \"${SCM_THEME_PROMPT_COLOR}\")\"\n\t\telse\n\t\t\tSCM_PROMPT=\"$(set_rgb_color \"${SCM_THEME_PROMPT_CLEAN_COLOR}\" \"${SCM_THEME_PROMPT_COLOR}\")\"\n\t\tfi\n\t\tif [[ \"${SCM_GIT_CHAR}\" == \"${SCM_CHAR}\" ]]; then\n\t\t\tSCM_PROMPT+=\" ${SCM_CHAR}${SCM_BRANCH}${SCM_STATE}\"\n\t\tfi\n\t\tSCM_PROMPT=\"$(set_rgb_color \"${LAST_THEME_COLOR}\" \"${SCM_THEME_PROMPT_COLOR}\")${THEME_PROMPT_SEPARATOR}${normal?}${SCM_PROMPT} ${normal?}\"\n\t\tLAST_THEME_COLOR=${SCM_THEME_PROMPT_COLOR}\n\telse\n\t\tSCM_PROMPT=\"\"\n\tfi\n}\n\nfunction powerline_cwd_prompt {\n\t# shellcheck disable=SC2119\n\tCWD_PROMPT=\"$(set_rgb_color \"${LAST_THEME_COLOR}\" \"${CWD_THEME_PROMPT_COLOR}\")${THEME_PROMPT_SEPARATOR}$(set_rgb_color 0 \"${CWD_THEME_PROMPT_COLOR}\") $(_swd)${normal?}$(set_rgb_color \"${CWD_THEME_PROMPT_COLOR}\" -)${normal?}\"\n\tLAST_THEME_COLOR=${CWD_THEME_PROMPT_COLOR}\n}\n\nfunction powerline_last_status_prompt {\n\tif [[ \"$1\" -eq 0 ]]; then\n\t\tLAST_STATUS_PROMPT=\"$(set_rgb_color \"${LAST_THEME_COLOR}\" -)${THEME_PROMPT_SEPARATOR}${normal?}\"\n\telse\n\t\tLAST_STATUS_PROMPT=\"$(set_rgb_color \"${LAST_THEME_COLOR}\" \"${LAST_STATUS_THEME_PROMPT_COLOR}\")${THEME_PROMPT_SEPARATOR}${normal?}$(set_rgb_color - \"${LAST_STATUS_THEME_PROMPT_COLOR}\") ${LAST_STATUS} ${normal?}$(set_rgb_color \"${LAST_STATUS_THEME_PROMPT_COLOR}\" -)${THEME_PROMPT_SEPARATOR}${normal?}\"\n\tfi\n}\n\nfunction powerline_prompt_command() {\n\tlocal LAST_STATUS=\"$?\"\n\n\tpowerline_shell_prompt\n\tpowerline_virtualenv_prompt\n\tpowerline_scm_prompt\n\tpowerline_cwd_prompt\n\tpowerline_last_status_prompt LAST_STATUS\n\n\tPS1=\"${SHELL_PROMPT}${VIRTUALENV_PROMPT}${SCM_PROMPT}${CWD_PROMPT}${LAST_STATUS_PROMPT} \"\n}\n\nPROMPT_COMMAND=powerline_prompt_command\n"
  },
  {
    "path": "themes/primer/primer.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# based of the candy theme, but minimized by odbol\nfunction prompt_command() {\n\tPS1=\"$(clock_prompt) ${reset_color?}${white?}\\w${reset_color?}$(scm_prompt_info)${blue?} →${bold_blue?} ${reset_color?} \"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${blue?}\"}\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-\"%I:%M:%S\"}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/pro/pro.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${blue?}scm:( \"\nSCM_THEME_PROMPT_SUFFIX=\"${blue?} )\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${green?}git:( \"\nGIT_THEME_PROMPT_SUFFIX=\"${green?} )\"\n\nfunction git_prompt_info {\n\tgit_prompt_vars\n\techo -e \"$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_SUFFIX\"\n}\n\nfunction prompt() {\n\tPS1=\"\\h: \\W $(scm_prompt_info)${reset_color?} $ \"\n}\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/pure/pure.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# scm theming\nSCM_THEME_PROMPT_PREFIX=\"|\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\"(\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\")\"\n\nfunction pure_prompt() {\n\tlocal ps_host=\"${bold_blue?}\\h${normal?}\"\n\tlocal ps_user=\"${green?}\\u${normal?}\"\n\tlocal ps_user_mark=\"${green?} \\$ ${normal?}\"\n\tlocal ps_root=\"${red?}\\u${red?}\"\n\tlocal ps_root_mark=\"${red?} \\$ ${normal?}\"\n\tlocal ps_path=\"${yellow?}\\w${normal?}\"\n\tlocal virtualenv_prompt scm_prompt\n\tvirtualenv_prompt=\"$(virtualenv_prompt)\"\n\tscm_prompt=\"$(scm_prompt)\"\n\t# make it work\n\tcase \"${EUID:-$UID}\" in\n\t\t0)\n\t\t\tps_user_mark=\"${ps_root_mark}\"\n\t\t\tps_user=\"${ps_root}\"\n\t\t\t;;\n\tesac\n\tPS1=\"${virtualenv_prompt}${ps_user}@${ps_host}${scm_prompt}:${ps_path}${ps_user_mark}\"\n}\n\nsafe_append_prompt_command pure_prompt\n"
  },
  {
    "path": "themes/purity/purity.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}⊘${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_THEME_PROMPT_PREFIX=\"${reset_color?}( \"\nSCM_THEME_PROMPT_SUFFIX=\" ${reset_color?})\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${bold_red?}⊘${normal?}\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nGIT_THEME_PROMPT_PREFIX=\"${reset_color?}( \"\nGIT_THEME_PROMPT_SUFFIX=\" ${reset_color?})\"\n\nSTATUS_THEME_PROMPT_BAD=\"${bold_red?}❯${reset_color?}${normal?} \"\nSTATUS_THEME_PROMPT_OK=\"${bold_green?}❯${reset_color?}${normal?} \"\n: \"${PURITY_THEME_PROMPT_COLOR:=${blue?}}\"\n\nfunction venv_prompt() {\n\tpython_venv=\"\"\n\t# Detect python venv\n\tif [[ -n \"${CONDA_DEFAULT_ENV:-}\" ]]; then\n\t\tpython_venv=\"(${PYTHON_VENV_CHAR}${CONDA_DEFAULT_ENV}) \"\n\telif [[ -n \"${VIRTUAL_ENV}\" ]]; then\n\t\tpython_venv=\"(${PYTHON_VENV_CHAR}${VIRTUAL_ENV##*/}) \"\n\tfi\n\t[[ -n \"${python_venv}\" ]] && echo \"${python_venv}\"\n}\n\nfunction prompt_command() {\n\tlocal retval=\"$?\" ret_status python_venv scm_prompt_info venv_prompt\n\tcase \"${retval}\" in\n\t\t0)\n\t\t\tret_status=\"$STATUS_THEME_PROMPT_OK\"\n\t\t\t;;\n\t\t*)\n\t\t\tret_status=\"$STATUS_THEME_PROMPT_BAD\"\n\t\t\t;;\n\tesac\n\tscm_prompt_info=\"$(scm_prompt_info)\"\n\tvenv_prompt=\"$(venv_prompt)\"\n\tPS1=\"\\n${PURITY_THEME_PROMPT_COLOR}\\w ${scm_prompt_info}\\n${ret_status}${venv_prompt}\"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/radek/radek.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nGIT_THEME_PROMPT_DIRTY=\"${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\"${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\"${bold_cyan?}[\"\nGIT_THEME_PROMPT_SUFFIX=\"${bold_cyan?}]\"\n\nVIRTUALENV_THEME_PROMPT_PREFIX=\"${bold_green?}[\"\nVIRTUALENV_THEME_PROMPT_SUFFIX=\"${bold_green?}]\"\nCONDAENV_THEME_PROMPT_PREFIX=\"${bold_green?}[\"\nCONDAENV_THEME_PROMPT_SUFFIX=\"${bold_green?}]\"\nPYTHON_THEME_PROMPT_PREFIX=\"${bold_green?}[\"\nPYTHON_THEME_PROMPT_SUFFIX=\"${bold_green?}]\"\n\nfunction prompt_command() {\n\tPS1=\"\\n${bold_white?}[\\u@\\h]${bold_yellow?}[\\w] ${bold_cyan?}$(scm_prompt_char_info)$(python_version_prompt)${green?}\\n→${reset_color?} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/rainbowbrite/rainbowbrite.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# based off of n0qorg\n# looks like, if you're in a git repo:\n# ± ~/path/to (branch ✓) $\n# in glorious red / blue / yellow color scheme\n\nprompt_setter() {\n\t# Save history\n\t_save-and-reload-history 1\n\t# displays user@server in purple\n\t# PS1=\"${red?}$(scm_char) ${purple?}\\u@\\h${reset_color?}:${blue?}\\w${yellow?}$(scm_prompt_info)$(ruby_version_prompt) ${black?}\\$${reset_color?} \"\n\t# no user@server\n\tPS1=\"${red?}$(scm_char) ${blue?}\\w${yellow?}$(scm_prompt_info)$(ruby_version_prompt) ${black?}\\$${reset_color?} \"\n\tPS2='> '\n\tPS4='+ '\n}\n\nsafe_append_prompt_command prompt_setter\n\nSCM_NONE_CHAR='·'\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" (\"\nSCM_THEME_PROMPT_SUFFIX=\"${yellow?})\"\nRVM_THEME_PROMPT_PREFIX=\" (\"\nRVM_THEME_PROMPT_SUFFIX=\")\"\n"
  },
  {
    "path": "themes/ramses/ramses.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\n__my_rvm_ruby_version() {\n\tlocal version gemset\n\tgemset=$(echo \"$GEM_HOME\" | awk -F'@' '{print $2}')\n\t[[ -n \"$gemset\" ]] && gemset=\"@$gemset\"\n\tversion=$(echo \"$MY_RUBY_HOME\" | awk -F'-' '{print $2}')\n\tlocal full=\"$version$gemset\"\n\t[[ -n \"$full\" ]] && echo \"[$full]\"\n}\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\n# show chroot if exist\nchroot() {\n\tif [[ -n \"$debian_chroot\" ]]; then\n\t\tmy_ps_chroot=\"${bold_cyan?}$debian_chroot${normal?}\"\n\t\techo \"($my_ps_chroot)\"\n\tfi\n}\n\n# show virtualenvwrapper\nmy_ve() {\n\n\tif [[ -n \"$CONDA_DEFAULT_ENV\" ]]; then\n\t\tmy_ps_ve=\"${bold_purple?}${CONDA_DEFAULT_ENV}${normal?}\"\n\t\techo \"($my_ps_ve)\"\n\telif [ -n \"$VIRTUAL_ENV\" ]; then\n\t\tmy_ps_ve=\"${bold_purple?}$ve${normal?}\"\n\t\techo \"($my_ps_ve)\"\n\tfi\n\techo \"\"\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT='[%s][%s]'\n\tmy_ps_host=\"${green?}\\h${normal?}\"\n\t# yes, these are the the same for now ...\n\tmy_ps_host_root=\"${green?}\\h${normal?}\"\n\n\tmy_ps_user=\"${bold_green?}\\u${normal?}\"\n\tmy_ps_root=\"${bold_red?}\\u${normal?}\"\n\n\tif [ -n \"$VIRTUAL_ENV\" ]; then\n\t\tve=$(basename \"$VIRTUAL_ENV\")\n\tfi\n\n\t# nice prompt\n\tcase \"$(id -u)\" in\n\t\t0)\n\t\t\tPS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(scm_prompt)$(__my_rvm_ruby_version)[${cyan?}\\w${normal?}]\n▪ \"\n\t\t\t;;\n\t\t*)\n\t\t\tPS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(scm_prompt)$(__my_rvm_ruby_version)\n|─[${bold_purple?}\\w${normal?}]\n▪ \"\n\t\t\t;;\n\tesac\n}\n\nPS2=\"▪ \"\n\n# vi mode\nset -o vi\nbind 'set vi-ins-mode-string \"└+\"'\nbind 'set vi-cmd-mode-string \"└─\"'\nbind 'set show-mode-in-prompt on'\nbind '\"jj\":vi-movement-mode'\nVIMRUNTIME='true'\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/rana/rana.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC2312 # Expected behavior for themes.\n\n# Theme inspired on:\n#  - Ronacher's dotfiles (mitsuhikos) - http://github.com/mitsuhiko/dotfiles/tree/master/bash/\n#  - Glenbot - http://theglenbot.com/custom-bash-shell-for-development/\n#  - My extravagant zsh - http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/\n#  - Monokai colors - http://monokai.nl/blog/2006/07/15/textmate-color-theme/\n#  - Bash_it modern theme\n#\n# by Rana Amrit Parth<ramrit9@gmaiil.com>\n\n# For the real Monokai colors you should add these to your .XDefaults or\n# terminal configuration:\n# ----------------------------------------------------------- TERMINAL COLORS\n# monokai - http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/\n#*background: #272822\n#*foreground: #E2DA6E\n#*color0: black\n# mild red\n#*color1: #CD0000\n# light green\n#*color2: #A5E02D\n# orange (yellow)\n#*color3: #FB951F\n# \"dark\" blue\n#*color4: #076BCC\n# hot pink\n#*color5: #F6266C\n# cyan\n#*color6: #64D9ED\n# gray\n#*color7: #E5E5E5\n\n# ----------------------------------------------------------------- DEF COLOR\nRCol='\\e[0m' # Text Reset\n\n# Regular\nBla='\\e[0;30m'\nRed='\\e[0;31m'\nGre='\\e[0;32m'\nYel='\\e[0;33m'\nBlu='\\e[0;34m'\nPur='\\e[0;35m'\nCya='\\e[0;36m'\nWhi='\\e[0;37m'\n\n# Bold\nBBla='\\e[1;30m'\nBRed='\\e[1;31m'\nBYel='\\e[1;33m'\nBGre='\\e[1;32m'\nBBlu='\\e[1;34m'\nBPur='\\e[1;35m'\nBCya='\\e[1;36m'\nBWhi='\\e[1;37m'\n\n# High Intensity\nIBla='\\e[0;90m'\nIRed='\\e[0;91m'\nIGre='\\e[0;92m'\nIYel='\\e[0;93m'\nIBlu='\\e[0;94m'\nIPur='\\e[0;95m'\nICya='\\e[0;96m'\nIWhi='\\e[0;97m'\n\n# ----------------------------------------------------------------- COLOR CONF\nD_DEFAULT_COLOR=\"${Whi}\"\nD_INTERMEDIATE_COLOR=\"${BWhi}\"\nD_USER_COLOR=\"${Yel}\"\nD_SUPERUSER_COLOR=\"${Red}\"\nD_MACHINE_COLOR=\"${IYel}\"\nD_DIR_COLOR=\"${Gre}\"\nD_GIT_COLOR=\"${BBlu}\"\nD_SCM_COLOR=\"${BYel}\"\nD_BRANCH_COLOR=\"${BYel}\"\nD_CHANGES_COLOR=\"${Whi}\"\nD_CMDFAIL_COLOR=\"${Red}\"\nD_VIMSHELL_COLOR=\"${Cya}\"\n\n# ------------------------------------------------------------------ FUNCTIONS\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\033]0;\\w\\007\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"${D_INTERMEDIATE_COLOR}on ${D_VIMSHELL_COLOR}\\\nvim shell${D_DEFAULT_COLOR} \"\n\tfi\n}\n\nmitsuhikos_lastcommandfailed() {\n\tlocal code=$?\n\tif [ $code != 0 ]; then\n\t\techo \"${D_INTERMEDIATE_COLOR}exited ${D_CMDFAIL_COLOR}\\\n$code ${D_DEFAULT_COLOR}\"\n\tfi\n}\n\n# vcprompt for scm instead of bash_it default\ndemula_vcprompt() {\n\tif [[ -n \"$VCPROMPT_EXECUTABLE\" ]]; then\n\t\tlocal D_VCPROMPT_FORMAT=\"on ${D_SCM_COLOR}%s${D_INTERMEDIATE_COLOR}:\\\n${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}\"\n\t\t$VCPROMPT_EXECUTABLE -f \"$D_VCPROMPT_FORMAT\"\n\tfi\n}\n\nprompt_git() {\n\tlocal s=''\n\tlocal branchName=''\n\n\t# Check if the current directory is in a Git repository.\n\tif git rev-parse --is-inside-work-tree &> /dev/null; then\n\n\t\t# check if the current directory is in .git before running git checks\n\t\tif [ \"$(git rev-parse --is-inside-git-dir 2> /dev/null)\" == 'false' ]; then\n\n\t\t\t# Ensure the index is up to date.\n\t\t\tgit update-index --really-refresh -q &> /dev/null\n\n\t\t\t# Check for uncommitted changes in the index.\n\t\t\tif ! git diff --quiet --ignore-submodules --cached; then\n\t\t\t\ts+='+'\n\t\t\tfi\n\n\t\t\t# Check for unstaged changes.\n\t\t\tif ! git diff-files --quiet --ignore-submodules --; then\n\t\t\t\ts+='!'\n\t\t\tfi\n\n\t\t\t# Check for untracked files.\n\t\t\tif [[ -n \"$(git ls-files --others --exclude-standard)\" ]]; then\n\t\t\t\ts+='?'\n\t\t\tfi\n\n\t\t\t# Check for stashed files.\n\t\t\tif git rev-parse --verify refs/stash &> /dev/null; then\n\t\t\t\ts+='$'\n\t\t\tfi\n\n\t\tfi\n\n\t\t# Get the short symbolic ref.\n\t\t# If HEAD isn’t a symbolic ref, get the short SHA for the latest commit\n\t\t# Otherwise, just give up.\n\t\tbranchName=\"$(git symbolic-ref --quiet --short HEAD 2> /dev/null \\\n\t\t\t|| git rev-parse --short HEAD 2> /dev/null \\\n\t\t\t|| echo '(unknown)')\"\n\n\t\t[[ -n \"${s}\" ]] && s=\" [${s}]\"\n\n\t\techo -e \"${1}${branchName}${Cya}${s}\"\n\telse\n\t\treturn\n\tfi\n}\n\n# -------------------------------------------------------------- PROMPT OUTPUT\nprompt() {\n\tlocal LAST_COMMAND_FAILED\n\tLAST_COMMAND_FAILED=$(mitsuhikos_lastcommandfailed)\n\tlocal SAVE_CURSOR='\\033[s'\n\tlocal RESTORE_CURSOR='\\033[u'\n\tlocal MOVE_CURSOR_RIGHTMOST='\\033[500C'\n\tlocal MOVE_CURSOR_5_LEFT='\\033[5D'\n\n\tif [[ \"${OSTYPE}\" == 'linux'* ]]; then\n\t\tPS1=\"${TITLEBAR}\n${SAVE_CURSOR}${MOVE_CURSOR_RIGHTMOST}${MOVE_CURSOR_5_LEFT}\\\n$(battery_charge)${RESTORE_CURSOR}\\\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n$(prompt_git \"$D_INTERMEDIATE_COLOR on $D_GIT_COLOR\")\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n\telse\n\t\tPS1=\"${TITLEBAR}\n${D_USER_COLOR}\\u ${D_INTERMEDIATE_COLOR}\\\nat ${D_MACHINE_COLOR}\\h ${D_INTERMEDIATE_COLOR}\\\nin ${D_DIR_COLOR}\\w ${D_INTERMEDIATE_COLOR}\\\n$(prompt_git \"$D_INTERMEDIATE_COLOR on $D_GIT_COLOR\")\\\n${LAST_COMMAND_FAILED}\\\n$(demula_vcprompt)\\\n$(is_vim_shell)\\\n$(battery_charge)\n${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n\tfi\n\n\tPS2=\"${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}\"\n}\n\n# Runs prompt (this bypasses bash_it $PROMPT setting)\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/redline/redline.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n. \"$BASH_IT/themes/powerline/powerline.base.bash\"\n\nPROMPT_DISTRO_LOGO=\" \"\nPROMPT_DISTRO_LOGO_COLOR=15\nPROMPT_DISTRO_LOGO_COLORBG=52\n\nPROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=\"\"}\nPOWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=\"\"}\n\nUSER_INFO_SSH_CHAR=${POWERLINE_USER_INFO_SSH_CHAR:=\" \"}\nUSER_INFO_SUDO_CHAR=${POWERLINE_USER_INFO_SUDO_CHAR:=\" \"}\nUSER_INFO_THEME_PROMPT_COLOR=52\nUSER_INFO_THEME_PROMPT_COLOR_SUDO=52\n\nPYTHON_VENV_CHAR=${POWERLINE_PYTHON_VENV_CHAR:=\" \"}\nCONDA_PYTHON_VENV_CHAR=${POWERLINE_CONDA_PYTHON_VENV_CHAR:=\"❲c❳ \"}\nPYTHON_VENV_THEME_PROMPT_COLOR=23\n\nSCM_NONE_CHAR=\"\"\nSCM_GIT_CHAR=${POWERLINE_SCM_GIT_CHAR:=\" \"}\nSCM_THEME_PROMPT_CLEAN=\"\"\nSCM_THEME_PROMPT_DIRTY=\"\"\nSCM_THEME_PROMPT_CLEAN_COLOR=235\nSCM_THEME_PROMPT_DIRTY_COLOR=235  #124\nSCM_THEME_PROMPT_STAGED_COLOR=235 #52\nSCM_THEME_PROMPT_UNSTAGED_COLOR=88\nSCM_THEME_PROMPT_COLOR=${SCM_THEME_PROMPT_CLEAN_COLOR}\n\nRVM_THEME_PROMPT_PREFIX=\"\"\nRVM_THEME_PROMPT_SUFFIX=\"\"\nRBENV_THEME_PROMPT_PREFIX=\"\"\nRBENV_THEME_PROMPT_SUFFIX=\"\"\nRUBY_THEME_PROMPT_COLOR=161\nRUBY_CHAR=${POWERLINE_RUBY_CHAR:=\" \"}\n\nCWD_THEME_DIR_SEPARATOR=\"\"\nCWD_THEME_DIR_SEPARATOR_COLOR=52\n\nCWD_THEME_PROMPT_COLOR=238\nHOST_THEME_PROMPT_COLOR=88\n\nLAST_STATUS_THEME_PROMPT_COLOR=52\n\nCLOCK_THEME_PROMPT_COLOR=240\n\nBATTERY_AC_CHAR=${BATTERY_AC_CHAR:=\"⚡\"}\nBATTERY_STATUS_THEME_PROMPT_GOOD_COLOR=70\nBATTERY_STATUS_THEME_PROMPT_LOW_COLOR=208\nBATTERY_STATUS_THEME_PROMPT_CRITICAL_COLOR=160\n\nTHEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:=\"%H:%M:%S\"}\n\nIN_VIM_THEME_PROMPT_COLOR=245\nIN_VIM_THEME_PROMPT_TEXT=\"vim\"\n\nIN_TOOLBOX_THEME_PROMPT_COLOR=125\nIN_TOOLBOX_THEME_PROMPT_TEXT=\"⬢ \"\n\nPOWERLINE_PROMPT=${POWERLINE_PROMPT:=\"python_venv ruby user_info hostname cwd scm\"}\n\nsafe_append_prompt_command __powerline_prompt_command\n"
  },
  {
    "path": "themes/rjorgenson/rjorgenson.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC2154\n\n# port of zork theme\n\n# set colors for use throughout the prompt\n# i like things consistent\nBRACKET_COLOR=${blue?}\nSTRING_COLOR=${green?}\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${STRING_COLOR}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\n__my_rvm_ruby_version() {\n\tlocal gemset version full\n\tgemset=$(echo \"$GEM_HOME\" | awk -F'@' '{print $2}')\n\t[[ \"$gemset\" != \"\" ]] && gemset=\"@$gemset\"\n\tversion=$(echo \"$MY_RUBY_HOME\" | awk -F'-' '{print $2}')\n\tfull=\"$version$gemset\"\n\t[[ \"$full\" != \"\" ]] && echo \"${BRACKET_COLOR}[${STRING_COLOR}$full${BRACKET_COLOR}]${normal?}\"\n}\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"${BRACKET_COLOR}[${STRING_COLOR}vim shell${BRACKET_COLOR}]${normal?}\"\n\tfi\n}\n\nfunction is_integer() { # helper function for todo-txt-count\n\t[ \"$1\" -eq \"$1\" ] > /dev/null 2>&1\n\treturn $?\n}\n\ntodo_txt_count() {\n\tif hash todo.sh 2>&-; then # is todo.sh installed\n\t\tcount=$(todo.sh ls | grep -E \"TODO: [0-9]+ of ([0-9]+) tasks shown\" | awk '{ print $4 }')\n\t\tif is_integer \"$count\"; then # did we get a sane answer back\n\t\t\techo \"${BRACKET_COLOR}[${STRING_COLOR}T:$count${BRACKET_COLOR}]${normal?}\"\n\t\tfi\n\tfi\n}\n\nmy_prompt_char() {\n\tif [[ $OSTYPE =~ \"darwin\" ]]; then\n\t\techo \"${BRACKET_COLOR}➞  ${normal?}\"\n\telse\n\t\techo \"${BRACKET_COLOR}➞ ${normal?}\"\n\tfi\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT=\"${BRACKET_COLOR}[%s${BRACKET_COLOR}][${STRING_COLOR}%s${BRACKET_COLOR}]\"\n\n\tmy_ps_host=\"${STRING_COLOR}\\h${normal?}\"\n\tmy_ps_user=\"${STRING_COLOR}\\u${normal?}\"\n\tmy_ps_root=\"${bold_red?}\\u${normal?}\"\n\tmy_ps_path=\"${STRING_COLOR}\\w${normal?}\"\n\n\t# nice prompt\n\tcase \"$(id -u)\" in\n\t\t0)\n\t\t\tPS1=\"${TITLEBAR}${BRACKET_COLOR}┌─[$my_ps_root${BRACKET_COLOR}][$my_ps_host${BRACKET_COLOR}]$(scm_prompt)$(__my_rvm_ruby_version)${BRACKET_COLOR}[${STRING_COLOR}\\w${BRACKET_COLOR}]$(is_vim_shell)\n${BRACKET_COLOR}└─$(my_prompt_char)${normal?}\"\n\t\t\t;;\n\t\t*)\n\t\t\tPS1=\"${TITLEBAR}${BRACKET_COLOR}┌─[$my_ps_user${BRACKET_COLOR}][$my_ps_host${BRACKET_COLOR}]$(scm_prompt)$(__my_rvm_ruby_version)${BRACKET_COLOR}[${STRING_COLOR}\\w${BRACKET_COLOR}]$(is_vim_shell)\n${BRACKET_COLOR}└─$(todo_txt_count)$(my_prompt_char)\"\n\t\t\t;;\n\tesac\n}\n\nPS2=\"└─$(my_prompt_char)\"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/robbyrussell/robbyrussell.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034,SC2154\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_yellow?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${bold_blue?}scm:(\"\nSCM_THEME_PROMPT_SUFFIX=\"${bold_blue?})\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${bold_yellow?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${bold_blue?}git:(\"\nGIT_THEME_PROMPT_SUFFIX=\"${bold_blue?})\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nVIRTUALENV_THEME_PROMPT_PREFIX='('\nVIRTUALENV_THEME_PROMPT_SUFFIX=') '\n\nfunction git_prompt_info() {\n\tgit_prompt_vars\n\techo -e \"$SCM_PREFIX${bold_red?}$SCM_BRANCH$SCM_STATE$SCM_SUFFIX\"\n}\n\nfunction prompt_command() {\n\tPS1=\"$(conda_or_venv_prompt)${bold_green?}➜  ${bold_cyan?}\\W${reset_color?}$(scm_prompt_info)${normal?} \"\n}\n\nPROMPT_COMMAND=prompt_command\n"
  },
  {
    "path": "themes/roderik/roderik.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nexport GIT_PS1_SHOWDIRTYSTATE=true\nexport GIT_PS1_SHOWUNTRACKEDFILES=true\nexport GIT_PS1_SHOWSTASHSTATE=true\n\nexport PROMPT_DIRTRIM=3\n\nfunction prompt_command() {\n\tif [[ ${EUID} == 0 ]]; then\n\t\tPS1=\"[$(clock_prompt)]${yellow?}[${red?}\\u@\\h ${green?}\\w${yellow?}]${red?}$(__git_ps1 \"(%s)\")${normal?}\\\\$ \"\n\telse\n\t\tPS1=\"[$(clock_prompt)]${yellow?}[${cyan?}\\u@\\h ${green?}\\w${yellow?}]${red?}$(__git_ps1 \"(%s)\")${normal?}\\\\$ \"\n\tfi\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/sexy/sexy.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Sexy Bash Prompt, inspired by \"Extravagant Zsh Prompt\"\n# Screenshot: http://cloud.gf3.ca/M5rG\n# A big thanks to \\amethyst on Freenode\n#\n# Configuration:\n#   * To visualize python environment (virtualenv and conda) add in your .bash_profile the following line:\n#       export SEXY_THEME_SHOW_PYTHON=true\n\n# Default setting\nSEXY_THEME_SHOW_PYTHON=\"${SEXY_THEME_SHOW_PYTHON:=false}\"\n\nif tput setaf 1 &> /dev/null; then\n\tif [[ $(tput colors) -ge 256 ]] 2> /dev/null; then\n\t\tMAGENTA=$(tput setaf 9)\n\t\tORANGE=$(tput setaf 172)\n\t\tGREEN=$(tput setaf 190)\n\t\tPURPLE=$(tput setaf 141)\n\t\tWHITE=$(tput setaf 0)\n\telse\n\t\tMAGENTA=$(tput setaf 5)\n\t\tORANGE=$(tput setaf 4)\n\t\tGREEN=$(tput setaf 2)\n\t\tPURPLE=$(tput setaf 1)\n\t\tWHITE=$(tput setaf 7)\n\tfi\n\tBOLD=$(tput bold)\n\tRESET=$(tput sgr0)\nelse\n\tMAGENTA=\"\\033[1;31m\"\n\tORANGE=\"\\033[1;33m\"\n\tGREEN=\"\\033[1;32m\"\n\tPURPLE=\"\\033[1;35m\"\n\tWHITE=\"\\033[1;37m\"\n\tBOLD=\"\"\n\tRESET=\"\\033[m\"\nfi\n\nparse_git_dirty() {\n\t[[ $(git status 2> /dev/null | tail -n1 | cut -c 1-17) != \"nothing to commit\" ]] && echo \"*\"\n}\nparse_git_branch() {\n\tgit branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e \"s/* \\(.*\\)/\\1$(parse_git_dirty)/\"\n}\nenv_prompt() {\n\techo -e \"($(virtualenv_prompt)$(condaenv_prompt))\"\n}\n\nfunction prompt_command() {\n\tPS1=\"\\[${BOLD}${MAGENTA}\\]\\u \\[$WHITE\\]at \\[$ORANGE\\]\\h \\[$WHITE\\]in \\[$GREEN\\]\\w\\[$WHITE\\]\\$([[ -n \\$(git branch 2> /dev/null) ]] && echo \\\" on \\\")\\[$PURPLE\\]\\$(parse_git_branch)\\[$WHITE\\]\\n\\$ \\[$RESET\\]\"\n\n\tif [ \"$SEXY_THEME_SHOW_PYTHON\" = true ]; then\n\t\tPS1=\"\\[${BOLD}${WHITE}\\]$(env_prompt) \"$PS1\n\tfi\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/simple/simple.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# prompt themeing\n\n#added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nfunction prompt_command() {\n\tPS1=\"${TITLEBAR}${orange?}${reset_color?}${green?}\\w${bold_blue?}\\[$(scm_prompt_info)\\]${normal?} \"\n}\n\n# scm themeing\nSCM_THEME_PROMPT_DIRTY=\" ✗\"\nSCM_THEME_PROMPT_CLEAN=\" ✓\"\nSCM_THEME_PROMPT_PREFIX=\"(\"\nSCM_THEME_PROMPT_SUFFIX=\")\"\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/sirup/sirup.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# For unstaged(*) and staged(+) values next to branch name in __git_ps1\nGIT_PS1_SHOWDIRTYSTATE=\"enabled\"\n\nfunction rvm_version_prompt {\n\tlocal gemset version\n\tgemset=$(echo \"$GEM_HOME\" | awk -F'@' '{print $2}')\n\t[[ -n \"$gemset\" ]] && gemset=\"@$gemset\"\n\tversion=$(echo \"$MY_RUBY_HOME\" | awk -F'-' '{print $2}')\n\t[[ \"$version\" == \"1.9.2\" ]] && version=\"\"\n\tlocal full=\"$version$gemset\"\n\t[[ -n \"$full\" ]] && echo \"$full\"\n}\n\nfunction prompt_command() {\n\t# Check http://github.com/Sirupsen/dotfiles for screenshot\n\tPS1=\"${blue?}\\W/${bold_blue?}$(rvm_version_prompt)${bold_green?}$(__git_ps1 \" (%s)\") ${normal?}$ \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/slick/slick.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_cyan?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_green?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\n__my_rvm_ruby_version() {\n\tlocal gemset version\n\tgemset=$(echo \"$GEM_HOME\" | awk -F'@' '{print $2}')\n\t[[ \"$gemset\" ]] && gemset=\"@$gemset\"\n\tversion=$(echo \"$MY_RUBY_HOME\" | awk -F'-' '{print $2}')\n\tlocal full=\"$version$gemset\"\n\t[[ \"$full\" ]] && echo \"[$full]\"\n}\n\n__my_venv_prompt() {\n\tif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\techo \"[${blue?}@${normal?}${VIRTUAL_ENV##*/}]\"\n\tfi\n}\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT='[%s][%s]'\n\tcase $HOSTNAME in\n\t\t\"clappy\"*)\n\t\t\tmy_ps_host=\"${green?}\\h${normal?}\"\n\t\t\t;;\n\t\t\"icekernel\")\n\t\t\tmy_ps_host=\"${red?}\\h${normal?}\"\n\t\t\t;;\n\t\t*)\n\t\t\tmy_ps_host=\"${green?}\\h${normal?}\"\n\t\t\t;;\n\tesac\n\n\tmy_ps_user=\"\\[\\033[01;32m\\]\\u\\[\\033[00m\\]\"\n\tmy_ps_root=\"\\[\\033[01;31m\\]\\u\\[\\033[00m\\]\"\n\tmy_ps_path=\"\\[\\033[01;36m\\]\\w\\[\\033[00m\\]\"\n\n\t# nice prompt\n\tcase \"$(id -u)\" in\n\t\t0)\n\t\t\tPS1=\"${TITLEBAR}[$my_ps_root][$my_ps_host]$(scm_prompt)$(__my_rvm_ruby_version)[${cyan?}\\w${normal?}]$(is_vim_shell)\n$ \"\n\t\t\t;;\n\t\t*)\n\t\t\tPS1=\"${TITLEBAR}[$my_ps_user][$my_ps_host]$(scm_prompt)$(__my_rvm_ruby_version)$(__my_venv_prompt)[${cyan?}\\w${normal?}]$(is_vim_shell)\n$ \"\n\t\t\t;;\n\tesac\n}\n\nPS2=\"> \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "themes/standard/standard.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# scm themeing\nSCM_THEME_PROMPT_DIRTY=\"×\"\nSCM_THEME_PROMPT_CLEAN=\"✓\"\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\n# TODO: need a check for OS before adding this to the prompt\n# ${debian_chroot:+($debian_chroot)}\n\n#added TITLEBAR for updating the tab and window titles with the pwd\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR='\\[\\033]0;\\w\\007\\]'\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nfunction prompt_command() {\n\t# shellcheck disable=SC2016\n\tPROMPT='${green?}\\u${normal?}@${green?}\\h${normal?}:${blue?}\\w${normal?}${red?}$(prompt_char)$(git_prompt_info)${normal?}\\$ '\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/tonka/tonka.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n__tonka_time() {\n\tTHEME_CLOCK_FORMAT=\"%H%M\"\n\tclock_prompt\n}\n\n__tonka_date() {\n\tTHEME_CLOCK_FORMAT=\"%a,%d %b %y\"\n\tclock_prompt\n}\n\n__tonka_clock() {\n\tlocal LIGHT_BLUE=\"\\[\\033[1;34m\\]\"\n\tif [[ \"${THEME_SHOW_CLOCK}\" = \"true\" ]]; then\n\t\techo \"$(__tonka_time)${LIGHT_BLUE}:$(__tonka_date)${LIGHT_BLUE}:\"\n\tfi\n}\n\nprompt_setter() {\n\n\t#   Named \"Tonka\" because of the colour scheme\n\tlocal WHITE=\"\\[\\033[1;37m\\]\"\n\tlocal LIGHT_BLUE=\"\\[\\033[1;34m\\]\"\n\tlocal YELLOW=\"\\[\\033[1;33m\\]\"\n\tlocal NO_COLOUR=\"\\[\\033[0m\\]\"\n\n\tcase $TERM in\n\t\txterm* | rxvt*)\n\t\t\tTITLEBAR='\\[\\033]0;\\u@\\h:\\w\\007\\]'\n\t\t\t;;\n\t\t*)\n\t\t\tTITLEBAR=\"\"\n\t\t\t;;\n\tesac\n\n\tPS1=\"$TITLEBAR$YELLOW-$LIGHT_BLUE-(\\\n$YELLOW\\u$LIGHT_BLUE@$YELLOW\\h\\\n$LIGHT_BLUE)-(\\\n$YELLOW\\$PWD\\\n$LIGHT_BLUE)-$YELLOW-\\\n\\n\\\n$YELLOW-$LIGHT_BLUE-(\\\n$(__tonka_clock)\\\n$WHITE\\$ $LIGHT_BLUE)-$YELLOW-$NO_COLOUR \"\n\n\tPS2=\"$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR \"\n\n}\n\nsafe_append_prompt_command prompt_setter\n\nTHEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-\"true\"}\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"\\[\\033[1;33m\\]\"}\n\nexport PS3=\">> \"\n\nLS_COLORS='no=00:fi=00:di=00;33:ln=01;36:pi=40;34:so=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.deb=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.mpg=01;37:*.avi=01;37:*.gl=01;37:*.dl=01;37:'\n\nexport LS_COLORS\n"
  },
  {
    "path": "themes/tonotdo/tonotdo.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\" ${purple?}\"\nSCM_THEME_PROMPT_SUFFIX=\" ${normal?}\"\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nSCM_GIT_SHOW_DETAILS=\"false\"\n\nfunction prompt_command() {\n\tPS1=\"${yellow?}\\u${normal?}${cyan?}@\\h${normal?}${purple?} ${normal?}${green?}\\w${normal?}$(scm_prompt_info)> \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/tylenol/tylenol.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# Based on 'bobby' theme with the addition of virtualenv_prompt\n#\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" ${yellow?}|${reset_color?}\"\nSCM_THEME_PROMPT_SUFFIX=\"${yellow?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\nVIRTUALENV_THEME_PROMPT_PREFIX='|'\nVIRTUALENV_THEME_PROMPT_SUFFIX='|'\n\nfunction prompt_command() {\n\tPS1=\"\\n${green?}$(virtualenv_prompt)${red?}$(ruby_version_prompt) ${reset_color?}\\h ${orange?}in ${reset_color?}\\w\\n${yellow?}$(scm_char)$(scm_prompt_info) ${yellow?}→${white?} \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/wanelo/wanelo.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nSCM_THEME_PROMPT_PREFIX=\" |\"\nSCM_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nGIT_THEME_PROMPT_DIRTY=\" ${red?}✗\"\nGIT_THEME_PROMPT_CLEAN=\" ${bold_green?}✓\"\nGIT_THEME_PROMPT_PREFIX=\" ${green?}|\"\nGIT_THEME_PROMPT_SUFFIX=\"${green?}|\"\n\nRVM_THEME_PROMPT_PREFIX=\"|\"\nRVM_THEME_PROMPT_SUFFIX=\"|\"\n\nfunction prompt_command() {\n\tif [ $? -eq 0 ]; then\n\t\tstatus=❤️\n\telse\n\t\tstatus=💔\n\tfi\n\tPS1=\"\\n${yellow?}$(ruby_version_prompt) ${purple?}\\h ${reset_color?}in ${green?}\\w $status \\n${bold_cyan?} ${blue?}|$(clock_prompt)|${green?}$(scm_prompt_info) ${green}→${reset_color?} \"\n}\n\nTHEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-\"${blue?}\"}\n\nPROMPT_COMMAND=prompt_command\n"
  },
  {
    "path": "themes/zitron/zitron.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\n# zitron theme by Florian Baumann <flo@noqqe.de>\n\n## git-theme\n# feel free to change git chars.\nGIT_THEME_PROMPT_DIRTY=\"${bold_yellow?}*${normal?}\"\nGIT_THEME_PROMPT_CLEAN=\"\"\nGIT_THEME_PROMPT_PREFIX=\"\"\nGIT_THEME_PROMPT_SUFFIX=\"\"\n\n## ls colors\n# thanks a lot to http://geoff.greer.fm/lscolors/\nexport LSCOLORS=\"Gxfxcxdxbxegedabagacad\"\nexport LS_COLORS=\"no=00:fi=00:di=01;33:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;34:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:\"\n\nfunction prompt_command() {\n\t## look-a-like\n\t# user:host:pwd git-branch(*)$\n\t# for example:\n\t# noqqe:deathstar:themes master*$\n\tPS1=\"${reset_color?}\\u:$(hostname)${normal?}:${bold_yellow?}\\W/${normal?} $(git_prompt_info)${reset_color?}$ \"\n}\n\nsafe_append_prompt_command prompt_command\n"
  },
  {
    "path": "themes/zork/zork.theme.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2034 # Expected behavior for themes.\n\nSCM_THEME_PROMPT_PREFIX=\"\"\nSCM_THEME_PROMPT_SUFFIX=\"\"\n\nSCM_THEME_PROMPT_DIRTY=\" ${bold_red?}✗${normal?}\"\nSCM_THEME_PROMPT_CLEAN=\" ${bold_green?}✓${normal?}\"\nSCM_GIT_CHAR=\"${bold_green?}±${normal?}\"\nSCM_SVN_CHAR=\"${bold_cyan?}⑆${normal?}\"\nSCM_HG_CHAR=\"${bold_red?}☿${normal?}\"\n\n#Mysql Prompt\nexport MYSQL_PS1=\"(\\u@\\h) [\\d]> \"\n\ncase $TERM in\n\txterm*)\n\t\tTITLEBAR=\"\\[\\033]0;\\w\\007\\]\"\n\t\t;;\n\t*)\n\t\tTITLEBAR=\"\"\n\t\t;;\nesac\n\nPS3=\">> \"\n\n__my_rvm_ruby_version() {\n\tlocal gemset version\n\tgemset=$(echo \"$GEM_HOME\" | awk -F'@' '{print $2}')\n\t[[ -n \"$gemset\" ]] && gemset=\"@$gemset\"\n\tversion=$(echo \"$MY_RUBY_HOME\" | awk -F'-' '{print $2}')\n\tlocal full=\"$version$gemset\"\n\t[[ -n \"$full\" ]] && echo \"[$full]\"\n}\n\nis_vim_shell() {\n\tif [[ -n \"$VIMRUNTIME\" ]]; then\n\t\techo \"[${cyan?}vim shell${normal?}]\"\n\tfi\n}\n\n# show chroot if exist\nchroot() {\n\tif [[ -n \"$debian_chroot\" ]]; then\n\t\tmy_ps_chroot=\"${bold_cyan?}$debian_chroot${normal?}\"\n\t\techo \"($my_ps_chroot)\"\n\tfi\n}\n\n# show virtualenvwrapper\nmy_ve() {\n\n\tif [[ -n \"$CONDA_DEFAULT_ENV\" ]]; then\n\t\tmy_ps_ve=\"${bold_purple?}${CONDA_DEFAULT_ENV}${normal?}\"\n\t\techo \"($my_ps_ve)\"\n\telif [[ -n \"$VIRTUAL_ENV\" ]]; then\n\t\tmy_ps_ve=\"${bold_purple?}$ve${normal?}\"\n\t\techo \"($my_ps_ve)\"\n\tfi\n\techo \"\"\n}\n\nprompt() {\n\tSCM_PROMPT_FORMAT='[%s][%s]'\n\tmy_ps_host=\"${green?}\\h${normal?}\"\n\t# yes, these are the the same for now ...\n\tmy_ps_host_root=\"${green?}\\h${normal?}\"\n\n\tmy_ps_user=\"${bold_green?}\\u${normal?}\"\n\tmy_ps_root=\"${bold_red?}\\u${normal?}\"\n\n\tif [ -n \"$VIRTUAL_ENV\" ]; then\n\t\tve=$(basename \"$VIRTUAL_ENV\")\n\tfi\n\n\t# nice prompt\n\tcase \"$(id -u)\" in\n\t\t0)\n\t\t\tPS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(scm_prompt)$(__my_rvm_ruby_version)[${cyan?}\\w${normal?}]$(is_vim_shell)\n└─▪ \"\n\t\t\t;;\n\t\t*)\n\t\t\tPS1=\"${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_user][$my_ps_host]$(scm_prompt)$(__my_rvm_ruby_version)[${cyan?}\\w${normal?}]$(is_vim_shell)\n└─▪ \"\n\t\t\t;;\n\tesac\n}\n\nPS2=\"└─▪ \"\n\nsafe_append_prompt_command prompt\n"
  },
  {
    "path": "uninstall.sh",
    "content": "#!/usr/bin/env bash\n#\n# Since we're uninstalling, avoid depending on any other part of _Bash It_.\n# I.e., hard-code colors (avoid `lib/colors.bash`), &c.\n\n: \"${BASH_IT:=${HOME?}/.bash_it}\"\n\nif [[ ! -e ~/.bashrc && ! -e ~/.bash_profile && ! -e ~/.bashrc.bak && ! -e ~/.bash_profile.bak ]]; then\n\techo \"We can't locate your configuration files, so we can't uninstall...\"\n\treturn\nelif grep -F -q -- BASH_IT ~/.bashrc && grep -F -q -- BASH_IT ~/.bash_profile; then\n\techo \"We can't figure out if Bash-it is loaded from ~/.bashrc or ~/.bash_profile...\"\n\treturn\nelif grep -F -q -- BASH_IT ~/.bashrc || [[ -e ~/.bashrc.bak && ! -e ~/.bashrc ]]; then\n\tCONFIG_FILE=\".bashrc\"\nelif grep -F -q -- BASH_IT ~/.bash_profile || [[ -e ~/.bash_profile.bak && ! -e ~/.bash_profile ]]; then\n\tCONFIG_FILE=\".bash_profile\"\nelse\n\techo \"Bash-it does not appear to be installed.\"\n\treturn\nfi\n\ncase $OSTYPE in\n\tdarwin*)\n\t\tCONFIG_FILE=.bash_profile\n\t\t;;\n\t*)\n\t\tCONFIG_FILE=.bashrc\n\t\t;;\nesac\n\n# overriding CONFIG_FILE:\nCONFIG_FILE=\"${BASH_IT_CONFIG_FILE:-\"${CONFIG_FILE}\"}\"\n# possible states:\n# - both .bash* /and/ .bash*.bak, /and/ both config reference `$BASH_IT`: no solution\n# - both config and bak, but only one references `$BASH_IT`: that one\n# - both config, only one bak, but other references `$BASH_IT`: the other one?\n# - both config, no bak, with `$BASH_IT` reference: that one\n# - one config, no bak, but no `$BASH_IT` reference: wut\n# - no config, with bak, with `$BASH_IT`: re-create???\n# - no config, no bak: nothing.\n\nBACKUP_FILE=$CONFIG_FILE.bak\n\nif [[ ! -e \"${HOME?}/$BACKUP_FILE\" ]]; then\n\tprintf '\\e[0;33m%s\\e[0m\\n' \"Backup file ~/$BACKUP_FILE not found.\"\n\n\ttest -w \"${HOME?}/$CONFIG_FILE\" \\\n\t\t&& mv \"${HOME?}/$CONFIG_FILE\" \"${HOME?}/$CONFIG_FILE.uninstall\" \\\n\t\t&& printf '\\e[0;32m%s\\e[0m\\n' \"Moved your ~/$CONFIG_FILE to ~/$CONFIG_FILE.uninstall.\"\nelse\n\t# Create a backup of the current config before restoring the old one\n\t# Use -L to dereference symlinks (for homesick/dotfile managers)\n\tif [[ -e \"${HOME?}/$CONFIG_FILE\" ]]; then\n\t\tcp -L \"${HOME?}/$CONFIG_FILE\" \"${HOME?}/$CONFIG_FILE.pre-uninstall.bak\"\n\t\tprintf '\\e[0;33m%s\\e[0m\\n' \"Current ~/$CONFIG_FILE backed up to ~/$CONFIG_FILE.pre-uninstall.bak\"\n\tfi\n\n\ttest -w \"${HOME?}/$BACKUP_FILE\" \\\n\t\t&& cp -a \"${HOME?}/$BACKUP_FILE\" \"${HOME?}/$CONFIG_FILE\" \\\n\t\t&& rm \"${HOME?}/$BACKUP_FILE\" \\\n\t\t&& printf '\\e[0;32m%s\\e[0m\\n' \"Your original ~/$CONFIG_FILE has been restored.\"\n\n\tprintf '\\e[0;33m%s\\e[0m\\n' \"NOTE: If you had made changes since installing Bash-it, they are preserved in ~/$CONFIG_FILE.pre-uninstall.bak\"\nfi\n\nprintf '\\n\\e[0;32m%s\\e[0m\\n\\n' \"Uninstallation finished successfully! Sorry to see you go!\"\nprintf '%s\\n' \"Final steps to complete the uninstallation:\"\nprintf '\\t%s\\n' \"-> Remove the ${BASH_IT//${HOME?}/\\~} folder\"\nprintf '\\t%s\\n' \"-> Open a new shell/tab/terminal\"\n"
  },
  {
    "path": "vendor/.gitattributes",
    "content": "* -whitespace\ninit.d/*.bash text eol=lf\n"
  },
  {
    "path": "vendor/github.com/django/django/AUTHORS",
    "content": "Django was originally created in late 2003 at World Online, the Web division\nof the Lawrence Journal-World newspaper in Lawrence, Kansas.\n\nHere is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS --\npeople who have submitted patches, reported bugs, added translations, helped\nanswer newbie questions, and generally made Django that much better:\n\n    Aaron Cannon <cannona@fireantproductions.com>\n    Aaron Swartz <http://www.aaronsw.com/>\n    Aaron T. Myers <atmyers@gmail.com>\n    Abeer Upadhyay <ab.esquarer@gmail.com>\n    Abhijeet Viswa <abhijeetviswa@gmail.com>\n    Abhinav Patil <https://github.com/ubadub/>\n    Abhishek Gautam <abhishekg1128@yahoo.com>\n    Adam Allred <adam.w.allred@gmail.com>\n    Adam Bogdał <adam@bogdal.pl>\n    Adam Donaghy\n    Adam Johnson <https://github.com/adamchainz>\n    Adam Malinowski <https://adammalinowski.co.uk/>\n    Adam Vandenberg\n    Adiyat Mubarak <adiyatmubarak@gmail.com>\n    Adnan Umer <u.adnan@outlook.com>\n    Adrian Holovaty <adrian@holovaty.com>\n    Adrien Lemaire <lemaire.adrien@gmail.com>\n    Afonso Fernández Nogueira <fonzzo.django@gmail.com>\n    AgarFu <heaven@croasanaso.sytes.net>\n    Ahmad Alhashemi <trans@ahmadh.com>\n    Ahmad Al-Ibrahim\n    Ahmed Eltawela <https://github.com/ahmedabt>\n    ajs <adi@sieker.info>\n    Akash Agrawal <akashrocksha@gmail.com>\n    Akis Kesoglou <akiskesoglou@gmail.com>\n    Aksel Ethem <aksel.ethem@gmail.com>\n    Akshesh Doshi <aksheshdoshi+django@gmail.com>\n    alang@bright-green.com\n    Alasdair Nicol <https://al.sdair.co.uk/>\n    Albert Wang <https://github.com/albertyw/>\n    Alcides Fonseca\n    Aldian Fazrihady <mobile@aldian.net>\n    Aleksandra Sendecka <asendecka@hauru.eu>\n    Aleksi Häkli <aleksi.hakli@iki.fi>\n    Alexander Dutton <dev@alexdutton.co.uk>\n    Alexander Myodov <alex@myodov.com>\n    Alexandr Tatarinov <tatarinov1997@gmail.com>\n    Alex Aktsipetrov <alex.akts@gmail.com>\n    Alex Becker <https://alexcbecker.net/>\n    Alex Couper <http://alexcouper.com/>\n    Alex Dedul\n    Alex Gaynor <alex.gaynor@gmail.com>\n    Alex Hill <alex@hill.net.au>\n    Alex Ogier <alex.ogier@gmail.com>\n    Alex Robbins <alexander.j.robbins@gmail.com>\n    Alexey Boriskin <alex@boriskin.me>\n    Alexey Tsivunin <most-208@yandex.ru>\n    Aljosa Mohorovic <aljosa.mohorovic@gmail.com>\n    Amit Chakradeo <https://amit.chakradeo.net/>\n    Amit Ramon <amit.ramon@gmail.com>\n    Amit Upadhyay <http://www.amitu.com/blog/>\n    A. Murat Eren <meren@pardus.org.tr>\n    Ana Belen Sarabia <belensarabia@gmail.com>\n    Ana Krivokapic <https://github.com/infraredgirl>\n    Andi Albrecht <albrecht.andi@gmail.com>\n    André Ericson <de.ericson@gmail.com>\n    Andrei Kulakov <andrei.avk@gmail.com>\n    Andreas\n    Andreas Mock <andreas.mock@web.de>\n    Andreas Pelme <andreas@pelme.se>\n    Andrés Torres Marroquín <andres.torres.marroquin@gmail.com>\n    Andrew Brehaut <https://brehaut.net/blog>\n    Andrew Clark <amclark7@gmail.com>\n    Andrew Durdin <adurdin@gmail.com>\n    Andrew Godwin <andrew@aeracode.org>\n    Andrew Pinkham <http://AndrewsForge.com>\n    Andrews Medina <andrewsmedina@gmail.com>\n    Andriy Sokolovskiy <me@asokolovskiy.com>\n    Andy Dustman <farcepest@gmail.com>\n    Andy Gayton <andy-django@thecablelounge.com>\n    andy@jadedplanet.net\n    Anssi Kääriäinen <akaariai@gmail.com>\n    ant9000@netwise.it\n    Anthony Briggs <anthony.briggs@gmail.com>\n    Anton Samarchyan <desecho@gmail.com>\n    Antoni Aloy\n    Antonio Cavedoni <http://cavedoni.com/>\n    Antonis Christofides <anthony@itia.ntua.gr>\n    Antti Haapala <antti@industrialwebandmagic.com>\n    Antti Kaihola <http://djangopeople.net/akaihola/>\n    Anubhav Joshi <anubhav9042@gmail.com>\n    Aram Dulyan\n    arien <regexbot@gmail.com>\n    Armin Ronacher\n    Aron Podrigal <aronp@guaranteedplus.com>\n    Artem Gnilov <boobsd@gmail.com>\n    Arthur <avandorp@gmail.com>\n    Arthur Koziel <http://arthurkoziel.com>\n    Arthur Rio <arthur.rio44@gmail.com>\n    Arvis Bickovskis <viestards.lists@gmail.com>\n    Aryeh Leib Taurog <http://www.aryehleib.com/>\n    A S Alam <aalam@users.sf.net>\n    Asif Saif Uddin <auvipy@gmail.com>\n    atlithorn <atlithorn@gmail.com>\n    Audrey Roy <http://audreymroy.com/>\n    av0000@mail.ru\n    Axel Haustant <noirbizarre@gmail.com>\n    Aymeric Augustin <aymeric.augustin@m4x.org>\n    Bahadır Kandemir <bahadir@pardus.org.tr>\n    Baishampayan Ghose\n    Baptiste Mispelon <bmispelon@gmail.com>\n    Barry Pederson <bp@barryp.org>\n    Bartolome Sanchez Salado <i42sasab@uco.es>\n    Bartosz Grabski <bartosz.grabski@gmail.com>\n    Bashar Al-Abdulhadi\n    Bastian Kleineidam <calvin@debian.org>\n    Batiste Bieler <batiste.bieler@gmail.com>\n    Batman\n    Batuhan Taskaya <batuhanosmantaskaya@gmail.com>\n    Baurzhan Ismagulov <ibr@radix50.net>\n    Ben Dean Kawamura <ben.dean.kawamura@gmail.com>\n    Ben Firshman <ben@firshman.co.uk>\n    Ben Godfrey <http://aftnn.org>\n    Benjamin Wohlwend <piquadrat@gmail.com>\n    Ben Khoo <khoobks@westnet.com.au>\n    Ben Slavin <benjamin.slavin@gmail.com>\n    Ben Sturmfels <ben@sturm.com.au>\n    Berker Peksag <berker.peksag@gmail.com>\n    Bernd Schlapsi\n    Bernhard Essl <me@bernhardessl.com>\n    berto\n    Bill Fenner <fenner@gmail.com>\n    Bjørn Stabell <bjorn@exoweb.net>\n    Bo Marchman <bo.marchman@gmail.com>\n    Bogdan Mateescu\n    Bojan Mihelac <bmihelac@mihelac.org>\n    Bouke Haarsma <bouke@haarsma.eu>\n    Božidar Benko <bbenko@gmail.com>\n    Brad Melin <melinbrad@gmail.com>\n    Brandon Chinn <https://brandonchinn178.github.io/>\n    Brant Harris\n    Brendan Hayward <brendanhayward85@gmail.com>\n    Brendan Quinn <brendan@cluefulmedia.com>\n    Brenton Simpson <http://theillustratedlife.com>\n    Brett Cannon <brett@python.org>\n    Brett Hoerner <bretthoerner@bretthoerner.com>\n    Brian Beck <http://blog.brianbeck.com/>\n    Brian Fabian Crain <http://www.bfc.do/>\n    Brian Harring <ferringb@gmail.com>\n    Brian Helba <brian.helba@kitware.com>\n    Brian Ray <http://brianray.chipy.org/>\n    Brian Rosner <brosner@gmail.com>\n    Bruce Kroeze <https://coderseye.com/>\n    Bruno Alla <alla.brunoo@gmail.com>\n    Bruno Renié <buburno@gmail.com>\n    brut.alll@gmail.com\n    Bryan Chow <bryan at verdjn dot com>\n    Bryan Veloso <bryan@revyver.com>\n    bthomas\n    btoll@bestweb.net\n    C8E\n    Caio Ariede <caio.ariede@gmail.com>\n    Calvin Spealman <ironfroggy@gmail.com>\n    Cameron Curry\n    Cameron Knight (ckknight)\n    Can Burak Çilingir <canburak@cs.bilgi.edu.tr>\n    Can Sarıgöl <ertugrulsarigol@gmail.com>\n    Carl Meyer <carl@oddbird.net>\n    Carles Pina i Estany <carles@pina.cat>\n    Carlos Eduardo de Paula <carlosedp@gmail.com>\n    Carlos Matías de la Torre <cmdelatorre@gmail.com>\n    Carlton Gibson <carlton.gibson@noumenal.es>\n    cedric@terramater.net\n    Chad Whitman <chad.whitman@icloud.com>\n    ChaosKCW\n    Charlie Leifer <coleifer@gmail.com>\n    charly.wilhelm@gmail.com\n    Chason Chaffin <chason@gmail.com>\n    Cheng Zhang\n    Chris Adams\n    Chris Beaven <smileychris@gmail.com>\n    Chris Bennett <chrisrbennett@yahoo.com>\n    Chris Cahoon <chris.cahoon@gmail.com>\n    Chris Chamberlin <dja@cdc.msbx.net>\n    Chris Jerdonek\n    Chris Jones <chris@brack3t.com>\n    Chris Lamb <chris@chris-lamb.co.uk>\n    Chris Streeter <chris@chrisstreeter.com>\n    Christian Barcenas <christian@cbarcenas.com>\n    Christian Metts\n    Christian Oudard <christian.oudard@gmail.com>\n    Christian Tanzer <tanzer@swing.co.at>\n    Christoffer Sjöbergsson\n    Christophe Pettus <xof@thebuild.com>\n    Christopher Adams <http://christopheradams.info>\n    Christopher Babiak <chrisbabiak@gmail.com>\n    Christopher Lenz <https://www.cmlenz.net/>\n    Christoph Mędrela <chris.medrela@gmail.com>\n    Chris Wagner <cw264701@ohio.edu>\n    Chris Wesseling <Chris.Wesseling@cwi.nl>\n    Chris Wilson <chris+github@qwirx.com>\n    Claude Paroz <claude@2xlibre.net>\n    Clint Ecker\n    colin@owlfish.com\n    Colin Wood <cwood06@gmail.com>\n    Collin Anderson <cmawebsite@gmail.com>\n    Collin Grady <collin@collingrady.com>\n    Colton Hicks <coltonbhicks@gmail.com>\n    Craig Blaszczyk <masterjakul@gmail.com>\n    crankycoder@gmail.com\n    Curtis Maloney (FunkyBob) <curtis@tinbrain.net>\n    dackze+django@gmail.com\n    Dagur Páll Ammendrup <dagurp@gmail.com>\n    Dane Springmeyer\n    Dan Fairs <dan@fezconsulting.com>\n    Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com>\n    Daniel Duan <DaNmarner@gmail.com>\n    Daniele Procida <daniele@vurt.org>\n    Daniel Greenfeld\n    dAniel hAhler\n    Daniel Jilg <daniel@breakthesystem.org>\n    Daniel Lindsley <daniel@toastdriven.com>\n    Daniel Poelzleithner <https://poelzi.org/>\n    Daniel Pyrathon <pirosb3@gmail.com>\n    Daniel Roseman <http://roseman.org.uk/>\n    Daniel Tao <https://philosopherdeveloper.com/>\n    Daniel Wiesmann <daniel.wiesmann@gmail.com>\n    Danilo Bargen\n    Dan Johnson <danj.py@gmail.com>\n    Dan Palmer <dan@danpalmer.me>\n    Dan Poirier <poirier@pobox.com>\n    Dan Stephenson <http://dan.io/>\n    Dan Watson <http://danwatson.net/>\n    dave@thebarproject.com\n    David Ascher <https://ascher.ca/>\n    David Avsajanishvili <avsd05@gmail.com>\n    David Blewett <david@dawninglight.net>\n    David Brenneman <http://davidbrenneman.com>\n    David Cramer <dcramer@gmail.com>\n    David Danier <david.danier@team23.de>\n    David Eklund\n    David Foster <david@dafoster.net>\n    David Gouldin <dgouldin@gmail.com>\n    david@kazserve.org\n    David Krauth\n    David Larlet <https://larlet.fr/david/>\n    David Reynolds <david@reynoldsfamily.org.uk>\n    David Sanders <dsanders11@ucsbalum.com>\n    David Schein\n    David Tulig <david.tulig@gmail.com>\n    David Wobrock <david.wobrock@gmail.com>\n    Davide Ceretti <dav.ceretti@gmail.com>\n    Deep L. Sukhwani <deepsukhwani@gmail.com>\n    Deepak Thukral <deep.thukral@gmail.com>\n    Denis Kuzmichyov <kuzmichyov@gmail.com>\n    Dennis Schwertel <dennisschwertel@gmail.com>\n    Derek Willis <http://blog.thescoop.org/>\n    Deric Crago <deric.crago@gmail.com>\n    deric@monowerks.com\n    Deryck Hodge <http://www.devurandom.org/>\n    Dimitris Glezos <dimitris@glezos.com>\n    Dirk Datzert <dummy@habmalnefrage.de>\n    Dirk Eschler <dirk.eschler@gmx.net>\n    Dmitri Fedortchenko <zeraien@gmail.com>\n    Dmitry Jemerov <intelliyole@gmail.com>\n    dne@mayonnaise.net\n    Dolan Antenucci <antenucci.d@gmail.com>\n    Donald Harvey <donald@donaldharvey.co.uk>\n    Donald Stufft <donald@stufft.io>\n    Don Spaulding <donspauldingii@gmail.com>\n    Doug Beck <doug@douglasbeck.com>\n    Doug Napoleone <doug@dougma.com>\n    dready <wil@mojipage.com>\n    dusk@woofle.net\n    Dustyn Gibson <miigotu@gmail.com>\n    Ed Morley <https://github.com/edmorley>\n    eibaan@gmail.com\n    elky <http://elky.me/>\n    Emmanuelle Delescolle <https://github.com/nanuxbe>\n    Emil Stenström <em@kth.se>\n    enlight\n    Enrico <rico.bl@gmail.com>\n    Eric Boersma <eric.boersma@gmail.com>\n    Eric Brandwein <brandweineric@gmail.com>\n    Eric Floehr <eric@intellovations.com>\n    Eric Florenzano <floguy@gmail.com>\n    Eric Holscher <http://ericholscher.com>\n    Eric Moritz <http://eric.themoritzfamily.com/>\n    Eric Palakovich Carr <carreric@gmail.com>\n    Erik Karulf <erik@karulf.com>\n    Erik Romijn <django@solidlinks.nl>\n    eriks@win.tue.nl\n    Erwin Junge <erwin@junge.nl>\n    Esdras Beleza <linux@esdrasbeleza.com>\n    Espen Grindhaug <http://grindhaug.org/>\n    Eugene Lazutkin <http://lazutkin.com/blog/>\n    Evan Grim <https://github.com/egrim>\n    Fabrice Aneche <akh@nobugware.com>\n    Farhaan Bukhsh <farhaan.bukhsh@gmail.com>\n    favo@exoweb.net\n    fdr <drfarina@gmail.com>\n    Federico Capoano <nemesis@ninux.org>\n    Felipe Lee <felipe.lee.garcia@gmail.com>\n    Filip Noetzel <http://filip.noetzel.co.uk/>\n    Filip Wasilewski <filip.wasilewski@gmail.com>\n    Finn Gruwier Larsen <finn@gruwier.dk>\n    Flávio Juvenal da Silva Junior <flavio@vinta.com.br>\n    flavio.curella@gmail.com\n    Florian Apolloner <florian@apolloner.eu>\n    Florian Moussous <florian.moussous@gmail.com>\n    Fran Hrženjak <fran.hrzenjak@gmail.com>\n    Francisco Albarran Cristobal <pahko.xd@gmail.com>\n    Francisco Couzo <franciscouzo@gmail.com>\n    François Freitag <mail@franek.fr>\n    Frank Tegtmeyer <fte@fte.to>\n    Frank Wierzbicki\n    Frank Wiles <frank@revsys.com>\n    František Malina <fmalina@gmail.com>\n    Fraser Nevett <mail@nevett.org>\n    Gabriel Grant <g@briel.ca>\n    Gabriel Hurley <gabriel@strikeawe.com>\n    gandalf@owca.info\n    Garry Lawrence\n    Garry Polley <garrympolley@gmail.com>\n    Garth Kidd <http://www.deadlybloodyserious.com/>\n    Gary Wilson <gary.wilson@gmail.com>\n    Gasper Koren\n    Gasper Zejn <zejn@kiberpipa.org>\n    Gavin Wahl <gavinwahl@gmail.com>\n    Ge Hanbin <xiaomiba0904@gmail.com>\n    geber@datacollect.com\n    Geert Vanderkelen\n    George Karpenkov <george@metaworld.ru>\n    George Song <george@damacy.net>\n    George Vilches <gav@thataddress.com>\n    Georg \"Hugo\" Bauer <gb@hugo.westfalen.de>\n    Georgi Stanojevski <glisha@gmail.com>\n    Gerardo Orozco <gerardo.orozco.mosqueda@gmail.com>\n    Gil Gonçalves <lursty@gmail.com>\n    Girish Kumar <girishkumarkh@gmail.com>\n    Gisle Aas <gisle@aas.no>\n    Glenn Maynard <glenn@zewt.org>\n    glin@seznam.cz\n    GomoX <gomo@datafull.com>\n    Gonzalo Saavedra <gonzalosaavedra@gmail.com>\n    Gopal Narayanan <gopastro@gmail.com>\n    Graham Carlyle <graham.carlyle@maplecroft.net>\n    Grant Jenks <contact@grantjenks.com>\n    Greg Chapple <gregchapple1@gmail.com>\n    Gregor Allensworth <greg.allensworth@gmail.com>\n    Gregor Müllegger <gregor@muellegger.de>\n    Grigory Fateyev <greg@dial.com.ru>\n    Grzegorz Ślusarek <grzegorz.slusarek@gmail.com>\n    Guilherme Mesquita Gondim <semente@taurinus.org>\n    Guillaume Pannatier <guillaume.pannatier@gmail.com>\n    Gustavo Picon\n    hambaloney\n    Hang Park <hangpark@kaist.ac.kr>\n    Hannes Ljungberg <hannes.ljungberg@gmail.com>\n    Hannes Struß <x@hannesstruss.de>\n    Hasan Ramezani <hasan.r67@gmail.com>\n    Hawkeye\n    Helen Sherwood-Taylor <helen@rrdlabs.co.uk>\n    Henrique Romano <onaiort@gmail.com>\n    Henry Dang <henrydangprg@gmail.com>\n    Hidde Bultsma\n    Himanshu Chauhan <hchauhan1404@outlook.com>\n    hipertracker@gmail.com\n    Hiroki Kiyohara <hirokiky@gmail.com>\n    Honza Král <honza.kral@gmail.com>\n    Horst Gutmann <zerok@zerokspot.com>\n    Hugo Osvaldo Barrera <hugo@barrera.io>\n    HyukJin Jang <wkdgurwls00@naver.com>\n    Hyun Mi Ae\n    Iacopo Spalletti <i.spalletti@nephila.it>\n    Ian A Wilson <http://ianawilson.com>\n    Ian Clelland <clelland@gmail.com>\n    Ian G. Kelly <ian.g.kelly@gmail.com>\n    Ian Holsman <http://feh.holsman.net/>\n    Ian Lee <IanLee1521@gmail.com>\n    Ibon <ibonso@gmail.com>\n    Idan Gazit <idan@gazit.me>\n    Idan Melamed\n    Ifedapo Olarewaju <ifedapoolarewaju@gmail.com>\n    Igor Kolar <ike@email.si>\n    Illia Volochii <illia.volochii@gmail.com>\n    Ilya Semenov <semenov@inetss.com>\n    Ingo Klöcker <djangoproject@ingo-kloecker.de>\n    I.S. van Oostveen <v.oostveen@idca.nl>\n    ivan.chelubeev@gmail.com\n    Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>\n    Jaap Roes <jaap.roes@gmail.com>\n    Jack Moffitt <https://metajack.im/>\n    Jacob Burch <jacobburch@gmail.com>\n    Jacob Green\n    Jacob Kaplan-Moss <jacob@jacobian.org>\n    Jakub Paczkowski <jakub@paczkowski.eu>\n    Jakub Wilk <jwilk@jwilk.net>\n    Jakub Wiśniowski <restless.being@gmail.com>\n    james_027@yahoo.com\n    James Aylett\n    James Bennett <james@b-list.org>\n    James Murty\n    James Tauber <jtauber@jtauber.com>\n    James Timmins <jameshtimmins@gmail.com>\n    James Turk <dev@jamesturk.net>\n    James Wheare <django@sparemint.com>\n    Jannis Leidel <jannis@leidel.info>\n    Janos Guljas\n    Jan Pazdziora\n    Jan Rademaker\n    Jarek Głowacki <jarekwg@gmail.com>\n    Jarek Zgoda <jarek.zgoda@gmail.com>\n    Jason Davies (Esaj) <https://www.jasondavies.com/>\n    Jason Huggins <http://www.jrandolph.com/blog/>\n    Jason McBrayer <http://www.carcosa.net/jason/>\n    jason.sidabras@gmail.com\n    Jason Yan <tailofthesun@gmail.com>\n    Javier Mansilla <javimansilla@gmail.com>\n    Jay Parlar <parlar@gmail.com>\n    Jay Welborn <jesse.welborn@gmail.com>\n    Jay Wineinger <jay.wineinger@gmail.com>\n    J. Clifford Dyer <jcd@sdf.lonestar.org>\n    jcrasta@gmail.com\n    jdetaeye\n    Jeff Anderson <jefferya@programmerq.net>\n    Jeff Balogh <jbalogh@mozilla.com>\n    Jeff Hui <jeffkhui@gmail.com>\n    Jeffrey Gelens <jeffrey@gelens.org>\n    Jeff Triplett <jeff.triplett@gmail.com>\n    Jeffrey Yancey <jeffrey.yancey@gmail.com>\n    Jens Diemer <django@htfx.de>\n    Jens Page\n    Jensen Cochran <jensen.cochran@gmail.com>\n    Jeong-Min Lee <falsetru@gmail.com>\n    Jérémie Blaser <blaserje@gmail.com>\n    Jeremy Bowman <https://github.com/jmbowman>\n    Jeremy Carbaugh <jcarbaugh@gmail.com>\n    Jeremy Dunck <jdunck@gmail.com>\n    Jeremy Lainé <jeremy.laine@m4x.org>\n    Jesse Young <adunar@gmail.com>\n    Jezeniel Zapanta <jezeniel.zapanta@gmail.com>\n    jhenry <jhenry@theonion.com>\n    Jim Dalton <jim.dalton@gmail.com>\n    Jimmy Song <jaejoon@gmail.com>\n    Jiri Barton\n    Joachim Jablon <ewjoachim@gmail.com>\n    Joao Oliveira <joaoxsouls@gmail.com>\n    Joao Pedro Silva <j.pedro004@gmail.com>\n    Joe Heck <http://www.rhonabwy.com/wp/>\n    Joel Bohman <mail@jbohman.com>\n    Joel Heenan <joelh-django@planetjoel.com>\n    Joel Watts <joel@joelwatts.com>\n    Joe Topjian <http://joe.terrarum.net/geek/code/python/django/>\n    Johan C. Stöver <johan@nilling.nl>\n    Johann Queuniet <johann.queuniet@adh.naellia.eu>\n    john@calixto.net\n    John D'Agostino <john.dagostino@gmail.com>\n    John D'Ambrosio <dambrosioj@gmail.com>\n    John Huddleston <huddlej@wwu.edu>\n    John Moses <moses.john.r@gmail.com>\n    John Paulett <john@paulett.org>\n    John Shaffer <jshaffer2112@gmail.com>\n    Jökull Sólberg Auðunsson <jokullsolberg@gmail.com>\n    Jon Dufresne <jon.dufresne@gmail.com>\n    Jonas Haag <jonas@lophus.org>\n    Jonatas C. D. <jonatas.cd@gmail.com>\n    Jonathan Buchanan <jonathan.buchanan@gmail.com>\n    Jonathan Daugherty (cygnus) <http://www.cprogrammer.org/>\n    Jonathan Feignberg <jdf@pobox.com>\n    Jonathan Slenders\n    Jordan Dimov <s3x3y1@gmail.com>\n    Jordi J. Tablada <jordi.joan@gmail.com>\n    Jorge Bastida <me@jorgebastida.com>\n    Jorge Gajon <gajon@gajon.org>\n    José Tomás Tocino García <josetomas.tocino@gmail.com>\n    Josef Rousek <josef.rousek@gmail.com>\n    Joseph Kocherhans <joseph@jkocherhans.com>\n    Josh Smeaton <josh.smeaton@gmail.com>\n    Joshua Cannon <joshdcannon@gmail.com>\n    Joshua Ginsberg <jag@flowtheory.net>\n    Jozko Skrablin <jozko.skrablin@gmail.com>\n    J. Pablo Fernandez <pupeno@pupeno.com>\n    jpellerin@gmail.com\n    Juan Catalano <catalanojuan@gmail.com>\n    Juan Manuel Caicedo <juan.manuel.caicedo@gmail.com>\n    Juan Pedro Fisanotti <fisadev@gmail.com>\n    Julia Elman\n    Julia Matsieva <julia.matsieva@gmail.com>\n    Julian Bez\n    Julien Phalip <jphalip@gmail.com>\n    Junyoung Choi <cupjoo@gmail.com>\n    junzhang.jn@gmail.com\n    Jure Cuhalev <gandalf@owca.info>\n    Justin Bronn <jbronn@gmail.com>\n    Justine Tunney <jtunney@gmail.com>\n    Justin Lilly <justinlilly@gmail.com>\n    Justin Michalicek <jmichalicek@gmail.com>\n    Justin Myles Holmes <justin@slashrootcafe.com>\n    Jyrki Pulliainen <jyrki.pulliainen@gmail.com>\n    Kadesarin Sanjek\n    Karderio <karderio@gmail.com>\n    Karen Tracey <kmtracey@gmail.com>\n    Karol Sikora <elektrrrus@gmail.com>\n    Katherine “Kati” Michel <kthrnmichel@gmail.com>\n    Kathryn Killebrew <kathryn.killebrew@gmail.com>\n    Katie Miller <katie@sub50.com>\n    Keith Bussell <kbussell@gmail.com>\n    Kenneth Love <kennethlove@gmail.com>\n    Kent Hauser <kent@khauser.net>\n    Kevin Grinberg <kevin@kevingrinberg.com>\n    Kevin Kubasik <kevin@kubasik.net>\n    Kevin McConnell <kevin.mcconnell@gmail.com>\n    Kieran Holland <http://www.kieranholland.com>\n    kilian <kilian.cavalotti@lip6.fr>\n    Kim Joon Hwan 김준환 <xncbf12@gmail.com>\n    Klaas van Schelven <klaas@vanschelven.com>\n    knox <christobzr@gmail.com>\n    konrad@gwu.edu\n    Kowito Charoenratchatabhan <kowito@felspar.com>\n    Krišjānis Vaiders <krisjanisvaiders@gmail.com>\n    krzysiek.pawlik@silvermedia.pl\n    Krzysztof Jurewicz <krzysztof.jurewicz@gmail.com>\n    Krzysztof Kulewski <kulewski@gmail.com>\n    kurtiss@meetro.com\n    Lakin Wecker <lakin@structuredabstraction.com>\n    Lars Yencken <lars.yencken@gmail.com>\n    Lau Bech Lauritzen\n    Laurent Luce <https://www.laurentluce.com/>\n    Laurent Rahuel <laurent.rahuel@gmail.com>\n    lcordier@point45.com\n    Leah Culver <leah.culver@gmail.com>\n    Leandra Finger <leandra.finger@gmail.com>\n    Lee Reilly <lee@leereilly.net>\n    Lee Sanghyuck <shlee322@elab.kr>\n    Leo \"hylje\" Honkanen <sealage@gmail.com>\n    Leo Shklovskii\n    Leo Soto <leo.soto@gmail.com>\n    lerouxb@gmail.com\n    Lex Berezhny <lex@damoti.com>\n    Liang Feng <hutuworm@gmail.com>\n    limodou\n    Lincoln Smith <lincoln.smith@anu.edu.au>\n    Liu Yijie <007gzs@gmail.com>\n    Loek van Gent <loek@barakken.nl>\n    Loïc Bistuer <loic.bistuer@sixmedia.com>\n    Lowe Thiderman <lowe.thiderman@gmail.com>\n    Luan Pablo <luanpab@gmail.com>\n    Lucas Connors <https://www.revolutiontech.ca/>\n    Luciano Ramalho\n    Ludvig Ericson <ludvig.ericson@gmail.com>\n    Luis C. Berrocal <luis.berrocal.1942@gmail.com>\n    Łukasz Langa <lukasz@langa.pl>\n    Łukasz Rekucki <lrekucki@gmail.com>\n    Luke Granger-Brown <django@lukegb.com>\n    Luke Plant <L.Plant.98@cantab.net>\n    Maciej Fijalkowski\n    Maciej Wiśniowski <pigletto@gmail.com>\n    Mads Jensen <https://github.com/atombrella>\n    Makoto Tsuyuki <mtsuyuki@gmail.com>\n    Malcolm Tredinnick\n    Manuel Saelices <msaelices@yaco.es>\n    Manuzhai\n    Marc Aymerich Gubern\n    Marc Egli <frog32@me.com>\n    Marcel Telka <marcel@telka.sk>\n    Marc Fargas <telenieko@telenieko.com>\n    Marc Garcia <marc.garcia@accopensys.com>\n    Marcin Wróbel\n    Marc Remolt <m.remolt@webmasters.de>\n    Marc Tamlyn <marc.tamlyn@gmail.com>\n    Marc-Aurèle Brothier <ma.brothier@gmail.com>\n    Marian Andre <django@andre.sk>\n    Marijn Vriens <marijn@metronomo.cl>\n    Mario Gonzalez <gonzalemario@gmail.com>\n    Mariusz Felisiak <felisiak.mariusz@gmail.com>\n    Mark Biggers <biggers@utsl.com>\n    Mark Gensler <mark.gensler@protonmail.com>\n    mark@junklight.com\n    Mark Lavin <markdlavin@gmail.com>\n    Mark Sandstrom <mark@deliciouslynerdy.com>\n    Markus Amalthea Magnuson <markus.magnuson@gmail.com>\n    Markus Holtermann <https://markusholtermann.eu>\n    Marten Kenbeek <marten.knbk+django@gmail.com>\n    Marti Raudsepp <marti@juffo.org>\n    martin.glueck@gmail.com\n    Martin Green\n    Martin Kosír <martin@martinkosir.net>\n    Martin Mahner <https://www.mahner.org/>\n    Martin Maney <http://www.chipy.org/Martin_Maney>\n    Martin von Gagern <gagern@google.com>\n    Mart Sõmermaa <http://mrts.pri.ee/>\n    Marty Alchin <gulopine@gamemusic.org>\n    Masashi Shibata <m.shibata1020@gmail.com>\n    masonsimon+django@gmail.com\n    Massimiliano Ravelli <massimiliano.ravelli@gmail.com>\n    Massimo Scamarcia <massimo.scamarcia@gmail.com>\n    Mathieu Agopian <mathieu.agopian@gmail.com>\n    Matías Bordese\n    Matt Boersma <matt@sprout.org>\n    Matt Croydon <http://www.postneo.com/>\n    Matt Deacalion Stevens <matt@dirtymonkey.co.uk>\n    Matt Dennenbaum\n    Matthew Flanagan <https://wadofstuff.blogspot.com/>\n    Matthew Schinckel <matt@schinckel.net>\n    Matthew Somerville <matthew-django@dracos.co.uk>\n    Matthew Tretter <m@tthewwithanm.com>\n    Matthew Wilkes <matt@matthewwilkes.name>\n    Matthias Kestenholz <mk@406.ch>\n    Matthias Pronk <django@masida.nl>\n    Matt Hoskins <skaffenuk@googlemail.com>\n    Matt McClanahan <https://mmcc.cx/>\n    Matt Riggott\n    Matt Robenolt <m@robenolt.com>\n    Mattia Larentis <mattia@laretis.eu>\n    Mattia Procopio <promat85@gmail.com>\n    Mattias Loverot <mattias@stubin.se>\n    mattycakes@gmail.com\n    Max Burstein <http://maxburstein.com>\n    Max Derkachev <mderk@yandex.ru>\n    Max Smolens <msmolens@gmail.com>\n    Maxime Lorant <maxime.lorant@gmail.com>\n    Maxime Turcotte <maxocub@riseup.net>\n    Maximilian Merz <django@mxmerz.de>\n    Maximillian Dornseif <md@hudora.de>\n    mccutchen@gmail.com\n    Meir Kriheli <http://mksoft.co.il/>\n    Michael S. Brown <michael@msbrown.net>\n    Michael Hall <mhall1@ualberta.ca>\n    Michael Josephson <http://www.sdjournal.com/>\n    Michael Manfre <mmanfre@gmail.com>\n    michael.mcewan@gmail.com\n    Michael Placentra II <someone@michaelplacentra2.net>\n    Michael Radziej <mir@noris.de>\n    Michael Sanders <m.r.sanders@gmail.com>\n    Michael Schwarz <michi.schwarz@gmail.com>\n    Michael Sinov <sihaelov@gmail.com>\n    Michael Thornhill <michael.thornhill@gmail.com>\n    Michal Chruszcz <troll@pld-linux.org>\n    michal@plovarna.cz\n    Michał Modzelewski <michal.modzelewski@gmail.com>\n    Mihai Damian <yang_damian@yahoo.com>\n    Mihai Preda <mihai_preda@yahoo.com>\n    Mikaël Barbero <mikael.barbero nospam at nospam free.fr>\n    Mike Axiak <axiak@mit.edu>\n    Mike Grouchy <https://mikegrouchy.com/>\n    Mike Malone <mjmalone@gmail.com>\n    Mike Richardson\n    Mike Wiacek <mjwiacek@google.com>\n    Mikhail Korobov <kmike84@googlemail.com>\n    Mikko Hellsing <mikko@sorl.net>\n    Mikołaj Siedlarek <mikolaj.siedlarek@gmail.com>\n    milkomeda\n    Milton Waddams\n    mitakummaa@gmail.com\n    mmarshall\n    Moayad Mardini <moayad.m@gmail.com>\n    Morgan Aubert <morgan.aubert@zoho.com>\n    Moritz Sichert <moritz.sichert@googlemail.com>\n    Morten Bagai <m@bagai.com>\n    msaelices <msaelices@gmail.com>\n    msundstr\n    Mushtaq Ali <mushtaak@gmail.com>\n    Mykola Zamkovoi <nickzam@gmail.com>\n    Nadège Michel <michel.nadege@gmail.com>\n    Nagy Károly <charlie@rendszergazda.com>\n    Nasimul Haque <nasim.haque@gmail.com>\n    Nasir Hussain <nasirhjafri@gmail.com>\n    Natalia Bidart <nataliabidart@gmail.com>\n    Nate Bragg <jonathan.bragg@alum.rpi.edu>\n    Nathan Gaberel <nathan@gnab.fr>\n    Neal Norwitz <nnorwitz@google.com>\n    Nebojša Dorđević\n    Ned Batchelder <https://nedbatchelder.com/>\n    Nena Kojadin <nena@kiberpipa.org>\n    Niall Dalton <niall.dalton12@gmail.com>\n    Niall Kelly <duke.sam.vimes@gmail.com>\n    Nick Efford <nick@efford.org>\n    Nick Lane <nick.lane.au@gmail.com>\n    Nick Pope <nick@nickpope.me.uk>\n    Nick Presta <nick@nickpresta.ca>\n    Nick Sandford <nick.sandford@gmail.com>\n    Nick Sarbicki <nick.a.sarbicki@gmail.com>\n    Niclas Olofsson <n@niclasolofsson.se>\n    Nicola Larosa <nico@teknico.net>\n    Nicolas Lara <nicolaslara@gmail.com>\n    Nicolas Noé <nicolas@niconoe.eu>\n    Niran Babalola <niran@niran.org>\n    Nis Jørgensen <nis@superlativ.dk>\n    Nowell Strite <https://nowell.strite.org/>\n    Nuno Mariz <nmariz@gmail.com>\n    oggie rob <oz.robharvey@gmail.com>\n    oggy <ognjen.maric@gmail.com>\n    Oliver Beattie <oliver@obeattie.com>\n    Oliver Rutherfurd <http://rutherfurd.net/>\n    Olivier Sels <olivier.sels@gmail.com>\n    Olivier Tabone <olivier.tabone@ripplemotion.fr>\n    Orestis Markou <orestis@orestis.gr>\n    Orne Brocaar <http://brocaar.com/>\n    Oscar Ramirez <tuxskar@gmail.com>\n    Ossama M. Khayat <okhayat@yahoo.com>\n    Owen Griffiths\n    Pablo Martín <goinnn@gmail.com>\n    Panos Laganakos <panos.laganakos@gmail.com>\n    Paolo Melchiorre <paolo@melchiorre.org>\n    Pascal Hartig <phartig@rdrei.net>\n    Pascal Varet\n    Patrik Sletmo <patrik.sletmo@gmail.com>\n    Paul Bissex <http://e-scribe.com/>\n    Paul Collier <paul@paul-collier.com>\n    Paul Collins <paul.collins.iii@gmail.com>\n    Paul Donohue <django@PaulSD.com>\n    Paul Lanier <planier@google.com>\n    Paul McLanahan <paul@mclanahan.net>\n    Paul McMillan <Paul@McMillan.ws>\n    Paulo Poiati <paulogpoiati@gmail.com>\n    Paulo Scardine <paulo@scardine.com.br>\n    Paul Smith <blinkylights23@gmail.com>\n    Pavel Kulikov <kulikovpavel@gmail.com>\n    pavithran s <pavithran.s@gmail.com>\n    Pavlo Kapyshin <i@93z.org>\n    permonik@mesias.brnonet.cz\n    Petar Marić <http://www.petarmaric.com/>\n    Pete Crosier <pete.crosier@gmail.com>\n    peter@mymart.com\n    Peter Sheats <sheats@gmail.com>\n    Peter van Kampen\n    Peter Zsoldos <http://zsoldosp.eu>\n    Pete Shinners <pete@shinners.org>\n    Petr Marhoun <petr.marhoun@gmail.com>\n    pgross@thoughtworks.com\n    phaedo <http://phaedo.cx/>\n    phil.h.smith@gmail.com\n    Philip Lindborg <philip.lindborg@gmail.com>\n    Philippe Raoult <philippe.raoult@n2nsoft.com>\n    phil@produxion.net\n    Piotr Jakimiak <piotr.jakimiak@gmail.com>\n    Piotr Lewandowski <piotr.lewandowski@gmail.com>\n    plisk\n    polpak@yahoo.com\n    pradeep.gowda@gmail.com\n    Preston Holmes <preston@ptone.com>\n    Preston Timmons <prestontimmons@gmail.com>\n    Priyansh Saxena <askpriyansh@gmail.com>\n    Przemysław Buczkowski <przemub@przemub.pl>\n    Przemysław Suliga <http://suligap.net>\n    Qi Zhao <zhaoqi99@outlook.com>\n    Rachel Tobin <rmtobin@me.com>\n    Rachel Willmer <http://www.willmer.com/kb/>\n    Radek Švarz <https://www.svarz.cz/translate/>\n    Raffaele Salmaso <raffaele@salmaso.org>\n    Rajesh Dhawan <rajesh.dhawan@gmail.com>\n    Ramez Ashraf <ramezashraf@gmail.com>\n    Ramin Farajpour Cami <ramin.blackhat@gmail.com>\n    Ramiro Morales <ramiro@rmorales.net>\n    Ramon Saraiva <ramonsaraiva@gmail.com>\n    Ram Rachum <ram@rachum.com>\n    Randy Barlow <randy@electronsweatshop.com>\n    Raphaël Barrois <raphael.barrois@m4x.org>\n    Raphael Michel <mail@raphaelmichel.de>\n    Raúl Cumplido <raulcumplido@gmail.com>\n    Rebecca Smith <rebkwok@gmail.com>\n    Remco Wendt <remco.wendt@gmail.com>\n    Renaud Parent <renaud.parent@gmail.com>\n    Renbi Yu <averybigant@gmail.com>\n    Reza Mohammadi <reza@zeerak.ir>\n    rhettg@gmail.com\n    Ricardo Javier Cárdenes Medina <ricardo.cardenes@gmail.com>\n    ricardojbarrios@gmail.com\n    Riccardo Di Virgilio\n    Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>\n    Richard Davies <richard.davies@elastichosts.com>\n    Richard House <Richard.House@i-logue.com>\n    Rick Wagner <rwagner@physics.ucsd.edu>\n    Rigel Di Scala <rigel.discala@propylon.com>\n    Robert Coup\n    Robert Myers <myer0052@gmail.com>\n    Roberto Aguilar <roberto@baremetal.io>\n    Robert Rock Howard <http://djangomojo.com/>\n    Robert Wittams\n    Rob Golding-Day <rob@golding-day.com>\n    Rob Hudson <https://rob.cogit8.org/>\n    Rob Nguyen <tienrobertnguyenn@gmail.com>\n    Robin Munn <http://www.geekforgod.com/>\n    Rodrigo Pinheiro Marques de Araújo <fenrrir@gmail.com>\n    Romain Garrigues <romain.garrigues.cs@gmail.com>\n    Ronny Haryanto <https://ronny.haryan.to/>\n    Ross Poulton <ross@rossp.org>\n    Rozza <ross.lawley@gmail.com>\n    Rudolph Froger <rfroger@estrate.nl>\n    Rudy Mutter\n    Rune Rønde Laursen <runerl@skjoldhoej.dk>\n    Russell Cloran <russell@rucus.net>\n    Russell Keith-Magee <russell@keith-magee.com>\n    Russ Webber\n    Ryan Hall <ryanhall989@gmail.com>\n    ryankanno\n    Ryan Kelly <ryan@rfk.id.au>\n    Ryan Niemeyer <https://profiles.google.com/ryan.niemeyer/about>\n    Ryan Petrello <ryan@ryanpetrello.com>\n    Ryan Rubin <ryanmrubin@gmail.com>\n    Ryno Mathee <rmathee@gmail.com>\n    Sachin Jat <sanch.jat@gmail.com>\n    Sage M. Abdullah <https://github.com/laymonage>\n    Sam Newman <http://www.magpiebrain.com/>\n    Sander Dijkhuis <sander.dijkhuis@gmail.com>\n    Sanket Saurav <sanketsaurav@gmail.com>\n    Sanyam Khurana <sanyam.khurana01@gmail.com>\n    Sarthak Mehrish <sarthakmeh03@gmail.com>\n    schwank@gmail.com\n    Scot Hacker <shacker@birdhouse.org>\n    Scott Barr <scott@divisionbyzero.com.au>\n    Scott Fitsimones <scott@airgara.ge>\n    Scott Pashley <github@scottpashley.co.uk>\n    scott@staplefish.com\n    Sean Brant\n    Sebastian Hillig <sebastian.hillig@gmail.com>\n    Sebastian Spiegel <https://www.tivix.com/>\n    Segyo Myung <myungsekyo@gmail.com>\n    Selwin Ong <selwin@ui.co.id>\n    Sengtha Chay <sengtha@e-khmer.com>\n    Senko Rašić <senko.rasic@dobarkod.hr>\n    serbaut@gmail.com\n    Sergei Maertens <sergeimaertens@gmail.com>\n    Sergey Fedoseev <fedoseev.sergey@gmail.com>\n    Sergey Kolosov <m17.admin@gmail.com>\n    Seth Hill <sethrh@gmail.com>\n    Shai Berger <shai@platonix.com>\n    Shannon -jj Behrens <https://www.jjinux.com/>\n    Shawn Milochik <shawn@milochik.com>\n    Silvan Spross <silvan.spross@gmail.com>\n    Simeon Visser <http://simeonvisser.com>\n    Simon Blanchard\n    Simon Charette <charette.s@gmail.com>\n    Simon Greenhill <dev@simon.net.nz>\n    Simon Litchfield <simon@quo.com.au>\n    Simon Meers <simon@simonmeers.com>\n    Simon Williams\n    Simon Willison <simon@simonwillison.net>\n    Sjoerd Job Postmus\n    Slawek Mikula <slawek dot mikula at gmail dot com>\n    sloonz <simon.lipp@insa-lyon.fr>\n    smurf@smurf.noris.de\n    sopel\n    Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>\n    Stanislas Guerra <stan@slashdev.me>\n    Stanislaus Madueke\n    Stanislav Karpov <work@stkrp.ru>\n    starrynight <cmorgh@gmail.com>\n    Stefan R. Filipek\n    Stefane Fermgier <sf@fermigier.com>\n    Stefano Rivera <stefano@rivera.za.net>\n    Stéphane Raimbault <stephane.raimbault@gmail.com>\n    Stephan Jaekel <steph@rdev.info>\n    Stephen Burrows <stephen.r.burrows@gmail.com>\n    Steven L. Smith (fvox13) <steven@stevenlsmith.com>\n    Steven Noorbergen (Xaroth) <xaroth+django@xaroth.nl>\n    Stuart Langridge <https://www.kryogenix.org/>\n    Subhav Gautam <subhavgautam@yahoo.co.uk>\n    Sujay S Kumar <sujay.skumar141295@gmail.com>\n    Sune Kirkeby <https://ibofobi.dk/>\n    Sung-Jin Hong <serialx.net@gmail.com>\n    SuperJared\n    Susan Tan <susan.tan.fleckerl@gmail.com>\n    Sutrisno Efendi <kangfend@gmail.com>\n    Swaroop C H <http://www.swaroopch.info>\n    Szilveszter Farkas <szilveszter.farkas@gmail.com>\n    Taavi Teska <taaviteska@gmail.com>\n    Tai Lee <real.human@mrmachine.net>\n    Takashi Matsuo <matsuo.takashi@gmail.com>\n    Tareque Hossain <http://www.codexn.com>\n    Taylor Mitchell <taylor.mitchell@gmail.com>\n    Terry Huang <terryh.tp@gmail.com>\n    thebjorn <bp@datakortet.no>\n    Thejaswi Puthraya <thejaswi.puthraya@gmail.com>\n    Thijs van Dien <thijs@vandien.net>\n    Thom Wiggers\n    Thomas Chaumeny <t.chaumeny@gmail.com>\n    Thomas Güttler <hv@tbz-pariv.de>\n    Thomas Kerpe <thomas@kerpe.net>\n    Thomas Sorrel\n    Thomas Steinacher <http://www.eggdrop.ch/>\n    Thomas Stromberg <tstromberg@google.com>\n    Thomas Tanner <tanner@gmx.net>\n    tibimicu@gmx.net\n    Tim Allen <tim@pyphilly.org>\n    Tim Givois <tim.givois.mendez@gmail.com>\n    Tim Graham <timograham@gmail.com>\n    Tim Heap <tim@timheap.me>\n    Tim Saylor <tim.saylor@gmail.com>\n    Tobias Kunze <rixx@cutebit.de>\n    Tobias McNulty <https://www.caktusgroup.com/blog/>\n    tobias@neuyork.de\n    Todd O'Bryan <toddobryan@mac.com>\n    Tom Carrick <https://www.carrick.eu>\n    Tom Christie <tom@tomchristie.com>\n    Tom Forbes <tom@tomforb.es>\n    Tom Insam\n    Tom Tobin\n    Tomáš Ehrlich <tomas.ehrlich@gmail.com>\n    Tomáš Kopeček <permonik@m6.cz>\n    Tome Cvitan <tome@cvitan.com>\n    Tomek Paczkowski <tomek@hauru.eu>\n    Tomer Chachamu\n    Tommy Beadle <tbeadle@gmail.com>\n    Tore Lundqvist <tore.lundqvist@gmail.com>\n    torne-django@wolfpuppy.org.uk\n    Travis Cline <travis.cline@gmail.com>\n    Travis Pinney\n    Travis Swicegood <travis@domain51.com>\n    Travis Terry <tdterry7@gmail.com>\n    Trevor Caira <trevor@caira.com>\n    Trey Long <trey@ktrl.com>\n    tstromberg@google.com\n    tt@gurgle.no\n    Tyler Tarabula <tyler.tarabula@gmail.com>\n    Tyson Clugg <tyson@clugg.net>\n    Tyson Tate <tyson@fallingbullets.com>\n    Unai Zalakain <unai@gisa-elkartea.org>\n    Valentina Mukhamedzhanova <umirra@gmail.com>\n    valtron\n    Vasiliy Stavenko <stavenko@gmail.com>\n    Vasil Vangelovski\n    Vibhu Agarwal <vibhu-agarwal.github.io>\n    Victor Andrée\n    viestards.lists@gmail.com\n    Viktor Danyliuk <v.v.danyliuk@gmail.com>\n    Ville Säävuori <https://www.unessa.net/>\n    Vinay Karanam <https://github.com/vinayinvicible>\n    Vinay Sajip <vinay_sajip@yahoo.co.uk>\n    Vincent Foley <vfoleybourgon@yahoo.ca>\n    Vinny Do <vdo.code@gmail.com>\n    Vitaly Babiy <vbabiy86@gmail.com>\n    Vladimir Kuzma <vladimirkuzma.ch@gmail.com>\n    Vlado <vlado@labath.org>\n    Vsevolod Solovyov\n    Vytis Banaitis <vytis.banaitis@gmail.com>\n    wam-djangobug@wamber.net\n    Wang Chun <wangchun@exoweb.net>\n    Warren Smith <warren@wandrsmith.net>\n    Waylan Limberg <waylan@gmail.com>\n    Wiktor Kołodziej <wiktor@pykonik.org>\n    Wiley Kestner <wiley.kestner@gmail.com>\n    Wiliam Alves de Souza <wiliamsouza83@gmail.com>\n    Will Ayd <william.ayd@icloud.com>\n    William Schwartz <wkschwartz@gmail.com>\n    Will Hardy <django@willhardy.com.au>\n    Wilson Miner <wminer@gmail.com>\n    Wim Glenn <hey@wimglenn.com>\n    wojtek\n    Xavier Francisco <xavier.n.francisco@gmail.com>\n    Xia Kai <https://blog.xiaket.org/>\n    Yann Fouillat <gagaro42@gmail.com>\n    Yann Malet\n    Yasushi Masuda <whosaysni@gmail.com>\n    ye7cakf02@sneakemail.com\n    ymasuda@ethercube.com\n    Yoong Kang Lim <yoongkang.lim@gmail.com>\n    Yusuke Miyazaki <miyazaki.dev@gmail.com>\n    Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>\n    Zachary Voase <zacharyvoase@gmail.com>\n    Zach Liu <zachliu@gmail.com>\n    Zach Thompson <zthompson47@gmail.com>\n    Zain Memon\n    Zak Johnson <zakj@nox.cx>\n    Žan Anderle <zan.anderle@gmail.com>\n    Zbigniew Siciarz <zbigniew@siciarz.net>\n    zegor\n    Zeynel Özdemir <ozdemir.zynl@gmail.com>\n    Zlatko Mašek <zlatko.masek@gmail.com>\n    zriv <https://github.com/zriv>\n    <Please alphabetize new entries>\n\nA big THANK YOU goes to:\n\n    Rob Curley and Ralph Gage for letting us open-source Django.\n\n    Frank Wiles for making excellent arguments for open-sourcing, and for\n    his sage sysadmin advice.\n\n    Ian Bicking for convincing Adrian to ditch code generation.\n\n    Mark Pilgrim for \"Dive Into Python\" (https://www.diveinto.org/python3/).\n\n    Guido van Rossum for creating Python.\n"
  },
  {
    "path": "vendor/github.com/django/django/LICENSE",
    "content": "Copyright (c) Django Software Foundation and individual contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    3. Neither the name of Django nor the names of its contributors may be used\n       to endorse or promote products derived from this software without\n       specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/django/django/LICENSE.python",
    "content": "Django is licensed under the three-clause BSD license; see the file\nLICENSE for details.\n\nDjango includes code from the Python standard library, which is licensed under\nthe Python license, a permissive open source license. The copyright and license\nis included below for compliance with Python's terms.\n\n----------------------------------------------------------------------\n\nCopyright (c) 2001-present Python Software Foundation; All Rights Reserved\n\nA. HISTORY OF THE SOFTWARE\n==========================\n\nPython was created in the early 1990s by Guido van Rossum at Stichting\nMathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands\nas a successor of a language called ABC.  Guido remains Python's\nprincipal author, although it includes many contributions from others.\n\nIn 1995, Guido continued his work on Python at the Corporation for\nNational Research Initiatives (CNRI, see http://www.cnri.reston.va.us)\nin Reston, Virginia where he released several versions of the\nsoftware.\n\nIn May 2000, Guido and the Python core development team moved to\nBeOpen.com to form the BeOpen PythonLabs team.  In October of the same\nyear, the PythonLabs team moved to Digital Creations, which became\nZope Corporation.  In 2001, the Python Software Foundation (PSF, see\nhttps://www.python.org/psf/) was formed, a non-profit organization\ncreated specifically to own Python-related Intellectual Property.\nZope Corporation was a sponsoring member of the PSF.\n\nAll Python releases are Open Source (see http://www.opensource.org for\nthe Open Source Definition).  Historically, most, but not all, Python\nreleases have also been GPL-compatible; the table below summarizes\nthe various releases.\n\n    Release         Derived     Year        Owner       GPL-\n                    from                                compatible? (1)\n\n    0.9.0 thru 1.2              1991-1995   CWI         yes\n    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes\n    1.6             1.5.2       2000        CNRI        no\n    2.0             1.6         2000        BeOpen.com  no\n    1.6.1           1.6         2001        CNRI        yes (2)\n    2.1             2.0+1.6.1   2001        PSF         no\n    2.0.1           2.0+1.6.1   2001        PSF         yes\n    2.1.1           2.1+2.0.1   2001        PSF         yes\n    2.1.2           2.1.1       2002        PSF         yes\n    2.1.3           2.1.2       2002        PSF         yes\n    2.2 and above   2.1.1       2001-now    PSF         yes\n\nFootnotes:\n\n(1) GPL-compatible doesn't mean that we're distributing Python under\n    the GPL.  All Python licenses, unlike the GPL, let you distribute\n    a modified version without making your changes open source.  The\n    GPL-compatible licenses make it possible to combine Python with\n    other software that is released under the GPL; the others don't.\n\n(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,\n    because its license has a choice of law clause.  According to\n    CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1\n    is \"not incompatible\" with the GPL.\n\nThanks to the many outside volunteers who have worked under Guido's\ndirection to make these releases possible.\n\n\nB. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON\n===============================================================\n\nPYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\n--------------------------------------------\n\n1. This LICENSE AGREEMENT is between the Python Software Foundation\n(\"PSF\"), and the Individual or Organization (\"Licensee\") accessing and\notherwise using this software (\"Python\") in source or binary form and\nits associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, PSF hereby\ngrants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,\nanalyze, test, perform and/or display publicly, prepare derivative works,\ndistribute, and otherwise use Python alone or in any derivative version,\nprovided, however, that PSF's License Agreement and PSF's notice of copyright,\ni.e., \"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,\n2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;\nAll Rights Reserved\" are retained in Python alone or in any derivative version\nprepared by Licensee.\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python.\n\n4. PSF is making Python available to Licensee on an \"AS IS\"\nbasis.  PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\nFOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. Nothing in this License Agreement shall be deemed to create any\nrelationship of agency, partnership, or joint venture between PSF and\nLicensee.  This License Agreement does not grant permission to use PSF\ntrademarks or trade name in a trademark sense to endorse or promote\nproducts or services of Licensee, or any third party.\n\n8. By copying, installing or otherwise using Python, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nBEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0\n-------------------------------------------\n\nBEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1\n\n1. This LICENSE AGREEMENT is between BeOpen.com (\"BeOpen\"), having an\noffice at 160 Saratoga Avenue, Santa Clara, CA 95051, and the\nIndividual or Organization (\"Licensee\") accessing and otherwise using\nthis software in source or binary form and its associated\ndocumentation (\"the Software\").\n\n2. Subject to the terms and conditions of this BeOpen Python License\nAgreement, BeOpen hereby grants Licensee a non-exclusive,\nroyalty-free, world-wide license to reproduce, analyze, test, perform\nand/or display publicly, prepare derivative works, distribute, and\notherwise use the Software alone or in any derivative version,\nprovided, however, that the BeOpen Python License is retained in the\nSoftware, alone or in any derivative version prepared by Licensee.\n\n3. BeOpen is making the Software available to Licensee on an \"AS IS\"\nbasis.  BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE\nSOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS\nAS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY\nDERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n5. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n6. This License Agreement shall be governed by and interpreted in all\nrespects by the law of the State of California, excluding conflict of\nlaw provisions.  Nothing in this License Agreement shall be deemed to\ncreate any relationship of agency, partnership, or joint venture\nbetween BeOpen and Licensee.  This License Agreement does not grant\npermission to use BeOpen trademarks or trade names in a trademark\nsense to endorse or promote products or services of Licensee, or any\nthird party.  As an exception, the \"BeOpen Python\" logos available at\nhttp://www.pythonlabs.com/logos.html may be used according to the\npermissions granted on that web page.\n\n7. By copying, installing or otherwise using the software, Licensee\nagrees to be bound by the terms and conditions of this License\nAgreement.\n\n\nCNRI LICENSE AGREEMENT FOR PYTHON 1.6.1\n---------------------------------------\n\n1. This LICENSE AGREEMENT is between the Corporation for National\nResearch Initiatives, having an office at 1895 Preston White Drive,\nReston, VA 20191 (\"CNRI\"), and the Individual or Organization\n(\"Licensee\") accessing and otherwise using Python 1.6.1 software in\nsource or binary form and its associated documentation.\n\n2. Subject to the terms and conditions of this License Agreement, CNRI\nhereby grants Licensee a nonexclusive, royalty-free, world-wide\nlicense to reproduce, analyze, test, perform and/or display publicly,\nprepare derivative works, distribute, and otherwise use Python 1.6.1\nalone or in any derivative version, provided, however, that CNRI's\nLicense Agreement and CNRI's notice of copyright, i.e., \"Copyright (c)\n1995-2001 Corporation for National Research Initiatives; All Rights\nReserved\" are retained in Python 1.6.1 alone or in any derivative\nversion prepared by Licensee.  Alternately, in lieu of CNRI's License\nAgreement, Licensee may substitute the following text (omitting the\nquotes): \"Python 1.6.1 is made available subject to the terms and\nconditions in CNRI's License Agreement.  This Agreement together with\nPython 1.6.1 may be located on the Internet using the following\nunique, persistent identifier (known as a handle): 1895.22/1013.  This\nAgreement may also be obtained from a proxy server on the Internet\nusing the following URL: http://hdl.handle.net/1895.22/1013\".\n\n3. In the event Licensee prepares a derivative work that is based on\nor incorporates Python 1.6.1 or any part thereof, and wants to make\nthe derivative work available to others as provided herein, then\nLicensee hereby agrees to include in any such work a brief summary of\nthe changes made to Python 1.6.1.\n\n4. CNRI is making Python 1.6.1 available to Licensee on an \"AS IS\"\nbasis.  CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR\nIMPLIED.  BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND\nDISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS\nFOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT\nINFRINGE ANY THIRD PARTY RIGHTS.\n\n5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON\n1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS\nA RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,\nOR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\n\n6. This License Agreement will automatically terminate upon a material\nbreach of its terms and conditions.\n\n7. This License Agreement shall be governed by the federal\nintellectual property law of the United States, including without\nlimitation the federal copyright law, and, to the extent such\nU.S. federal law does not apply, by the law of the Commonwealth of\nVirginia, excluding Virginia's conflict of law provisions.\nNotwithstanding the foregoing, with regard to derivative works based\non Python 1.6.1 that incorporate non-separable material that was\npreviously distributed under the GNU General Public License (GPL), the\nlaw of the Commonwealth of Virginia shall govern this License\nAgreement only as to issues arising under or with respect to\nParagraphs 4, 5, and 7 of this License Agreement.  Nothing in this\nLicense Agreement shall be deemed to create any relationship of\nagency, partnership, or joint venture between CNRI and Licensee.  This\nLicense Agreement does not grant permission to use CNRI trademarks or\ntrade name in a trademark sense to endorse or promote products or\nservices of Licensee, or any third party.\n\n8. By clicking on the \"ACCEPT\" button where indicated, or by copying,\ninstalling or otherwise using Python 1.6.1, Licensee agrees to be\nbound by the terms and conditions of this License Agreement.\n\n        ACCEPT\n\n\nCWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\n--------------------------------------------------\n\nCopyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,\nThe Netherlands.  All rights reserved.\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of Stichting Mathematisch\nCentrum or CWI not be used in advertising or publicity pertaining to\ndistribution of the software without specific, written prior\npermission.\n\nSTICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO\nTHIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\nFITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE\nFOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT\nOF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/django/django/extras/Makefile",
    "content": "all: sdist bdist_wheel\n\nsdist:\n\tpython setup.py sdist\n\nbdist_wheel:\n\tpython setup.py bdist_wheel\n\n.PHONY : sdist bdist_wheel\n"
  },
  {
    "path": "vendor/github.com/django/django/extras/README.TXT",
    "content": "This directory contains extra stuff that can improve your Django experience.\n"
  },
  {
    "path": "vendor/github.com/django/django/extras/django_bash_completion",
    "content": "# #############################################################################\n# This bash script adds tab-completion feature to django-admin and manage.py.\n#\n# Testing it out without installing\n# =================================\n#\n# To test out the completion without \"installing\" this, just run this file\n# directly, like so:\n#\n#     . ~/path/to/django_bash_completion\n#\n# Note: There's a dot ('.') at the beginning of that command.\n#\n# After you do that, tab completion will immediately be made available in your\n# current Bash shell. But it won't be available next time you log in.\n#\n# Installing\n# ==========\n#\n# To install this, point to this file from your .bash_profile, like so:\n#\n#     . ~/path/to/django_bash_completion\n#\n# Do the same in your .bashrc if .bashrc doesn't invoke .bash_profile.\n#\n# Settings will take effect the next time you log in.\n#\n# Uninstalling\n# ============\n#\n# To uninstall, just remove the line from your .bash_profile and .bashrc.\n\n_django_completion()\n{\n    COMPREPLY=( $( COMP_WORDS=\"${COMP_WORDS[*]}\" \\\n                   COMP_CWORD=$COMP_CWORD \\\n                   DJANGO_AUTO_COMPLETE=1 $1 ) )\n}\n# When the django-admin.py deprecation ends, remove django-admin.py.\ncomplete -F _django_completion -o default django-admin.py manage.py django-admin\n\n_python_django_completion()\n{\n    if [[ ${COMP_CWORD} -ge 2 ]]; then\n        local PYTHON_EXE=${COMP_WORDS[0]##*/}\n        if echo \"$PYTHON_EXE\" | grep -qE \"python([3-9]\\.[0-9])?\"; then\n            local PYTHON_SCRIPT=${COMP_WORDS[1]##*/}\n            if echo \"$PYTHON_SCRIPT\" | grep -qE \"manage\\.py|django-admin(\\.py)?\"; then\n                COMPREPLY=( $( COMP_WORDS=( \"${COMP_WORDS[*]:1}\" )\n                               COMP_CWORD=$(( COMP_CWORD-1 ))\n                               DJANGO_AUTO_COMPLETE=1 ${COMP_WORDS[*]} ) )\n            fi\n        fi\n    fi\n}\n\n# Support for multiple interpreters.\nunset pythons\nif command -v whereis &>/dev/null; then\n    python_interpreters=$(whereis python | cut -d \" \" -f 2-)\n    for python in $python_interpreters; do\n        [[ $python != *-config ]] && pythons=\"${pythons} ${python##*/}\"\n    done\n    unset python_interpreters\n    pythons=$(echo \"$pythons\" | tr \" \" \"\\n\" | sort -u | tr \"\\n\" \" \")\nelse\n    pythons=python\nfi\n\ncomplete -F _python_django_completion -o default $pythons\nunset pythons\n"
  },
  {
    "path": "vendor/github.com/dsifford/yarn-completion/yarn",
    "content": "# shellcheck shell=bash disable=2207\n# vim: set fdm=syntax fdl=0:\n#\n# Version: 0.17.0\n# Yarn Version: 1.22.11\n#\n# bash completion for Yarn (https://github.com/yarnpkg/yarn)\n#\n# To enable on-demand completion loading, copy this file to one of the following locations:\n#  - $BASH_COMPLETION_USER_DIR/completions/yarn\n#  or\n#  - $XDG_DATA_HOME/bash-completion/completions/yarn\n#  or\n#  - ~/.local/share/bash-completion/completions/yarn\n#\n\n###\n# Parses and extracts data from package.json files.\n#\n# Usage:\n#\t__yarn_get_package_fields [-g] [-t FIELDTYPE] <field-key>\n#\n# Options:\n#   -g\t\t\t  Parse global package.json file, if available\n#   -t FIELDTYPE  The field type being parsed (array|boolean|number|object|string) [default: object]\n#\n# Notes:\n#\tIf FIELDTYPE is object, then the object keys are returned.\n#\tIf FIELDTYPE is array, boolean, number, or string, then the field values are returned.\n#\t<field-key> must be a first-level field in the json file.\n##\n__yarn_get_package_fields() {\n\tdeclare cwd=$PWD field_type=object field_key opt package_dot_json OPTIND OPTARG\n\n\twhile [[ -n $cwd ]]; do\n\t\tif [[ -f \"$cwd/package.json\" ]]; then\n\t\t\tpackage_dot_json=\"$cwd/package.json\"\n\t\t\tbreak\n\t\tfi\n\t\tcwd=\"${cwd%/*}\"\n\tdone\n\n\twhile getopts \":gt:\" opt; do\n\t\tcase $opt in\n\t\t\tg)\n\t\t\t\tif [[ -f $HOME/.config/yarn/global/package.json ]]; then\n\t\t\t\t\tpackage_dot_json=\"$HOME/.config/yarn/global/package.json\"\n\t\t\t\telif [[ -f $HOME/.local/share/yarn/global/package.json ]]; then\n\t\t\t\t\tpackage_dot_json=\"$HOME/.local/share/yarn/global/package.json\"\n\t\t\t\telif [[ -f $HOME/.yarn/global/package.json ]]; then\n\t\t\t\t\tpackage_dot_json=\"$HOME/.yarn/global/package.json\"\n\t\t\t\telse\n\t\t\t\t\tpackage_dot_json=\"\"\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\tt)\n\t\t\t\tcase \"$OPTARG\" in\n\t\t\t\t\tarray | boolean | number | object | string)\n\t\t\t\t\t\tfield_type=\"$OPTARG\"\n\t\t\t\t\t\t;;\n\t\t\t\tesac\n\t\t\t\t;;\n\t\t\t*) ;;\n\n\t\tesac\n\tdone\n\tshift $((OPTIND - 1))\n\n\tfield_key='\"'$1'\"'\n\n\t[[ ! -f $package_dot_json || ! $field_key ]] && return\n\n\tcase \"$field_type\" in\n\t\tobject)\n\t\t\tsed -n '/'\"$field_key\"':[[:space:]]*{/,/^[[:space:]]*}/{\n\t\t\t\t# exclude start and end patterns\n\t\t\t\t//!{\n\t\t\t\t\t# extract the text between the first pair of double quotes\n\t\t\t\t\ts/^[[:space:]]*\"\\([^\"]*\\).*/\\1/p\n\t\t\t\t}\n\t\t\t}' \"$package_dot_json\"\n\t\t\t;;\n\t\tarray)\n\t\t\tsed -n '/'\"$field_key\"':[[:space:]]*\\[/,/^[[:space:]]*]/{\n\t\t\t\t# exclude start and end patterns\n\t\t\t\t//!{\n\t\t\t\t\t# extract the text between the first pair of double quotes\n\t\t\t\t\ts/^[[:space:]]*\"\\([^\"]*\\).*/\\1/p\n\t\t\t\t}\n\t\t\t}' \"$package_dot_json\"\n\t\t\t;;\n\t\tboolean | number)\n\t\t\tsed -n 's/[[:space:]]*'\"$field_key\"':[[:space:]]*\\([a-z0-9]*\\)/\\1/p' \"$package_dot_json\"\n\t\t\t;;\n\t\tstring)\n\t\t\tsed -n 's/[[:space:]]*'\"$field_key\"':[[:space:]]*\"\\(.*\\)\".*/\\1/p' \"$package_dot_json\"\n\t\t\t;;\n\tesac\n}\n\n###\n# Count all command arguments starting at a given depth, excluding flags and\n# flag arguments.\n#\n# Usage:\n#\t__yarn_count_args [-d INT]\n#\n# Options:\n#   -d INT  The start depth to begin counting [default: 0]\n#\n# Globals:\n#  *args\n#   cword\n##\n__yarn_count_args() {\n\targs=0\n\tdeclare -i counter=0 depth=0\n\tdeclare arg_flag_pattern opt OPTIND\n\targ_flag_pattern=\"@($(tr ' ' '|' <<< \"${arg_flags[*]}\"))\"\n\n\twhile getopts \":d:\" opt; do\n\t\tcase $opt in\n\t\t\td)\n\t\t\t\tdepth=$OPTARG\n\t\t\t\t;;\n\t\t\t*) ;;\n\t\tesac\n\tdone\n\tshift $((OPTIND - 1))\n\n\twhile ((counter < cword)); do\n\t\tcase ${words[counter]} in\n\t\t\t-* | =) ;;\n\t\t\t*)\n\t\t\t\t# shellcheck disable=SC2053\n\t\t\t\tif [[ ${words[counter - 1]} != $arg_flag_pattern ]]; then\n\t\t\t\t\tif ((depth-- <= 0)); then\n\t\t\t\t\t\t((args++))\n\t\t\t\t\tfi\n\t\t\t\tfi\n\t\t\t\t;;\n\t\tesac\n\t\t((counter++))\n\tdone\n}\n\n###\n# Retrieves the command or subcommand at a given depth, or the last occurring\n# command or subcommand before the cursor location if no depth is given, or if\n# depth exceeds cursor location.\n#\n# Usage:\n#   __yarn_get_command [-d INT]\n#\n# Options:\n#   -d INT  Depth of command to retrieve.\n#\n# Globals:\n#  *cmd\n#   commands\n#   cword\n#   subcommands\n#   words\n##\n__yarn_get_command() {\n\tdeclare -i counter=0 cmd_depth=0 OPTIND\n\tdeclare cmdlist word opt\n\n\twhile getopts \":d:\" opt; do\n\t\tcase $opt in\n\t\t\td)\n\t\t\t\tcmd_depth=\"$OPTARG\"\n\t\t\t\t;;\n\t\t\t*) ;;\n\t\tesac\n\tdone\n\tshift $((OPTIND - 1))\n\n\tcmdlist=\"@($(tr ' ' '|' <<< \"${commands[*]} ${subcommands[*]}\"))\"\n\tcmd=yarn\n\n\twhile ((counter < cword)); do\n\t\tword=\"${words[counter]}\"\n\t\tcase \"$word\" in\n\t\t\t$cmdlist)\n\t\t\t\tcmd=\"$word\"\n\t\t\t\t((--cmd_depth == 0)) && break\n\t\t\t\t;;\n\t\tesac\n\t\t((counter++))\n\tdone\n}\n\n###\n# Global fallback completion generator if all else fails.\n#\n# Usage:\n#   __yarn_fallback\n#\n# Globals:\n#   cur\n##\n__yarn_fallback() {\n\tcase \"$cur\" in\n\t\t-*)\n\t\t\tCOMPREPLY=($(compgen -W \"$(__yarn_flags)\" -- \"$cur\"))\n\t\t\t;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -o plusdirs -f -- \"$cur\"))\n\t\t\t;;\n\tesac\n}\n\n###\n# Process and merge local and global flags after removing the flags that\n# have already been used.\n#\n# Usage:\n#   __yarn_flags\n#\n# Globals:\n#   flags\n#   global_flags\n#   words\n##\n__yarn_flags() {\n\tdeclare word\n\tdeclare -a existing_flags=()\n\n\tfor word in \"${words[@]}\"; do\n\t\tcase \"$word\" in\n\t\t\t-*)\n\t\t\t\texisting_flags+=(\"$word\")\n\t\t\t\t;;\n\t\tesac\n\tdone\n\n\tLC_ALL=C comm -23 \\\n\t\t<(echo \"${flags[@]}\" \"${global_flags[@]}\" | tr ' ' '\\n' | LC_ALL=C sort -u) \\\n\t\t<(echo \"${existing_flags[@]}\" | tr ' ' '\\n' | LC_ALL=C sort -u)\n}\n\n###\n# Handles completions for flags that require, or optionally take, arguments.\n#\n# Usage:\n#   __yarn_flag_args\n#\n# Globals:\n#   cur\n#   prev\n##\n__yarn_flag_args() {\n\tdeclare {arg,bool,dir,file,int,special}_flag_pattern\n\targ_flag_pattern=\"@($(tr ' ' '|' <<< \"${arg_flags[*]}\"))\"\n\n\t# shellcheck disable=SC2053\n\tif [[ $prev != $arg_flag_pattern ]]; then\n\t\treturn 1\n\tfi\n\n\tbool_flag_pattern=\"@($(tr ' ' '|' <<< \"${bool_arg_flags[*]}\"))\"\n\tdir_flag_pattern=\"@($(tr ' ' '|' <<< \"${dir_arg_flags[*]}\"))\"\n\tfile_flag_pattern=\"@($(tr ' ' '|' <<< \"${file_arg_flags[*]}\"))\"\n\tint_flag_pattern=\"@($(tr ' ' '|' <<< \"${int_arg_flags[*]}\"))\"\n\tspecial_flag_pattern=\"@($(tr ' ' '|' <<< \"${special_arg_flags[*]}\"))\"\n\n\tcase \"$prev\" in\n\t\t$bool_flag_pattern)\n\t\t\tCOMPREPLY=($(compgen -W 'true false' -- \"$cur\"))\n\t\t\t;;\n\t\t$dir_flag_pattern)\n\t\t\tcompopt -o dirnames\n\t\t\t;;\n\t\t$file_flag_pattern)\n\t\t\tcompopt -o default -o filenames\n\t\t\t;;\n\t\t$int_flag_pattern)\n\t\t\tcompopt -o nospace\n\t\t\tCOMPREPLY=($(compgen -W '{0..9}' -- \"$cur\"))\n\t\t\t;;\n\t\t$special_flag_pattern)\n\t\t\tcase \"$prev\" in\n\t\t\t\t--access)\n\t\t\t\t\tCOMPREPLY=($(compgen -W 'public restricted' -- \"$cur\"))\n\t\t\t\t\t;;\n\t\t\t\t--groups)\n\t\t\t\t\tCOMPREPLY=($(compgen -W 'dependencies devDependencies optionalDependencies' -- \"$cur\"))\n\t\t\t\t\t;;\n\t\t\t\t--level)\n\t\t\t\t\tCOMPREPLY=($(compgen -W 'info low moderate high critical' -- \"$cur\"))\n\t\t\t\t\t;;\n\t\t\t\t--network-timeout)\n\t\t\t\t\tcompopt -o nospace\n\t\t\t\t\tCOMPREPLY=($(compgen -W '{1000..10000..1000}' -- \"$cur\"))\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 0\n}\n\n_yarn_add() {\n\t((depth++))\n\tflags=(\n\t\t--audit -A\n\t\t--dev -D\n\t\t--exact -E\n\t\t--optional -O\n\t\t--peer -P\n\t\t--tilde -T\n\t\t--ignore-workspace-root-check -W\n\t)\n\treturn 1\n}\n\n_yarn_audit() {\n\t((depth++))\n\tflags=(\n\t\t--groups\n\t\t--level\n\t\t--summary\n\t)\n\treturn 1\n}\n\n_yarn_autoclean() {\n\t((depth++))\n\tflags=(\n\t\t--force -F\n\t\t--init -I\n\t)\n\treturn 1\n}\n\n_yarn_cache() {\n\t((depth++))\n\tdeclare cmd\n\tflags=(\n\t\t--pattern\n\t)\n\tsubcommands=(\n\t\tclean\n\t\tdir\n\t\tlist\n\t)\n\t__yarn_get_command\n\n\tcase \"$cmd\" in\n\t\tcache)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*)\n\t\t\t\t\treturn 1\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\t*)\n\t\t\treturn 1\n\t\t\t;;\n\tesac\n}\n\n_yarn_check() {\n\t((depth++))\n\tflags=(\n\t\t--integrity\n\t\t--verify-tree\n\t)\n\treturn 1\n}\n\n_yarn_config() {\n\t((depth++))\n\tdeclare cmd\n\tdeclare subcommands=(\n\t\tdelete\n\t\tget\n\t\tlist\n\t\tset\n\t)\n\tdeclare known_keys=(\n\t\tignore-optional\n\t\tignore-platform\n\t\tignore-scripts\n\t\tinit-author-email\n\t\tinit-author-name\n\t\tinit-author-url\n\t\tinit-license\n\t\tinit-version\n\t\tno-progress\n\t\tprefix\n\t\tregistry\n\t\tsave-prefix\n\t\tuser-agent\n\t\tversion-git-message\n\t\tversion-git-sign\n\t\tversion-git-tag\n\t\tversion-tag-prefix\n\t)\n\t__yarn_get_command\n\n\tcase \"$cmd\" in\n\t\tget | delete)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*) ;;\n\t\t\t\t*)\n\t\t\t\t\tif [[ $prev == @(get|delete) ]]; then\n\t\t\t\t\t\tCOMPREPLY=($(compgen -W \"${known_keys[*]}\" -- \"$cur\"))\n\t\t\t\t\t\treturn 0\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\tset)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*)\n\t\t\t\t\tflags=(\n\t\t\t\t\t\t--global\n\t\t\t\t\t)\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tif [[ $prev == set ]]; then\n\t\t\t\t\t\tCOMPREPLY=($(compgen -W \"${known_keys[*]}\" -- \"$cur\"))\n\t\t\t\t\t\treturn 0\n\t\t\t\t\tfi\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\tconfig)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*) ;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_create() {\n\t((depth++))\n\tdeclare -i args\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\t__yarn_count_args -d $depth\n\t\t\t((args == 0)) && return 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_generate_lock_entry() {\n\t((depth++))\n\tflags=(\n\t\t--resolved\n\t\t--use-manifest\n\t)\n\treturn 1\n}\n\n_yarn_global() {\n\t((depth++))\n\tdeclare cmd cmdlist\n\tflags=(\n\t\t--latest\n\t\t--prefix\n\t)\n\tsubcommands=(\n\t\tadd\n\t\tbin\n\t\tlist\n\t\tremove\n\t\tupgrade\n\t\tupgrade-interactive\n\t)\n\tcmdlist=\"@($(tr ' ' '|' <<< \"${subcommands[*]}\"))\"\n\n\t__yarn_get_command -d 3\n\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tcase \"$cmd\" in\n\t\t\t\t$cmdlist)\n\t\t\t\t\t\"_yarn_${cmd//-/_}\" 2> /dev/null\n\t\t\t\t\treturn $?\n\t\t\t\t\t;;\n\t\t\t\tglobal)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\n\treturn 1\n}\n\n_yarn_help() {\n\t((depth++))\n\tdeclare -i args\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\t__yarn_count_args -d $depth\n\t\t\tif ((args == 0)); then\n\t\t\t\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n\t\t\t\treturn 0\n\t\t\tfi\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_info() {\n\t((depth++))\n\tflags=(\n\t\t--json\n\t)\n\tdeclare standard_fields=(\n\t\tauthor\n\t\tbin\n\t\tbugs\n\t\tcontributors\n\t\tdependencies\n\t\tdescription\n\t\tdevDependencies\n\t\tdist-tags\n\t\tengines\n\t\tfiles\n\t\thomepage\n\t\tkeywords\n\t\tlicense\n\t\tmain\n\t\tmaintainers\n\t\tname\n\t\toptionalDependencies\n\t\tpeerDependencies\n\t\trepository\n\t\tversion\n\t\tversions\n\t)\n\n\tdeclare -i args\n\t__yarn_count_args -d $depth\n\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tcase \"$args\" in\n\t\t\t\t0)\n\t\t\t\t\tCOMPREPLY=(\n\t\t\t\t\t\t$(compgen -W \"\n\t\t\t\t\t\t\t$(__yarn_get_package_fields dependencies)\n\t\t\t\t\t\t\t$(__yarn_get_package_fields devDependencies)\n\t\t\t\t\t\t\t\" -- \"$cur\")\n\t\t\t\t\t)\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\t\t1)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${standard_fields[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_init() {\n\t((depth++))\n\tflags=(\n\t\t--yes -y\n\t\t--private -p\n\t\t--install -i\n\t)\n\treturn 1\n}\n\n_yarn_install() {\n\t((depth++))\n\tflags=(\n\t\t--audit -A\n\t)\n\treturn 1\n}\n\n_yarn_licenses() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tlist\n\t\tgenerate-disclaimer\n\t)\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\t__yarn_get_command\n\t\t\tcase \"$cmd\" in\n\t\t\t\tlicenses)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_list() {\n\t((depth++))\n\tflags=(\n\t\t--depth\n\t\t--pattern\n\t)\n\treturn 1\n}\n\n_yarn_node() {\n\t((depth++))\n\tflags=(\n\t\t--into\n\t)\n\treturn 1\n}\n\n_yarn_outdated() {\n\t((depth++))\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tCOMPREPLY=(\n\t\t\t\t$(compgen -W \"\n\t\t\t\t\t$(__yarn_get_package_fields dependencies)\n\t\t\t\t\t$(__yarn_get_package_fields devDependencies)\n\t\t\t\t\t\" -- \"$cur\")\n\t\t\t)\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_owner() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tadd\n\t\tlist\n\t\tremove\n\t)\n\t__yarn_get_command\n\tif [[ $cmd == owner ]]; then\n\t\tcase \"$cur\" in\n\t\t\t-*) ;;\n\t\t\t*)\n\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\tesac\n\tfi\n\treturn 1\n}\n\n_yarn_pack() {\n\t((depth++))\n\tflags=(\n\t\t--filename -f\n\t)\n\treturn 1\n}\n\n_yarn_policies() {\n\t((depth++))\n\tdeclare standard_policies=(\n\t\tlatest\n\t\tnightly\n\t\trc\n\t)\n\n\tdeclare -i args\n\t__yarn_count_args -d $depth\n\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tcase \"$args\" in\n\t\t\t\t0)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${standard_policies[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_publish() {\n\t((depth++))\n\tflags=(\n\t\t--access\n\t\t--major\n\t\t--message\n\t\t--minor\n\t\t--new-version\n\t\t--no-commit-hooks\n\t\t--no-git-tag-version\n\t\t--patch\n\t\t--preid\n\t\t--premajor\n\t\t--preminor\n\t\t--prepatch\n\t\t--prerelease\n\t\t--tag\n\t)\n\treturn 1\n}\n\n_yarn_remove() {\n\t((depth++))\n\tdeclare cmd dependencies devDependencies\n\tflags=(\n\t\t--ignore-workspace-root-check -W\n\t)\n\t__yarn_get_command -d 1\n\tcase \"$cmd\" in\n\t\tglobal)\n\t\t\tdependencies=$(__yarn_get_package_fields -g dependencies)\n\t\t\tdevDependencies=''\n\t\t\t;;\n\t\tremove)\n\t\t\tdependencies=$(__yarn_get_package_fields dependencies)\n\t\t\tdevDependencies=$(__yarn_get_package_fields devDependencies)\n\t\t\t;;\n\t\t*)\n\t\t\treturn 1\n\t\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -W \"$dependencies $devDependencies\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_run() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tenv\n\t\t$(__yarn_get_package_fields scripts)\n\t)\n\t__yarn_get_command\n\tif [[ $cmd == run ]]; then\n\t\tcase \"$cur\" in\n\t\t\t-*) ;;\n\t\t\t*)\n\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\treturn 0\n\t\t\t\t;;\n\t\tesac\n\tfi\n\treturn 1\n}\n\n_yarn_tag() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tadd\n\t\tlist\n\t\tremove\n\t)\n\t__yarn_get_command\n\tcase \"$cmd\" in\n\t\ttag)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*) ;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_team() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tadd\n\t\tcreate\n\t\tdestroy\n\t\tlist\n\t\tremove\n\t)\n\t__yarn_get_command\n\tcase \"$cmd\" in\n\t\tteam)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*) ;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_unplug() {\n\t((depth++))\n\tflags=(\n\t\t--clear\n\t\t--clear-all\n\t)\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tCOMPREPLY=(\n\t\t\t\t$(compgen -W \"\n\t\t\t\t\t$(__yarn_get_package_fields dependencies)\n\t\t\t\t\t$(__yarn_get_package_fields devDependencies)\n\t\t\t\t\t\" -- \"$cur\")\n\t\t\t)\n\t\t\treturn 0\n\t\t\t;;\n\n\tesac\n\treturn 1\n}\n\n_yarn_upgrade() {\n\t((depth++))\n\tdeclare cmd dependencies devDependencies\n\tflags=(\n\t\t--audit -A\n\t\t--caret -C\n\t\t--exact -E\n\t\t--latest -L\n\t\t--pattern -P\n\t\t--scope -S\n\t\t--tilde -T\n\t)\n\t__yarn_get_command -d 1\n\tcase \"$cmd\" in\n\t\tglobal)\n\t\t\tdependencies=$(__yarn_get_package_fields -g dependencies)\n\t\t\tdevDependencies=''\n\t\t\t;;\n\t\tupgrade)\n\t\t\tdependencies=$(__yarn_get_package_fields dependencies)\n\t\t\tdevDependencies=$(__yarn_get_package_fields devDependencies)\n\t\t\t;;\n\t\t*)\n\t\t\treturn 1\n\t\t\t;;\n\tesac\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -W \"$dependencies $devDependencies\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_upgrade_interactive() {\n\t((depth++))\n\tflags=(\n\t\t--caret -C\n\t\t--exact -E\n\t\t--latest\n\t\t--scope -S\n\t\t--tilde -T\n\t)\n\treturn 1\n}\n\n_yarn_version() {\n\t((depth++))\n\tflags=(\n\t\t--major\n\t\t--message\n\t\t--minor\n\t\t--new-version\n\t\t--no-commit-hooks\n\t\t--no-git-tag-version\n\t\t--patch\n\t\t--preid\n\t\t--premajor\n\t\t--preminor\n\t\t--prepatch\n\t\t--prerelease\n\t)\n\treturn 1\n}\n\n_yarn_workspace() {\n\t((depth++))\n\tdeclare -i args\n\tdeclare workspaces_info\n\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\t__yarn_count_args\n\t\t\tcase \"$args\" in\n\t\t\t\t[0-2])\n\t\t\t\t\tworkspaces_info=$(yarn workspaces info -s 2> /dev/null)\n\t\t\t\t\tif [[ -n $workspaces_info ]]; then\n\t\t\t\t\t\tmapfile -t < <(\n\t\t\t\t\t\t\tsed -n 's/^ \\{2\\}\"\\([^\"]*\\)\": {$/\\1/p' <<< \"$workspaces_info\"\n\t\t\t\t\t\t)\n\t\t\t\t\t\tCOMPREPLY=($(compgen -W \"${MAPFILE[*]}\" -- \"$cur\"))\n\t\t\t\t\tfi\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\t\t3)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\t\t*)\n\t\t\t\t\tdeclare cmd\n\t\t\t\t\tworkspaces_info=$(yarn workspaces info -s 2> /dev/null)\n\n\t\t\t\t\tif [[ -n $workspaces_info ]]; then\n\t\t\t\t\t\tPWD=$(\n\t\t\t\t\t\t\tsed -n '/^ \\{2\\}\"'\"${COMP_WORDS[2]}\"'\": {$/,/^ \\{2\\}},\\{0,1\\}$/{\n\t\t\t\t\t\t\t\ts/^ \\{4\\}\"location\": \"\\([^\"]*\\)\",$/\\1/p\n\t\t\t\t\t\t\t}' <<< \"$workspaces_info\"\n\t\t\t\t\t\t)\n\t\t\t\t\tfi\n\n\t\t\t\t\t__yarn_get_command -d 3\n\t\t\t\t\t\"_yarn_${cmd//-/_}\" 2> /dev/null\n\t\t\t\t\treturn $?\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_workspaces() {\n\t((depth++))\n\tdeclare cmd\n\tsubcommands=(\n\t\tinfo\n\t\trun\n\t)\n\t__yarn_get_command -d 4\n\tcase \"$cmd\" in\n\t\tworkspaces)\n\t\t\tcase \"$cur\" in\n\t\t\t\t-*) ;;\n\t\t\t\t*)\n\t\t\t\t\tCOMPREPLY=($(compgen -W \"${subcommands[*]}\" -- \"$cur\"))\n\t\t\t\t\treturn 0\n\t\t\t\t\t;;\n\t\t\tesac\n\t\t\t;;\n\t\tinfo)\n\t\t\treturn 0\n\t\t\t;;\n\t\trun)\n\t\t\t__yarn_run\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_why() {\n\t((depth++))\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t./*)\n\t\t\tcompopt -o filenames\n\t\t\t;;\n\t\t*)\n\t\t\tdeclare modules\n\t\t\tmodules=$(yarn list --depth 0 | sed -n 's/.* \\([a-zA-Z0-9@].*\\)@.*/\\1/p') || return 1\n\t\t\tCOMPREPLY=($(compgen -W \"$modules\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn_yarn() {\n\t((depth++))\n\tcase \"$cur\" in\n\t\t-*) ;;\n\t\t*)\n\t\t\tCOMPREPLY=($(compgen -W \"${commands[*]}\" -- \"$cur\"))\n\t\t\treturn 0\n\t\t\t;;\n\tesac\n\treturn 1\n}\n\n_yarn() {\n\t# shellcheck disable=SC2064\n\ttrap \"\n\t\tPWD=$PWD\n\t\t$(shopt -p extglob)\n\t\tset +o pipefail\n\t\" RETURN\n\n\tshopt -s extglob\n\tset -o pipefail\n\n\tdeclare cur cmd prev\n\tdeclare -a words\n\tdeclare -i cword counter=1 depth=1\n\tdeclare -ar commands=(\n\t\taccess\n\t\tadd\n\t\taudit\n\t\tautoclean\n\t\tbin\n\t\tcache\n\t\tcheck\n\t\tconfig\n\t\tcreate\n\t\texec\n\t\tgenerate-lock-entry\n\t\tglobal\n\t\thelp\n\t\timport\n\t\tinfo\n\t\tinit\n\t\tinstall\n\t\tlicenses\n\t\tlink\n\t\tlist\n\t\tlogin\n\t\tlogout\n\t\tnode\n\t\toutdated\n\t\towner\n\t\tpack\n\t\tpolicies\n\t\tpublish\n\t\tremove\n\t\trun\n\t\ttag\n\t\tteam\n\t\tunlink\n\t\tunplug\n\t\tupgrade\n\t\tupgrade-interactive\n\t\tversion\n\t\tversions\n\t\twhy\n\t\tworkspace\n\t\tworkspaces\n\t\t$(__yarn_get_package_fields scripts)\n\t)\n\tdeclare -a subcommands=()\n\n\tdeclare -ar bool_arg_flags=(\n\t\t--emoji\n\t\t--production --prod\n\t\t--scripts-prepend-node-path\n\t)\n\tdeclare -ar dir_arg_flags=(\n\t\t--cache-folder\n\t\t--cwd\n\t\t--global-folder\n\t\t--into\n\t\t--link-folder\n\t\t--modules-folder\n\t\t--preferred-cache-folder\n\t\t--prefix\n\t)\n\tdeclare -ar file_arg_flags=(\n\t\t--filename -f\n\t\t--use-manifest\n\t\t--use-yarnrc\n\t)\n\tdeclare -ar int_arg_flags=(\n\t\t--depth\n\t\t--network-concurrency\n\t)\n\tdeclare -ar special_arg_flags=(\n\t\t--access\n\t\t--groups\n\t\t--level\n\t\t--network-timeout\n\t)\n\tdeclare -ar optional_arg_flags=(\n\t\t--emoji\n\t\t--prod\n\t\t--production\n\t\t--scripts-prepend-node-path\n\t)\n\tdeclare -ar skipped_arg_flags=(\n\t\t--https-proxy\n\t\t--message\n\t\t--mutex\n\t\t--new-version\n\t\t--otp\n\t\t--pattern -P\n\t\t--proxy\n\t\t--registry\n\t\t--resolved\n\t\t--scope -S\n\t\t--tag\n\t)\n\tdeclare -ar arg_flags=(\n\t\t\"${bool_arg_flags[@]}\"\n\t\t\"${dir_arg_flags[@]}\"\n\t\t\"${file_arg_flags[@]}\"\n\t\t\"${int_arg_flags[@]}\"\n\t\t\"${special_arg_flags[@]}\"\n\t\t\"${optional_arg_flags[@]}\"\n\t\t\"${skipped_arg_flags[@]}\"\n\t)\n\n\tdeclare -ar global_flags=(\n\t\t--cache-folder\n\t\t--check-files\n\t\t--cwd\n\t\t--disable-pnp\n\t\t--emoji\n\t\t--enable-pnp --pnp\n\t\t--flat\n\t\t--focus\n\t\t--force\n\t\t--frozen-lockfile\n\t\t--global-folder\n\t\t--har\n\t\t--help -h\n\t\t--https-proxy\n\t\t--ignore-engines\n\t\t--ignore-optional\n\t\t--ignore-platform\n\t\t--ignore-scripts\n\t\t--json\n\t\t--link-duplicates\n\t\t--link-folder\n\t\t--modules-folder\n\t\t--mutex\n\t\t--network-concurrency\n\t\t--network-timeout\n\t\t--no-bin-links\n\t\t--no-default-rc\n\t\t--no-lockfile\n\t\t--non-interactive\n\t\t--no-node-version-check\n\t\t--no-progress\n\t\t--offline\n\t\t--otp\n\t\t--prefer-offline\n\t\t--preferred-cache-folder\n\t\t--prod\n\t\t--production\n\t\t--proxy\n\t\t--pure-lockfile\n\t\t--registry\n\t\t--scripts-prepend-node-path\n\t\t--silent -s\n\t\t--skip-integrity-check\n\t\t--strict-semver\n\t\t--update-checksums\n\t\t--use-yarnrc\n\t\t--verbose\n\t\t--version -v\n\t)\n\tdeclare -a flags=()\n\n\tCOMPREPLY=()\n\tif command -v _get_comp_words_by_ref > /dev/null; then\n\t\t_get_comp_words_by_ref -n = -n @ -n : cur prev words cword\n\telif command -v _init_completion > /dev/null; then\n\t\t_init_completion\n\tfi\n\n\t__yarn_get_command -d 1\n\n\t__yarn_flag_args || \"_yarn_${cmd//-/_}\" 2> /dev/null || __yarn_fallback\n\n\tif command -v __ltrim_colon_completions > /dev/null; then\n\t\t__ltrim_colon_completions \"$cur\"\n\tfi\n}\n\nif [[ ${BASH_VERSINFO[0]} -ge 4 && ${BASH_VERSINFO[1]} -ge 4 ]]; then\n\tcomplete -o nosort -F _yarn yarn\nelse\n\tcomplete -F _yarn yarn\nfi"
  },
  {
    "path": "vendor/github.com/erichs/composure/.gitignore",
    "content": "composure_test/**\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/.travis.yml",
    "content": "language: c\nscript: make tests\nbranches:\n  only:\n    - testing\n    - master\nbefore_install:\n - sudo apt-get update -qq\n - sudo apt-get install -qq ksh zsh\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/History.md",
    "content": "1.3   / 2015-11-04\n==================\n  * Make glossary() faster by not introspecting loaded shell functions\n  * Remove brittle and incomplete test suite\n  * Fixes for shellcheck.net\n\n1.2.4 / 2015-08-29\n==================\n  * Minor updates for latest shellcheck.net codes\n  * Fix write() function, thanks @IsoLinearCHiP!\n\n1.2.3 / 2015-04-01\n==================\n  * Minor fixes for latest shellcheck.net codes\n  * Better wrapping for long about metadata\n  * Support leading hyphens in function names\n\n1.2.2 / 2015-01-16\n==================\nvarious fixes, including contributions from:\n  * @nilbus\n  * @martinlauer\n  * @DrVanScott\n\n1.2.1 / 2014-01-05\n==================\n  * Tab completion for revise(), new compost() func\n  * Improve shell determination and bootstrapping sequence\n\n1.2.0 / 2013-11-17\n==================\n  * Auto-load composed functions\n\n1.1.1 / 2013-10-29\n==================\n  * Fix issue with zsh noclobber option\n\n1.1.0 / 2013-10-23\n==================\n  * Auto-revise drafted functions\n  * Populate author metadata on draft\n  * Use tpope-style commit msgs\n  * Respect XDG_DATA_HOME\n\n1.0.4 / 2013-08-30\n==================\n\n  * increase letterpress spacing\n  * refactor composure extras\n\n1.0.3 / 2012-11-29\n==================\n\n  * make revise() smarter\n  * write() includes shebang and main() invocation\n\n1.0.2 / 2012-05-24\n==================\n\n  * use _plumbing nomenclature\n\n1.0.1 / 2012-05-19\n==================\n\n  * revise() takes an optional -e flag\n  * revise() aborts on an empty file\n  * metadata cleaned up\n\n1.0 / 2012-05-17\n==================\n\n  * performance improvements\n  * fix draft(): ensure alias names are not used for function names\n  * porcelain is self-referential\n  * consolidate plumbing fns\n  * add diagram\n  * write() porcelain\n  * apidoc for author & version\n  * second-order functions\n  * asciicast demo!\n  * prompt for git repo creation\n  * full POSIX compatibility\n  * revised documentation\n  * sed-fu rescues case blocks - solves #1\n  * basic git tracking\n  * remove hyphens from function names\n  * fix for non-interactive shells\n  * respect EDITOR preference\n  * add readme\n  * initial commit\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/LICENSE",
    "content": "License: The MIT License\nCopyright © 2012, 2016 Erich Smith\nPermission is hereby granted, free of charge, to any person obtaining a copy of this\nsoftware and associated documentation files (the \"Software\"), to deal in the Software\nwithout restriction, including without limitation the rights to use, copy, modify,\nmerge, publish, distribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to the following\nconditions:\nThe above copyright notice and this permission notice shall be included in all copies\nor substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/Makefile",
    "content": "\nTARGET = tests\nall: $(TARGET)\n\ntests:\n\tcd test && make tests\n\nclean::\n\trm -f test/*~ test/t/*~\n\trm -rf test/composure_test\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/README.md",
    "content": "\n     e88~~\\  e88~-_  888-~88e-~88e 888-~88e   e88~-_   d88~\\ 888  888 888-~\\  e88~~8e\n    d888    d888   i 888  888  888 888  888b d888   i C888   888  888 888    d888  88b\n    8888    8888   | 888  888  888 888  8888 8888   |  Y88b  888  888 888    8888__888\n    Y888    Y888   ' 888  888  888 888  888P Y888   '   888D 888  888 888    Y888    ,\n     \"88__/  \"88_-~  888  888  888 888-_88\"   \"88_-~  \\_88P  \"88_-888 888     \"88___/\n                                   888\n\n    # Composure: don't fear the Unix chainsaw\n\nThese light-hearted functions make programming the shell easier and\nmore intuitive:\n\n* Transition organically from command, to function, to script\n* Use an unobtrusive help system with arbitrary shell metadata\n* Automatically version and store your shell functions with Git\n\nstatic analysis and automated tests: [![Build Status](https://travis-ci.org/erichs/composure.png?branch=master)](https://travis-ci.org/erichs/composure)\n\n## Demo!\n\n[Composing a simple network monitoring script](http://asciinema.org/a/476) (4 minutes)\n\n## Compatibility\n\nComposure is POSIX-compliant, and is known to work on ksh93, zsh, and\nbash, on osx and linux.\n\nPlease feel free to open an issue if you have any difficulties on your system.\n\n## Installing\n\nPut composure.sh where you'd like it to live and source it from your\nshell's profile or rc file.\n\nOn Bash:\n\n```bash\n    cd /your/favorite/directory\n    curl -L http://git.io/composure > composure.sh\n    chmod +x composure.sh\n    echo \"source $(pwd)/composure.sh\" >> ~/.bashrc   # or, ~/.bash_profile on osx\n```\n\nUsers upgrading from a version prior to 1.1.0 need to execute the following commands, as the directory for composure's local repo has changed:\n\n```bash\n  mkdir ~/.local 2>/dev/null\n  mv ~/.composure ~/.local/composure\n```\n\n## Craft - Draft - Revise - Write\n\n<img src=\"http://yuml.me/47fcf7e2\" />\n\n### Crafting the command line\n\n[REPL environments](http://repl.it) are great for trying out programming ideas\nand crafting snippets of working code, aren't they? Composure helps you make\nbetter use of the REPL environment constantly at your fingertips: the shell.\n\nMany Unix users I know like to iteratively build up complex commands by trying\nsomething out, hitting the up arrow and perhaps adding a filter with a pipe:\n\n```bash\n  $ cat servers.txt\n  bashful: up\n  doc: down\n\n  up-arrow\n\n  $ cat servers.txt | grep down\n  doc: down\n\n  up-arrow\n\n  $ cat servers.txt | grep down | mail -s \"down server(s)\" admin@here.com\n```\n\nComposure helps by letting you quickly draft simple shell functions, breaking down\nyour long pipe filters and complex commands into readable and reusable chunks.\n\n### Draft first, ask questions later\n\nOnce you've crafted your gem of a command, don't throw it away! Use 'draft ()'\nand give it a [good name](http://martinfowler.com/bliki/TwoHardThings.html).\nThis stores your last command as a function you can reuse later. Think of it\nlike a rough draft.\n\n```bash\n  $ cat servers.txt\n  bashful: up\n  doc: down\n\n  up-arrow\n\n  $ cat servers.txt | grep down\n  doc: down\n\n  $ draft finddown\n\n  $ finddown | mail -s \"down server(s)\" admin@here.com\n```\n\n### Revise, revise, revise!\n\nNow that you've got a minimal shell function, you may want to make it better\nthrough refactoring and revision. Use the 'revise ()' command to revise your\nshell function in your favorite editor.\n\n * generalize functions with input parameters\n * add or remove functionality\n * add supporting metadata for documentation\n\n```bash\n  $ revise finddown\n  finddown ()\n  {\n      about finds servers marked 'down' in text file\n      group admin\n      cat $1 | grep down\n  }\n\n  $ finddown servers.txt\n  doc: down\n```\n\n### Get it in Writing\n\nWhen it is time to put your function or functions to use in a shell script, just call write:\n\n```bash\n  $ write finddown > finddown.sh\n```\n\nEdit the main() function, chmod +x, and you're ready to go!\n\n## Arbitrary shell metadata!\n\nComposure uses a simple system of dynamic keywords that allow you to add\nmetadata to your functions. Just call 'cite ()' to initialize your new\nkeyword(s), and use them freely in your functions:\n\n```bash\n  foo()\n  {\n      cite about\n      about perform mad script-foo\n      echo 'foo'\n  }\n```\n\nRetrieve your metadata later by calling 'metafor ()':\n\n```bash\n  typeset -f foo | metafor about  # displays:\n  perform mad script-foo\n```\n\nBy default, composure knows the keywords: about, param, group, author, and example.\n\nThese default keywords are used by the help system:\n\n## Intuitive help system\n\nThe 'glossary ()' function will automatically summarize all functions with\n'about' metadata. If called with a 'group' name as a parameter, it will\nsummarize functions belonging to that group.\n\nTo display apidoc-style help for a function, use 'reference ()'.\n\n```bash\n  $ glossary   # displays:\n  cite                creates a new meta keyword for use in your functions\n  draft               wraps last command into a new function\n  finddown            finds servers marked 'down' in text file\n  foo                 perform mad script-foo\n  glossary            displays help summary for all functions, or summary for a group of functions\n  metafor             prints function metadata associated with keyword\n  reference           displays apidoc help for a specific function\n  revise              loads function into editor for revision\n  write               writes one or more composed function definitions to stdout\n\n  meanwhile\n\n  $ glossary admin   # displays:\n  finddown            finds servers marked 'down' in text file\n\n  and\n\n  $ reference draft  # displays:\n  draft               wraps last command into a new function\n  parameters:\n                      1: name to give function\n  examples:\n                      $ ls\n                      $ draft list\n                      $ list\n```\n\n## Git integration\n\nIf you already use git, installing composure will initialize a ~/.local/composure\nrepository, and store and version your functions there. Just use 'draft ()' and\n'revise ()', they automatically version for you.\n\nComposure supports the [XDG Base Directory](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)\nspecification, and will respect your local XDG_DATA_HOME environment variable.\n\nWhy do this?\n\n * the latest version of any function you've composed may always be sourced from\n   your composure repo\n * never throw away code--keep your one-off functions in your composure 'junk\n   drawer', and grep through it later for long-forgotten gems\n * every version of every function you write is always\n   available to you via basic git commands\n\n## Persistent access\n\nDraft or revise a function, and the latest version is automatically sourced into your current shell environment. By default, composure automatically sources all of your composed functions when you source the composure.sh script. If you are concerned about shell startup time, have many hundreds of versioned shell functions, or otherwise want to control which functions are loaded from your composure repository, you may disable the default behavior by adding the following line to your shell's startup script:\n\n```shell\nexport LOAD_COMPOSED_FUNCTIONS=0\n```\n\n# Credits\n\nComposure grew out of ideas taken from from Gary Bernhardt's hilarious talk [The Unix\nChainsaw](http://www.confreaks.com/videos/615-cascadiaruby2011-the-unix-chainsaw) (31 minutes),\nwhich refers to the Elements of Programming described in MIT's [SICP\ntext](http://mitpress.mit.edu/sicp/full-text/book/book.html):\n\n * primitive expressions\n * means of combination\n * means of abstraction\n\n## Known Issues\n\n'glossary ()' and 'reference ()' do not support nested functions with metadata.\n\n`revise` works well if your editor is terminal-based, like Emacs or Vim. If you use a windowed editor like Atom, VSCode, or Sublime, you will need to check to see if your editor supports a flag argument that allows it to wait for the files to be closed before returning. If this is supported, you can create a small script to launch your editor in this mode, and specify that script path in your `EDITOR` var. See https://github.com/erichs/composure/issues/10.\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/c_extras.sh",
    "content": "#!/bin/bash\n\n_basename_no_extension () {\n  sed -e 's/^.*\\/\\(.*\\)\\.inc$/\\1/'\n}\n\n_composure_functions () {\n  _list_composure_files | _basename_no_extension\n}\n\n_load_tab_completions () {\n  # support tab completion for 'revise' command\n  # you may disable this by adding the following line to your shell startup:\n  # export COMPOSURE_TAB_COMPLETION=0\n\n  if [ \"$COMPOSURE_TAB_COMPLETION\" = \"0\" ]; then\n    return  # if you say so...\n  fi\n\n  case \"$(_shell)\" in\n    zsh)\n      read -r -d '' SCRIPT <<ZSHDATA\n_zsh_revise_complete () {\n   typeset word completions\n   word=\"\\$1\"\n   completions=\"\\$(_composure_functions)\"\n   reply=( \"\\${(ps:\\n:)completions}\" )\n}\ncompctl -K _zsh_revise_complete revise\nZSHDATA\n      eval \"$SCRIPT\"\n      unset SCRIPT\n      ;;\n    bash)\n      read -r -d '' SCRIPT <<BASHDATA\n_bash_revise_complete () {\n  typeset cur\n  cur=\\${COMP_WORDS[COMP_CWORD]}\n  COMPREPLY=( \\$(compgen -W \"\\$(_composure_functions)\" -- \\$cur) )\n  return 0\n}\ncomplete -F _bash_revise_complete revise\nBASHDATA\n      eval \"$SCRIPT\"\n      unset SCRIPT\n      ;;\n    *)\n      echo \"composure tab completions unavailable\"\n      ;;\n  esac\n}\n\n# Second-order functions for composure\n\nfindgroup ()\n{\n    about 'finds all functions belonging to group'\n    param '1: name of group'\n    example '$ findgroup tools'\n    group 'composure'\n\n    typeset func\n    for func in $(_typeset_functions)\n    do\n        typeset group=\"$(typeset -f $func | metafor group)\"\n        if [ \"$group\" = \"$1\" ]; then\n            echo \"$func\"\n        fi\n    done\n}\n\noverview ()\n{\n    about 'gives overview of available shell functions, by group'\n    group 'composure'\n\n    # display a brief progress message...\n    printf '%s' 'building documentation...'\n    typeset grouplist=$(mktemp /tmp/grouplist.XXXX);\n    typeset func;\n    for func in $(_typeset_functions);\n    do\n        typeset group=\"$(typeset -f $func | metafor group)\";\n        if [ -z \"$group\" ]; then\n            group='misc';\n        fi;\n        typeset about=\"$(typeset -f $func | metafor about)\";\n        _letterpress \"$about\" $func >> $grouplist.$group;\n        echo $grouplist.$group >> $grouplist;\n    done;\n    # clear progress message\n    printf '\\r%s\\n' '                          '\n    typeset group;\n    typeset gfile;\n    for gfile in $(cat $grouplist | sort | uniq);\n    do\n        printf '%s\\n' \"${gfile##*.}:\";\n        cat $gfile;\n        printf '\\n';\n        command rm $gfile 2> /dev/null;\n    done | less\n    command rm $grouplist 2> /dev/null\n}\n\nrecompose ()\n{\n    about 'loads a stored function from ~/.composure repo'\n    param '1: name of function'\n    example '$ load myfunc'\n    group 'composure'\n\n    . $(_get_composure_dir)/$1.inc\n}\n\nunique_metafor ()\n{\n    about 'displays all unique metadata for a given keyword'\n    param '1: keyword'\n    example '$ unique_metafor group'\n    group 'composure'\n\n    typeset keyword=$1\n\n    typeset file=$(mktemp /tmp/composure.XXXX)\n    typeset -f | metafor $keyword >> $file\n    cat $file | sort | uniq\n    command rm $file 2>/dev/null\n}\n\ncompost () {\n\tabout 'delete function stored in composure repo'\n\tparam '1: name of function'\n\texample '$ compost myfunc'\n\tgroup 'composure'\n\n  typeset func=$1\n  [ -z \"$func\" ] && echo \"you must specify a function name!\" && return 1\n\n  (\n\t  cd $(_get_composure_dir)\n    git rm \"$func.inc\" && git commit -m \"Delete function $func\"\n  )\n}\n\n_load_tab_completions\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/composure.plugin.zsh",
    "content": "#!/bin/zsh\nsource ${0:h}/{composure,c_extras}.sh\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/composure.sh",
    "content": "#!/bin/bash\n\n# composure - by erichs\n# light-hearted functions for intuitive shell programming\n\n# version: 1.3.1\n# latest source available at http://git.io/composure\n\n# install: source this script in your ~/.profile or ~/.${SHELL}rc script\n# known to work on bash, zsh, and ksh93\n\n# 'plumbing' functions\n\n_bootstrap_composure() {\n  _generate_metadata_functions\n  _load_composed_functions\n  _determine_printf_cmd\n}\n\n_get_composure_dir ()\n{\n  if [ -n \"${XDG_DATA_HOME:-}\" ]; then\n    echo \"$XDG_DATA_HOME/composure\"\n  else\n    echo \"$HOME/.local/composure\"\n  fi\n}\n\n_get_author_name ()\n{\n  typeset name localname\n  localname=\"$(git --git-dir \"$(_get_composure_dir)/.git\" config --get user.name)\"\n  for name in \"${GIT_AUTHOR_NAME:-}\" \"$localname\"; do\n    if [ -n \"$name\" ]; then\n      echo \"$name\"\n      break\n    fi\n  done\n}\n\n_composure_keywords ()\n{\n  echo \"about author example group param version\"\n}\n\n_letterpress ()\n{\n  typeset rightcol=\"$1\" leftcol=\"${2:- }\" leftwidth=\"${3:-20}\"\n\n  if [ -z \"$rightcol\" ]; then\n    return\n  fi\n\n  $_printf_cmd \"%-*s%s\\n\" \"$leftwidth\" \"$leftcol\" \"$rightcol\"\n}\n\n_determine_printf_cmd() {\n  if [ -z \"${_printf_cmd:-}\" ]; then\n    _printf_cmd=printf\n    # prefer GNU gprintf if available\n    [ -x \"$(which gprintf 2>/dev/null)\" ] && _printf_cmd=gprintf\n    export _printf_cmd\n  fi\n}\n\n_longest_function_name_length ()\n{\n  echo \"$1\" | awk 'BEGIN{ maxlength=0 }\n  {\n  for(i=1;i<=NF;i++)\n    if (length($i)>maxlength)\n    {\n    maxlength=length($i)\n    }\n  }\n  END{ print maxlength}'\n}\n\n_temp_filename_for ()\n{\n  typeset file=\"$(mktemp \"/tmp/$1.XXXX\")\"\n  command rm \"$file\" 2>/dev/null   # ensure file is unlinked prior to use\n  echo \"$file\"\n}\n\n_prompt ()\n{\n  typeset prompt=\"$1\"\n  typeset result\n  case \"$(_shell)\" in\n    bash)\n      read -r -e -p \"$prompt\" result;;\n    *)\n      echo -n \"$prompt\" >&2; read -r result;;\n  esac\n  echo \"$result\"\n}\n\n_add_composure_file ()\n{\n  typeset func=\"$1\"\n  typeset file=\"$2\"\n  typeset operation=\"$3\"\n  typeset comment=\"${4:-}\"\n  typeset composure_dir=$(_get_composure_dir)\n\n  (\n    if ! cd \"$composure_dir\"; then\n      printf \"%s\\n\" \"Oops! Can't find $composure_dir!\"\n      return\n    fi\n    if git rev-parse 2>/dev/null; then\n      if [ ! -f \"$file\" ]; then\n        printf \"%s\\n\" \"Oops! Couldn't find $file to version it for you...\"\n        return\n      fi\n      cp \"$file\" \"$composure_dir/$func.inc\"\n      git add --all .\n      if [ -z \"$comment\" ]; then\n        comment=\"$(_prompt 'Git Comment: ')\"\n      fi\n      git commit -m \"$operation $func: $comment\"\n    fi\n  )\n}\n\n_transcribe ()\n{\n  typeset func=\"$1\"\n  typeset file=\"$2\"\n  typeset operation=\"$3\"\n  typeset comment=\"${4:-}\"\n  typeset composure_dir=$(_get_composure_dir)\n\n  if git --version >/dev/null 2>&1; then\n    if [ -d \"$composure_dir\" ]; then\n      _add_composure_file \"$func\" \"$file\" \"$operation\" \"$comment\"\n    else\n      if [ \"${USE_COMPOSURE_REPO:-}\" = \"0\" ]; then\n        return  # if you say so...\n      fi\n      printf \"%s\\n\" \"I see you don't have a $composure_dir repo...\"\n      typeset input=''\n      typeset valid=0\n      while [ $valid != 1 ]; do\n        printf \"\\n%s\" 'would you like to create one? y/n: '\n        read -r input\n        case $input in\n          y|yes|Y|Yes|YES)\n            (\n              echo 'creating git repository for your functions...'\n              mkdir -p \"$composure_dir\" || return 1\n              cd \"$composure_dir\" || return 1\n              git init\n              echo \"composure stores your function definitions here\" > README.txt\n              git add README.txt\n              git commit -m 'initial commit'\n            )\n            # if at first you don't succeed...\n            _transcribe \"$func\" \"$file\" \"$operation\" \"$comment\"\n            valid=1\n            ;;\n          n|no|N|No|NO)\n            printf \"%s\\n\" \"ok. add 'export USE_COMPOSURE_REPO=0' to your startup script to disable this message.\"\n            valid=1\n          ;;\n          *)\n            printf \"%s\\n\" \"sorry, didn't get that...\"\n          ;;\n        esac\n      done\n     fi\n  fi\n}\n\n_typeset_functions ()\n{\n  # unfortunately, there does not seem to be a easy, portable way to list just the\n  # names of the defined shell functions...\n\n  case \"$(_shell)\" in\n    sh|bash)\n      typeset -F | awk '{print $3}'\n      ;;\n    *)\n      # trim everything following '()' in ksh/zsh\n      typeset +f | sed 's/().*$//'\n      ;;\n  esac\n}\n\n_typeset_functions_about ()\n{\n  typeset f\n  for f in $(_typeset_functions); do\n    typeset -f -- \"$f\" | grep -qE \"^about[[:space:]]|[[:space:]]about[[:space:]]\" && echo -- \"$f\"\n  done\n}\n\n_shell () {\n  # here's a hack I modified from a StackOverflow post:\n  # get the ps listing for the current process ($$), and print the last column (CMD)\n  # stripping any leading hyphens shells sometimes throw in there\n  typeset this=$(ps -o comm -p $$ | tail -1 | awk '{print $NF}' | sed 's/^-*//')\n  echo \"${this##*/}\"  # e.g. /bin/bash => bash\n}\n\n_generate_metadata_functions() {\n  typeset f\n  for f in $(_composure_keywords)\n  do\n    eval \"$f() { :; }\"\n  done\n}\n\n_list_composure_files () {\n  typeset composure_dir=\"$(_get_composure_dir)\"\n  [ -d \"$composure_dir\" ] && find \"$composure_dir\" -maxdepth 1 -name '*.inc'\n}\n\n_load_composed_functions () {\n  # load previously composed functions into shell\n  # you may disable this by adding the following line to your shell startup:\n  # export LOAD_COMPOSED_FUNCTIONS=0\n\n  if [ \"${LOAD_COMPOSED_FUNCTIONS:-}\" = \"0\" ]; then\n    return  # if you say so...\n  fi\n\n  typeset inc\n  for inc in $(_list_composure_files); do\n    # shellcheck source=/dev/null\n    . \"$inc\"\n  done\n}\n\n_strip_trailing_whitespace () {\n  sed -e 's/ \\+$//'\n}\n\n_strip_semicolons () {\n  sed -e 's/;$//'\n}\n\n\n# 'porcelain' functions\n\ncite ()\n{\n  about 'creates one or more meta keywords for use in your functions'\n  param 'one or more keywords'\n  example '$ cite url username'\n  example '$ url http://somewhere.com'\n  example '$ username alice'\n  group 'composure'\n\n  # this is the storage half of the 'metadata' system:\n  # we create dynamic metadata keywords with function wrappers around\n  # the NOP command, ':'\n\n  # anything following a keyword will get parsed as a positional\n  # parameter, but stay resident in the ENV. As opposed to shell\n  # comments, '#', which do not get parsed and are not available\n  # at runtime.\n\n  # a BIG caveat--your metadata must be roughly parsable: do not use\n  # contractions, and consider single or double quoting if it contains\n  # non-alphanumeric characters\n\n  if [ -z \"$1\" ]; then\n    printf '%s\\n' 'missing parameter(s)'\n    reference cite\n    return\n  fi\n\n  typeset keyword\n  for keyword in \"$@\"; do\n    eval \"$keyword() { :; }\"\n  done\n}\n\ndraft ()\n{\n  about 'wraps command from history into a new function, default is last command'\n  param '1: name to give function'\n  param '2: optional history line number'\n  example '$ ls'\n  example '$ draft list'\n  example '$ draft newfunc 1120  # wraps command at history line 1120 in newfunc()'\n  group 'composure'\n\n  typeset func=$1\n  typeset num=$2\n\n  if [ -z \"$func\" ]; then\n    printf '%s\\n' 'missing parameter(s)'\n    reference draft\n    return\n  fi\n\n  # aliases bind tighter than function names, disallow them\n  if type -a \"$func\" 2>/dev/null | grep -q 'is.*alias'; then\n    printf '%s\\n' \"sorry, $(type -a \"$func\"). please choose another name.\"\n    return\n  fi\n\n  typeset cmd\n  if [ -z \"$num\" ]; then\n    # some versions of 'fix command, fc' need corrective lenses...\n    typeset lines=$(fc -ln -1 | grep -q draft && echo 2 || echo 1)\n    # parse last command from fc output\n    # shellcheck disable=SC2086\n    cmd=$(fc -ln -$lines | head -1 | sed 's/^[[:blank:]]*//')\n  else\n    # parse command from history line number\n    cmd=$(eval \"history | grep '^[[:blank:]]*$num' | head -1\" | sed 's/^[[:blank:][:digit:]]*//')\n  fi\n  eval \"function $func {\n  author '$(_get_author_name)'\n  about ''\n  param ''\n  example ''\n  group ''\n\n  $cmd;\n}\"\n  typeset file=$(_temp_filename_for draft)\n  typeset -f \"$func\" | _strip_trailing_whitespace | _strip_semicolons > \"$file\"\n  _transcribe \"$func\" \"$file\" Draft \"Initial draft\"\n  command rm \"$file\" 2>/dev/null\n  revise \"$func\"\n}\n\nglossary ()\n{\n  about 'displays help summary for all functions, or summary for a group of functions'\n  param '1: optional, group name'\n  example '$ glossary'\n  example '$ glossary misc'\n  group 'composure'\n\n  typeset targetgroup=${1:-}\n  typeset functionlist=\"$(_typeset_functions_about)\"\n  typeset maxwidth=$(_longest_function_name_length \"$functionlist\" | awk '{print $1 + 5}')\n\n  for func in $(echo $functionlist); do\n\n    if [ \"X${targetgroup}X\" != \"XX\" ]; then\n      typeset group=\"$(typeset -f -- $func | metafor group)\"\n      if [ \"$group\" != \"$targetgroup\" ]; then\n        continue  # skip non-matching groups, if specified\n      fi\n    fi\n    typeset about=\"$(typeset -f -- $func | metafor about)\"\n    typeset aboutline=\n    echo \"$about\" | fmt | while read -r aboutline; do\n      _letterpress \"$aboutline\" \"$func\" \"$maxwidth\"\n      func=\" \" # only display function name once\n    done\n  done\n}\n\nmetafor ()\n{\n  about 'prints function metadata associated with keyword'\n  param '1: meta keyword'\n  example '$ typeset -f glossary | metafor example'\n  group 'composure'\n\n  typeset keyword=$1\n\n  if [ -z \"$keyword\" ]; then\n    printf '%s\\n' 'missing parameter(s)'\n    reference metafor\n    return\n  fi\n\n  # this sed-fu is the retrieval half of the 'metadata' system:\n  # 'grep' for the metadata keyword, and then parse/filter the matching line\n\n  # grep keyword # strip trailing '|\"|; # ignore thru keyword and leading '|\"\n  sed -n \"/$keyword / s/['\\\";]*\\$//;s/^[ \t]*\\(: _\\)*$keyword ['\\\"]*\\([^([].*\\)*\\$/\\2/p\"\n}\n\nreference ()\n{\n  about 'displays apidoc help for a specific function'\n  param '1: function name'\n  example '$ reference revise'\n  group 'composure'\n\n  typeset func=$1\n  if [ -z \"$func\" ]; then\n    printf '%s\\n' 'missing parameter(s)'\n    reference reference\n    return\n  fi\n\n  typeset line\n\n  typeset about=\"$(typeset -f \"$func\" | metafor about)\"\n  _letterpress \"$about\" \"$func\"\n\n  typeset author=\"$(typeset -f $func | metafor author)\"\n  if [ -n \"$author\" ]; then\n    _letterpress \"$author\" 'author:'\n  fi\n\n  typeset version=\"$(typeset -f $func | metafor version)\"\n  if [ -n \"$version\" ]; then\n    _letterpress \"$version\" 'version:'\n  fi\n\n  if [ -n \"$(typeset -f $func | metafor param)\" ]; then\n    printf \"parameters:\\n\"\n    typeset -f $func | metafor param | while read -r line\n    do\n      _letterpress \"$line\"\n    done\n  fi\n\n  if [ -n \"$(typeset -f $func | metafor example)\" ]; then\n    printf \"examples:\\n\"\n    typeset -f $func | metafor example | while read -r line\n    do\n      _letterpress \"$line\"\n    done\n  fi\n}\n\nrevise ()\n{\n  about 'loads function into editor for revision'\n  param '<optional> -e: revise version stored in ENV'\n  param '1: name of function'\n  example '$ revise myfunction'\n  example '$ revise -e myfunction'\n  example 'save a zero-length file to abort revision'\n  group 'composure'\n\n  typeset source='git'\n  if [ \"$1\" = '-e' ]; then\n    source='env'\n    shift\n  fi\n\n  typeset func=$1\n  if [ -z \"$func\" ]; then\n    printf '%s\\n' 'missing parameter(s)'\n    reference revise\n    return\n  fi\n\n  typeset composure_dir=$(_get_composure_dir)\n  typeset temp=$(_temp_filename_for revise)\n  # populate tempfile...\n  if [ \"$source\" = 'env' ] || [ ! -f \"$composure_dir/$func.inc\" ]; then\n    # ...with ENV if specified or not previously versioned\n    typeset -f $func > $temp\n  else\n    # ...or with contents of latest git revision\n    cat \"$composure_dir/$func.inc\" > \"$temp\"\n  fi\n\n  if [ -z \"${EDITOR:-}\" ]\n  then\n    typeset EDITOR=vi\n  fi\n\n  $EDITOR \"$temp\"\n  if [ -s \"$temp\" ]; then\n    typeset edit='N'\n\n    # source edited file\n    # shellcheck source=/dev/null\n    . \"$temp\" || edit='Y'\n\n    while [ $edit = 'Y' ]; do\n      echo -n \"Re-edit? Y/N: \"\n      read -r edit\n      case $edit in\n         y|yes|Y|Yes|YES)\n           edit='Y'\n           $EDITOR \"$temp\"\n           # shellcheck source=/dev/null\n           . \"$temp\" && edit='N';;\n         *)\n           edit='N';;\n      esac\n    done\n    _transcribe \"$func\" \"$temp\" Revise\n  else\n    # zero-length files abort revision\n    printf '%s\\n' 'zero-length file, revision aborted!'\n  fi\n  command rm \"$temp\"\n}\n\nwrite ()\n{\nabout 'writes one or more composed function definitions to stdout'\nparam 'one or more function names'\nexample '$ write finddown foo'\nexample '$ write finddown'\ngroup 'composure'\n\nif [ -z \"$1\" ]; then\n  printf '%s\\n' 'missing parameter(s)'\n  reference write\n  return\nfi\n\necho \"#!/usr/bin/env ${SHELL##*/}\"\n\n# bootstrap metadata\ncat <<END\nfor f in $(_composure_keywords)\ndo\n  eval \"\\$f() { :; }\"\ndone\nunset f\nEND\n\n# write out function definitons\n# shellcheck disable=SC2034\ntypeset -f cite \"$@\"\n\ncat <<END\nmain() {\n  echo \"edit me to do something useful!\"\n  exit 0\n}\n\nmain \\$*\nEND\n}\n\n_bootstrap_composure\n\n: <<EOF\nLicense: The MIT License\n\nCopyright © 2012, 2016 Erich Smith\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this\nsoftware and associated documentation files (the \"Software\"), to deal in the Software\nwithout restriction, including without limitation the rights to use, copy, modify,\nmerge, publish, distribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be included in all copies\nor substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\nCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\nOR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nEOF\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/test/Makefile",
    "content": "\nTARGET = tests\n\nall: $(TARGET)\n\nruntests:\n\t./runtests.sh\n\nrunshellcheck:\n\t./runshellcheck.sh\n\ntests:\n\t./wvtestrun $(MAKE) runshellcheck\n\nclean::\n\trm -f *~ t/*~\n\trm -rf composure_test\n\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/test/runshellcheck.sh",
    "content": "#!/usr/bin/env sh\n\n# run code quality metrics\necho \"Testing \\\"code quality\\\" with shellcheck.net in ../composure.sh:\"\ndatafile=shellcheck.raw\nmetricfile=shellcheck.out\n\ncurl -s --data-urlencode script=\"$(cat ../composure.sh)\" \\\n  www.shellcheck.net/shellcheck.php > $datafile\ncat $datafile | python -mjson.tool > $metricfile\nrm $datafile\ncat $metricfile\n\n# check for shellcheck.net errors\ncat $metricfile | grep -q error\nif [ $? -eq 0 ]; then\n  echo \"! shellcheck.net:../composure.sh:0  [ errors ]  FAILED\"\n  rm $metricfile\n  exit 2\nfi\n\n# check for shellcheck.net warnings\ncat $metricfile | grep -q warning\nif [ $? -eq 0 ]; then\n  echo \"! shellcheck.net:../composure.sh:0  [ warnings ]  FAILED\"\n  rm $metricfile\n  exit 2\nfi\n\necho \"! shellcheck.net:../composure.sh:0 [ no errors or warnings ] ok\"\nrm $metricfile\n"
  },
  {
    "path": "vendor/github.com/erichs/composure/test/wvtestrun",
    "content": "#!/usr/bin/perl -w\n#\n# WvTest:\n#   Copyright (C)2007-2012 Versabanq Innovations Inc. and contributors.\n#       Licensed under the GNU Library General Public License, version 2.\n#       See the included file named LICENSE for license information.\n#       You can get wvtest from: http://github.com/apenwarr/wvtest\n#\nuse strict;\nuse Time::HiRes qw(time);\n\n# always flush\n$| = 1;\n\nif (@ARGV < 1) {\n    print STDERR \"Usage: $0 <command line...>\\n\";\n    exit 127;\n}\n\nprint STDERR \"Testing \\\"all\\\" in @ARGV:\\n\";\n\nmy $pid = open(my $fh, \"-|\");\nif (!$pid) {\n    # child\n    setpgrp();\n    open STDERR, '>&STDOUT' or die(\"Can't dup stdout: $!\\n\");\n    exec(@ARGV);\n    exit 126; # just in case\n}\n\nmy $istty = -t STDOUT && $ENV{'TERM'} ne \"dumb\";\nmy @log = ();\nmy ($gpasses, $gfails) = (0,0);\n\nsub bigkill($)\n{\n    my $pid = shift;\n\n    if (@log) {\n\tprint \"\\n\" . join(\"\\n\", @log) . \"\\n\";\n    }\n\n    print STDERR \"\\n! Killed by signal    FAILED\\n\";\n\n    ($pid > 0) || die(\"pid is '$pid'?!\\n\");\n\n    local $SIG{CHLD} = sub { }; # this will wake us from sleep() faster\n    kill 15, $pid;\n    sleep(2);\n\n    if ($pid > 1) {\n\tkill 9, -$pid;\n    }\n    kill 9, $pid;\n\n    exit(125);\n}\n\n# parent\nlocal $SIG{INT} = sub { bigkill($pid); };\nlocal $SIG{TERM} = sub { bigkill($pid); };\nlocal $SIG{ALRM} = sub {\n    print STDERR \"Alarm timed out!  No test results for too long.\\n\";\n    bigkill($pid);\n};\n\nsub colourize($)\n{\n    my $result = shift;\n    my $pass = ($result eq \"ok\");\n\n    if ($istty) {\n\tmy $colour = $pass ? \"\\e[32;1m\" : \"\\e[31;1m\";\n\treturn \"$colour$result\\e[0m\";\n    } else {\n\treturn $result;\n    }\n}\n\nsub mstime($$$)\n{\n    my ($floatsec, $warntime, $badtime) = @_;\n    my $ms = int($floatsec * 1000);\n    my $str = sprintf(\"%d.%03ds\", $ms/1000, $ms % 1000);\n\n    if ($istty && $ms > $badtime) {\n        return \"\\e[31;1m$str\\e[0m\";\n    } elsif ($istty && $ms > $warntime) {\n        return \"\\e[33;1m$str\\e[0m\";\n    } else {\n        return \"$str\";\n    }\n}\n\nsub resultline($$)\n{\n    my ($name, $result) = @_;\n    return sprintf(\"! %-65s %s\", $name, colourize($result));\n}\n\nmy $allstart = time();\nmy ($start, $stop);\n\nsub endsect()\n{\n    $stop = time();\n    if ($start) {\n\tprintf \" %s %s\\n\", mstime($stop - $start, 500, 1000), colourize(\"ok\");\n    }\n}\n\nwhile (<$fh>)\n{\n    chomp;\n    s/\\r//g;\n\n    if (/^\\s*Testing \"(.*)\" with (.*) in (.*):\\s*$/)\n    {\n        alarm(120);\n\tmy ($sect, $shell, $file) = ($1, $2, $3);\n\n\tendsect();\n\n  chomp($shell=`basename $shell`);\n\n\tprintf(\"! %s %s %s: \", $shell, $file, $sect);\n\t@log = ();\n\t$start = $stop;\n    }\n    elsif (/^!\\s*(.*?)\\s+(\\S+)\\s*$/)\n    {\n        alarm(120);\n\n\tmy ($name, $result) = ($1, $2);\n\tmy $pass = ($result eq \"ok\");\n\n\tif (!$start) {\n\t    printf(\"\\n! Startup: \");\n\t    $start = time();\n\t}\n\n\tpush @log, resultline($name, $result);\n\n\tif (!$pass) {\n\t    $gfails++;\n\t    if (@log) {\n\t\tprint \"\\n\" . join(\"\\n\", @log) . \"\\n\";\n\t\t@log = ();\n\t    }\n\t} else {\n\t    $gpasses++;\n\t    print \".\";\n\t}\n    }\n    else\n    {\n\tpush @log, $_;\n    }\n}\n\nendsect();\n\nmy $newpid = waitpid($pid, 0);\nif ($newpid != $pid) {\n    die(\"waitpid returned '$newpid', expected '$pid'\\n\");\n}\n\nmy $code = $?;\nmy $ret = ($code >> 8);\n\n# return death-from-signal exits as >128.  This is what bash does if you ran\n# the program directly.\nif ($code && !$ret) { $ret = $code | 128; }\n\nif ($ret && @log) {\n    print \"\\n\" . join(\"\\n\", @log) . \"\\n\";\n}\n\nif ($code != 0) {\n    print resultline(\"Program returned non-zero exit code ($ret)\", \"FAILED\");\n}\n\nmy $gtotal = $gpasses+$gfails;\nprintf(\"\\nWvTest: %d test%s, %d failure%s, total time %s.\\n\",\n    $gtotal, $gtotal==1 ? \"\" : \"s\",\n    $gfails, $gfails==1 ? \"\" : \"s\",\n    mstime(time() - $allstart, 2000, 5000));\nprint STDERR \"\\nWvTest result code: $ret\\n\";\nexit( $ret ? $ret : ($gfails ? 125 : 0) );\n"
  },
  {
    "path": "vendor/github.com/gaelicWizard/bash-progcomp/.editorconfig",
    "content": "# EditorConfig is awesome: http://EditorConfig.org\n\n[*]\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[**.md]\nindent_style = space\nindent_size = 2\ntrim_trailing_whitespace = false\n\n[.git*]\nindent_style = tab\n\n[**.*sh]\nindent_style = tab\nindent_size = tab\n\nshell_variant      = bash\nbinary_next_line   = true  # like -bn\nswitch_case_indent = false # like -ci\nspace_redirects    = true  # like -sr\nkeep_padding       = false # like -kp\nfunction_next_line = true  # like -fn\nend_of_line        = lf\ncharset            = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[**.bats]\nindent_style = tab\nindent_size = tab\n\nshell_variant      = bash\nend_of_line        = lf\ncharset            = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n"
  },
  {
    "path": "vendor/github.com/gaelicWizard/bash-progcomp/LICENSE",
    "content": "BSD 3-Clause License\n\nCopyright (c) 2006, Playhaus\nCopyright (c) 2021, gaelicWizard.LLC\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its\n   contributors may be used to endorse or promote products derived from\n   this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "vendor/github.com/gaelicWizard/bash-progcomp/defaults.completion.bash",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2207\n#\n# Bash command line completion for defaults\n#\n# Version 1.0 created by Jonathon Mah on 2006-11-08.\n# Version 2.0 written by John Pell on 2021-09-11.\n#\n\nfunction matchpattern()\n{\n\tlocal PATTERN=${2:?$FUNCNAME: a pattern is required}\n\tlocal SEP=${3:-|}\n\t[[ -z \"${PATTERN##*${SEP}${1}${SEP}*}\" ]]\n}\n\nfunction _defaults_verbs()\n{\n\tlocal IFS=$'\\n'\t# Treat only newlines as delimiters in string operations.\n\tlocal LC_CTYPE='C'\t# Do not consider character set in string operations.\n\tlocal LC_COLLATE='C'\t# Do not consider character set in pattern matching.\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tCOMPREPLY=()\n\n\tcase $COMP_CWORD in\n\t1)\n\t\tcandidates=(\"${cmds// /$IFS}\" \"${host_opts[@]}\")\n\t\t;;\n\t2 | 3)\n\t\tcandidates=(\"${cmds// /$IFS}\")\n\t\t;;\n\t*)\n\t\treturn 1\n\t\t;;\n\tesac\n\n\tCOMPREPLY=($(compgen -W \"${candidates[*]}\" | grep -i \"^${cur}\"))\n\treturn 0\n}\n\nfunction _defaults_domains()\n{\n\tlocal IFS=$'\\n'\t# Treat only newlines as delimiters in string operations.\n\tlocal LC_CTYPE='C'\t# Do not consider character set in string operations.\n\tlocal LC_COLLATE='C'\t# Do not consider character set in pattern matching.\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tCOMPREPLY=()\n\n\tif [[ \"$BASH_VERSINFO\" -ge 4 ]]\n\tthen # Exponential performance issue on strings greater than about 10k.\n\t\tlocal domains=\"$(defaults domains)\"\n\t\tlocal candidates=($(compgen -W \"${domains//, /$IFS}\" | grep -i \"^${cur}\"))\n\telse\n\t\tlocal domains=\"$(defaults domains | sed -e 's/, /^/g' | tr '^' '\\n')\"\n\t\tlocal candidates=($(compgen -W \"${domains}\" | grep -i \"^${cur}\"))\n\tfi\n\tCOMPREPLY=($(printf '%q\\n' \"${candidates[@]}\"))\n\tif grep -q \"^$cur\" <<< '-app'\n\tthen\n\t\tCOMPREPLY[${#COMPREPLY[@]}]=\"-app\"\n\telif grep -q \"^$cur\" <<< '-g'\n\tthen\n\t\tCOMPREPLY[${#COMPREPLY[@]}]=\"-g\"\n\tfi\n\n\treturn 0\n}\n\nfunction _defaults()\n{\n\tlocal IFS=$'\\n'\t# Treat only newlines as delimiters in string operations.\n\tlocal LC_CTYPE='C'\t# Do not consider character set in string operations.\n\tlocal LC_COLLATE='C'\t# Do not consider character set in pattern matching.\n\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n\tlocal prev=\"${COMP_WORDS[COMP_CWORD - 1]}\"\n\tCOMPREPLY=()\n\n\tlocal host_opts cmds cmd domain keys key_index candidates verbs value_types\n\n\thost_opts=('-currentHost' '-host')\n\tcmds=' delete domains export find help import read read-type rename write '\n\tvalue_types=('-string' '-data' '-integer' '-float' '-boolean' '-date' '-array' '-array-add' '-dict' '-dict-add')\n\n\tcase $COMP_CWORD in\n\t1)\n\t\t_defaults_verbs\n\t\treturn \"$?\"\n\t\t;;\n\t2)\n\t\tcase $prev in\n\t\t\"-currentHost\")\n\t\t\t_defaults_verbs\n\t\t\t;;\n\t\t\"-host\")\n\t\t\t_known_hosts -a\n\t\t\t;;\n\t\t*)\n\t\t\tif matchpattern \"$prev\" \"${cmds// /|}\"\n\t\t\tthen\n\t\t\t\t# TODO: not correct for verbs: domains, find, help\n\t\t\t\t_defaults_domains\n\t\t\telse\n\t\t\t\treturn 1 # verb is not recognized\n\t\t\tfi\n\t\t\t;;\n\t\tesac\n\t\treturn \"$?\"\n\t\t;;\n\t3)\n\t\tcase ${COMP_WORDS[1]} in\n\t\t\"-currentHost\")\n\t\t\t_defaults_domains\n\t\t\treturn \"$?\"\n\t\t\t;;\n\t\t\"-host\")\n\t\t\t_defaults_verbs\n\t\t\treturn \"$?\"\n\t\t\t;;\n\t\tesac\n\t\t;;\n\t4)\n\t\tcase ${COMP_WORDS[1]} in\n\t\t\"-host\")\n\t\t\tif matchpattern \"$prev\" \"${cmds// /|}\"\n\t\t\tthen\n\t\t\t\t# TODO: not correct for verbs: domains, find, help\n\t\t\t\t_defaults_domains\n\t\t\telse\n\t\t\t\treturn 1 # verb is not recognized\n\t\t\tfi\n\t\t\t;;\n\t\tesac\n\t\t;;\n\tesac\n\n\t# Both a domain and command have been specified\n\n\tcase ${COMP_WORDS[1]} in\n\t\"-currentHost\")\n\t\tif matchpattern \"${COMP_WORDS[2]}\" \"${cmds// /|}\"\n\t\tthen\n\t\t\tcmd=\"${COMP_WORDS[2]}\"\n\t\t\tdomain=\"${COMP_WORDS[3]}\"\n\t\t\tkey_index=4\n\t\t\tif [[ \"$domain\" == \"-app\" ]]\n\t\t\tthen\n\t\t\t\tif [[ $COMP_CWORD -eq 4 ]]\n\t\t\t\tthen\n\t\t\t\t\t# Completing application name. Can't help here, sorry\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\tdomain=\"-app ${COMP_WORDS[4]}\"\n\t\t\t\tkey_index=5\n\t\t\tfi\n\t\tfi\n\t\t;;\n\t\"-host\")\n\t\tif matchpattern \"${COMP_WORDS[3]}\" \"${cmds// /|}\"\n\t\tthen\n\t\t\tcmd=\"${COMP_WORDS[3]}\"\n\t\t\tdomain=\"${COMP_WORDS[4]}\"\n\t\t\tkey_index=5\n\t\t\tif [[ \"$domain\" == \"-app\" ]]\n\t\t\tthen\n\t\t\t\tif [[ $COMP_CWORD -eq 5 ]]\n\t\t\t\tthen\n\t\t\t\t\t# Completing application name. Can't help here, sorry\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\tdomain=\"-app ${COMP_WORDS[5]}\"\n\t\t\t\tkey_index=6\n\t\t\tfi\n\t\tfi\n\t\t;;\n\t*)\n\t\tif matchpattern \"${COMP_WORDS[1]}\" \"${cmds// /|}\"\n\t\tthen\n\t\t\tcmd=\"${COMP_WORDS[1]}\"\n\t\t\tdomain=\"${COMP_WORDS[2]}\"\n\t\t\tkey_index=3\n\t\t\tif [[ \"$domain\" == \"-app\" ]]\n\t\t\tthen\n\t\t\t\tif [[ $COMP_CWORD -eq 3 ]]\n\t\t\t\tthen\n\t\t\t\t\t# Completing application name. Can't help here, sorry\n\t\t\t\t\treturn 0\n\t\t\t\tfi\n\t\t\t\tdomain=\"-app ${COMP_WORDS[3]}\"\n\t\t\t\tkey_index=4\n\t\t\tfi\n\t\tfi\n\t\t;;\n\n\tesac\n\n\tkeys=($(defaults read \"$domain\" 2> /dev/null | sed -n -e '/^    [^}) ]/p' | sed -e 's/^    \\([^\" ]\\{1,\\}\\) = .*$/\\1/g' -e 's/^    \"\\([^\"]\\{1,\\}\\)\" = .*$/\\1/g'))\n\n\tcase $cmd in\n\tread | read-type)\n\t\t# Complete key\n\t\tif candidates=($(compgen -W \"${keys[*]:-}\" | grep -i \"^${cur}\"))\n\t\tthen\n\t\t\tCOMPREPLY=($(printf '%q\\n' \"${candidates[@]}\"))\n\t\tfi\n\t\t;;\n\twrite)\n\t\tif [[ $key_index -eq $COMP_CWORD ]]\n\t\tthen\n\t\t\t# Complete key\n\t\t\tif candidates=($(compgen -W \"${keys[*]:-}\" | grep -i \"^${cur}\"))\n\t\t\tthen\n\t\t\t\tCOMPREPLY=($(printf '%q\\n' \"${candidates[@]}\"))\n\t\t\tfi\n\t\telif [[ $((key_index + 1)) -eq $COMP_CWORD ]]\n\t\tthen\n\t\t\t# Complete value type\n\t\t\tlocal cur_type=\"$(defaults read-type \"$domain\" \"${COMP_WORDS[key_index]}\" 2> /dev/null | sed -e 's/^Type is \\(.*\\)/-\\1/' -e's/dictionary/dict/' | grep \"^$cur\")\"\n\t\t\tif [[ $cur_type ]]\n\t\t\tthen\n\t\t\t\tCOMPREPLY=(\"$cur_type\")\n\t\t\telse\n\t\t\t\tCOMPREPLY=($(compgen -W \"${value_types[*]}\" -- \"$cur\"))\n\t\t\tfi\n\t\telif [[ $((key_index + 2)) -eq $COMP_CWORD ]]\n\t\tthen\n\t\t\t# Complete value\n\t\t\tCOMPREPLY=($(defaults read \"$domain\" \"${COMP_WORDS[key_index]}\" 2> /dev/null | grep -i \"^${cur//\\\\/\\\\\\\\}\"))\n\t\tfi\n\t\t;;\n\trename)\n\t\tif [[ $key_index -eq $COMP_CWORD || $((key_index + 1)) -eq $COMP_CWORD ]]\n\t\tthen\n\t\t\t# Complete source and destination keys\n\t\t\tif candidates=($(compgen -W \"${keys[*]:-}\" | grep -i \"^${cur}\"))\n\t\t\tthen\n\t\t\t\tCOMPREPLY=($(printf '%q\\n' \"${candidates[@]}\"))\n\t\t\tfi\n\t\tfi\n\t\t;;\n\tdelete)\n\t\tif [[ $key_index -eq $COMP_CWORD ]]\n\t\tthen\n\t\t\t# Complete key\n\t\t\tif candidates=($(compgen -W \"${keys[*]:-}\" | grep -i \"^${cur}\"))\n\t\t\tthen\n\t\t\t\tCOMPREPLY=($(printf '%q\\n' \"${candidates[@]}\"))\n\t\t\tfi\n\t\tfi\n\t\t;;\n\tesac\n\n\treturn 0\n}\n\ncomplete -F _defaults -o default defaults\n\n# This file is licensed under the BSD license, as follows:\n#\n# Copyright (c) 2006, Playhaus\n# Copyright (c) 2021, gaelicWizard.LLC\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n#   list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n# * Neither the names of the authors nor the names of its contributors may be\n#   used to endorse or promote products derived from this software without\n#   specific prior written permission.\n#\n# This software is provided by the copyright holders and contributors \"as is\"\n# and any express or implied warranties, including, but not limited to, the\n# implied warranties of merchantability and fitness for a particular purpose are\n# disclaimed. In no event shall the copyright owner or contributors be liable\n# for any direct, indirect, incidental, special, exemplary, or consequential\n# damages (including, but not limited to, procurement of substitute goods or\n# services; loss of use, data, or profits; or business interruption) however\n# caused and on any theory of liability, whether in contract, strict liability,\n# or tort (including negligence or otherwise) arising in any way out of the use\n# of this software, even if advised of the possibility of such damage.\n"
  },
  {
    "path": "vendor/github.com/gaelicWizard/bash-progcomp/defaults.completion.bats",
    "content": "#!/usr/bin/env bats\n\nload ../test_helper\n\nfunction local_setup() {\n  load ../../completion/available/defaults.completion\n  function _known_hosts() { :; }\n  function defaults() { echo 'NSGlobalDomain, Bash It'; }\n}\n\nfunction __check_completion() {\n  # Get the parameters as a single value\n  COMP_LINE=$*\n\n  # Get the parameters as an array\n  eval set -- \"$@\"\n  COMP_WORDS=(\"$@\")\n\n  # Index of the cursor in the line\n  COMP_POINT=${#COMP_LINE}\n\n  # Get the last character of the line that was entered\n  COMP_LAST=$((${COMP_POINT} - 1))\n\n  # If the last character was a space...\n  if [[ ${COMP_LINE:$COMP_LAST} = ' ' ]]; then\n    # ...then add an empty array item\n    COMP_WORDS+=('')\n  fi\n\n  # Word index of the last word\n  COMP_CWORD=$(( ${#COMP_WORDS[@]} - 1 ))\n\n  # Run the Bash-it completion function\n  _defaults\n\n  # Return the completion output\n  echo \"${COMPREPLY[@]}\"\n}\n\n@test \"completion defaults: ensure that the _defaults function is available\" {\n  type -a _defaults &> /dev/null\n  assert_success\n}\n\n@test \"completion defaults: - show verbs and options\" {\n  run __check_completion 'defaults '\n  assert_line -n 0 'delete domains export find help import read read-type rename write -currentHost -host'\n}\n\n@test \"completion defaults: r* - show matching verbs\" {\n  run __check_completion 'defaults r'\n  assert_line -n 0 'read read-type rename'\n}\n\n@test \"completion defaults: R* - show matching verbs\" {\n  run __check_completion 'defaults R'\n  assert_line -n 0 'read read-type rename'\n}\n\n@test \"completion defaults: -* - show matching flags\" {\n  run __check_completion 'defaults -'\n  assert_line -n 0 '-currentHost -host'\n}\n\n@test \"completion defaults: -currentHost - show verbs\" {\n  run __check_completion 'defaults -currentHost '\n  assert_line -n 0 'delete domains export find help import read read-type rename write'\n}\n\n@test \"completion defaults: -host - show nothing\" {\n  run __check_completion 'defaults -host '\n  assert_line -n 0 \"$(_known_hosts -a)\"\n}\n\n@test \"completion defaults: -host some_computer_name - show verbs\" {\n  run __check_completion 'defaults -host some_computer_name '\n  assert_line -n 0 'delete domains export find help import read read-type rename write'\n}\n\n@test \"completion defaults: read - show all domains\" {\n  run __check_completion 'defaults read '\n  assert_line -n 0 \"NSGlobalDomain Bash\\ It -app\"\n}\n\n@test \"completion defaults: read nsg* - show matching domains\" {\n  run __check_completion 'defaults read nsg'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: read NSG* - show matching domains\" {\n  run __check_completion 'defaults read NSG'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: read bash* - show matching domains\" {\n  run __check_completion 'defaults read bash'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: read BASH* - show matching domains\" {\n  run __check_completion 'defaults read BASH'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: read bash* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults read bash\\ i'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: read BASH* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults read BASH\\ I'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -currentHost read - show all domains\" {\n  run __check_completion 'defaults -currentHost read '\n  assert_line -n 0 \"NSGlobalDomain Bash\\ It -app\"\n}\n\n@test \"completion defaults: -currentHost read nsg* - show matching domains\" {\n  run __check_completion 'defaults -currentHost read nsg'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: -currentHost read NSG* - show matching domains\" {\n  run __check_completion 'defaults -currentHost read NSG'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: -currentHost read bash* - show matching domains\" {\n  run __check_completion 'defaults -currentHost read bash'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -currentHost read BASH* - show matching domains\" {\n  run __check_completion 'defaults -currentHost read BASH'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -currentHost read bash* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults -currentHost read bash\\ i'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -currentHost read BASH* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults -currentHost read BASH\\ I'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -host some.computer.name read - show all domains\" {\n  run __check_completion 'defaults -host some.computer.name read '\n  assert_line -n 0 \"NSGlobalDomain Bash\\ It -app\"\n}\n\n@test \"completion defaults: -host some.computer.name read nsg* - show matching domains\" {\n  run __check_completion 'defaults -host some.computer.name read nsg'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: -host some.computer.name read NSG* - show matching domains\" {\n  run __check_completion 'defaults -host some.computer.name read NSG'\n  assert_line -n 0 \"NSGlobalDomain\"\n}\n\n@test \"completion defaults: -host some.computer.name read bash* - show matching domains\" {\n  run __check_completion 'defaults -host some.computer.name read bash'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -host some.computer.name read BASH* - show matching domains\" {\n  run __check_completion 'defaults -host some.computer.name read BASH'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -host some.computer.name read bash* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults -host some.computer.name read bash\\ i'\n  assert_line -n 0 \"Bash\\ It\"\n}\n\n@test \"completion defaults: -host some.computer.name read BASH* - show matching domains (with spaces)\" {\n  run __check_completion 'defaults -host some.computer.name read BASH\\ I'\n  assert_line -n 0 \"Bash\\ It\"\n}\n"
  },
  {
    "path": "vendor/github.com/ohmyzsh/ohmyzsh/LICENSE.txt",
    "content": "MIT License\n\nCopyright (c) 2009-2021 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/README.md",
    "content": "# git plugin\n\nThe git plugin provides many [aliases](#aliases) and a few useful [functions](#functions).\n\nTo use it, add `git` to the plugins array in your zshrc file:\n\n```zsh\nplugins=(... git)\n```\n\n## Aliases\n\n| Alias                | Command                                                                                                                          |\n|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------|\n| g                    | git                                                                                                                              |\n| ga                   | git add                                                                                                                          |\n| gaa                  | git add --all                                                                                                                    |\n| gapa                 | git add --patch                                                                                                                  |\n| gau                  | git add --update                                                                                                                 |\n| gav                  | git add --verbose                                                                                                                |\n| gap                  | git apply                                                                                                                        |\n| gapt                 | git apply --3way                                                                                                                 |\n| gb                   | git branch                                                                                                                       |\n| gba                  | git branch -a                                                                                                                    |\n| gbd                  | git branch -d                                                                                                                    |\n| gbda                 | git branch --no-color --merged \\| grep -vE \"^([+*]\\|\\s*($(git_main_branch)\\|$(git_develop_branch))\\s*$)\" \\| xargs git branch -d 2>/dev/null |\n| gbD                  | git branch -D                                                                                                                    |\n| gbl                  | git blame -b -w                                                                                                                  |\n| gbnm                 | git branch --no-merged                                                                                                           |\n| gbr                  | git branch --remote                                                                                                              |\n| gbs                  | git bisect                                                                                                                       |\n| gbsb                 | git bisect bad                                                                                                                   |\n| gbsg                 | git bisect good                                                                                                                  |\n| gbsr                 | git bisect reset                                                                                                                 |\n| gbss                 | git bisect start                                                                                                                 |\n| gc                   | git commit -v                                                                                                                    |\n| gc!                  | git commit -v --amend                                                                                                            |\n| gcn!                 | git commit -v --no-edit --amend                                                                                                  |\n| gca                  | git commit -v -a                                                                                                                 |\n| gca!                 | git commit -v -a --amend                                                                                                         |\n| gcan!                | git commit -v -a --no-edit --amend                                                                                               |\n| gcans!               | git commit -v -a -s --no-edit --amend                                                                                            |\n| gcam                 | git commit -a -m                                                                                                                 |\n| gcas                 | git commit -a -s                                                                                                                 |\n| gcasm                | git commit -a -s -m                                                                                                                  |\n| gcsm                 | git commit -s -m                                                                                                                 |\n| gcb                  | git checkout -b                                                                                                                  |\n| gcf                  | git config --list                                                                                                                |\n| gcl                  | git clone --recurse-submodules                                                                                                   |\n| gclean               | git clean -id                                                                                                                    |\n| gpristine            | git reset --hard && git clean -dffx                                                                                              |\n| gcm                  | git checkout $(git_main_branch)                                                                                                  |\n| gcd                  | git checkout $(git_develop_branch)                                                                                               |\n| gcmsg                | git commit -m                                                                                                                    |\n| gco                  | git checkout                                                                                                                     |\n| gcor                 | git checkout --recurse-submodules                                                                                                |\n| gcount               | git shortlog -sn                                                                                                                 |\n| gcp                  | git cherry-pick                                                                                                                  |\n| gcpa                 | git cherry-pick --abort                                                                                                          |\n| gcpc                 | git cherry-pick --continue                                                                                                       |\n| gcs                  | git commit -S                                                                                                                    |\n| gd                   | git diff                                                                                                                         |\n| gdca                 | git diff --cached                                                                                                                |\n| gdcw                 | git diff --cached --word-diff                                                                                                    |\n| gdct                 | git describe --tags $(git rev-list --tags --max-count=1)                                                                         |\n| gds                  | git diff --staged                                                                                                                |\n| gdt                  | git diff-tree --no-commit-id --name-only -r                                                                                      |\n| gdnolock             | git diff $@ \":(exclude)package-lock.json\" \":(exclude)&ast;.lock\"                                                                 |\n| gdu                  | git diff @{u}                                                                                                                    |\n| gdv                  | git diff -w $@ \\| view -                                                                                                         |\n| gdw                  | git diff --word-diff                                                                                                             |\n| gf                   | git fetch                                                                                                                        |\n| gfa                  | git fetch --all --prune                                                                                                          |\n| gfg                  | git ls-files \\| grep                                                                                                             |\n| gfo                  | git fetch origin                                                                                                                 |\n| gg                   | git gui citool                                                                                                                   |\n| gga                  | git gui citool --amend                                                                                                           |\n| ggf                  | git push --force origin $(current_branch)                                                                                        |\n| ggfl                 | git push --force-with-lease origin $(current_branch)                                                                             |\n| ggl                  | git pull origin $(current_branch)                                                                                                |\n| ggp                  | git push origin $(current_branch)                                                                                                |\n| ggpnp                | ggl && ggp                                                                                                                       |\n| ggpull               | git pull origin \"$(git_current_branch)\"                                                                                          |\n| ggpur                | ggu                                                                                                                              |\n| ggpush               | git push origin \"$(git_current_branch)\"                                                                                          |\n| ggsup                | git branch --set-upstream-to=origin/$(git_current_branch)                                                                        |\n| ggu                  | git pull --rebase origin $(current_branch)                                                                                       |\n| gpsup                | git push --set-upstream origin $(git_current_branch)                                                                             |\n| ghh                  | git help                                                                                                                         |\n| gignore              | git update-index --assume-unchanged                                                                                              |\n| gignored             | git ls-files -v \\| grep \"^[[:lower:]]\"                                                                                           |\n| git-svn-dcommit-push | git svn dcommit && git push github $(git_main_branch):svntrunk                                                                   |\n| gk                   | gitk --all --branches                                                                                                            |\n| gke                  | gitk --all $(git log -g --pretty=%h)                                                                                             |\n| gl                   | git pull                                                                                                                         |\n| glg                  | git log --stat                                                                                                                   |\n| glgp                 | git log --stat -p                                                                                                                |\n| glgg                 | git log --graph                                                                                                                  |\n| glgga                | git log --graph --decorate --all                                                                                                 |\n| glgm                 | git log --graph --max-count=10                                                                                                   |\n| glo                  | git log --oneline --decorate                                                                                                     |\n| glol                 | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'                           |\n| glols                | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat                    |\n| glod                 | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'                           |\n| glods                | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short              |\n| glola                | git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all                     |\n| glog                 | git log --oneline --decorate --graph                                                                                             |\n| gloga                | git log --oneline --decorate --graph --all                                                                                       |\n| glp                  | git log --pretty=\\<format\\>                                                                                                      |\n| gm                   | git merge                                                                                                                        |\n| gmom                 | git merge origin/$(git_main_branch)                                                                                              |\n| gmtl                 | git mergetool --no-prompt                                                                                                        |\n| gmtlvim              | git mergetool --no-prompt --tool=vimdiff                                                                                         |\n| gmum                 | git merge upstream/$(git_main_branch)                                                                                            |\n| gma                  | git merge --abort                                                                                                                |\n| gp                   | git push                                                                                                                         |\n| gpd                  | git push --dry-run                                                                                                               |\n| gpf                  | git push --force-with-lease                                                                                                      |\n| gpf!                 | git push --force                                                                                                                 |\n| gpoat                | git push origin --all && git push origin --tags                                                                                  |\n| gpr                  | git pull --rebase                                                                                                                |\n| gpu                  | git push upstream                                                                                                                |\n| gpv                  | git push -v                                                                                                                      |\n| gr                   | git remote                                                                                                                       |\n| gra                  | git remote add                                                                                                                   |\n| grb                  | git rebase                                                                                                                       |\n| grba                 | git rebase --abort                                                                                                               |\n| grbc                 | git rebase --continue                                                                                                            |\n| grbd                 | git rebase $(git_develop_branch)                                                                                                 |\n| grbi                 | git rebase -i                                                                                                                    |\n| grbm                 | git rebase $(git_main_branch)                                                                                                    |\n| grbo                 | git rebase --onto                                                                                                                |\n| grbs                 | git rebase --skip                                                                                                                |\n| grev                 | git revert                                                                                                                       |\n| grh                  | git reset                                                                                                                        |\n| grhh                 | git reset --hard                                                                                                                 |\n| groh                 | git reset origin/$(git_current_branch) --hard                                                                                    |\n| grm                  | git rm                                                                                                                           |\n| grmc                 | git rm --cached                                                                                                                  |\n| grmv                 | git remote rename                                                                                                                |\n| grrm                 | git remote remove                                                                                                                |\n| grs                  | git restore                                                                                                                      |\n| grset                | git remote set-url                                                                                                               |\n| grss                 | git restore --source                                                                                                             |\n| grst                 | git restore --staged                                                                                                             |\n| grt                  | cd \"$(git rev-parse --show-toplevel \\|\\| echo .)\"                                                                                |\n| gru                  | git reset --                                                                                                                     |\n| grup                 | git remote update                                                                                                                |\n| grv                  | git remote -v                                                                                                                    |\n| gsb                  | git status -sb                                                                                                                   |\n| gsd                  | git svn dcommit                                                                                                                  |\n| gsh                  | git show                                                                                                                         |\n| gsi                  | git submodule init                                                                                                               |\n| gsps                 | git show --pretty=short --show-signature                                                                                         |\n| gsr                  | git svn rebase                                                                                                                   |\n| gss                  | git status -s                                                                                                                    |\n| gst                  | git status                                                                                                                       |\n| gsta                 | git stash push                                                                                                                   |\n| gsta                 | git stash save                                                                                                                   |\n| gstaa                | git stash apply                                                                                                                  |\n| gstc                 | git stash clear                                                                                                                  |\n| gstd                 | git stash drop                                                                                                                   |\n| gstl                 | git stash list                                                                                                                   |\n| gstp                 | git stash pop                                                                                                                    |\n| gsts                 | git stash show --text                                                                                                            |\n| gstu                 | git stash --include-untracked                                                                                                    |\n| gstall               | git stash --all                                                                                                                  |\n| gsu                  | git submodule update                                                                                                             |\n| gsw                  | git switch                                                                                                                       |\n| gswc                 | git switch -c                                                                                                                    |\n| gts                  | git tag -s                                                                                                                       |\n| gtv                  | git tag \\| sort -V                                                                                                               |\n| gtl                  | gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl                                                                       |\n| gunignore            | git update-index --no-assume-unchanged                                                                                           |\n| gunwip               | git log -n 1 \\| grep -q -c \"\\-\\-wip\\-\\-\" && git reset HEAD~1                                                                     |\n| gup                  | git pull --rebase                                                                                                                |\n| gupv                 | git pull --rebase -v                                                                                                             |\n| gupa                 | git pull --rebase --autostash                                                                                                    |\n| gupav                | git pull --rebase --autostash -v                                                                                                 |\n| glum                 | git pull upstream $(git_main_branch)                                                                                             |\n| gwch                 | git whatchanged -p --abbrev-commit --pretty=medium                                                                               |\n| gwip                 | git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m \"--wip-- [skip ci]\"           |\n| gam                  | git am                                                                                                                           |\n| gamc                 | git am --continue                                                                                                                |\n| gams                 | git am --skip                                                                                                                    |\n| gama                 | git am --abort                                                                                                                   |\n| gamscp               | git am --show-current-patch                                                                                                      |\n\n### Main branch preference\n\nFollowing the recent push for removing racially-charged words from our technical vocabulary, the git plugin favors using\na branch name other than `master`. In this case, we favor the shorter, neutral and descriptive term `main`. This means\nthat any aliases and functions that previously used `master`, will use `main` if that branch exists. We do this via the\nfunction `git_main_branch`.\n\n### Deprecated aliases\n\nThese are aliases that have been removed, renamed, or otherwise modified in a way that may, or may not, receive further support.\n\n| Alias  | Command                                                | Modification                                           |\n| :----- | :----------------------------------------------------- | :----------------------------------------------------- |\n| gap    | `git add --patch`                                      | new alias `gapa`                                       |\n| gcl    | `git config --list`                                    | new alias `gcf`                                        |\n| gdc    | `git diff --cached`                                    | new alias `gdca`                                       |\n| gdt    | `git difftool`                                         | no replacement                                         |\n| ggpull | `git pull origin $(current_branch)`                    | new alias `ggl` (`ggpull` still exists for now though) |\n| ggpur  | `git pull --rebase origin $(current_branch)`           | new alias `ggu` (`ggpur` still exists for now though)  |\n| ggpush | `git push origin $(current_branch)`                    | new alias `ggp` (`ggpush` still exists for now though) |\n| gk     | `gitk --all --branches`                                | now aliased to `gitk --all --branches`                 |\n| glg    | `git log --stat --max-count = 10`                      | now aliased to `git log --stat --color`                |\n| glgg   | `git log --graph --max-count = 10`                     | now aliased to `git log --graph --color`               |\n| gwc    | `git whatchanged -p --abbrev-commit --pretty = medium` | new alias `gwch`                                       |\n\n## Functions\n\n### Current\n\n| Command                | Description                                                                                              |\n|:-----------------------|:---------------------------------------------------------------------------------------------------------|\n| `grename <old> <new>`  | Rename `old` branch to `new`, including in origin remote                                                 |\n| current_branch         | Return the name of the current branch                                                                    |\n| git_current_user_name  | Returns the `user.name` config value                                                                     |\n| git_current_user_email | Returns the `user.email` config value                                                                    |\n| git_main_branch        | Returns the name of the main branch: `main` if it exists, `master` otherwise                             |\n| git_develop_branch     | Returns the name of the develop branch: `dev`, `devel`, `development` if they exist, `develop` otherwise |\n\n### Work in Progress (WIP)\n\nThese features allow to pause a branch development and switch to another one (_\"Work in Progress\"_,  or wip). When you want to go back to work, just unwip it.\n\n| Command          | Description                                     |\n|:-----------------|:------------------------------------------------|\n| work_in_progress | Echoes a warning if the current branch is a wip |\n| gwip             | Commit wip branch                               |\n| gunwip           | Uncommit wip branch                             |\n\n### Deprecated functions\n\n| Command                | Description                             | Reason                                                          |\n|:-----------------------|:----------------------------------------|:----------------------------------------------------------------|\n| current_repository     | Return the names of the current remotes | Didn't work properly. Use `git remote -v` instead (`grv` alias) |\n"
  },
  {
    "path": "vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/git.plugin.zsh",
    "content": "#\n# Functions\n#\n\n# The name of the current branch\n# Back-compatibility wrapper for when this function was defined here in\n# the plugin, before being pulled in to core lib/git.zsh as git_current_branch()\n# to fix the core -> git plugin dependency.\nfunction current_branch() {\n  git_current_branch\n}\n\n# Pretty log messages\nfunction _git_log_prettily(){\n  if ! [ -z $1 ]; then\n    git log --pretty=$1\n  fi\n}\n\n# Warn if the current branch is a WIP\nfunction work_in_progress() {\n  if $(git log -n 1 2>/dev/null | grep -q -c \"\\-\\-wip\\-\\-\"); then\n    echo \"WIP!!\"\n  fi\n}\n\n# Check if main exists and use instead of master\nfunction git_main_branch() {\n  command git rev-parse --git-dir &>/dev/null || return\n  local ref\n  for ref in refs/{heads,remotes/{origin,upstream}}/{main,trunk}; do\n    if command git show-ref -q --verify $ref; then\n      echo ${ref:t}\n      return\n    fi\n  done\n  echo master\n}\n\n# Check for develop and similarly named branches\nfunction git_develop_branch() {\n  command git rev-parse --git-dir &>/dev/null || return\n  local branch\n  for branch in dev devel development; do\n    if command git show-ref -q --verify refs/heads/$branch; then\n      echo $branch\n      return\n    fi\n  done\n  echo develop\n}\n\n#\n# Aliases\n# (sorted alphabetically)\n#\n\nalias g='git'\n\nalias ga='git add'\nalias gaa='git add --all'\nalias gapa='git add --patch'\nalias gau='git add --update'\nalias gav='git add --verbose'\nalias gap='git apply'\nalias gapt='git apply --3way'\n\nalias gb='git branch'\nalias gba='git branch -a'\nalias gbd='git branch -d'\nalias gbda='git branch --no-color --merged | command grep -vE \"^([+*]|\\s*($(git_main_branch)|$(git_develop_branch))\\s*$)\" | command xargs git branch -d 2>/dev/null'\nalias gbD='git branch -D'\nalias gbl='git blame -b -w'\nalias gbnm='git branch --no-merged'\nalias gbr='git branch --remote'\nalias gbs='git bisect'\nalias gbsb='git bisect bad'\nalias gbsg='git bisect good'\nalias gbsr='git bisect reset'\nalias gbss='git bisect start'\n\nalias gc='git commit -v'\nalias gc!='git commit -v --amend'\nalias gcn!='git commit -v --no-edit --amend'\nalias gca='git commit -v -a'\nalias gca!='git commit -v -a --amend'\nalias gcan!='git commit -v -a --no-edit --amend'\nalias gcans!='git commit -v -a -s --no-edit --amend'\nalias gcam='git commit -a -m'\nalias gcsm='git commit -s -m'\nalias gcas='git commit -a -s'\nalias gcasm='git commit -a -s -m'\nalias gcb='git checkout -b'\nalias gcf='git config --list'\nalias gcl='git clone --recurse-submodules'\nalias gclean='git clean -id'\nalias gpristine='git reset --hard && git clean -dffx'\nalias gcm='git checkout $(git_main_branch)'\nalias gcd='git checkout $(git_develop_branch)'\nalias gcmsg='git commit -m'\nalias gco='git checkout'\nalias gcor='git checkout --recurse-submodules'\nalias gcount='git shortlog -sn'\nalias gcp='git cherry-pick'\nalias gcpa='git cherry-pick --abort'\nalias gcpc='git cherry-pick --continue'\nalias gcs='git commit -S'\nalias gcss='git commit -S -s'\nalias gcssm='git commit -S -s -m'\n\nalias gd='git diff'\nalias gdca='git diff --cached'\nalias gdcw='git diff --cached --word-diff'\nalias gdct='git describe --tags $(git rev-list --tags --max-count=1)'\nalias gds='git diff --staged'\nalias gdt='git diff-tree --no-commit-id --name-only -r'\nalias gdu='git diff @{u}'\nalias gdw='git diff --word-diff'\n\nfunction gdnolock() {\n  git diff \"$@\" \":(exclude)package-lock.json\" \":(exclude)*.lock\"\n}\n\nfunction gdv() {\n\tgit diff -w \"$@\" | view -\n}\n\nalias gf='git fetch'\n# --jobs=<n> was added in git 2.8\nis-at-least 2.8 \"$git_version\" \\\n  && alias gfa='git fetch --all --prune --jobs=10' \\\n  || alias gfa='git fetch --all --prune'\nalias gfo='git fetch origin'\n\nalias gfg='git ls-files | grep'\n\nalias gg='git gui citool'\nalias gga='git gui citool --amend'\n\nfunction ggf() {\n  [[ \"$#\" != 1 ]] && local b=\"$(git_current_branch)\"\n  git push --force origin \"${b:=$1}\"\n}\nfunction ggfl() {\n  [[ \"$#\" != 1 ]] && local b=\"$(git_current_branch)\"\n  git push --force-with-lease origin \"${b:=$1}\"\n}\n\nfunction ggl() {\n  if [[ \"$#\" != 0 ]] && [[ \"$#\" != 1 ]]; then\n    git pull origin \"${*}\"\n  else\n    [[ \"$#\" == 0 ]] && local b=\"$(git_current_branch)\"\n    git pull origin \"${b:=$1}\"\n  fi\n}\n\nfunction ggp() {\n  if [[ \"$#\" != 0 ]] && [[ \"$#\" != 1 ]]; then\n    git push origin \"${*}\"\n  else\n    [[ \"$#\" == 0 ]] && local b=\"$(git_current_branch)\"\n    git push origin \"${b:=$1}\"\n  fi\n}\n\nfunction ggpnp() {\n  if [[ \"$#\" == 0 ]]; then\n    ggl && ggp\n  else\n    ggl \"${*}\" && ggp \"${*}\"\n  fi\n}\n\nfunction ggu() {\n  [[ \"$#\" != 1 ]] && local b=\"$(git_current_branch)\"\n  git pull --rebase origin \"${b:=$1}\"\n}\n\nalias ggpur='ggu'\nalias ggpull='git pull origin \"$(git_current_branch)\"'\nalias ggpush='git push origin \"$(git_current_branch)\"'\n\nalias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'\nalias gpsup='git push --set-upstream origin $(git_current_branch)'\n\nalias ghh='git help'\n\nalias gignore='git update-index --assume-unchanged'\nalias gignored='git ls-files -v | grep \"^[[:lower:]]\"'\nalias git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'\n\nalias gk='\\gitk --all --branches'\nalias gke='\\gitk --all $(git log -g --pretty=%h)'\n\nalias gl='git pull'\nalias glg='git log --stat'\nalias glgp='git log --stat -p'\nalias glgg='git log --graph'\nalias glgga='git log --graph --decorate --all'\nalias glgm='git log --graph --max-count=10'\nalias glo='git log --oneline --decorate'\nalias glol=\"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'\"\nalias glols=\"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat\"\nalias glod=\"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\"\nalias glods=\"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short\"\nalias glola=\"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all\"\nalias glog='git log --oneline --decorate --graph'\nalias gloga='git log --oneline --decorate --graph --all'\nalias glp=\"_git_log_prettily\"\n\nalias gm='git merge'\nalias gmom='git merge origin/$(git_main_branch)'\nalias gmtl='git mergetool --no-prompt'\nalias gmtlvim='git mergetool --no-prompt --tool=vimdiff'\nalias gmum='git merge upstream/$(git_main_branch)'\nalias gma='git merge --abort'\n\nalias gp='git push'\nalias gpd='git push --dry-run'\nalias gpf='git push --force-with-lease'\nalias gpf!='git push --force'\nalias gpoat='git push origin --all && git push origin --tags'\nalias gpr='git pull --rebase'\nalias gpu='git push upstream'\nalias gpv='git push -v'\n\nalias gr='git remote'\nalias gra='git remote add'\nalias grb='git rebase'\nalias grba='git rebase --abort'\nalias grbc='git rebase --continue'\nalias grbd='git rebase $(git_develop_branch)'\nalias grbi='git rebase -i'\nalias grbm='git rebase $(git_main_branch)'\nalias grbo='git rebase --onto'\nalias grbs='git rebase --skip'\nalias grev='git revert'\nalias grh='git reset'\nalias grhh='git reset --hard'\nalias groh='git reset origin/$(git_current_branch) --hard'\nalias grm='git rm'\nalias grmc='git rm --cached'\nalias grmv='git remote rename'\nalias grrm='git remote remove'\nalias grs='git restore'\nalias grset='git remote set-url'\nalias grss='git restore --source'\nalias grst='git restore --staged'\nalias grt='cd \"$(git rev-parse --show-toplevel || echo .)\"'\nalias gru='git reset --'\nalias grup='git remote update'\nalias grv='git remote -v'\n\nalias gsb='git status -sb'\nalias gsd='git svn dcommit'\nalias gsh='git show'\nalias gsi='git submodule init'\nalias gsps='git show --pretty=short --show-signature'\nalias gsr='git svn rebase'\nalias gss='git status -s'\nalias gst='git status'\n\n# use the default stash push on git 2.13 and newer\nis-at-least 2.13 \"$git_version\" \\\n  && alias gsta='git stash push' \\\n  || alias gsta='git stash save'\n\nalias gstaa='git stash apply'\nalias gstc='git stash clear'\nalias gstd='git stash drop'\nalias gstl='git stash list'\nalias gstp='git stash pop'\nalias gsts='git stash show --text'\nalias gstu='gsta --include-untracked'\nalias gstall='git stash --all'\nalias gsu='git submodule update'\nalias gsw='git switch'\nalias gswc='git switch -c'\n\nalias gts='git tag -s'\nalias gtv='git tag | sort -V'\nalias gtl='gtl(){ git tag --sort=-v:refname -n -l \"${1}*\" }; noglob gtl'\n\nalias gunignore='git update-index --no-assume-unchanged'\nalias gunwip='git log -n 1 | grep -q -c \"\\-\\-wip\\-\\-\" && git reset HEAD~1'\nalias gup='git pull --rebase'\nalias gupv='git pull --rebase -v'\nalias gupa='git pull --rebase --autostash'\nalias gupav='git pull --rebase --autostash -v'\nalias glum='git pull upstream $(git_main_branch)'\n\nalias gwch='git whatchanged -p --abbrev-commit --pretty=medium'\nalias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m \"--wip-- [skip ci]\"'\n\nalias gam='git am'\nalias gamc='git am --continue'\nalias gams='git am --skip'\nalias gama='git am --abort'\nalias gamscp='git am --show-current-patch'\n\nfunction grename() {\n  if [[ -z \"$1\" || -z \"$2\" ]]; then\n    echo \"Usage: $0 old_branch new_branch\"\n    return 1\n  fi\n\n  # Rename branch locally\n  git branch -m \"$1\" \"$2\"\n  # Rename branch in origin remote\n  if git push origin :\"$1\"; then\n    git push --set-upstream origin \"$2\"\n  fi\n}\n\nunset git_version\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/.github/workflows/bats.yaml",
    "content": "name: Bats tests\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Install Bats\n        run: |\n          sudo apt-get update\n          sudo apt-get install --assume-yes bats\n      - name: Check out repository\n        uses: actions/checkout@v2\n      - name: Run tests\n        run: bats test\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/LICENSE.md",
    "content": "The MIT License\n\nCopyright (c) 2017 Ryan Caloras and contributors (see https://github.com/rcaloras/bash-preexec)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/README.md",
    "content": "[![Build Status](https://github.com/rcaloras/bash-preexec/actions/workflows/bats.yaml/badge.svg)](https://github.com/rcaloras/bash-preexec/actions/)\n[![GitHub version](https://badge.fury.io/gh/rcaloras%2Fbash-preexec.svg)](https://badge.fury.io/gh/rcaloras%2Fbash-preexec)\n\nBash-Preexec \n============\n\n**preexec** and **precmd** hook functions for Bash 3.1+ in the style of Zsh. They aim to emulate the behavior [as described for Zsh](http://zsh.sourceforge.net/Doc/Release/Functions.html#Hook-Functions).\n\n<a href=\"https://bashhub.com\" target=\"_blank\"><img src=\"https://bashhub.com/assets/images/bashhub-logo.png\" alt=\"Bashhub Logo\" width=\"200\"></a>\n\nThis project is currently being used in production by [Bashhub](https://github.com/rcaloras/bashhub-client), [iTerm2](https://github.com/gnachman/iTerm2), and [Fig](https://fig.io). Hype!\n\n## Quick Start\n```bash\n# Pull down our file from GitHub and write it to your home directory as a hidden file.\ncurl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh\n# Source our file to bring it into our environment\nsource ~/.bash-preexec.sh\n# Define a couple functions.\npreexec() { echo \"just typed $1\"; }\nprecmd() { echo \"printing the prompt\"; }\n```\n\n## Install\nYou'll want to pull down the file and add it to your bash profile/configuration (i.e ~/.bashrc, ~/.profile, ~/.bash_profile, etc). **It must be the last thing imported in your bash profile.**\n```bash\n# Pull down our file from GitHub and write it to your home directory as a hidden file.\ncurl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/.bash-preexec.sh\n# Source our file at the end of our bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile)\necho '[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh' >> ~/.bashrc\n```\n\n## Usage\nTwo functions **preexec** and **precmd** can now be defined and they'll be automatically invoked by bash-preexec if they exist.\n\n* `preexec` Executed just after a command has been read and is about to be executed. The string that the user typed is passed as the first argument.\n* `precmd` Executed just before each prompt. Equivalent to PROMPT_COMMAND, but more flexible and resilient.\n```bash\nsource ~/.bash-preexec.sh\npreexec() { echo \"just typed $1\"; }\nprecmd() { echo \"printing the prompt\"; }\n```\nShould output something like:\n```\nelementz@Kashmir:~/git/bash-preexec (master)$ ls\njust typed ls\nbash-preexec.sh  README.md  test\nprinting the prompt\n```\n#### Function Arrays\nYou can also define functions to be invoked by appending them to two different arrays. This is great if you want to have many functions invoked for either hook. Both preexec and precmd functions are added to these by default and don't need to be added manually.\n* `$preexec_functions` Array of functions invoked by preexec.\n* `$precmd_functions` Array of functions invoked by precmd.\n\n#### preexec\n```bash\n# Define some function to use preexec\npreexec_hello_world() { echo \"You just entered $1\"; }\n# Add it to the array of functions to be invoked each time.\npreexec_functions+=(preexec_hello_world)\n```\n\n#### precmd\n```bash\nprecmd_hello_world() { echo \"This is invoked before the prompt is displayed\"; }\nprecmd_functions+=(precmd_hello_world)\n```\n\nYou can also define multiple functions to be invoked like so.\n\n```bash\nprecmd_hello_one() { echo \"This is invoked on precmd first\"; }\nprecmd_hello_two() { echo \"This is invoked on precmd second\"; }\nprecmd_functions+=(precmd_hello_one)\nprecmd_functions+=(precmd_hello_two)\n```\n\nYou can check the functions set for each by echoing its contents.\n\n```bash\necho ${preexec_functions[@]}\necho ${precmd_functions[@]}\n```\n\n## Subshells\nbash-preexec does not support invoking preexec() for subshells by default. It must be enabled by setting \n`__bp_enable_subshells`.\n```bash\n# Enable experimental subshell support\nexport __bp_enable_subshells=\"true\"\n```\nThis is disabled by default due to buggy situations related to to `functrace` and Bash's `DEBUG trap`. See [Issue #25](https://github.com/rcaloras/bash-preexec/issues/25)\n\n## Library authors\nIf you want to detect bash-preexec in your library (for example, to add hooks to `preexec_functions` when available), use the Bash variable `bash_preexec_imported`:\n\n```bash\nif [[ -n \"${bash_preexec_imported:-}\" ]]; then\n    echo \"Bash-preexec is loaded.\"\nfi\n```\n\n## Tests\nYou can run tests using [Bats](https://github.com/bats-core/bats-core).\n```bash\nbats test\n```\nShould output something like:\n```\nelementz@Kashmir:~/git/bash-preexec(master)$ bats test\n ✓ No functions defined for preexec should simply return\n ✓ precmd should execute a function once\n ✓ preexec should execute a function with the last command in our history\n ✓ preexec should execute multiple functions in the order added to their arrays\n ✓ preecmd should execute multiple functions in the order added to their arrays\n```\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh",
    "content": "# bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions.\n# https://github.com/rcaloras/bash-preexec\n#\n#\n# 'preexec' functions are executed before each interactive command is\n# executed, with the interactive command as its argument. The 'precmd'\n# function is executed before each prompt is displayed.\n#\n# Author: Ryan Caloras (ryan@bashhub.com)\n# Forked from Original Author: Glyph Lefkowitz\n#\n# V0.6.0\n#\n\n# General Usage:\n#\n#  1. Source this file at the end of your bash profile so as not to interfere\n#     with anything else that's using PROMPT_COMMAND.\n#\n#  2. Add any precmd or preexec functions by appending them to their arrays:\n#       e.g.\n#       precmd_functions+=(my_precmd_function)\n#       precmd_functions+=(some_other_precmd_function)\n#\n#       preexec_functions+=(my_preexec_function)\n#\n#  3. Consider changing anything using the DEBUG trap or PROMPT_COMMAND\n#     to use preexec and precmd instead. Preexisting usages will be\n#     preserved, but doing so manually may be less surprising.\n#\n#  Note: This module requires two Bash features which you must not otherwise be\n#  using: the \"DEBUG\" trap, and the \"PROMPT_COMMAND\" variable. If you override\n#  either of these after bash-preexec has been installed it will most likely break.\n\n# Tell shellcheck what kind of file this is.\n# shellcheck shell=bash\n\n# Make sure this is bash that's running and return otherwise.\n# Use POSIX syntax for this line:\nif [ -z \"${BASH_VERSION-}\" ]; then\n    return 1\nfi\n\n# We only support Bash 3.1+.\n# Note: BASH_VERSINFO is first available in Bash-2.0.\nif [[ -z \"${BASH_VERSINFO-}\" ]] || (( BASH_VERSINFO[0] < 3 || (BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 1) )); then\n    return 1\nfi\n\n# Avoid duplicate inclusion\nif [[ -n \"${bash_preexec_imported:-}\" || -n \"${__bp_imported:-}\" ]]; then\n    return 0\nfi\nbash_preexec_imported=\"defined\"\n\n# WARNING: This variable is no longer used and should not be relied upon.\n# Use ${bash_preexec_imported} instead.\n# shellcheck disable=SC2034\n__bp_imported=\"${bash_preexec_imported}\"\n\n# Should be available to each precmd and preexec\n# functions, should they want it. $? and $_ are available as $? and $_, but\n# $PIPESTATUS is available only in a copy, $BP_PIPESTATUS.\n# TODO: Figure out how to restore PIPESTATUS before each precmd or preexec\n# function.\n__bp_last_ret_value=\"$?\"\nBP_PIPESTATUS=(\"${PIPESTATUS[@]}\")\n__bp_last_argument_prev_command=\"$_\"\n\n__bp_inside_precmd=0\n__bp_inside_preexec=0\n\n# Initial PROMPT_COMMAND string that is removed from PROMPT_COMMAND post __bp_install\n__bp_install_string=$'__bp_trap_string=\"$(trap -p DEBUG)\"\\ntrap - DEBUG\\n__bp_install'\n\n# Fails if any of the given variables are readonly\n# Reference https://stackoverflow.com/a/4441178\n__bp_require_not_readonly() {\n    local var\n    for var; do\n        if ! ( unset \"$var\" 2> /dev/null ); then\n            echo \"bash-preexec requires write access to ${var}\" >&2\n            return 1\n        fi\n    done\n}\n\n# Remove ignorespace and or replace ignoreboth from HISTCONTROL\n# so we can accurately invoke preexec with a command from our\n# history even if it starts with a space.\n__bp_adjust_histcontrol() {\n    local histcontrol\n    histcontrol=\"${HISTCONTROL:-}\"\n    histcontrol=\"${histcontrol//ignorespace}\"\n    # Replace ignoreboth with ignoredups\n    if [[ \"$histcontrol\" == *\"ignoreboth\"* ]]; then\n        histcontrol=\"ignoredups:${histcontrol//ignoreboth}\"\n    fi\n    export HISTCONTROL=\"$histcontrol\"\n}\n\n# This variable describes whether we are currently in \"interactive mode\";\n# i.e. whether this shell has just executed a prompt and is waiting for user\n# input.  It documents whether the current command invoked by the trace hook is\n# run interactively by the user; it's set immediately after the prompt hook,\n# and unset as soon as the trace hook is run.\n__bp_preexec_interactive_mode=\"\"\n\n# These arrays are used to add functions to be run before, or after, prompts.\ndeclare -a precmd_functions\ndeclare -a preexec_functions\n\n# Trims leading and trailing whitespace from $2 and writes it to the variable\n# name passed as $1\n__bp_trim_whitespace() {\n    local var=${1:?} text=${2:-}\n    text=\"${text#\"${text%%[![:space:]]*}\"}\"   # remove leading whitespace characters\n    text=\"${text%\"${text##*[![:space:]]}\"}\"   # remove trailing whitespace characters\n    printf -v \"$var\" '%s' \"$text\"\n}\n\n\n# Trims whitespace and removes any leading or trailing semicolons from $2 and\n# writes the resulting string to the variable name passed as $1. Used for\n# manipulating substrings in PROMPT_COMMAND\n__bp_sanitize_string() {\n    local var=${1:?} text=${2:-} sanitized\n    __bp_trim_whitespace sanitized \"$text\"\n    sanitized=${sanitized%;}\n    sanitized=${sanitized#;}\n    __bp_trim_whitespace sanitized \"$sanitized\"\n    printf -v \"$var\" '%s' \"$sanitized\"\n}\n\n# This function is installed as part of the PROMPT_COMMAND;\n# It sets a variable to indicate that the prompt was just displayed,\n# to allow the DEBUG trap to know that the next command is likely interactive.\n__bp_interactive_mode() {\n    __bp_preexec_interactive_mode=\"on\"\n}\n\n\n# This function is installed as part of the PROMPT_COMMAND.\n# It will invoke any functions defined in the precmd_functions array.\n__bp_precmd_invoke_cmd() {\n    # Save the returned value from our last command, and from each process in\n    # its pipeline. Note: this MUST be the first thing done in this function.\n    # BP_PIPESTATUS may be unused, ignore\n    # shellcheck disable=SC2034\n\n    __bp_last_ret_value=\"$?\" BP_PIPESTATUS=(\"${PIPESTATUS[@]}\")\n\n    # Don't invoke precmds if we are inside an execution of an \"original\n    # prompt command\" by another precmd execution loop. This avoids infinite\n    # recursion.\n    if (( __bp_inside_precmd > 0 )); then\n        return\n    fi\n    local __bp_inside_precmd=1\n\n    # Invoke every function defined in our function array.\n    local precmd_function\n    for precmd_function in \"${precmd_functions[@]}\"; do\n\n        # Only execute this function if it actually exists.\n        # Test existence of functions with: declare -[Ff]\n        if type -t \"$precmd_function\" 1>/dev/null; then\n            __bp_set_ret_value \"$__bp_last_ret_value\" \"$__bp_last_argument_prev_command\"\n            # Quote our function invocation to prevent issues with IFS\n            \"$precmd_function\"\n        fi\n    done\n\n    __bp_set_ret_value \"$__bp_last_ret_value\"\n}\n\n# Sets a return value in $?. We may want to get access to the $? variable in our\n# precmd functions. This is available for instance in zsh. We can simulate it in bash\n# by setting the value here.\n__bp_set_ret_value() {\n    return ${1:+\"$1\"}\n}\n\n__bp_in_prompt_command() {\n\n    local prompt_command_array IFS=$'\\n;'\n    read -rd '' -a prompt_command_array <<< \"${PROMPT_COMMAND[*]:-}\"\n\n    local trimmed_arg\n    __bp_trim_whitespace trimmed_arg \"${1:-}\"\n\n    local command trimmed_command\n    for command in \"${prompt_command_array[@]:-}\"; do\n        __bp_trim_whitespace trimmed_command \"$command\"\n        if [[ \"$trimmed_command\" == \"$trimmed_arg\" ]]; then\n            return 0\n        fi\n    done\n\n    return 1\n}\n\n# This function is installed as the DEBUG trap.  It is invoked before each\n# interactive prompt display.  Its purpose is to inspect the current\n# environment to attempt to detect if the current command is being invoked\n# interactively, and invoke 'preexec' if so.\n__bp_preexec_invoke_exec() {\n\n    # Save the contents of $_ so that it can be restored later on.\n    # https://stackoverflow.com/questions/40944532/bash-preserve-in-a-debug-trap#40944702\n    __bp_last_argument_prev_command=\"${1:-}\"\n    # Don't invoke preexecs if we are inside of another preexec.\n    if (( __bp_inside_preexec > 0 )); then\n        return\n    fi\n    local __bp_inside_preexec=1\n\n    # Checks if the file descriptor is not standard out (i.e. '1')\n    # __bp_delay_install checks if we're in test. Needed for bats to run.\n    # Prevents preexec from being invoked for functions in PS1\n    if [[ ! -t 1 && -z \"${__bp_delay_install:-}\" ]]; then\n        return\n    fi\n\n    if [[ -n \"${COMP_POINT:-}\" || -n \"${READLINE_POINT:-}\" ]]; then\n        # We're in the middle of a completer or a keybinding set up by \"bind\n        # -x\".  This obviously can't be an interactively issued command.\n        return\n    fi\n    if [[ -z \"${__bp_preexec_interactive_mode:-}\" ]]; then\n        # We're doing something related to displaying the prompt.  Let the\n        # prompt set the title instead of me.\n        return\n    else\n        # If we're in a subshell, then the prompt won't be re-displayed to put\n        # us back into interactive mode, so let's not set the variable back.\n        # In other words, if you have a subshell like\n        #   (sleep 1; sleep 2)\n        # You want to see the 'sleep 2' as a set_command_title as well.\n        if [[ 0 -eq \"${BASH_SUBSHELL:-}\" ]]; then\n            __bp_preexec_interactive_mode=\"\"\n        fi\n    fi\n\n    if  __bp_in_prompt_command \"${BASH_COMMAND:-}\"; then\n        # If we're executing something inside our prompt_command then we don't\n        # want to call preexec. Bash prior to 3.1 can't detect this at all :/\n        __bp_preexec_interactive_mode=\"\"\n        return\n    fi\n\n    local this_command\n    this_command=$(LC_ALL=C HISTTIMEFORMAT='' builtin history 1)\n    this_command=\"${this_command#*[[:digit:]][* ] }\"\n\n    # Sanity check to make sure we have something to invoke our function with.\n    if [[ -z \"$this_command\" ]]; then\n        return\n    fi\n\n    # Invoke every function defined in our function array.\n    local preexec_function\n    local preexec_function_ret_value\n    local preexec_ret_value=0\n    for preexec_function in \"${preexec_functions[@]:-}\"; do\n\n        # Only execute each function if it actually exists.\n        # Test existence of function with: declare -[fF]\n        if type -t \"$preexec_function\" 1>/dev/null; then\n            __bp_set_ret_value \"${__bp_last_ret_value:-}\"\n            # Quote our function invocation to prevent issues with IFS\n            \"$preexec_function\" \"$this_command\"\n            preexec_function_ret_value=\"$?\"\n            if [[ \"$preexec_function_ret_value\" != 0 ]]; then\n                preexec_ret_value=\"$preexec_function_ret_value\"\n            fi\n        fi\n    done\n\n    # Restore the last argument of the last executed command, and set the return\n    # value of the DEBUG trap to be the return code of the last preexec function\n    # to return an error.\n    # If `extdebug` is enabled a non-zero return value from any preexec function\n    # will cause the user's command not to execute.\n    # Run `shopt -s extdebug` to enable\n    __bp_set_ret_value \"$preexec_ret_value\" \"$__bp_last_argument_prev_command\"\n}\n\n__bp_install() {\n    # Exit if we already have this installed.\n    if [[ \"${PROMPT_COMMAND[*]:-}\" == *\"__bp_precmd_invoke_cmd\"* ]]; then\n        return 1\n    fi\n\n    trap '__bp_preexec_invoke_exec \"$_\"' DEBUG\n\n    # Preserve any prior DEBUG trap as a preexec function\n    eval \"local trap_argv=(${__bp_trap_string:-})\"\n    local prior_trap=${trap_argv[2]:-}\n    unset __bp_trap_string\n    if [[ -n \"$prior_trap\" ]]; then\n        eval '__bp_original_debug_trap() {\n            '\"$prior_trap\"'\n        }'\n        preexec_functions+=(__bp_original_debug_trap)\n    fi\n\n    # Adjust our HISTCONTROL Variable if needed.\n    __bp_adjust_histcontrol\n\n    # Issue #25. Setting debug trap for subshells causes sessions to exit for\n    # backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash.\n    #\n    # Disabling this by default. It can be enabled by setting this variable.\n    if [[ -n \"${__bp_enable_subshells:-}\" ]]; then\n\n        # Set so debug trap will work be invoked in subshells.\n        set -o functrace > /dev/null 2>&1\n        shopt -s extdebug > /dev/null 2>&1\n    fi\n\n    local existing_prompt_command\n    # Remove setting our trap install string and sanitize the existing prompt command string\n    existing_prompt_command=\"${PROMPT_COMMAND:-}\"\n    # Edge case of appending to PROMPT_COMMAND\n    existing_prompt_command=\"${existing_prompt_command//$__bp_install_string/:}\" # no-op\n    existing_prompt_command=\"${existing_prompt_command//$'\\n':$'\\n'/$'\\n'}\" # remove known-token only\n    existing_prompt_command=\"${existing_prompt_command//$'\\n':;/$'\\n'}\" # remove known-token only\n    __bp_sanitize_string existing_prompt_command \"$existing_prompt_command\"\n    if [[ \"${existing_prompt_command:-:}\" == \":\" ]]; then\n        existing_prompt_command=\n    fi\n\n    # Install our hooks in PROMPT_COMMAND to allow our trap to know when we've\n    # actually entered something.\n    PROMPT_COMMAND='__bp_precmd_invoke_cmd'\n    PROMPT_COMMAND+=${existing_prompt_command:+$'\\n'$existing_prompt_command}\n    if (( BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 1) )); then\n        PROMPT_COMMAND+=('__bp_interactive_mode')\n    else\n        # shellcheck disable=SC2179 # PROMPT_COMMAND is not an array in bash <= 5.0\n        PROMPT_COMMAND+=$'\\n__bp_interactive_mode'\n    fi\n\n    # Add two functions to our arrays for convenience\n    # of definition.\n    precmd_functions+=(precmd)\n    preexec_functions+=(preexec)\n\n    # Invoke our two functions manually that were added to $PROMPT_COMMAND\n    __bp_precmd_invoke_cmd\n    __bp_interactive_mode\n}\n\n# Sets an installation string as part of our PROMPT_COMMAND to install\n# after our session has started. This allows bash-preexec to be included\n# at any point in our bash profile.\n__bp_install_after_session_init() {\n    # bash-preexec needs to modify these variables in order to work correctly\n    # if it can't, just stop the installation\n    __bp_require_not_readonly PROMPT_COMMAND HISTCONTROL HISTTIMEFORMAT || return\n\n    local sanitized_prompt_command\n    __bp_sanitize_string sanitized_prompt_command \"${PROMPT_COMMAND:-}\"\n    if [[ -n \"$sanitized_prompt_command\" ]]; then\n        # shellcheck disable=SC2178 # PROMPT_COMMAND is not an array in bash <= 5.0\n        PROMPT_COMMAND=${sanitized_prompt_command}$'\\n'\n    fi\n    # shellcheck disable=SC2179 # PROMPT_COMMAND is not an array in bash <= 5.0\n    PROMPT_COMMAND+=${__bp_install_string}\n}\n\n# Run our install so long as we're not delaying it.\nif [[ -z \"${__bp_delay_install:-}\" ]]; then\n    __bp_install_after_session_init\nfi\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/test/README.md",
    "content": "Testing `bash-preexec`\n======================\n\n**Note on test conditions**\n\nWhen writing test conditions, use `[ ... ]` instead of `[[ ... ]]` since the\nformer are supported by Bats on Bash versions before 4.1. In particular, macOS\nuses Bash 3.2, and `[[ ... ]]` tests always pass on macOS.\n\nIn some cases, you may want to use a feature unique to `[[ ... ]]` such as\npattern matching (`[[ $name = a* ]]`) or regular expressions (`[[ $(date) =~\n^Fri\\ ...\\ 13 ]]`). In those cases, use the following pattern to replace “bare”\n`[[ ... ]]`.\n\n```\n[[ ... ]] || return 1\n```\n\nReferences:\n* [Differences between `[` and `[[`](http://mywiki.wooledge.org/BashFAQ/031)\n* [Problems with `[[` in Bats](https://github.com/sstephenson/bats/issues/49)\n* [Using `|| return 1` instead of `|| false`](https://github.com/bats-core/bats-core/commit/e5695a673faad4d4d33446ed5c99d70dbfa6d8be)\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/test/bash-preexec.bats",
    "content": "#!/usr/bin/env bats\n\nsetup() {\n  PROMPT_COMMAND=''        # in case the invoking shell has set this\n  history -s fake command  # preexec requires there be some history\n  set -o nounset           # in case the user has this set\n  __bp_delay_install=\"true\"\n  source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n}\n\n# Evaluates all the elements of PROMPT_COMMAND\neval_PROMPT_COMMAND() {\n  local prompt_command\n  for prompt_command in \"${PROMPT_COMMAND[@]}\"; do\n    eval \"$prompt_command\"\n  done\n}\n\n# Joins the elements of PROMPT_COMMAND with $'\\n'\njoin_PROMPT_COMMAND() {\n  local IFS=$'\\n'\n  echo \"${PROMPT_COMMAND[*]}\"\n}\n\nbp_install() {\n  __bp_install_after_session_init\n  eval_PROMPT_COMMAND\n}\n\ntest_echo() {\n  echo \"test echo\"\n}\n\ntest_preexec_echo() {\n  printf \"%s\\n\" \"$1\"\n}\n\n# Helper functions necessary because Bats' run doesn't preserve $?\nreturn_exit_code() {\n  return $1\n}\n\nset_exit_code_and_run_precmd() {\n  return_exit_code \"${1:-0}\"\n  __bp_precmd_invoke_cmd\n}\n\n\n@test \"sourcing bash-preexec should exit with 1 if we're not using bash\" {\n  unset BASH_VERSION\n  run source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n  [ $status -eq 1 ]\n  [ -z \"$output\" ]\n}\n\n@test \"sourcing bash-preexec should exit with 1 if we're using an older version of bash\" {\n  if type -p bash-3.0 &>/dev/null; then\n    run bash-3.0 -c \"source \\\"${BATS_TEST_DIRNAME}/../bash-preexec.sh\\\"\"\n    [ \"$status\" -eq 1 ]\n    [ -z \"$output\" ]\n  else\n    skip\n  fi\n}\n\n@test \"__bp_install should exit if it's already installed\" {\n  bp_install\n\n  run '__bp_install'\n  [ $status -eq 1 ]\n  [ -z \"$output\" ]\n}\n\n@test \"__bp_install should remove trap logic and itself from PROMPT_COMMAND\" {\n  __bp_install_after_session_init\n\n  # Assert that before running, the command contains the install string, and\n  # afterwards it does not\n  # shellcheck disable=SC2154\n  [[ \"$PROMPT_COMMAND\" == *\"$__bp_install_string\"* ]] || return 1\n\n  eval_PROMPT_COMMAND\n\n  [[ \"$PROMPT_COMMAND\" != *\"$__bp_install_string\"* ]] || return 1\n}\n\n@test \"__bp_install should preserve an existing DEBUG trap\" {\n  trap_invoked_count=0\n  foo() { (( trap_invoked_count += 1 )); }\n\n  # note setting this causes BATS to mis-report the failure line when this test fails\n  trap foo DEBUG\n  [ \"$(trap -p DEBUG | cut -d' ' -f3)\" == \"'foo'\" ]\n\n  bp_install\n  trap_count_snapshot=$trap_invoked_count\n\n  [ \"$(trap -p DEBUG | cut -d' ' -f3)\" == \"'__bp_preexec_invoke_exec\" ]\n  [[ \"${preexec_functions[*]}\" == *\"__bp_original_debug_trap\"* ]] || return 1\n\n  __bp_interactive_mode # triggers the DEBUG trap\n\n  # ensure the trap count is still being incremented after the trap's been overwritten\n  (( trap_count_snapshot < trap_invoked_count ))\n}\n\n@test \"__bp_install should preserve an existing DEBUG trap containing quotes\" {\n  trap_invoked_count=0\n  foo() { (( trap_invoked_count += 1 )); }\n\n  # note setting this causes BATS to mis-report the failure line when this test fails\n  trap \"foo && echo 'hello' >/dev/null\" debug\n  [ \"$(trap -p DEBUG | cut -d' ' -f3-7)\" == \"'foo && echo '\\''hello'\\'' >/dev/null'\" ]\n\n  bp_install\n  trap_count_snapshot=$trap_invoked_count\n\n  [ \"$(trap -p DEBUG | cut -d' ' -f3)\" == \"'__bp_preexec_invoke_exec\" ]\n  [[ \"${preexec_functions[*]}\" == *\"__bp_original_debug_trap\"* ]] || return 1\n\n  __bp_interactive_mode # triggers the DEBUG trap\n\n  # ensure the trap count is still being incremented after the trap's been overwritten\n  (( trap_count_snapshot < trap_invoked_count ))\n}\n\n@test \"__bp_sanitize_string should remove semicolons and trim space\" {\n\n    __bp_sanitize_string output \"   true1;  \"$'\\n'\n    [ \"$output\" == \"true1\" ]\n\n    __bp_sanitize_string output \" ; true2;  \"\n    [ \"$output\" == \"true2\" ]\n\n    __bp_sanitize_string output $'\\n'\" ; true3;  \"\n    [ \"$output\" == \"true3\" ]\n\n}\n\n@test \"Appending to PROMPT_COMMAND should work after bp_install\" {\n    bp_install\n\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; true\"\n    eval_PROMPT_COMMAND\n}\n\n@test \"Appending or prepending to PROMPT_COMMAND should work after bp_install_after_session_init\" {\n    __bp_install_after_session_init\n    nl=$'\\n'\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; true\"\n    PROMPT_COMMAND=\"$PROMPT_COMMAND $nl true\"\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; true\"\n    PROMPT_COMMAND=\"true; $PROMPT_COMMAND\"\n    PROMPT_COMMAND=\"true; $PROMPT_COMMAND\"\n    PROMPT_COMMAND=\"true; $PROMPT_COMMAND\"\n    PROMPT_COMMAND=\"true $nl $PROMPT_COMMAND\"\n    eval_PROMPT_COMMAND\n}\n\n# Case where a user is appending or prepending to PROMPT_COMMAND.\n# This can happen after 'source bash-preexec.sh' e.g.\n# source bash-preexec.sh; PROMPT_COMMAND=\"$PROMPT_COMMAND; other_prompt_command_hook\"\n@test \"Adding to PROMPT_COMMAND before and after initiating install\" {\n    PROMPT_COMMAND=\"echo before\"\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; echo before2\"\n    __bp_install_after_session_init\n    PROMPT_COMMAND=\"$PROMPT_COMMAND\"$'\\n echo after'\n    PROMPT_COMMAND=\"echo after2; $PROMPT_COMMAND;\"\n\n    eval_PROMPT_COMMAND\n\n    expected_result=$'__bp_precmd_invoke_cmd\\necho after2; echo before; echo before2\\n echo after\\n__bp_interactive_mode'\n    [ \"$(join_PROMPT_COMMAND)\" == \"$expected_result\" ]\n}\n\n@test \"Adding to PROMPT_COMMAND after with semicolon\" {\n    PROMPT_COMMAND=\"echo before\"\n    __bp_install_after_session_init\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; echo after\"\n\n    eval_PROMPT_COMMAND\n\n    expected_result=$'__bp_precmd_invoke_cmd\\necho before\\n echo after\\n__bp_interactive_mode'\n    [ \"$(join_PROMPT_COMMAND)\" == \"$expected_result\" ]\n}\n\n@test \"during install PROMPT_COMMAND and precmd functions should be executed each once\" {\n    PROMPT_COMMAND=\"echo before\"\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; echo before2\"\n    __bp_install_after_session_init\n    PROMPT_COMMAND=\"$PROMPT_COMMAND; echo after\"\n    PROMPT_COMMAND=\"echo after2; $PROMPT_COMMAND;\"\n\n    precmd() { echo \"inside precmd\"; }\n    run eval_PROMPT_COMMAND\n    [ \"${lines[0]}\" == \"after2\" ]\n    [ \"${lines[1]}\" == \"before\" ]\n    [ \"${lines[2]}\" == \"before2\" ]\n    [ \"${lines[3]}\" == \"inside precmd\" ]\n    [ \"${lines[4]}\" == \"after\" ]\n    [ \"${#lines[@]}\" == '5' ]\n}\n\n@test \"No functions defined for preexec should simply return\" {\n    __bp_interactive_mode\n\n    run '__bp_preexec_invoke_exec' 'true'\n    [ $status -eq 0 ]\n    [ -z \"$output\" ]\n}\n\n@test \"precmd should execute a function once\" {\n    precmd_functions+=(test_echo)\n    run set_exit_code_and_run_precmd\n    [ $status -eq 0 ]\n    [ \"$output\" == \"test echo\" ]\n}\n\n@test \"precmd should set \\$? to be the previous exit code\" {\n    echo_exit_code() {\n      echo \"$?\"\n    }\n\n    precmd_functions+=(echo_exit_code)\n    run set_exit_code_and_run_precmd 251\n    [ $status -eq 251 ]\n    [ \"$output\" == \"251\" ]\n}\n\n@test \"precmd should set \\$BP_PIPESTATUS to the previous \\$PIPESTATUS\" {\n  echo_pipestatus() {\n    echo \"${BP_PIPESTATUS[*]}\"\n  }\n  # Helper function is necessary because Bats' run doesn't preserve $PIPESTATUS\n  set_pipestatus_and_run_precmd() {\n    false | true\n    __bp_precmd_invoke_cmd\n  }\n\n  precmd_functions+=(echo_pipestatus)\n  run 'set_pipestatus_and_run_precmd'\n  [ $status -eq 0 ]\n  [ \"$output\" == \"1 0\" ]\n}\n\n@test \"precmd should set \\$_ to be the previous last arg\" {\n    echo_last_arg() {\n      echo \"$_\"\n    }\n    precmd_functions+=(echo_last_arg)\n\n    bats_trap=$(trap -p DEBUG)\n    trap DEBUG # remove the Bats stack-trace trap so $_ doesn't get overwritten\n    : \"last-arg\"\n    __bp_preexec_invoke_exec \"$_\"\n    eval \"$bats_trap\" # Restore trap\n    run set_exit_code_and_run_precmd\n    [ $status -eq 0 ]\n    [ \"$output\" == \"last-arg\" ]\n}\n\n@test \"preexec should execute a function with the last command in our history\" {\n    preexec_functions+=(test_preexec_echo)\n    __bp_interactive_mode\n    git_command=\"git commit -a -m 'committing some stuff'\"\n    history -s $git_command\n\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == \"$git_command\" ]\n}\n\n@test \"preexec should execute multiple functions in the order added to their arrays\" {\n    fun_1() { echo \"$1 one\"; }\n    fun_2() { echo \"$1 two\"; }\n    preexec_functions+=(fun_1)\n    preexec_functions+=(fun_2)\n    __bp_interactive_mode\n\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"${#lines[@]}\" == '2' ]\n    [ \"${lines[0]}\" == \"fake command one\" ]\n    [ \"${lines[1]}\" == \"fake command two\" ]\n}\n\n@test \"preecmd should execute multiple functions in the order added to their arrays\" {\n    fun_1() { echo \"one\"; }\n    fun_2() { echo \"two\"; }\n    precmd_functions+=(fun_1)\n    precmd_functions+=(fun_2)\n\n    run set_exit_code_and_run_precmd\n    [ $status -eq 0 ]\n    [ \"${#lines[@]}\" == '2' ]\n    [ \"${lines[0]}\" == \"one\" ]\n    [ \"${lines[1]}\" == \"two\" ]\n}\n\n@test \"preexec should execute a function with IFS defined to local scope\" {\n    IFS=_\n    name_with_underscores_1() { parts=(1_2); echo $parts; }\n    preexec_functions+=(name_with_underscores_1)\n\n    __bp_interactive_mode\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == \"1 2\" ]\n}\n\n@test \"precmd should execute a function with IFS defined to local scope\" {\n    IFS=_\n    name_with_underscores_2() { parts=(2_2); echo $parts; }\n    precmd_functions+=(name_with_underscores_2)\n    run set_exit_code_and_run_precmd\n    [ $status -eq 0 ]\n    [ \"$output\" == \"2 2\" ]\n}\n\n@test \"preexec should set \\$? to be the exit code of preexec_functions\" {\n    return_nonzero() {\n      return 1\n    }\n    preexec_functions+=(return_nonzero)\n\n    __bp_interactive_mode\n\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 1 ]\n}\n\n@test \"in_prompt_command should detect if a command is part of PROMPT_COMMAND\" {\n\n    PROMPT_COMMAND=$'precmd_invoke_cmd\\n something; echo yo\\n __bp_interactive_mode'\n    run '__bp_in_prompt_command' \"something\"\n    [ $status -eq 0 ]\n\n    run '__bp_in_prompt_command' \"something_else\"\n    [ $status -eq 1 ]\n\n    # Should trim commands and arguments here.\n    PROMPT_COMMAND=\" precmd_invoke_cmd ; something ; some_stuff_here;\"\n    run '__bp_in_prompt_command' \" precmd_invoke_cmd \"\n    [ $status -eq 0 ]\n\n    PROMPT_COMMAND=\" precmd_invoke_cmd ; something ; some_stuff_here;\"\n    run '__bp_in_prompt_command' \" not_found\"\n    [ $status -eq 1 ]\n\n}\n\n@test \"__bp_adjust_histcontrol should remove ignorespace and ignoreboth\" {\n\n    # Should remove ignorespace\n    HISTCONTROL=\"ignorespace:ignoredups:*\"\n    __bp_adjust_histcontrol\n    [ \"$HISTCONTROL\" == \":ignoredups:*\" ]\n\n    # Should remove ignoreboth and replace it with ignoredups\n    HISTCONTROL=\"ignoreboth\"\n    __bp_adjust_histcontrol\n    [ \"$HISTCONTROL\" == \"ignoredups:\" ]\n\n    # Handle a few inputs\n    HISTCONTROL=\"ignoreboth:ignorespace:some_thing_else\"\n    __bp_adjust_histcontrol\n    echo \"$HISTCONTROL\"\n    [ \"$HISTCONTROL\" == \"ignoredups:::some_thing_else\" ]\n\n}\n\n@test \"preexec should respect HISTTIMEFORMAT\" {\n    preexec_functions+=(test_preexec_echo)\n    __bp_interactive_mode\n    git_command=\"git commit -a -m 'committing some stuff'\"\n    HISTTIMEFORMAT='%F %T '\n    history -s $git_command\n\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == \"$git_command\" ]\n}\n\n@test \"preexec should not strip whitespace from commands\" {\n    preexec_functions+=(test_preexec_echo)\n    __bp_interactive_mode\n    history -s \" this command has whitespace \"\n\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == \" this command has whitespace \" ]\n}\n\n@test \"preexec should preserve multi-line strings in commands\" {\n    preexec_functions+=(test_preexec_echo)\n    __bp_interactive_mode\n    history -s \"this 'command contains\na multiline string'\"\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == \"this 'command contains\na multiline string'\" ]\n}\n\n@test \"preexec should work on options to 'echo' commands\" {\n    preexec_functions+=(test_preexec_echo)\n    __bp_interactive_mode\n    history -s -- '-n'\n    run '__bp_preexec_invoke_exec'\n    [ $status -eq 0 ]\n    [ \"$output\" == '-n' ]\n}\n"
  },
  {
    "path": "vendor/github.com/rcaloras/bash-preexec/test/include-test.bats",
    "content": "#!/usr/bin/env bats\n\n@test \"should not import if it's already defined\" {\n  # shellcheck disable=SC2034,SC2030\n  bash_preexec_imported=\"defined\"\n  # shellcheck source=vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n  source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n  [ -z \"$(type -t __bp_install)\" ]\n}\n\n@test \"should not import if it's already defined (old guard, don't use elsewhere!)\" {\n  # shellcheck disable=SC2030\n  __bp_imported=\"defined\"\n  # shellcheck source=vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n  source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n  [ -z \"$(type -t __bp_install)\" ]\n}\n\n@test \"should import if not defined\" {\n  unset bash_preexec_imported\n  # shellcheck source=vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n  source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n  [ -n \"$(type -t __bp_install)\" ]\n}\n\n@test \"bp should stop installation if HISTTIMEFORMAT is readonly\" {\n  readonly HISTTIMEFORMAT\n  # shellcheck source=vendor/github.com/rcaloras/bash-preexec/bash-preexec.sh\n  run source \"${BATS_TEST_DIRNAME}/../bash-preexec.sh\"\n  [ $status -ne 0 ]\n  [[ \"$output\" =~ \"HISTTIMEFORMAT\" ]] || return 1\n}\n"
  },
  {
    "path": "vendor/github.com/rparree/jboss-bash-completion/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2020 Raphael Parree\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/rparree/jboss-bash-completion/README.md",
    "content": "jboss-bash-completion\n=====================\n\nJBoss Bash Completion for JBoss 5 and 7 (EAP 6)\n\n\n\nOverview\n--------\n\nCompletion for the `run.sh` (JBoss5) and `standalone.sh`/`domain.sh`\n\nSome of the options available in jboss7: \n\n\n* `--admin-only` `-h` `-help` `-version` `-V` `-v`\n* `-Djboss.home.dir`  \n* `--server-config` (options the xml files in the configuration directory relative to -Djboss.server.base.dir)\n* `-b` `-bmanagement` `-bunsecure` `-bpublic` `-Djboss.domain.master.address` `-Djboss.bind.address.*` (options: your local IP addresses and 0.0.0.0)\n* `-Djboss.socket.binding.port-offset`  (options: 100 200 300 400 10000 20000 30000 40000)\n* `-u` (options 239.255.0.1 239.255.0.2 239.255.0.3)\n* `-P` -Djboss.node.name \n\n\nInstall\n-------\n\nMake sure you have installed bash_completion 1.3 (or higher):\n\nDebian/Ubuntu: `apt-get install bash-completion`\nRHEL/CentOS: `yum install bash-completion`\n\nCopy the file(s) to your `/etc/bash_completion.d` folder:\n\n`sudo cp jboss* /etc/bash_completion.d`\n\n\n"
  },
  {
    "path": "vendor/github.com/rparree/jboss-bash-completion/jboss5",
    "content": "# Completions for JBoss Application Server 5\n# VERSION: 1.3\n# DATE: 2012-06-21\n# rparree-at-edc4it-dot-com\n\n\n\n\n_serverProfiles5(){\n # from http://unix.stackexchange.com/questions/34238/complete-files-from-a-different-directory-in-bash\n    if [ -d \"../server\" ]\n    then\n      IFS=$'\\n' tmp=( $(compgen -W \"$(ls \"../server\")\" -- \"$cur\" ))\n      COMPREPLY=( \"${tmp[@]// /\\ }\" )\n          unset IFS\n    else\n      COMPREPLY=( $(compgen -W \"default standard all web minimal production\" -- ${cur}) )\n    fi\n}\n\n_bindingAddress5(){\n  # from /etc/bash_completion.d/ssh\n    COMPREPLY=( \"${COMPREPLY[@]}\" $( compgen -W \\\n    \"0.0.0.0 $( PATH=\"$PATH:/sbin\" ifconfig -a | \\\n    sed -ne 's/.*addr:\\([^[:space:]]*\\).*/\\1/p' \\\n        -ne 's/.*inet[[:space:]]\\{1,\\}\\([^[:space:]]*\\).*/\\1/p' )\" \\\n    -- \"$cur\" ) )\n}\n\n_jboss5()\n{\n    \n    local cur prev words cword\n    COMPREPLY=()\n    _get_comp_words_by_ref -n = cur prev words cword\n  \n    case $cur in\n\t\n        -Djboss.service.binding.set=*)\n            cur=${cur#*=}\n            #static list of common bindings sets\n            local bindings=\"ports-01 ports-02 ports-03 ports-04\"\n            COMPREPLY=( $(compgen -W \"${bindings}\" -- ${cur}) )\n            return 0\n            ;;\n        -Djboss.default.jgroups.stack=*)\n            cur=${cur#*=}\n            #static list of standard JGroups stacks\n            local stacks=\"udp udp-async udp-sync tcp tcp-sync\"\n            COMPREPLY=( $(compgen -W \"${stacks}\" -- ${cur}) )\n            return 0\n            ;;\n\n        -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef=*|-Dcom.sun.management.jmxremote.authenticate=*|-Dcom.sun.management.jmxremote.ssl=*)\n            cur=${cur#*=}\n            local booleans=\"true false\"\n            COMPREPLY=( $(compgen -W \"${booleans}\" -- ${cur}) )\n            return 0\n            ;;\n    esac\n\n\n    case $prev in\n        -u)\n            # a few from RFC 2365 IPv4 Local Scope ()\n           local addresses=\"239.255.0.1 239.255.0.2 239.255.0.3\"\n            COMPREPLY=( $(compgen -W \"${addresses}\" -- ${cur}) )\n            return 0\n            ;;\n        -l)\n                local loggers=\"log4j jdk\"\n            COMPREPLY=( $(compgen -W \"${loggers}\" -- ${cur}) )\n            return 0\n            ;;\n        -b)\n            _bindingAddress5\n            return 0\n            ;;\n        -c)\n            _serverProfiles5\n            return 0\n            ;;\n        *)\n            ;;\n    esac\n\n       \n    COMPREPLY=( $( compgen -W ' -u  -c -m - -b  -g -l -d -p -n -B -L -C -P -v -help -Djboss.platform.mbeanserver' -- \"$cur\" ) \\\n                $( compgen -W '-Djboss.Domain -Djboss.modcluster.proxyList -Djboss.service.binding.set -Djboss.jvmRoute -Djboss.messaging.ServerPeerID -Djboss.default.jgroups.stack -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port -Dcom.sun.management.jmxremote.ssl' \\\n                           -S '=' -- \"$cur\" ) )       \n    return 0\n\n  \n}\ncomplete -o nospace -F _jboss5 run.sh\n"
  },
  {
    "path": "vendor/github.com/rparree/jboss-bash-completion/jboss7",
    "content": "# Completions for JBoss Application Server 7 (EAP 6)\n# VERSION: 0.6\n# DATE: 2012-10-30\n# rparree-at-edc4it-dot-com\n\n\n\n\n_serverProfiles(){\n    if [[ $COMP_WORDS == *standalone.sh* ]]\n    then\n      serverdir=\"../standalone/configuration/\"\n    else\n       # assume is domain.sh\n      serverdir=\"../domain/configuration/\"\n    fi\n    \n    for i in  ${!COMP_WORDS[*]}\n    do\n      if [[ \"${COMP_WORDS[i]}\" == \"-Djboss.server.base.dir\" || \"${COMP_WORDS[i]}\" == \"-Djboss.domain.base.dir\" ]]; then\n        serverdir=\"${COMP_WORDS[i+2]}/configuration\"\n      fi \n      \n    done\n    if [ -d \"${serverdir}\" ]\n    then\n \n      IFS=$'\\n' tmp=\"$(ls \"${serverdir}\" | grep xml)\"\n        local fls=\"${tmp[@]// /\\ }\"\n      unset IFS\n      COMPREPLY=( $(compgen -W \"${fls} initial boot last v\" -- \"$cur\" ))\n    fi\n}\n\n_bindingAddress(){\n  # from /etc/bash_completion.d/ssh\n    COMPREPLY=( \"${COMPREPLY[@]}\" $( compgen -W \\\n    \"0.0.0.0 $( PATH=\"$PATH:/sbin\" ifconfig -a | \\\n    sed -ne 's/.*addr:\\([^[:space:]]*\\).*/\\1/p' \\\n        -ne 's/.*inet[[:space:]]\\{1,\\}\\([^[:space:]]*\\).*/\\1/p' )\" \\\n    -- \"$cur\" ) )\n}\n\n_jboss(){\n    \n    local cur prev words cword\n    COMPREPLY=()\n    _get_comp_words_by_ref -n = cur prev words cword\n  \n    case $cur in\n\t\n        -Djboss.socket.binding.port-offset=*)\n            cur=${cur#*=}\n            #static list of common bindings sets\n            local bindings=\"100 200 300 400 10000 20000 30000 40000\"\n            COMPREPLY=( $(compgen -W \"${bindings}\" -- ${cur}) )\n            return 0\n            ;;\n        -Djboss.default.jgroups.stack=*)\n            cur=${cur#*=}\n            #static list of standard JGroups stacks\n            local stacks=\"udp udp-async udp-sync tcp tcp-sync\"\n            COMPREPLY=( $(compgen -W \"${stacks}\" -- ${cur}) )\n            return 0\n            ;;\n\n        -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef=*|-Dcom.sun.management.jmxremote.authenticate=*|-Dcom.sun.management.jmxremote.ssl=*)\n            cur=${cur#*=}\n            local booleans=\"true false\"\n            COMPREPLY=( $(compgen -W \"${booleans}\" -- ${cur}) )\n            return 0\n            ;;\n        \n        -Djboss.server.base.dir=*|-Djboss.home.dir=*|-Djboss.domain.base.dir=*)\n           cur=${cur#*=}\n           _filedir -d\n           return 0\n           ;;\n         \n        -Djboss.domain.master.address=*|-Djboss.bind.address*=*)\n           cur=${cur#*=}\n           _bindingAddress\n           return 0\n           ;;\n        --server-config=*|-c=|--host-config=*)\n\t   cur=${cur#*=}\n           _serverProfiles\n           return 0 \n     \n\n    esac\n\n\n    case $prev in\n        -u)\n            # a few from RFC 2365 IPv4 Local Scope ()\n           local addresses=\"239.255.0.1 239.255.0.2 239.255.0.3\"\n            COMPREPLY=( $(compgen -W \"${addresses}\" -- ${cur}) )\n            return 0\n            ;;\n        -b*)\n            _bindingAddress\n            return 0\n            ;;\n        -c)\n            _serverProfiles\n            return 0\n            ;;\n        *)\n            ;;\n    esac\n    # *** from jboss5  ********************\n    # *** -modulepath  -c -m  -g -l -d -p -n -B -L -C  -Djboss.platform.mbeanserver -Djboss.server.base.directory   \n    # ***  -Djboss.Domain -Djboss.modcluster.proxyList  -Djboss.jvmRoute -Djboss.default.jgroups.stack -Dorg.jboss.ejb3.remoting.IsLocalInterceptor.passByRef -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port -Dcom.sun.management.jmxremote.ssl\n    # *************************************\n    \n    # standard commands for standalone and domain mode\n    local commandsWithoutEqualSign='-b -bmanagement -bunsecure -bpublic --admin-only -h -help -u -version -V -v'\n    local commandsWithEqualSign='-P -Djboss.node.name -Djboss.home.dir -Djboss.socket.binding.port-offset -Djboss.bind.address.management -Djboss.bind.address -Djboss.bind.address.unsecure'\n    \n    if [[ $COMP_WORDS == *standalone.sh* ]]\n    then\n       commandsWithoutEqualSign=\"${commandsWithoutEqualSign} -c\"\n       commandsWithEqualSign=\"${commandsWithEqualSign} --server-config -Djboss.server.base.dir -c\"\n    else\n       # assume is domain.sh\n       commandsWithoutEqualSign=\"${commandsWithoutEqualSign} --backup  --cached-dc\"\n       commandsWithEqualSign=\"${commandsWithEqualSign} -Djboss.domain.master.address --host-config -Djboss.domain.master.port -Djboss.domain.base.dir \"\n    fi\n     \n\n    \n    \n    COMPREPLY=( $( compgen -W \"$commandsWithoutEqualSign\" -- \"$cur\" ) \n                $( compgen -W \"$commandsWithEqualSign\"  -S '=' -- \"$cur\" ) )       \n    return 0\n\n  \n}\ncomplete -o nospace -F _jboss standalone.sh\ncomplete -o nospace -F _jboss domain.sh\n"
  },
  {
    "path": "vendor/github.com/vigo/apm-bash-completion/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, sex characteristics, gender identity and expression,\nlevel of experience, education, socio-economic status, nationality, personal\nappearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at ugurozyilmazel@gmail.com. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see\nhttps://www.contributor-covenant.org/faq"
  },
  {
    "path": "vendor/github.com/vigo/apm-bash-completion/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Uğur \"vigo\" Özyılmazel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "vendor/github.com/vigo/apm-bash-completion/README.md",
    "content": "# Bash Completion for Atom Package Manager (apm)\n\nIf you use [Atom](http://atom.io) editor, you'll like this completion helper.\n\n## Installation\n\nYou can install via [Homebrew](http://brew.sh)\n\n    brew install homebrew/completions/apm-bash-completion\n\n## Usage\n\n```bash\n$ apm [TAB]\n\nclean                 featured              ln                    remove                unlink\nconfig                help                  lns                   rm                    unpublish\ndedupe                home                  login                 search                unstar\ndeinstall             init                  ls                    show                  update\ndelete                install               open                  star                  upgrade\ndev                   link                  outdated              starred               view\ndevelop               linked                publish               stars                 \ndocs                  links                 rebuild               test                  \nerase                 list                  rebuild-module-cache  uninstall             \n\n$ apm publish\nbuild  major  minor  patch\n\n$ apm config\ndelete  edit    get     list    set\n```\n\n## Manual Usage\n\nJust get the file `apm` and call `source apm` (or add it to your bash environment)\n\n---\n\n## What’s New?\n\nWell, I even don’t remember this project since I’ve got mail today about\nmissing LICENSE file. Feel free to contribute, add missing pieces :)\n\n---\n\n## Contribution\n\nPlease let me know if you need some more options. Please create an issue and\nmake a request. Also If you like to improve or add more features please fork\nit and you know the rest :)\n\n1. Fork it ( https://github.com/vigo/apm-bash-completion )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n---\n\n## Contributer(s)\n\n* [Uğur \"vigo\" Özyılmazel](https://github.com/vigo) - Creator, maintainer\n\n---\n\n## License\n\nThis project is licensed under MIT\n\n---\n"
  },
  {
    "path": "vendor/github.com/vigo/apm-bash-completion/apm",
    "content": "#!/usr/bin/env bash\n\n# this is the modified version of bundle bash-completion.\n# Copyright (c) 2011-2013 Daniel Luz <dev at mernen dot com> (bundle bash-completion)\n#\n# apm bash-completion is written by Ugur Ozyilmazel\n# github: @vigo, twitter: @vigobronx\n# enjoy!\n#\n# you need to activate this via\n# $ source apm\n\n__apm(){\n    local cur prev options apm_command\n    COMPREPLY=()\n    cur=\"${COMP_WORDS[COMP_CWORD]}\"\n    prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n    __apm_get_command\n    if [[ $cur = -* ]]; then\n        options=\"--color\"\n        if [[ -z $apm_command ]]; then\n            options=\"$options --version --help\"\n        fi\n        if [[ $apm_command && $apm_command = publish ]]; then\n            options=\"--tag --rename\"\n        fi\n    else\n        if [[ -z $apm_command || $apm_command = help ]]; then\n            options=\"help clean config dedupe deinstall delete dev develop docs erase featured home init install link linked links list ln lns login ls open outdated publish rebuild rebuild-module-cache remove rm search show star starred stars test uninstall unlink unpublish unstar update upgrade view\"\n        fi\n        if [[ $apm_command && $apm_command = publish ]]; then\n            options=\"major minor patch build\"\n        fi\n        if [[ $apm_command && $apm_command = config ]]; then\n            options=\"set get delete list edit\"\n        fi\n    fi\n    COMPREPLY=($(compgen -W \"$options\" -- \"$cur\"))\n}\n__apm_get_command() {\n    local i\n    for ((i=1; i < $COMP_CWORD; ++i)); do\n        local arg=${COMP_WORDS[$i]}\n        case $arg in\n        [^-]*)\n            apm_command=$arg\n            return;;\n        --version)\n            apm_command=-\n            return;;\n        --help)\n            apm_command=help\n            return;;\n        publish)\n            apm_command=publish\n            return;;\n        config)\n            apm_command=config\n            return;;\n        esac\n    done\n}\ncomplete -F __apm -o bashdefault -o default apm\n"
  }
]