Repository: Bash-it/bash-it Branch: master Commit: 39f60ff4b2a1 Files: 475 Total size: 1.1 MB Directory structure: gitextract_hzq29b6j/ ├── .ackrc ├── .editorconfig ├── .git-blame-ignore-revs ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ └── feature_request.yml │ ├── PULL_REQUEST_TEMPLATE.md │ ├── no-response.yml │ └── workflows/ │ └── ci.yml ├── .gitignore ├── .gitmodules ├── .pre-commit-config.yaml ├── .readthedocs.yml ├── CLAUDE.md ├── LICENSE ├── aliases/ │ └── available/ │ ├── ag.aliases.bash │ ├── ansible.aliases.bash │ ├── apt.aliases.bash │ ├── atom.aliases.bash │ ├── bash-it.aliases.bash │ ├── bolt.aliases.bash │ ├── bundler.aliases.bash │ ├── clipboard.aliases.bash │ ├── composer.aliases.bash │ ├── curl.aliases.bash │ ├── directory.aliases.bash │ ├── dnf.aliases.bash │ ├── docker-compose.aliases.bash │ ├── docker.aliases.bash │ ├── editor.aliases.bash │ ├── emacs.aliases.bash │ ├── fuck.aliases.bash │ ├── general.aliases.bash │ ├── git-omz.aliases.bash │ ├── git.aliases.bash │ ├── gitsvn.aliases.bash │ ├── heroku.aliases.bash │ ├── hg.aliases.bash │ ├── homebrew-cask.aliases.bash │ ├── homebrew.aliases.bash │ ├── homesick.aliases.bash │ ├── jitsu.aliases.bash │ ├── kubectl.aliases.bash │ ├── laravel.aliases.bash │ ├── maven.aliases.bash │ ├── msys2.aliases.bash │ ├── node.aliases.bash │ ├── npm.aliases.bash │ ├── osx.aliases.bash │ ├── phoenix.aliases.bash │ ├── puppet.aliases.bash │ ├── pyrocms.aliases.bash │ ├── rails.aliases.bash │ ├── svn.aliases.bash │ ├── systemd.aliases.bash │ ├── terraform.aliases.bash │ ├── terragrunt.aliases.bash │ ├── textmate.aliases.bash │ ├── tmux.aliases.bash │ ├── todo.aliases.bash │ ├── uuidgen.aliases.bash │ ├── vagrant.aliases.bash │ ├── vault.aliases.bash │ ├── vim.aliases.bash │ └── yarn.aliases.bash ├── bash_it.sh ├── clean_files.txt ├── completion/ │ └── available/ │ ├── aliases.completion.bash │ ├── apm.completion.bash │ ├── artisan.completion.bash │ ├── awless.completion.bash │ ├── awscli.completion.bash │ ├── bash-it.completion.bash │ ├── brew.completion.bash │ ├── bundler.completion.bash │ ├── capistrano.completion.bash │ ├── cargo.completion.bash │ ├── composer.completion.bash │ ├── conda.completion.bash │ ├── consul.completion.bash │ ├── crystal.completion.bash │ ├── dart.completion.bash │ ├── defaults.completion.bash │ ├── dirs.completion.bash │ ├── django.completion.bash │ ├── dmidecode.completion.bash │ ├── docker-compose.completion.bash │ ├── docker-machine.completion.bash │ ├── docker.completion.bash │ ├── dotnet.completion.bash │ ├── drush.completion.bash │ ├── export.completion.bash │ ├── fabric.completion.bash │ ├── flutter.completion.bash │ ├── gcloud.completion.bash │ ├── gem.completion.bash │ ├── git.completion.bash │ ├── git_flow.completion.bash │ ├── git_flow_avh.completion.bash │ ├── github-cli.completion.bash │ ├── go.completion.bash │ ├── gradle.completion.bash │ ├── grunt.completion.bash │ ├── gulp.completion.bash │ ├── helm.completion.bash │ ├── homesick.completion.bash │ ├── hub.completion.bash │ ├── invoke.completion.bash │ ├── jboss5.completion.bash │ ├── jboss7.completion.bash │ ├── jungle.completion.bash │ ├── kind.completion.bash │ ├── knife.completion.bash │ ├── kontena.completion.bash │ ├── kubectl.completion.bash │ ├── laravel.completion.bash │ ├── lerna.completion.bash │ ├── makefile.completion.bash │ ├── maven.completion.bash │ ├── minikube.completion.bash │ ├── minishift.completion.bash │ ├── ng.completion.bash │ ├── ngrok.completion.bash │ ├── notify-send.completion.bash │ ├── npm.completion.bash │ ├── nvm.completion.bash │ ├── openshift.completion.bash │ ├── packer.completion.bash │ ├── pew.completion.bash │ ├── pip.completion.bash │ ├── pip3.completion.bash │ ├── pipenv.completion.bash │ ├── pipx.completion.bash │ ├── projects.completion.bash │ ├── rake.completion.bash │ ├── rustup.completion.bash │ ├── rvm.completion.bash │ ├── salt.completion.bash │ ├── sdkman.completion.bash │ ├── sqlmap.completion.bash │ ├── ssh.completion.bash │ ├── svn.completion.bash │ ├── system.completion.bash │ ├── terraform.completion.bash │ ├── test_kitchen.completion.bash │ ├── tmux.completion.bash │ ├── todo.completion.bash │ ├── travis.completion.bash │ ├── vagrant.completion.bash │ ├── vault.completion.bash │ ├── virsh.completion.bash │ ├── virtualbox.completion.bash │ ├── vuejs.completion.bash │ ├── wpscan.completion.bash │ └── yarn.completion.bash ├── custom/ │ └── example.bash ├── docs/ │ ├── Makefile │ ├── README.md │ ├── TODO_COMPOSURE_METADATA.md │ ├── _static/ │ │ └── .keep │ ├── _templates/ │ │ └── .keep │ ├── commands/ │ │ ├── doctor.rst │ │ ├── index.rst │ │ ├── profile.rst │ │ ├── reload.rst │ │ ├── search.rst │ │ └── update.rst │ ├── conf.py │ ├── contributing.rst │ ├── custom.rst │ ├── development.rst │ ├── help_screens.rst │ ├── index.rst │ ├── installation.rst │ ├── make.bat │ ├── misc.rst │ ├── plans/ │ │ ├── bash-it-issues-comprehensive-analysis.md │ │ ├── bash-it-quick-reference.md │ │ └── bash-it-roadmap-2025.md │ ├── proxy_support.rst │ ├── requirements.txt │ ├── test.rst │ ├── themes-list/ │ │ ├── atomic.rst │ │ ├── barbuk.rst │ │ ├── bira.rst │ │ ├── brainy.rst │ │ ├── codeword.rst │ │ ├── easy.rst │ │ ├── index.rst │ │ ├── inretio.rst │ │ ├── nwinkler_random_colors.rst │ │ ├── oh-my-posh.rst │ │ ├── powerline-base.rst │ │ ├── powerline-multiline.rst │ │ ├── powerline-naked.rst │ │ ├── powerline-plain.rst │ │ ├── powerline.rst │ │ ├── radek.rst │ │ └── redline.rst │ ├── themes.rst │ ├── troubleshooting.rst │ ├── uninstalling.rst │ └── vcs_user.rst ├── hooks/ │ ├── check-clean-files-txt.sh │ ├── dot-bash.sh │ └── dot-sh.sh ├── install.sh ├── lib/ │ ├── battery.bash │ ├── colors.bash │ ├── command_duration.bash │ ├── completion.bash │ ├── helpers.bash │ ├── history.bash │ ├── log.bash │ ├── preexec.bash │ ├── preview.bash │ ├── search.bash │ └── utilities.bash ├── lint_clean_files.sh ├── plugins/ │ └── available/ │ ├── alias-completion.plugin.bash │ ├── autojump.plugin.bash │ ├── aws.plugin.bash │ ├── base.plugin.bash │ ├── basher.plugin.bash │ ├── blesh.plugin.bash │ ├── boot2docker.plugin.bash │ ├── browser.plugin.bash │ ├── chruby-auto.plugin.bash │ ├── chruby.plugin.bash │ ├── cht-sh.plugin.bash │ ├── cmd-returned-notify.plugin.bash │ ├── colors.plugin.bash │ ├── direnv.plugin.bash │ ├── dirs.plugin.bash │ ├── docker-compose.plugin.bash │ ├── docker-machine.plugin.bash │ ├── docker.plugin.bash │ ├── edit-mode-emacs.plugin.bash │ ├── edit-mode-vi.plugin.bash │ ├── explain.plugin.bash │ ├── extract.plugin.bash │ ├── fasd.plugin.bash │ ├── fzf.plugin.bash │ ├── gif.plugin.bash │ ├── git-subrepo.plugin.bash │ ├── git.plugin.bash │ ├── gitstatus.plugin.bash │ ├── go.plugin.bash │ ├── goenv.plugin.bash │ ├── gradle.plugin.bash │ ├── hg.plugin.bash │ ├── history-eternal.plugin.bash │ ├── history-search.plugin.bash │ ├── history-substring-search.plugin.bash │ ├── history.plugin.bash │ ├── hub.plugin.bash │ ├── java.plugin.bash │ ├── javascript.plugin.bash │ ├── jekyll.plugin.bash │ ├── jenv.plugin.bash │ ├── jgitflow.plugin.bash │ ├── jump.plugin.bash │ ├── latex.plugin.bash │ ├── less-pretty-cat.plugin.bash │ ├── man.plugin.bash │ ├── nginx.plugin.bash │ ├── node.plugin.bash │ ├── nodenv.plugin.bash │ ├── nvm.plugin.bash │ ├── osx-timemachine.plugin.bash │ ├── osx.plugin.bash │ ├── pack.plugin.bash │ ├── percol.plugin.bash │ ├── pipsi.plugin.bash │ ├── plenv.plugin.bash │ ├── postgres.plugin.bash │ ├── powerline.plugin.bash │ ├── projects.plugin.bash │ ├── proxy.plugin.bash │ ├── pyenv.plugin.bash │ ├── python.plugin.bash │ ├── rails.plugin.bash │ ├── rbenv.plugin.bash │ ├── ruby.plugin.bash │ ├── rvm.plugin.bash │ ├── sdkman.plugin.bash │ ├── ssh.plugin.bash │ ├── sshagent.plugin.bash │ ├── subversion.plugin.bash │ ├── sudo.plugin.bash │ ├── textmate.plugin.bash │ ├── thefuck.plugin.bash │ ├── tmux.plugin.bash │ ├── tmuxinator.plugin.bash │ ├── todo.plugin.bash │ ├── url.plugin.bash │ ├── virtualenv.plugin.bash │ ├── xterm.plugin.bash │ ├── z_autoenv.plugin.bash │ └── zoxide.plugin.bash ├── profiles/ │ └── default.bash_it ├── scripts/ │ └── reloader.bash ├── template/ │ └── bashrc.template.bash ├── test/ │ ├── bash_it/ │ │ └── bash_it.bats │ ├── completion/ │ │ ├── aliases.completion.bats │ │ └── bash-it.completion.bats │ ├── fixtures/ │ │ ├── bash_it/ │ │ │ ├── aliases/ │ │ │ │ └── available/ │ │ │ │ ├── a.aliases.bash │ │ │ │ └── b.aliases.bash │ │ │ ├── plugins/ │ │ │ │ └── available/ │ │ │ │ └── c.plugin.bash │ │ │ └── profiles/ │ │ │ ├── test-bad-component.bash_it │ │ │ └── test-bad-type.bash_it │ │ ├── go/ │ │ │ ├── go path/ │ │ │ │ └── bin/ │ │ │ │ └── .keep │ │ │ ├── gopath/ │ │ │ │ └── bin/ │ │ │ │ └── .keep │ │ │ └── gopath2/ │ │ │ └── bin/ │ │ │ └── .keep │ │ ├── plugin/ │ │ │ └── xterm/ │ │ │ └── files/ │ │ │ ├── arg0 │ │ │ └── arg1 │ │ └── svn/ │ │ ├── broken/ │ │ │ ├── svn │ │ │ └── xcrun │ │ └── working/ │ │ ├── svn │ │ └── xcrun │ ├── install/ │ │ ├── install.bats │ │ └── uninstall.bats │ ├── lib/ │ │ ├── battery.bats │ │ ├── command_duration.bats │ │ ├── composure.bats │ │ ├── helpers.bats │ │ ├── log.bats │ │ ├── preexec.bats │ │ ├── search.bats │ │ └── utilities.bats │ ├── lint-requirements.txt │ ├── plugins/ │ │ ├── base.plugin.bats │ │ ├── cmd-returned-notify.plugin.bats │ │ ├── go.plugin.bats │ │ ├── ruby.plugin.bats │ │ └── xterm.plugin.bats │ ├── run │ ├── test_helper.bash │ └── themes/ │ ├── base.theme.bats │ ├── base.theme.git.bats │ └── base.theme.svn.bats ├── themes/ │ ├── 90210/ │ │ └── 90210.theme.bash │ ├── agnoster/ │ │ └── agnoster.theme.bash │ ├── atomic/ │ │ └── atomic.theme.bash │ ├── axin/ │ │ └── axin.theme.bash │ ├── bakke/ │ │ └── bakke.theme.bash │ ├── barbuk/ │ │ └── barbuk.theme.bash │ ├── base.theme.bash │ ├── binaryanomaly/ │ │ └── binaryanomaly.theme.bash │ ├── bira/ │ │ └── bira.theme.bash │ ├── bobby/ │ │ └── bobby.theme.bash │ ├── bobby-python/ │ │ └── bobby-python.theme.bash │ ├── brainy/ │ │ └── brainy.theme.bash │ ├── brunton/ │ │ └── brunton.theme.bash │ ├── candy/ │ │ └── candy.theme.bash │ ├── clean/ │ │ └── clean.theme.bash │ ├── codeword/ │ │ └── codeword.theme.bash │ ├── cooperkid/ │ │ └── cooperkid.theme.bash │ ├── cupcake/ │ │ └── cupcake.theme.bash │ ├── demula/ │ │ └── demula.theme.bash │ ├── dos/ │ │ └── dos.theme.bash │ ├── doubletime/ │ │ └── doubletime.theme.bash │ ├── doubletime_multiline/ │ │ └── doubletime_multiline.theme.bash │ ├── doubletime_multiline_pyonly/ │ │ └── doubletime_multiline_pyonly.theme.bash │ ├── dulcie/ │ │ └── dulcie.theme.bash │ ├── duru/ │ │ └── duru.theme.bash │ ├── easy/ │ │ └── easy.theme.bash │ ├── elixr/ │ │ └── elixr.theme.bash │ ├── emperor/ │ │ └── emperor.theme.bash │ ├── envy/ │ │ └── envy.theme.bash │ ├── essential/ │ │ └── essential.theme.bash │ ├── font/ │ │ └── font.theme.bash │ ├── gallifrey/ │ │ └── gallifrey.theme.bash │ ├── githelpers.theme.bash │ ├── gitline/ │ │ ├── gitline.theme.bash │ │ └── powerline.base.bash │ ├── hawaii50/ │ │ └── hawaii50.theme.bash │ ├── inretio/ │ │ └── inretio.theme.bash │ ├── iterate/ │ │ └── iterate.theme.bash │ ├── kitsune/ │ │ └── kitsune.theme.bash │ ├── lambda/ │ │ └── lambda.theme.bash │ ├── luan/ │ │ └── luan.theme.bash │ ├── mairan/ │ │ └── mairan.theme.bash │ ├── mbriggs/ │ │ └── mbriggs.theme.bash │ ├── metal/ │ │ └── metal.theme.bash │ ├── minimal/ │ │ └── minimal.theme.bash │ ├── modern/ │ │ └── modern.theme.bash │ ├── modern-t/ │ │ └── modern-t.theme.bash │ ├── modern-time/ │ │ └── modern-time.theme.bash │ ├── morris/ │ │ └── morris.theme.bash │ ├── n0qorg/ │ │ └── n0qorg.theme.bash │ ├── newin/ │ │ └── newin.theme.bash │ ├── norbu/ │ │ └── norbu.theme.bash │ ├── nwinkler/ │ │ └── nwinkler.theme.bash │ ├── nwinkler_random_colors/ │ │ └── nwinkler_random_colors.theme.bash │ ├── oh-my-posh/ │ │ └── oh-my-posh.theme.bash │ ├── p4helpers.theme.bash │ ├── parrot/ │ │ └── parrot.theme.bash │ ├── pete/ │ │ └── pete.theme.bash │ ├── powerline/ │ │ ├── powerline.base.bash │ │ └── powerline.theme.bash │ ├── powerline-multiline/ │ │ ├── powerline-multiline.base.bash │ │ └── powerline-multiline.theme.bash │ ├── powerline-naked/ │ │ ├── powerline-naked.base.bash │ │ └── powerline-naked.theme.bash │ ├── powerline-plain/ │ │ ├── powerline-plain.base.bash │ │ └── powerline-plain.theme.bash │ ├── powerturk/ │ │ └── powerturk.theme.bash │ ├── primer/ │ │ └── primer.theme.bash │ ├── pro/ │ │ └── pro.theme.bash │ ├── pure/ │ │ └── pure.theme.bash │ ├── purity/ │ │ └── purity.theme.bash │ ├── radek/ │ │ └── radek.theme.bash │ ├── rainbowbrite/ │ │ └── rainbowbrite.theme.bash │ ├── ramses/ │ │ └── ramses.theme.bash │ ├── rana/ │ │ └── rana.theme.bash │ ├── redline/ │ │ └── redline.theme.bash │ ├── rjorgenson/ │ │ └── rjorgenson.theme.bash │ ├── robbyrussell/ │ │ └── robbyrussell.theme.bash │ ├── roderik/ │ │ └── roderik.theme.bash │ ├── sexy/ │ │ └── sexy.theme.bash │ ├── simple/ │ │ └── simple.theme.bash │ ├── sirup/ │ │ └── sirup.theme.bash │ ├── slick/ │ │ └── slick.theme.bash │ ├── standard/ │ │ └── standard.theme.bash │ ├── tonka/ │ │ └── tonka.theme.bash │ ├── tonotdo/ │ │ └── tonotdo.theme.bash │ ├── tylenol/ │ │ └── tylenol.theme.bash │ ├── wanelo/ │ │ └── wanelo.theme.bash │ ├── zitron/ │ │ └── zitron.theme.bash │ └── zork/ │ └── zork.theme.bash ├── uninstall.sh └── vendor/ ├── .gitattributes └── github.com/ ├── django/ │ └── django/ │ ├── AUTHORS │ ├── LICENSE │ ├── LICENSE.python │ └── extras/ │ ├── Makefile │ ├── README.TXT │ └── django_bash_completion ├── dsifford/ │ └── yarn-completion/ │ └── yarn ├── erichs/ │ └── composure/ │ ├── .gitignore │ ├── .travis.yml │ ├── History.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── c_extras.sh │ ├── composure.plugin.zsh │ ├── composure.sh │ └── test/ │ ├── Makefile │ ├── runshellcheck.sh │ └── wvtestrun ├── gaelicWizard/ │ └── bash-progcomp/ │ ├── .editorconfig │ ├── LICENSE │ ├── defaults.completion.bash │ └── defaults.completion.bats ├── ohmyzsh/ │ └── ohmyzsh/ │ ├── LICENSE.txt │ └── plugins/ │ └── git/ │ ├── README.md │ └── git.plugin.zsh ├── rcaloras/ │ └── bash-preexec/ │ ├── .github/ │ │ └── workflows/ │ │ └── bats.yaml │ ├── LICENSE.md │ ├── README.md │ ├── bash-preexec.sh │ └── test/ │ ├── README.md │ ├── bash-preexec.bats │ └── include-test.bats ├── rparree/ │ └── jboss-bash-completion/ │ ├── LICENSE │ ├── README.md │ ├── jboss5 │ └── jboss7 └── vigo/ └── apm-bash-completion/ ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md └── apm ================================================ FILE CONTENTS ================================================ ================================================ FILE: .ackrc ================================================ --ignore-dir=enabled/ ================================================ FILE: .editorconfig ================================================ # EditorConfig is awesome: http://EditorConfig.org [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [**.{md,rst}] trim_trailing_whitespace = false [.git*] indent_size = tab indent_style = tab [{**.*sh,test/run,**.bats}] indent_size = tab indent_style = tab shell_variant = bash binary_next_line = true # like -bn switch_case_indent = true # like -ci space_redirects = true # like -sr keep_padding = false # like -kp end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [**.bats] indent_size = tab indent_style = tab shell_variant = bats ================================================ FILE: .git-blame-ignore-revs ================================================ # Ignore shfmt related commits 003b0ce802c10ab6e161d7ba5a7d9b6722312cc5 7c2c2a5525557cbfee98e73de921fd7f7e6811a1 d37505b636ca7bc95301d8daaf9c58a3186ce57a d7695d5456b980190b6d1c4a4715b13d1b63c332 ================================================ FILE: .gitattributes ================================================ *.sh text eol=lf *.bash text eol=lf *.bats text eol=lf # Docs allow trailing whitespaces *.md whitespace=-blank-at-eol *.rst whitespace=-blank-at-eol # Windows files *.bat text eol=crlf ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yml ================================================ name: 🐛 Bug report title: "[Bug]: " description: Create a bug report to help us improve labels: "bug:general" body: - type: textarea attributes: label: Expected behavior description: Tell us what should happen. validations: required: true - type: textarea attributes: label: Current behavior description: Tell us what happens instead of the expected behavior. validations: required: true - type: textarea attributes: label: Possible solution description: Tell us how it could be fixed at your glance. validations: required: false - type: textarea attributes: label: Context description: > How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. validations: required: false - type: textarea attributes: label: Steps to reproduce description: > Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant. validations: required: true - type: textarea attributes: label: "Diagnostic Information" description: > **Please run `bash-it doctor` and paste the complete output below.** This single command provides all the diagnostic information we need including: bash-it version, enabled components, bash version, OS version, and configuration. placeholder: "Run: bash-it doctor" value: | ``` # Paste the output of: bash-it doctor ``` validations: required: true - type: textarea attributes: label: "Additional Context (Optional)" description: > Any additional information that might help diagnose the issue. This could include specific error messages, relevant parts of your ~/.bashrc, or other configuration details not captured by `bash-it doctor`. placeholder: "Paste any additional relevant information here" validations: required: false - type: textarea attributes: label: Notes description: > Provide any extra details here. ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: true contact_links: - name: Libera chat url: https://web.libera.chat/?channel=#bash-it about: You can ask and answer questions here ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.yml ================================================ name: 💡 Feature request title: "[Feature]: " description: Suggest an idea for this project labels: "feature request" body: - type: textarea attributes: label: Expected behavior description: Tell us how your feature should work. validations: required: true - type: textarea attributes: label: Current behavior description: Explain the difference your feature will have from current behavior. validations: required: true - type: textarea attributes: label: Possible solution description: Tell us how it could be fixed at your glance. validations: required: false - type: textarea attributes: label: Context description: > How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. - type: textarea attributes: label: Notes description: > Provide any extra details here. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ ## Description ## Motivation and Context ## How Has This Been Tested? ## Screenshots (if appropriate): ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: - [ ] My code follows the code style of this project. - [ ] If my change requires a change to the documentation, I have updated the documentation accordingly. - [ ] I have read the **CONTRIBUTING** document. - [ ] If I have added a new file, I also added it to ``clean_files.txt`` and formatted it using ``lint_clean_files.sh``. - [ ] I have added tests to cover my changes, and all the new and existing tests pass. ================================================ FILE: .github/no-response.yml ================================================ # Configuration for probot-no-response - https://github.com/probot/no-response # Number of days of inactivity before an Issue is closed for lack of response daysUntilClose: 14 # Label requiring a response responseRequiredLabel: waiting-for-response # Comment to post when closing an Issue for lack of response. Set to `false` to disable closeComment: > This issue has been automatically closed because there has been no response to our request for more information from the original author. You can always reopen the issue if needed. ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI # Triggers the workflow on push or pull request events on: [push, pull_request] jobs: bats-test: strategy: matrix: os: [ubuntu-24.04, macos-14] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Install greadlink if: startsWith(runner.os, 'macOS') run: brew install coreutils - name: Install parallel if: startsWith(runner.os, 'macOS') run: brew install parallel - name: Test code run: test/run build-docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.8 - name: Install docs dependencies run: python3 -m pip install -r docs/requirements.txt - name: Build the docs run: sphinx-build -W -b html docs docs/_build/html lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v4 with: go-version: 1.21.0 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.8 - name: Install shfmt run: go install mvdan.cc/sh/v3/cmd/shfmt@latest - name: Install shellcheck env: scversion: stable # Or latest, vxx, etc run: | wget -qO- "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv "shellcheck-${scversion}/shellcheck" sudo cp "shellcheck-${scversion}/shellcheck" /usr/bin/ shellcheck --version - name: Install pre-commit run: python3 -m pip install -r test/lint-requirements.txt - name: Run lint run: ./lint_clean_files.sh lint-differential: runs-on: ubuntu-latest permissions: security-events: write steps: - name: Repository checkout uses: actions/checkout@v4 with: fetch-depth: 0 - id: ShellCheck name: Differential ShellCheck uses: redhat-plumbers-in-action/differential-shellcheck@v5 with: token: ${{ secrets.GITHUB_TOKEN }} ================================================ FILE: .gitignore ================================================ .atom-build.json */enabled/* .DS_Store custom/* !custom/example.bash .rvmrc aliases/custom.aliases.bash completion/custom.completion.bash lib/custom.bash plugins/custom.plugins.bash *.swp .*.un~ bats .idea *.sublime-workspace *.sublime-project enabled/* /enabled tmp/ # Do not save profiles profiles/* # apart from the default one !profiles/default.bash_it /vendor/github.com/nojhan/liquidprompt .trunk/ ================================================ FILE: .gitmodules ================================================ [submodule "test_lib/bats-core"] path = test_lib/bats-core url = https://github.com/bats-core/bats-core branch = tags/v1.11.1 [submodule "test_lib/bats-support"] path = test_lib/bats-support url = https://github.com/bats-core/bats-support branch = master #branch = tags/v0.3.0 [submodule "test_lib/bats-assert"] path = test_lib/bats-assert url = https://github.com/bats-core/bats-assert branch = tags/v2.1.0 [submodule "test_lib/bats-file"] path = test_lib/bats-file url = https://github.com/bats-core/bats-file branch = master ================================================ FILE: .pre-commit-config.yaml ================================================ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks --- # fail_fast: true minimum_pre_commit_version: 1.18.1 exclude: "docs/_build/|vendor/" repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.3.0 hooks: - id: trailing-whitespace exclude: ".(md|rst)$" - id: end-of-file-fixer - id: check-merge-conflict - id: mixed-line-ending - id: check-added-large-files - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 2.1.5 hooks: - id: git-check # Configure in .gitattributes - id: shellcheck files: "\\.(bash)$" - id: shfmt - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.1.7 hooks: # - id: forbid-crlf - id: remove-crlf exclude: ".bat$" - repo: local hooks: - id: dot-sh name: Check .sh files against bash-it requirements entry: ./hooks/dot-sh.sh language: system files: "\\.sh$" types: [file] - id: dot-bash name: Check .bash files against bash-it requirements entry: ./hooks/dot-bash.sh language: system files: "\\.bash$" types: [file] - id: clean-files-txt name: Check that clean_files.txt is sorted alphabetically. entry: ./hooks/check-clean-files-txt.sh language: system files: clean_files.txt ================================================ FILE: .readthedocs.yml ================================================ version: 2 sphinx: builder: htmldir configuration: docs/conf.py python: version: 3.7 install: - requirements: docs/requirements.txt ================================================ FILE: CLAUDE.md ================================================ # CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview Bash-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. ## Architecture ### Core Components - **bash_it.sh**: Main entry point that initializes the framework - **lib/**: Core libraries providing utilities, logging, helpers, and appearance functions - **scripts/reloader.bash**: Component loader that sources enabled components - **install.sh**: Installation script with interactive and silent modes - **enabled/**: Symlinks to active components from available/ directories ### Component Types 1. **Aliases** (`aliases/available/`): Command shortcuts and convenience functions 2. **Plugins** (`plugins/available/`): Extended functionality and integrations 3. **Completions** (`completion/available/`): Tab completion definitions 4. **Themes** (`themes/`): Prompt customizations and visual styles ### Loading Order 1. Libraries (except appearance) 2. Global enabled directory 3. Enabled aliases, plugins, completions 4. Theme files (if BASH_IT_THEME is set) 5. Custom files from BASH_IT_CUSTOM directory ## Development Commands ### Testing ```bash # Run all tests using BATS (Bash Automated Testing System) test/run # Run specific test suites test/run test/bash_it test/completion test/plugins # Tests require git submodules to be initialized git submodule init && git submodule update ``` ### Linting and Code Quality The project uses a gradual pre-commit system implementation via `clean_files.txt` allow-list: ```bash # Run pre-commit hooks only on allow-listed clean files ./lint_clean_files.sh # Run pre-commit hooks on all files (for testing new coverage) pre-commit run --all-files # Manual shellcheck on bash files shellcheck **/*.bash # Format shell scripts shfmt -w **/*.bash ``` **Gradual Linting System**: - `clean_files.txt`: Allow-list of files/directories that pass all linting rules - `lint_clean_files.sh`: Runs pre-commit hooks only on allow-listed files - When modifying files NOT in `clean_files.txt`, ensure they pass linting before adding them to the allow-list - Before creating a PR, add newly cleaned files to `clean_files.txt` to expand coverage - This system allows gradual improvement of code quality across the large codebase **Vendor Directory Policy**: - Files in `vendor/` are treated as immutable external dependencies - Pre-commit hooks exclude vendor files via `.pre-commit-config.yaml` global exclude pattern - `clean_files.txt` does not include vendor shell scripts, only `.gitattributes` - CI and local linting will skip vendor files entirely ### Component Management ```bash # Enable/disable components bash-it enable alias git bash-it enable plugin history bash-it enable completion docker # Show available components bash-it show aliases bash-it show plugins bash-it show completions # Search components bash-it search docker ``` ## Key Configuration ### Environment Variables - `BASH_IT`: Base directory path - `BASH_IT_THEME`: Active theme name - `BASH_IT_CUSTOM`: Custom components directory - `BASH_IT_LOG_PREFIX`: Logging prefix for debug output ### File Structure Conventions - Available components: `{type}/available/{name}.{type}.bash` - Enabled components: `{type}/enabled/{name}.{type}.bash` (symlinks) - Custom components: `custom/{name}.bash` - Themes: `themes/{name}/` ## Development Guidelines ### Git Workflow - **NEVER commit directly to master branch** - Master should always stay in sync with `origin/master` - Always create a feature branch for new work: `git checkout -b feature/feature-name` - Keep feature branches focused on a single issue/feature - Create separate branches for separate features - Push feature branches with upstream tracking: `git push -u fork feature-branch-name` - This allows manual pushes later with just `git push` - Use `--force-with-lease` for rebased branches ### Component Development - Use composure metadata: `about`, `group`, `author`, `example` - Follow naming convention: `{name}.{type}.bash` - Test components before submitting - Components should be modular and not conflict with others ### Testing Components - Each component type has dedicated test files in `test/` - Use BATS framework for shell script testing - Test files follow pattern: `{component}.bats` ### Code Standards - Use shellcheck for linting - Follow existing code style in the repository - Add appropriate metadata using composure functions - Components should handle missing dependencies gracefully - **Prefix sensitive commands with `command`** to bypass user aliases: - `command mv` instead of `mv` (users may have `alias mv='mv -i'`) - `command grep` instead of `grep` (users may have custom grep flags) - `command rm` instead of `rm` (users may have `alias rm='rm -i'`) - Apply to any command that could be aliased and break core functionality - This prevents surprises from user's alias configurations in bash-it core functions - **Use parameter expansion with default for potentially unset variables**: - `${VARIABLE-}` instead of `$VARIABLE` when variable may be unset - Prevents errors when `set -u` is active in user's shell - Examples: `${BASH_VERSION-}`, `${HOME-}`, `${PATH-}` - Critical for variables checked in conditionals: `if [ -n "${BASH_VERSION-}" ]` - This defensive practice ensures scripts work regardless of user's shell options ## Project Planning & Roadmaps Strategic planning documents are maintained in `docs/plans/`: - **[Quick Reference](docs/plans/bash-it-quick-reference.md)** - TL;DR summary of current issues and action items - **[Comprehensive Issue Analysis](docs/plans/bash-it-issues-comprehensive-analysis.md)** - Detailed breakdown of all open issues with categorization and recommendations - **[2025 Roadmap](docs/plans/bash-it-roadmap-2025.md)** - 6-month technical debt reduction plan with phases and success metrics These documents guide ongoing maintenance, issue triage, and code quality improvements. ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2020-2021 Bash-it Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: aliases/available/ag.aliases.bash ================================================ # shellcheck shell=bash about-alias 'the silver searcher (ag) aliases' url "https://geoff.greer.fm/ag/" ## Summary for args to less: # less(1) # -M (-M or --LONG-PROMPT) Prompt very verbosely # -I (-I or --IGNORE-CASE) Searches with '/' ignore case # -R (-R or --RAW-CONTROL-CHARS) For handling ANSI colors # -F (-F or --quit-if-one-screen) Auto exit if <1 screen # -X (-X or --no-init) Disable termcap init & deinit alias ag='ag --smart-case --pager="less -MIRFX"' ================================================ FILE: aliases/available/ansible.aliases.bash ================================================ # shellcheck shell=bash about-alias 'ansible abbreviations' url "https://docs.ansible.com/" alias ans=ansible alias ap=ansible-playbook ================================================ FILE: aliases/available/apt.aliases.bash ================================================ # shellcheck shell=bash # # -binaryanomaly cite 'about-alias' about-alias 'Apt and dpkg aliases for Ubuntu and Debian distros.' url "https://wiki.debian.org/Apt" # set apt aliases function _set_pkg_aliases() { if _command_exists apt; then alias apts='apt-cache search' alias aptshow='apt-cache show' alias aptinst='sudo apt-get install -V' alias aptupd='sudo apt-get update' alias aptupg='sudo apt-get dist-upgrade -V && sudo apt-get autoremove' alias aptupgd='sudo apt-get update && sudo apt-get dist-upgrade -V && sudo apt-get autoremove' alias aptrm='sudo apt-get remove' alias aptpurge='sudo apt-get remove --purge' alias chkup='/usr/lib/update-notifier/apt-check -p --human-readable' alias chkboot='cat /var/run/reboot-required' alias pkgfiles='dpkg --listfiles' fi } _set_pkg_aliases ================================================ FILE: aliases/available/atom.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Atom.io editor abbreviations' url "https://atom-editor.cc/" alias a='atom' alias ah='atom .' alias apmup='apm update --no-confirm' alias apmi='apm install' ================================================ FILE: aliases/available/bash-it.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Aliases for the bash-it command (these aliases are automatically included with the "general" aliases)' url "https://github.com/Bash-it/bash-it" # Common misspellings of bash-it alias shit='bash-it' alias batshit='bash-it' alias bashit='bash-it' alias batbsh='bash-it' alias babsh='bash-it' alias bash_it='bash-it' alias bash_ti='bash-it' # Additional bash-it aliases for help/show alias bshsa='bash-it show aliases' alias bshsc='bash-it show completions' alias bshsp='bash-it show plugins' alias bshha='bash-it help aliases' alias bshhc='bash-it help completions' alias bshhp='bash-it help plugins' alias bshsch="bash-it search" alias bshenp="bash-it enable plugin" alias bshena="bash-it enable alias" alias bshenc="bash-it enable completion" ================================================ FILE: aliases/available/bolt.aliases.bash ================================================ # shellcheck shell=bash about-alias 'puppet bolt aliases' url "https://www.puppet.com/docs/bolt/" # Aliases alias bolt='bolt command run --tty --no-host-key-check' alias boltas='bolt -p -u' alias sudobolt='bolt --run-as root --sudo-password' alias sudoboltas='sudobolt -p -u' ================================================ FILE: aliases/available/bundler.aliases.bash ================================================ # shellcheck shell=bash about-alias 'ruby bundler' url "https://bundler.io/" # Bundler Commands alias be='bundle exec' alias bi='bundle install' alias bl='bundle list' alias bu='bundle update' alias bp='bundle package' ================================================ FILE: aliases/available/clipboard.aliases.bash ================================================ # shellcheck shell=bash about-alias 'xclip shortcuts' url "https://github.com/astrand/xclip" alias pbcopy="xclip -selection clipboard" alias pbpaste="xclip -selection clipboard -o" alias xcpy="xclip -selection clipboard" alias xpst="xclip -selection clipboard -o" # to use it just install xclip on your distribution and it would work like: # $ echo "hello" | xcpy # $ xpst # hello # very useful for things like: # cat ~/.ssh/id_rsa.pub | xcpy # have fun! ================================================ FILE: aliases/available/composer.aliases.bash ================================================ # shellcheck shell=bash about-alias 'common composer abbreviations' url "https://getcomposer.org/" # Aliases alias coab='composer about' alias coar='composer archive' alias cob='composer browser' alias cocpr='composer check-platform-reqs' alias cocc='composer clear-cache' alias cocfg='composer config' alias cocp='composer create-project' alias codp='composer depends' alias codiag='composer diagnose' alias codmp='composer dump-autoload' alias coex='composer exec' alias coglob='composer global' alias coh='composer help' alias cohome='composer home' alias coi='composer install' alias coinf='composer info' alias coini='composer init' alias coli='composer license' alias colis='composer list' alias coout='composer outdated' alias cop='composer prohibits' alias corem='composer remove' alias coreq='composer require' alias coreqd='composer require --dev' alias cors='composer run-script' alias cos='composer search' alias cosu='composer self-update' alias coshow='composer show' alias costat='composer status' alias cosugg='composer suggest' alias coup='composer update' alias coupg='composer upgrade' alias coval='composer validate' alias cowhy='composer why' alias cowhyn='composer why-not' ================================================ FILE: aliases/available/curl.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Curl aliases for convenience.' url "https://curl.se/" # set apt aliases function _set_pkg_aliases() { if _command_exists curl; then # follow redirects alias cl='curl -L' # follow redirects, download as original name alias clo='curl -L -O' # follow redirects, download as original name, continue alias cloc='curl -L -C - -O' # follow redirects, download as original name, continue, retry 5 times alias clocr='curl -L -C - -O --retry 5' # follow redirects, fetch banner alias clb='curl -L -I' # see only response headers from a get request alias clhead='curl -D - -so /dev/null' fi } _set_pkg_aliases ================================================ FILE: aliases/available/directory.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Shortcuts for directory commands: ls, cd, &c.' url "https://github.com/Bash-it/bash-it" if command ls --color -d . &> /dev/null; then alias ls='ls --color=auto' # BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set. fi # List directory contents alias sl=ls alias la='ls -AF' # Compact view, show hidden alias ll='ls -Al' alias l='ls -A' alias l1='ls -1' alias lf='ls -F' # Change directory alias ..='cd ..' # Go up one directory alias cd..='cd ..' # Common misspelling for going up one directory alias ...='cd ../..' # Go up two directories alias ....='cd ../../..' # Go up three directories alias -- -='cd -' # Go back # Create or remove directory alias md='mkdir -p' alias rd='rmdir' ================================================ FILE: aliases/available/dnf.aliases.bash ================================================ # shellcheck shell=bash about-alias 'dnf aliases for fedora 22+ distros' url "https://dnf.readthedocs.io/" if _command_exists dnf; then alias dnfp="dnf info" # Show package information alias dnfl="dnf list" # List packages alias dnfli="dnf list installed" # List installed packages alias dnfgl="dnf grouplist" # List package groups alias dnfmc="dnf makecache" # Generate metadata cache alias dnfs="dnf search" # Search package alias dnfi="sudo dnf install" # Install package alias dnfr="sudo dnf remove" # Remove package alias dnfu="sudo dnf upgrade" # Upgrade package alias dnfc="sudo dnf clean all" # Clean cache alias dnfri="sudo dnf reinstall" # Reinstall package alias dnfgi="sudo dnf groupinstall" # Install package group alias dnfgr="sudo dnf groupremove" # Remove package group fi ================================================ FILE: aliases/available/docker-compose.aliases.bash ================================================ # shellcheck shell=bash about-alias 'docker-compose abbreviations' url "https://docs.docker.com/compose/" alias dco="docker-compose" # Defined in the `docker-compose` plugin, please check there for details. alias dcofresh="docker-compose-fresh" alias dcol="docker-compose logs -f --tail 100" alias dcou="docker-compose up" alias dcouns="dcou --no-start" ================================================ FILE: aliases/available/docker.aliases.bash ================================================ # shellcheck shell=bash about-alias 'docker abbreviations' url "https://docs.docker.com/" alias dk='docker' alias dklc='docker ps -l' # List last Docker container alias dklcid='docker ps -l -q' # List last Docker container ID alias dklcip='docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -l -q)' # Get IP of last Docker container alias dkps='docker ps' # List running Docker containers alias dkpsa='docker ps -a' # List all Docker containers alias dki='docker images' # List Docker images alias dkrmac='docker rm $(docker ps -a -q)' # Delete all Docker containers case $OSTYPE in darwin* | *bsd* | *BSD*) alias dkrmui='docker images -q -f dangling=true | xargs docker rmi' # Delete all untagged Docker images ;; *) alias dkrmui='docker images -q -f dangling=true | xargs -r docker rmi' # Delete all untagged Docker images ;; esac if _bash-it-component-item-is-enabled plugin docker; then # Function aliases from docker plugin: alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container alias dkrmall='docker-remove-stale-assets' # Delete all untagged images and exited containers alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image alias dkrmi='docker-remove-images' # Delete images for supplied IDs or all if no IDs are passed as arguments alias dkideps='docker-image-dependencies' # Output a graph of image dependencies using Graphiz alias dkre='docker-runtime-environment' # List environmental variables of the supplied image ID fi alias dkelc='docker exec -it $(dklcid) bash --login' # Enter last container (works with Docker 1.3 and above) alias dkrmflast='docker rm -f $(dklcid)' alias dkbash='dkelc' alias dkex='docker exec -it ' # Useful to run any commands into container without leaving host alias dkri='docker run --rm -i ' alias dkric='docker run --rm -i -v $PWD:/cwd -w /cwd ' alias dkrit='docker run --rm -it ' alias dkritc='docker run --rm -it -v $PWD:/cwd -w /cwd ' # Added more recent cleanup options from newer docker versions alias dkip='docker image prune -a -f' alias dkvp='docker volume prune -f' alias dksp='docker system prune -a -f' ================================================ FILE: aliases/available/editor.aliases.bash ================================================ # shellcheck shell=bash about-alias 'shortcuts for editing' url "https://github.com/Bash-it/bash-it" alias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}' alias e='edit' # sudo editors alias svim='sudo ${VISUAL:-vim}' alias snano='sudo ${ALTERNATE_EDITOR:-nano}' alias sedit='sudo ${EDITOR:-${ALTERNATE_EDITOR:-nano}}' # Shortcuts to edit startup files alias vbrc='${VISUAL:-vim} ~/.bashrc' alias vbpf='${VISUAL:-vim} ~/.bash_profile' ================================================ FILE: aliases/available/emacs.aliases.bash ================================================ # shellcheck shell=bash about-alias 'emacs editor' url "https://www.gnu.org/software/emacs/" case $OSTYPE in linux*) alias em='emacs' alias en='emacs -nw' alias e='emacsclient -n' alias et='emacsclient -t' alias ed='emacs --daemon' alias E='SUDO_EDITOR=emacsclient sudo -e' ;; darwin*) alias em='open -a emacs' ;; esac ================================================ FILE: aliases/available/fuck.aliases.bash ================================================ # shellcheck shell=bash about-alias 'fuck/please to retry last command with sudo' url "https://github.com/Bash-it/bash-it" # Play nicely with 'thefuck' plugin if ! _command_exists fuck; then alias fuck='sudo $(fc -ln -1)' fi alias please=fuck alias plz=please alias fucking=sudo ================================================ FILE: aliases/available/general.aliases.bash ================================================ # shellcheck shell=bash # shellcheck source-path=SCRIPTDIR about-alias 'general aliases' url "https://github.com/Bash-it/bash-it" if command ls --color -d . &> /dev/null; then alias ls='ls --color=auto' # BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set. fi # List directory contents alias sl=ls alias la='ls -AF' # Compact view, show hidden alias ll='ls -Al' alias l='ls -A' alias l1='ls -1' alias lf='ls -F' alias _='sudo' # colored grep # Need to check an existing file for a pattern that will be found to ensure # that the check works when on an OS that supports the color option if command grep --color=auto "a" "${BASH_IT?}"/*.md &> /dev/null; then alias grep='grep --color=auto' fi if _command_exists gshuf; then alias shuf=gshuf fi alias c='clear' alias cls='clear' alias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}' alias pager='${PAGER:=less}' alias q='exit' alias irc='${IRC_CLIENT:-irc}' # Language aliases alias rb='ruby' alias py='python' alias ipy='ipython' # Pianobar can be found here: http://github.com/PromyLOPh/pianobar/ if _command_exists pianobar; then alias piano='pianobar' fi alias ..='cd ..' # Go up one directory alias cd..='cd ..' # Common misspelling for going up one directory alias ...='cd ../..' # Go up two directories alias ....='cd ../../..' # Go up three directories alias -- -='cd -' # Go back alias dow='cd $HOME/Downloads' # Go to the Downloads directory # Shell History alias h='history' # Tree if ! _command_exists tree; then alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" fi # Directory alias md='mkdir -p' alias rd='rmdir' # Remove alias rmrf='rm -rf' # Shorten extract _command_exists 'extract' \ && alias xt='extract' # sudo editors alias svim='sudo "${VISUAL:-vim}"' alias snano='sudo "${ALTERNATE_EDITOR:-nano}"' # Display whatever file is regular file or folder function catt() { for i in "$@"; do if [[ -d "$i" ]]; then ls "$i" else cat "$i" fi done } # The Bash-it aliases were moved to the `bash-it.aliases.bash` file. The intent of this # is to keep the script readable and less bloated. If you don't need to use # the `general` aliases, but you want the Bash-it aliases, you can disable the `general` # aliases and enable just the ones for Bash-it explicitly: # bash-it disable alias general # bash-it enable alias bash-it source "$BASH_IT/aliases/available/bash-it.aliases.bash" source "$BASH_IT/aliases/available/directory.aliases.bash" source "$BASH_IT/aliases/available/editor.aliases.bash" ================================================ FILE: aliases/available/git-omz.aliases.bash ================================================ # shellcheck shell=bash cite 'about-alias' about-alias 'git aliases from oh-my-zsh (incompatible with regular git aliases option)' url "https://git-scm.com/" if _bash-it-component-item-is-enabled aliases git; then _log_warning "git-omz aliases are incompatible with regular git aliases" return 1 fi # Load after regular git aliases # BASH_IT_LOAD_PRIORITY: 160 # Setup git version read -ra git_version_arr <<< "$(git version 2> /dev/null)" # shellcheck disable=SC2034 git_version="${git_version_arr[2]}" # Setup is-at-least function is-at-least { local expected_version=$1 local actual_version=$2 local versions printf -v versions '%s\n%s' "$expected_version" "$actual_version" [[ $versions = "$(sort -V <<< "$versions")" ]] } # Setup git_current_branch function git_current_branch { _git-branch } # shellcheck disable=SC1090 source "${BASH_IT}"/vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/git.plugin.zsh ================================================ FILE: aliases/available/git.aliases.bash ================================================ # shellcheck shell=bash about-alias 'common git abbreviations' url "https://git-scm.com/" # We can use this variable to make sure that we don't accidentally clash with git-zsh aliases if _bash-it-component-item-is-enabled aliases git-omz; then _log_warning "The aliases from 'git' and from 'git-omz' conflict with each other; please only enable one." return 1 fi alias g='git' alias get='git' alias got='git' # add alias ga='git add' alias gall='git add -A' alias gap='git add -p' alias gav='git add -v' # branch alias gb='git branch' alias gba='git branch --all' alias gbd='git branch -d' alias gbD='git branch -D' alias gbl='git branch --list' alias gbla='git branch --list --all' alias gblr='git branch --list --remotes' alias gbm='git branch --move' alias gbr='git branch --remotes' alias gbt='git branch --track' # for-each-ref alias 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 # commit alias gc='git commit -v' alias gca='git commit -v -a' alias gcaa='git commit -a --amend -C HEAD' # Add uncommitted and unstaged changes to the last commit alias gcam='git commit -v -am' alias gcamd='git commit --amend' alias gc!='git commit -v --amend' alias gca!='git commit -v -a --amend' alias gcn!='git commit -v --amend --no-edit' alias gcm='git commit -v -m' alias gci='git commit --interactive' alias gcsam='git commit -S -am' # checkout alias gcb='git checkout -b' alias gco='git checkout' alias gcob='git checkout -b' alias gcobu='git checkout -b ${USER}/' alias gcom='git checkout $(get_default_branch)' alias gcpd='git checkout $(get_default_branch); git pull; git branch -D' alias gct='git checkout --track' # clone alias gcl='git clone' # clean alias gclean='git clean -fd' # cherry-pick alias gcp='git cherry-pick' alias gcpx='git cherry-pick -x' # diff alias gd='git diff' alias gds='git diff --staged' alias gdt='git difftool' # archive alias gexport='git archive --format zip --output' # fetch alias gf='git fetch --all --prune' alias gft='git fetch --all --prune --tags' alias gftv='git fetch --all --prune --tags --verbose' alias gfv='git fetch --all --prune --verbose' alias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/$(get_default_branch)' alias gup='git fetch && git rebase' # log alias 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' alias ggf='git log --graph --date=short --pretty=format:'\''%C(auto)%h %Cgreen%an%Creset %Cblue%cd%Creset %C(auto)%d %s'\''' alias ggs='gg --stat' alias 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 alias gll='git log --graph --pretty=oneline --abbrev-commit' alias gnew='git log HEAD@{1}..HEAD@{0}' # Show commits since last pull, see http://blogs.atlassian.com/2014/10/advanced-git-aliases/ alias gwc='git whatchanged' alias ghist='git log --pretty=format:'\''%h %ad | %s%d [%an]'\'' --graph --date=short' # Use it to be fast and without color. alias 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. # ls-files alias gu='git ls-files . --exclude-standard --others' # Show untracked files alias glsut='gu' alias glsum='git diff --name-only --diff-filter=U' # Show unmerged (conflicted) files # gui alias ggui='git gui' # home alias ghm='cd "$(git rev-parse --show-toplevel)"' # Git home # appendage to ghm if ! _command_exists gh; then alias gh='ghm' fi # merge alias gm='git merge' alias gma='git merge --abort' alias gmc='git merge --continue' alias gms='git merge --squash' alias gmt='git mergetool' # mv alias gmv='git mv' # patch alias gpatch='git format-patch -1' # push alias gp='git push' alias gpd='git push --delete' alias gpf='git push --force-with-lease' alias gpff='git push --force' alias gpo='git push origin HEAD' alias gpom='git push origin $(get_default_branch)' alias gpu='git push --set-upstream' alias gpunch='git push --force-with-lease' alias gpuo='git push --set-upstream origin' alias gpuoc='git push --set-upstream origin $(git symbolic-ref --short HEAD)' # pull alias gl='git pull' alias glp='git pull --prune' alias glum='git pull upstream $(get_default_branch)' alias gpl='git pull' alias gpp='git pull && git push' alias gpr='git pull --rebase' # remote alias gr='git remote' alias gra='git remote add' alias grv='git remote -v' # rm alias grm='git rm' alias 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. # rebase alias grb='git rebase' alias grba='git rebase --abort' alias grbc='git rebase --continue' alias grbm='git rebase $(get_default_branch)' alias grbmi='git rebase $(get_default_branch) --interactive' alias grbma='GIT_SEQUENCE_EDITOR=: git rebase $(get_default_branch) --interactive --autosquash' alias 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 # reset alias gus='git reset HEAD' # read as: 'git unstage' alias grh='git reset' # equivalent to: git reset HEAD alias grh!='git reset --hard' alias gpristine='git reset --hard && git clean -dfx' # status alias gs='git status' alias gss='git status -s' # shortlog alias gcount='git shortlog -sn' alias gsl='git shortlog -sn' # show alias gsh='git show' alias gshn='git show --name-only' alias gshns='git show --name-status' # svn alias gsd='git svn dcommit' alias gsr='git svn rebase' # Git SVN # stash alias gst='git stash' alias gstb='git stash branch' alias gstd='git stash drop' alias gstl='git stash list' alias gstp='git stash pop' # kept due to long-standing usage alias gstpo='git stash pop' # recommended for it's symmetry with gstpu (push) ## 'stash push' introduced in git v2.13.2 alias gstpu='git stash push' alias gstpum='git stash push -m' ## 'stash save' deprecated since git v2.16.0, alias is now push alias gsts='git stash push' alias gstsm='git stash push -m' # submodules alias gsu='git submodule update --init --recursive' # switch # these aliases requires git v2.23+ alias gsw='git switch' alias gswc='git switch --create' alias gswm='git switch $(get_default_branch)' alias gswt='git switch --track' # tag alias gt='git tag' alias gta='git tag -a' alias gtd='git tag -d' alias gtl='git tag -l' #worktree alias gw='git worktree' alias gwa='git worktree add' alias gwl='git worktree list' alias gwr='git worktree remove' case $OSTYPE in darwin*) alias gtls="git tag -l | gsort -V" ;; *) alias gtls='git tag -l | sort -V' ;; esac # functions function gdv() { git diff --ignore-all-space "$@" | vim -R - } function get_default_branch() { branch=$(git symbolic-ref refs/remotes/origin/HEAD) ${branch#refs/remotes/origin/} } ================================================ FILE: aliases/available/gitsvn.aliases.bash ================================================ # shellcheck shell=bash about-alias 'common git-svn abbreviations' url "https://git-scm.com/docs/git-svn" # Aliases alias gsr='git svn rebase' alias gsc='git svn dcommit' alias gsi='git svn info' ================================================ FILE: aliases/available/heroku.aliases.bash ================================================ # shellcheck shell=bash about-alias 'heroku task abbreviations' url "https://devcenter.heroku.com/" # heroku alias h='heroku' alias hl='heroku list' alias hi='heroku info' alias ho='heroku open' # dynos and workers alias hd='heroku dynos' alias hw='heroku workers' # rake console alias hr='heroku rake' alias hcon='heroku console' # new and restart alias hnew='heroku create' alias hrestart='heroku restart' # logs alias hlog='heroku logs' alias hlogs='heroku logs' # maint alias hon='heroku maintenance:on' alias hoff='heroku maintenance:off' # heroku configs alias hc='heroku config' alias hca='heroku config:add' alias hcr='heroku config:remove' alias hcc='heroku config:clear' ================================================ FILE: aliases/available/hg.aliases.bash ================================================ # shellcheck shell=bash about-alias 'mercurial abbreviations' url "https://www.mercurial-scm.org/" alias hs='hg status' alias hsum='hg summary' alias hcm='hg commit -m' ================================================ FILE: aliases/available/homebrew-cask.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Some aliases for Homebrew Cask' url "https://github.com/Homebrew/homebrew-cask" alias bcin='brew cask install' alias bcrm='brew cask uninstall' alias bczp='brew cask zap' alias bccl='brew cask cleanup' alias bcls='brew cask list' alias bcinf='brew cask info' alias bcdr='brew cask doctor' alias bced='brew cask edit' ================================================ FILE: aliases/available/homebrew.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Some aliases for Homebrew' url "https://brew.sh/" if _command_exists brew; then alias bed='brew edit' alias bls='brew list' alias bsr='brew search' alias bdr='brew doctor' alias bin='brew install' alias bcl='brew cleanup' alias brm='brew uninstall' alias bout='brew outdated' alias binf='brew info' alias bup='brew update && brew upgrade' fi ================================================ FILE: aliases/available/homesick.aliases.bash ================================================ # shellcheck shell=bash about-alias 'homesick aliases' url "https://github.com/technicalpickles/homesick" # Aliases alias sikhm="homesick cd dotfiles" alias sikclone="homesick clone" alias sikcomt="homesick commit dotfiles" alias sikdstry="homesick destroy" alias sikdif="homesick diff dotfiles" alias sikexec="homesick exec dotfiles" alias sikexeca="homesick exec_all" alias sikgen="homesick generate" alias sikhlp="homesick help" alias siklnk="homesick link dotfiles" alias sikls="homesick list" alias sikopn="homesick open dotfiles" alias sikpll="homesick pull dotfiles" alias sikpsh="homesick push dotfiles" alias sikrc="homesick rc dotfiles" alias sikpth="homesick show_path dotfiles" alias sikst="homesick status dotfiles" alias sikulnk="homesick unlink dotfiles" alias sikv="homesick version" ================================================ FILE: aliases/available/jitsu.aliases.bash ================================================ # shellcheck shell=bash about-alias 'jitsu task abbreviations' url "https://github.com/nodejitsu/jitsu" # jitsu alias j='jitsu' alias jl='jitsu login' alias jo='jitsu logout' # deploy and update alias jd='jitsu apps deploy' alias ju='jitsu apps update' # new and start, restart, stop alias jn='jitsu apps create' alias js='jitsu apps start' alias jr='jitsu apps restart' alias jx='jitsu apps stop' # logs alias jll='jitsu logs' alias jlog='jitsu logs' alias jlogs='jitsu logs' # env alias je='jitsu env' alias jel='jitsu env list' alias jes='jitsu env set' alias jeg='jitsu env get' alias jed='jitsu env delete' alias jec='jitsu env clear' alias jesv='jitsu env save' alias jeld='jitsu env load' # configuration alias jc='jitsu conf' alias jcl='jitsu config list' alias jcs='jitsu config set' alias jcg='jitsu config get' alias jcd='jitsu config delete' # list and install, view alias jls='jitsu list' alias jin='jitsu install' alias jv='jitsu apps view' # Database, Snapshots and Tokens alias jdb='jitsu databases' alias jss='jitsu snapshots' alias jto='jitsu tokens' ================================================ FILE: aliases/available/kubectl.aliases.bash ================================================ # shellcheck shell=bash about-alias 'kubectl aliases' url "https://kubernetes.io/docs/reference/kubectl/" if _command_exists kubectl; then alias kc='kubectl' alias kcgp='kubectl get pods' alias kcgd='kubectl get deployments' alias kcgn='kubectl get nodes' alias kcdp='kubectl describe pod' alias kcdd='kubectl describe deployment' alias kcdn='kubectl describe node' alias kcgpan='kubectl get pods --all-namespaces' alias kcgdan='kubectl get deployments --all-namespaces' # launches a disposable netshoot pod in the k8s cluster alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash' fi ================================================ FILE: aliases/available/laravel.aliases.bash ================================================ # shellcheck shell=bash about-alias 'laravel artisan abbreviations' url "https://laravel.com/docs/artisan" # A list of useful laravel aliases if [[ -x "${HOME?}/.config/composer/vendor/bin/laravel" ]]; then alias laravel='${HOME?}/.config/composer/vendor/bin/laravel' elif [[ -x "${HOME?}/.composer/vendor/bin/laravel" ]]; then alias laravel='${HOME?}/.composer/vendor/bin/laravel' else return fi # asset alias a:apub='php artisan asset:publish' # auth alias a:remclear='php artisan auth:clear-reminders' alias a:remcontroller='php artisan auth:reminders-controller' alias a:remtable='php artisan auth:reminders-table' # cache alias a:cacheclear='php artisan cache:clear' # command alias a:command='php artisan command:make' # config alias a:confpub='php artisan config:publish' # controller alias a:controller='php artisan make:controller' # db alias a:seed='php artisan db:seed' # key alias a:key='php artisan key:generate' # migrate alias a:migrate='php artisan migrate' alias a:mig='a:migrate' alias a:miginstall='php artisan migrate:install' alias a:migmake='php artisan migrate:make' alias a:migcreate='php artisan migrate:create' alias a:migpublish='php artisan migrate:publish' alias a:migrefresh='php artisan migrate:refresh' alias a:migreset='php artisan migrate:reset' alias a:migrollback='php artisan migrate:rollback' alias a:rollback='a:migrollback' # queue alias a:qfailed='php artisan queue:failed' alias a:qfailedtable='php artisan queue:failed-table' alias a:qflush='php artisan queue:flush' alias a:qforget='php artisan queue:forget' alias a:qlisten='php artisan queue:listen' alias a:qretry='php artisan queue:retry' alias a:qsubscribe='php artisan queue:subscribe' alias a:qwork='php artisan queue:work' # session alias a:stable='php artisan session:table' # view alias a:vpub='php artisan view:publish' # misc alias a:='php artisan' alias a:changes='php artisan changes' alias a:down='php artisan down' alias a:env='php artisan env' alias a:help='php artisan help' alias a:list='php artisan list' alias a:optimize='php artisan optimize' alias a:routes='php artisan routes' alias a:serve='php artisan serve' alias a:tail='php artisan tail' alias a:tinker='php artisan tinker' alias a:up='php artisan up' alias a:work='php artisan workbench' ================================================ FILE: aliases/available/maven.aliases.bash ================================================ # shellcheck shell=bash about-alias 'maven abbreviations' url "https://maven.apache.org/" alias mci='mvn clean install' alias mi='mvn install' alias mc='mvn clean' alias mct='mvn clean test' alias mcc='mvn clean compile' alias mccnt='mvn clean compile -DskipTests=true' alias mp='mvn package' alias mcp='mvn clean package' alias mcpnt='mvn clean package -DskipTests=true' alias mrprep='mvn release:prepare' alias mrperf='mvn release:perform' alias mrrb='mvn release:rollback' alias mdep='mvn dependency:tree' alias mpom='mvn help:effective-pom' alias mcisk='mci -Dmaven.test.skip=true' alias mcpsk='mcp -Dmaven.test.skip=true' # Maven service plugin aliases alias mspring='mvn spring-boot:run' alias mjetty='mvn jetty:run' alias mquark='mvn quarkus:dev' alias mmicro='mvn mn:run' ================================================ FILE: aliases/available/msys2.aliases.bash ================================================ # shellcheck shell=bash about-alias 'MSYS2 aliases' url "https://www.msys2.org/" LS_COMMON="-hG" LS_COMMON="$LS_COMMON --color=auto" LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat\*" # alias # setup the main ls alias if we've established common args alias ls='command ls ${LS_COMMON:-}' alias ll="ls -l" alias la="ls -a" alias lal="ll -a" alias lf="ls -F" ================================================ FILE: aliases/available/node.aliases.bash ================================================ # shellcheck shell=bash about-alias 'the Node.js environment aliases' url "https://nodejs.org/" # alias to setup nodejs development environment alias node-dev='export NODE_ENV=development' # alias to setup nodejs production environment alias node-prod='export NODE_ENV=production' ================================================ FILE: aliases/available/npm.aliases.bash ================================================ # shellcheck shell=bash about-alias 'common npm abbreviations' url "https://docs.npmjs.com/" # Aliases # npm alias ni='npm install' alias nis='npm install --save' alias nid='npm install --save-dev' alias nit='npm install-test' alias nits='npm install-test --save' alias nitd='npm install-test --save-dev' alias nu='npm uninstall' alias nus='npm uninstall --save' alias nusd='npm uninstall --save-dev' alias np='npm publish' alias nup='npm unpublish' alias nlk='npm link' alias nod='npm outdated' alias nrb='npm rebuild' alias nud='npm update' alias nr='npm run' alias nls='npm list --depth=0 2>/dev/null' alias nlsg='npm list -g --depth=0 2>/dev/null' alias nt='npm test' # npx alias nx='npx' alias nxplease='npx $(fc -ln -1)' alias nxn='npx --no-install ' alias nxp='npx -p ' alias nxnp='npx --no-install -p ' alias nxq='npx -q ' alias nxnq='npx --no-install -q ' alias nxqp='npx -q -p ' alias nxnqp='npx --no-install -q -p ' alias nxni='npx --no-install --ignore-existing ' alias nxip='npx --ignore-existing -p ' alias nxnip='npx --no-install --ignore-existing -p ' alias nxqi='npx -q --ignore-existing ' alias nxniq='npx --no-install --ignore-existing -q ' alias nxiqp='npx --ignore-existing -q -p ' alias nxniqp='npx --no-install --ignore-existing -q -p ' ================================================ FILE: aliases/available/osx.aliases.bash ================================================ # shellcheck shell=bash about-alias 'osx-specific aliases' url "https://github.com/Bash-it/bash-it" # Desktop Programs alias fireworks='open -a "/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app"' alias photoshop='open -a "/Applications/Adobe Photoshop CS3/Adobe Photoshop.app"' alias preview='open -a "${PREVIEW?}"' alias xcode='open -a "/Applications/XCode.app"' alias filemerge='open -a "/Developer/Applications/Utilities/FileMerge.app"' alias safari='open -a safari' alias firefox='open -a firefox' alias chrome='open -a "Google Chrome"' alias chromium='open -a chromium' alias brave='open -a "Brave Browser"' alias dashcode='open -a dashcode' alias f='open -a Finder ' alias fh='open -a Finder .' alias textedit='open -a TextEdit' alias hex='open -a "Hex Fiend"' alias skype='open -a Skype' alias mou='open -a Mou' alias subl='open -a "Sublime Text"' if [[ -s /usr/bin/firefox ]]; then unalias firefox fi # Requires growlnotify, which can be found in the Growl DMG under "Extras" alias grnot='growlnotify -s -t Terminal -m "Done"' # Get rid of those pesky .DS_Store files recursively alias dsclean='find . -type f -name .DS_Store -delete' # Track who is listening to your iTunes music alias whotunes='lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689' # Flush your dns cache alias flush='dscacheutil -flushcache' # Show/hide hidden files (for Mac OS X Mavericks) alias showhidden='defaults write com.apple.finder AppleShowAllFiles TRUE' alias hidehidden='defaults write com.apple.finder AppleShowAllFiles FALSE' # From http://apple.stackexchange.com/questions/110343/copy-last-command-in-terminal # shellcheck disable=SC2142 # The quoting confuses `shellcheck`... alias copyLastCmd="fc -ln -1 | awk '{\$1=\$1}1' ORS='' | pbcopy" # Use Finder's Quick Look on a file (^C or space to close) alias ql='qlmanage -p 2>/dev/null' # Mute/Unmute the system volume. Plays nice with all other volume settings. alias mute='osascript -e "set volume output muted true"' alias unmute='osascript -e "set volume output muted false"' # Pin to the tail of long commands for an audible alert after long processes ## curl http://downloads.com/hugefile.zip; lmk alias lmk='say "Process complete."' ================================================ FILE: aliases/available/phoenix.aliases.bash ================================================ # shellcheck shell=bash about-alias 'phoenix abbreviations' url "https://www.phoenixframework.org/" # Phoenix Commands alias i='iex' alias ips='iex -S mix phx.server' alias ism='iex -S mix' alias m='mix' alias mab='mix archive.build' alias mai='mix archive.install' alias mat='mix app.tree' alias mc='mix compile' alias mcv='mix compile --verbose' alias mcx='mix compile.xref' alias mdc='mix deps.compile' alias mdg='mix deps.get' alias mdgc='mix do deps.get, deps.compile' alias mdu='mix deps.update' alias mdt='mix deps.tree' alias mdua='mix deps.update --all' alias mdun='mix deps.unlock' alias mduu='mix deps.unlock --unused' alias meb='mix escript.build' alias mec='mix ecto.create' alias mecm='mix do ecto.create, ecto.migrate' alias med='mix ecto.drop' alias mem='mix ecto.migrate' alias megm='mix ecto.gen.migration' alias merb='mix ecto.rollback' alias mers='mix ecto.reset' alias mho='mix hex.outdated' alias mlh='mix local.hex' alias mn='mix new' alias mns='mix new --sup' alias mpgc='mix phx.gen.channel' alias mpgh='mix phx.gen.html' alias mpgj='mix phx.gen.json' alias mpgm='mix phx.gen.model' alias mpgs='mix phx.gen.secret' alias mpn='mix phx.new' alias mpr='mix phx.routes' alias mps='mix phx.server' alias mr='mix run' alias mrnh='mix run --no-halt' alias mrl='mix release' alias mt='mix test' alias mts='mix test --stale' alias mtw='mix test.watch' alias mx='mix xref' ================================================ FILE: aliases/available/puppet.aliases.bash ================================================ # shellcheck shell=bash about-alias 'puppet aliases' url "https://www.puppet.com/docs/puppet/" # Aliases alias pupval="puppet parser validate *.pp" alias puplint="puppet-lint *.pp" alias pupagt="puppet agent -t" alias pupagtd="puppet agent -t --debug" alias pupapp="puppet apply" ================================================ FILE: aliases/available/pyrocms.aliases.bash ================================================ # shellcheck shell=bash about-alias 'pyrocms abbreviations' url "https://pyrocms.com/" ### ## PyroCMS 3.4 bash aliases ## @author Denis Efremov ### # general alias a:cl="php artisan clear-compiled" # Remove the compiled class file alias a:d="php artisan down" # Put the application into maintenance mode alias a:e="php artisan env" # Display the current framework environment alias a:h="php artisan help" # Displays help for a command alias a:i="php artisan install" # Install the Streams Platform. alias a:ls="php artisan list" # Lists commands alias a:mg="php artisan migrate" # Run the database migrations alias a:op="php artisan optimize" # Optimize the framework for better performance (deprecated) alias a:pr="php artisan preset" # Swap the front-end scaffolding for the application alias a:s="php artisan serve" # Serve the application on the PHP development server alias a:u="php artisan up" # Bring the application out of maintenance mode # addon alias a:ad:i="php artisan addon:install" # Install an addon. alias a:ad:p="php artisan addon:publish" # Publish an the configuration and translations for an addon. alias a:ad:r="php artisan addon:reinstall" # Reinstall an addon. alias a:ad:u="php artisan addon:uninstall" # Uninstall an addon. # app alias a:ap:n="php artisan app:name" # Set the application namespace alias a:ap:p="php artisan app:publish" # Publish general application override files. # assets alias a:as:cl="php artisan assets:clear" # Clear compiled public assets. # auth alias a:au:clrs="php artisan auth:clear-resets" # Flush expired password reset tokens # cache alias a:ca:cl="php artisan cache:clear" # Flush the application cache alias a:ca:f="php artisan cache:forget" # Remove an item from the cache alias a:ca:t="php artisan cache:table" # Create a migration for the cache database table # config alias a:co:ca="php artisan config:cache" # Create a cache file for faster configuration loading alias a:co:cl="php artisan config:clear" # Remove the configuration cache file # db alias a:db:s="php artisan db:seed" # Seed the database with records # env alias a:en:s="php artisan env:set" # Set an environmental value. # event alias a:ev:g="php artisan event:generate" # Generate the missing events and listeners based on registration # extension alias a:ex:i="php artisan extension:install" # Install a extension. alias a:ex:r="php artisan extension:reinstall" # Reinstall a extension. alias a:ex:u="php artisan extension:uninstall" # Uninstall a extension. # files alias a:fi:cl="php artisan files:clean" # Clean missing files from the files table. # key alias a:ke:g="php artisan key:generate" # Set the application key # make alias a:mk:ad="php artisan make:addon" # Create a new addon. alias a:mk:au="php artisan make:auth" # Scaffold basic login and registration views and routes alias a:mk:cm="php artisan make:command" # Create a new Artisan command alias a:mk:ct="php artisan make:controller" # Create a new controller class alias a:mk:ev="php artisan make:event" # Create a new event class alias a:mk:fa="php artisan make:factory" # Create a new model factory alias a:mk:j="php artisan make:job" # Create a new job class alias a:mk:li="php artisan make:listener" # Create a new event listener class alias a:mk:ma="php artisan make:mail" # Create a new email class alias a:mk:mw="php artisan make:middleware" # Create a new middleware class alias a:mk:mg="php artisan make:migration" # Create a new migration file alias a:mk:md="php artisan make:model" # Create a new Eloquent model class alias a:mk:no="php artisan make:notification" # Create a new notification class alias a:mk:po="php artisan make:policy" # Create a new policy class alias a:mk:pr="php artisan make:provider" # Create a new service provider class alias a:mk:rq="php artisan make:request" # Create a new form request class alias a:mk:rs="php artisan make:resource" # Create a new resource alias a:mk:rl="php artisan make:rule" # Create a new validation rule alias a:mk:sd="php artisan make:seeder" # Create a new seeder class alias a:mk:st="php artisan make:stream" # Make a streams entity namespace. alias a:mk:ts="php artisan make:test" # Create a new test class # migrate alias a:mg:fr="php artisan migrate:fresh" # Drop all tables and re-run all migrations alias a:mg:i="php artisan migrate:install" # Create the migration repository alias a:mg:rf="php artisan migrate:refresh" # Reset and re-run all migrations alias a:mg:rs="php artisan migrate:reset" # Rollback all database migrations alias a:mg:rl="php artisan migrate:rollback" # Rollback the last database migration alias a:mg:st="php artisan migrate:status" # Show the status of each migration # module alias a:mo:i="php artisan module:install" # Install a module. alias a:mo:r="php artisan module:reinstall" # Reinstall a module. alias a:mo:u="php artisan module:uninstall" # Uninstall a module. # notifications alias a:no:tb="php artisan notifications:table" # Create a migration for the notifications table # package alias a:pk:d="php artisan package:discover" # Rebuild the cached package manifest # queue alias a:qu:fa="php artisan queue:failed" # List all of the failed queue jobs alias a:qu:ft="php artisan queue:failed-table" # Create a migration for the failed queue jobs database table alias a:qu:fl="php artisan queue:flush" # Flush all of the failed queue jobs alias a:qu:fg="php artisan queue:forget" # Delete a failed queue job alias a:qu:li="php artisan queue:listen" # Listen to a given queue alias a:qu:rs="php artisan queue:restart" # Restart queue worker daemons after their current job alias a:qu:rt="php artisan queue:retry" # Retry a failed queue job alias a:qu:tb="php artisan queue:table" # Create a migration for the queue jobs database table alias a:qu:w="php artisan queue:work" # Start processing jobs on the queue as a daemon # route alias a:ro:ca="php artisan route:cache" # Create a route cache file for faster route registration alias a:ro:cl="php artisan route:clear" # Remove the route cache file alias a:ro:ls="php artisan route:list" # List all registered routes # schedule alias a:sc:r="php artisan schedule:run" # Run the scheduled commands # scout alias a:su:fl="php artisan scout:flush" # Flush all of the model's records from the index alias a:su:im="php artisan scout:import" # Import the given model into the search index # session alias a:se:tb="php artisan session:table" # Create a migration for the session database table # storage alias a:sg:l="php artisan storage:link" # Create a symbolic link from "public/storage" to "storage/app/public" # streams alias a:st:cl="php artisan streams:cleanup" # Cleanup streams entry models. alias a:st:co="php artisan streams:compile" # Compile streams entry models. alias a:st:d="php artisan streams:destroy" # Destroy a namespace. alias a:st:p="php artisan streams:publish" # Publish configuration and translations for streams. alias a:st:r="php artisan streams:refresh" # Refresh streams generated components. # tntsearch alias a:tn:im="php artisan tntsearch:import" # Import the given model into the search index # vendor alias a:ve:p="php artisan vendor:publish" # Publish any publishable assets from vendor packages # view alias a:vi:cl="php artisan view:clear" # Clear all compiled view files ================================================ FILE: aliases/available/rails.aliases.bash ================================================ # shellcheck shell=bash about-alias 'rails abbreviations' url "https://guides.rubyonrails.org/" # Rails Commands alias r='rails' alias rg='rails g' alias rs='rails s' alias rc='rails c' alias rn='rails new' alias rb='rails dbconsole' alias rp='rails plugin' alias ra='rails application' alias rd='rails destroy' alias dbm='rake db:migrate' alias ss='script/server' alias ts="thin start" # thin server alias sc='script/console' alias restartapp='touch tmp/restart.txt' alias restart='touch tmp/restart.txt' # restart passenger alias devlog='tail -f log/development.log' alias taild='tail -f log/development.log' # tail dev log ================================================ FILE: aliases/available/svn.aliases.bash ================================================ # shellcheck shell=bash about-alias 'common svn abbreviations' url "https://subversion.apache.org/" # Aliases alias svs='svn status' alias sa='svn add' alias sci='svn ci -m' alias sco='svn co' alias sup='svn up' alias scu='svn cleanup' alias sli='svn list' alias sdel='svn delete' alias sdif='svn diff' alias slog='svn log' alias smv='svn move' ================================================ FILE: aliases/available/systemd.aliases.bash ================================================ # shellcheck shell=bash about-alias 'systemd service' url "https://systemd.io/" case $OSTYPE in linux*) # Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user alias sc='systemctl' alias scu='systemctl --user' alias scdr='systemctl daemon-reload' alias scdru='systemctl --user daemon-reload' alias scr='systemctl restart' alias scru='systemctl --user restart' alias sce='systemctl stop' alias sceu='systemctl --user stop' alias scs='systemctl start' alias scsu='systemctl --user start' # Keeping previous aliases for a non-breaking change. alias scue='sceu' alias scus='scsu' alias scur='scdru' ;; esac ================================================ FILE: aliases/available/terraform.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Aliases for Terraform/OpenTofu and Terragrunt' url "https://www.terraform.io/" if _command_exists terraform; then alias tf='terraform' elif _command_exists tofu; then alias tf='tofu' fi if _command_exists tf; then alias tfa='tf apply' alias tfp='tf plan' alias tfd='tf destroy' alias tfv='tf validate' alias tfi='tf init' alias tfo='tf output' alias tfr='tf refresh' alias tfw='tf workspace' alias tfae='tf apply -auto-approve' alias tfpa='tf plan -out=tfplan && tf apply tfplan' alias tfpaf='tf plan -out=tfplan && tf apply -auto-approve tfplan' fi ================================================ FILE: aliases/available/terragrunt.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Aliases for Terraform and Terragrunt' url "https://terragrunt.gruntwork.io/" alias tg='terragrunt' alias tgv='terragrunt validate' alias tgp='terragrunt plan' alias tga='terragrunt apply' alias tgd='terragrunt destroy' alias tgva='terragrunt validate-all' alias tgpa='terragrunt plan-all' alias tgaa='terragrunt apply-all' alias tgda='terragrunt destroy-all' ================================================ FILE: aliases/available/textmate.aliases.bash ================================================ # shellcheck shell=bash about-alias 'textmate abbreviations' url "https://macromates.com/" case $OSTYPE in darwin*) # Textmate alias e='mate . &' alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &' ;; esac ================================================ FILE: aliases/available/tmux.aliases.bash ================================================ # shellcheck shell=bash about-alias 'Tmux terminal multiplexer' url "https://github.com/tmux/tmux" alias txl='tmux ls' alias txn='tmux new -s' alias txa='tmux a -t' ================================================ FILE: aliases/available/todo.aliases.bash ================================================ # shellcheck shell=bash about-alias 'todo.txt-cli abbreviations' url "https://github.com/todotxt/todo.txt-cli" alias tls='"${TODO?}" ls' alias ta='"${TODO?}" a' alias trm='"${TODO?}" rm' alias tdo='"${TODO?}" do' alias tpri='"${TODO?}" pri' ================================================ FILE: aliases/available/uuidgen.aliases.bash ================================================ # shellcheck shell=bash about-alias 'uuidgen aliases' url "https://github.com/Bash-it/bash-it" if _command_exists uuid; then # Linux alias uuidu="uuid | tr '[:lower:]' '[:upper:]'" alias uuidl=uuid elif _command_exists uuidgen; then # macOS/BSD alias uuidu="uuidgen" alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" # because upper case is like YELLING alias uuidl=uuid fi ================================================ FILE: aliases/available/vagrant.aliases.bash ================================================ # shellcheck shell=bash about-alias 'vagrant aliases' url "https://www.vagrantup.com/" # Aliases alias vhl='vagrant hosts list' alias vscp='vagrant scp' alias vsl='vagrant snapshot list' alias vst='vagrant snapshot take' alias vup="vagrant up" alias vupl="vagrant up 2>&1 | tee vagrant.log" alias vh="vagrant halt" alias vs="vagrant suspend" alias vr="vagrant resume" alias vrl="vagrant reload" alias vssh="vagrant ssh" alias vst="vagrant status" alias vp="vagrant provision" alias vdstr="vagrant destroy" # requires vagrant-list plugin alias vl="vagrant list" # requires vagrant-hostmanager plugin alias vhst="vagrant hostmanager" ================================================ FILE: aliases/available/vault.aliases.bash ================================================ # shellcheck shell=bash about-alias 'vault aliases' url "https://www.vaultproject.io/" # Aliases alias vad="vault delete" alias val="vault list" alias var="vault read" alias varn="vault renew" alias varv="vault revoke" alias vasrv="vault server" alias vas="vault status" alias vav="vault version" alias vaw="vault write" alias vag="vault login -method=github" alias varv="vault read -field=value" ================================================ FILE: aliases/available/vim.aliases.bash ================================================ # shellcheck shell=bash about-alias 'vim abbreviations' url "https://www.vim.org/" alias v='${VISUAL:-vim}' if ! _command_exists vim; then _log_warning "Without 'vim', these aliases just aren't that useful..." fi # open the vim help in fullscreen incorporated from # https://stackoverflow.com/a/4687513 alias vimh='vim -c ":h | only"' # open vim in new tab is taken from # http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek _command_exists mvim && function mvimt { command mvim --remote-tab-silent "$@" || command mvim "$@"; } _command_exists gvim && function gvimt { command gvim --remote-tab-silent "$@" || command gvim "$@"; } ================================================ FILE: aliases/available/yarn.aliases.bash ================================================ # shellcheck shell=bash about-alias 'yarn package manager aliases' url "https://yarnpkg.com/" # Aliases alias ya='yarn' alias yai='yarn init' alias yaa='yarn add' alias yaga='yarn global add' alias yaad='yarn add --dev' alias yau='yarn upgrade' alias yarm='yarn remove' alias yagrm='yarn global remove' alias yaod='yarn outdated' alias yapa='yarn pack' alias yap='yarn publish' alias yasu='yarn self-update' alias yaru='yarn run' alias yat='yarn test' alias yas='yarn serve' alias yacc='yarn cache clean' alias yack='yarn check' alias yals='yarn list' alias yain='yarn info' alias yali='yarn licenses ls' alias yaloi='yarn login' alias yaloo='yarn logout' ================================================ FILE: bash_it.sh ================================================ #!/usr/bin/env bash # shellcheck source-path=SCRIPTDIR/lib source-path=SCRIPTDIR/scripts # shellcheck disable=SC2034 # Requires bash 3.2+ to install and run # Skip loading if bash version is too old if [[ "${BASH_VERSINFO[0]-}" -lt 3 ]] || [[ "${BASH_VERSINFO[0]-}" -eq 3 && "${BASH_VERSINFO[1]}" -lt 2 ]]; then echo "sorry, but the minimum version of BASH supported by bash_it is 3.2, consider upgrading?" >&2 return 1 fi # Initialize Bash It BASH_IT_LOG_PREFIX="core: main: " : "${BASH_IT:=${BASH_SOURCE%/*}}" : "${BASH_IT_CUSTOM:=${BASH_IT}/custom}" : "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM}/themes"}" : "${BASH_IT_BASHRC:=${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}}" # Load composure first, so we support function metadata # shellcheck source-path=SCRIPTDIR/vendor/github.com/erichs/composure source "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" # Extend composure with additional metadata functions # shellcheck disable=SC2329 url() { :; } # support 'plumbing' metadata cite _about _param _example _group _author _version url cite about-alias about-plugin about-completion # Declare our end-of-main finishing hook, but don't use `declare`/`typeset` _bash_it_library_finalize_hook=() # We need to load logging module early in order to be able to log source "${BASH_IT}/lib/log.bash" # Load libraries _log_debug "Loading libraries..." for _bash_it_main_file_lib in "${BASH_IT}/lib"/*.bash; do _bash-it-log-prefix-by-path "${_bash_it_main_file_lib}" _log_debug "Loading library file..." # shellcheck disable=SC1090 source "$_bash_it_main_file_lib" BASH_IT_LOG_PREFIX="core: main: " done # Load the global "enabled" directory, then enabled aliases, completion, plugins # "_bash_it_main_file_type" param is empty so that files get sourced in glob order for _bash_it_main_file_type in "" "aliases" "plugins" "completion"; do BASH_IT_LOG_PREFIX="core: reloader: " # shellcheck disable=SC2140 source "${BASH_IT}/scripts/reloader.bash" ${_bash_it_main_file_type:+"skip" "$_bash_it_main_file_type"} BASH_IT_LOG_PREFIX="core: main: " done # Load theme, if a theme was set # shellcheck source-path=SCRIPTDIR/themes if [[ -n "${BASH_IT_THEME:-}" ]]; then _log_debug "Loading theme '${BASH_IT_THEME}'." BASH_IT_LOG_PREFIX="themes: githelpers: " source "${BASH_IT}/themes/githelpers.theme.bash" BASH_IT_LOG_PREFIX="themes: p4helpers: " source "${BASH_IT}/themes/p4helpers.theme.bash" BASH_IT_LOG_PREFIX="themes: base: " source "${BASH_IT}/themes/base.theme.bash" BASH_IT_LOG_PREFIX="lib: appearance: " # shellcheck disable=SC1090 if [[ -f "${BASH_IT_THEME}" ]]; then source "${BASH_IT_THEME}" elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" elif [[ -f "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" fi fi _log_debug "Loading custom aliases, completion, plugins..." for _bash_it_main_file_type in "aliases" "completion" "plugins"; do _bash_it_main_file_custom="${BASH_IT}/${_bash_it_main_file_type}/custom.${_bash_it_main_file_type}.bash" if [[ -s "${_bash_it_main_file_custom}" ]]; then _bash-it-log-prefix-by-path "${_bash_it_main_file_custom}" _log_debug "Loading component..." # shellcheck disable=SC1090 source "${_bash_it_main_file_custom}" fi BASH_IT_LOG_PREFIX="core: main: " done # Custom _log_debug "Loading general custom files..." for _bash_it_main_file_custom in "${BASH_IT_CUSTOM}"/*.bash "${BASH_IT_CUSTOM}"/*/*.bash; do if [[ -s "${_bash_it_main_file_custom}" ]]; then _bash-it-log-prefix-by-path "${_bash_it_main_file_custom}" _log_debug "Loading custom file..." # shellcheck disable=SC1090 source "$_bash_it_main_file_custom" fi BASH_IT_LOG_PREFIX="core: main: " done if [[ -n "${PROMPT:-}" ]]; then PS1="${PROMPT}" fi # Adding Support for other OSes if _command_exists gloobus-preview; then PREVIEW="gloobus-preview" elif [[ -d /Applications/Preview.app ]]; then PREVIEW="/Applications/Preview.app" else PREVIEW="less" fi # BASH_IT_RELOAD_LEGACY is set. if [[ -n "${BASH_IT_RELOAD_LEGACY:-}" ]] && ! _command_exists reload; then # shellcheck disable=SC2139 alias reload="builtin source '${BASH_IT_BASHRC?}'" fi for _bash_it_library_finalize_f in "${_bash_it_library_finalize_hook[@]:-}"; do eval "${_bash_it_library_finalize_f?}" # Use `eval` to achieve the same behavior as `$PROMPT_COMMAND`. done unset "${!_bash_it_library_finalize_@}" "${!_bash_it_main_file_@}" ================================================ FILE: clean_files.txt ================================================ ####################################################################### # Allow-list of files to be lint-checked by CI # # Directory Support # Directory references are allowed within the file, ie: # # themes/powerline # # All files under the referenced directory will be checked # # Checking Files Locally # You can manually invoke the check via: # # lint_clean_files.sh # # root directories # aliases/ completion/ custom/example.bash docs/ hooks/ lib/ plugins/ scripts/ template/ test/ themes/ # root files # .gitattributes bash_it.sh clean_files.txt install.sh lint_clean_files.sh uninstall.sh # vendor init files # vendor/.gitattributes ================================================ FILE: completion/available/aliases.completion.bash ================================================ # shellcheck shell=bash about-plugin 'Automatic completion of aliases' # Load after all aliases and completions to understand what needs to be completed # BASH_IT_LOAD_PRIORITY: 800 # References: # http://superuser.com/a/437508/119764 # http://stackoverflow.com/a/1793178/1228454 # Automatically add completion for all aliases to commands having completion functions function _bash-it-component-completion-callback-on-init-aliases() { local aliasCommandFunction namespace="alias_completion" local tmp_file completion_loader alias_name line completions chars local alias_arg_words new_completion compl_func compl_wrapper alias_defn # create array of function completion triggers, keeping multi-word triggers together IFS=$'\n' read -d '' -ra completions < <(complete -p) ((${#completions[@]} == 0)) && return 0 completions=("${completions[@]##complete -* * -}") # strip all but last option plus trigger(s) completions=("${completions[@]#complete -}") # strip anything missed completions=("${completions[@]#? * }") # strip last option and arg, leaving only trigger(s) completions=("${completions[@]#? }") # strip anything missed #TODO: this will fail on some completions... # create temporary file for wrapper functions and completions tmp_file="$(mktemp -t "${namespace}-${RANDOM}XXXXXX")" || return 1 IFS=$'\n' read -r completion_loader < <(complete -p -D 2> /dev/null) if [[ "${completion_loader#complete }" =~ '-F'[[:space:]]([[:alnum:]_]+)[[:space:]] ]]; then completion_loader="${BASH_REMATCH[1]}" else completion_loader="" fi # read in " '' ''" lines from defined aliases # some aliases do have backslashes that needs to be interpreted # shellcheck disable=SC2162 while read line; do line="${line#alias -- }" line="${line#alias }" alias_name="${line%%=*}" # Skip aliases not added by this script that already have completion functions. # This allows users to define their own alias completion functions. # For aliases added by this script, we do want to replace them in case the # alias getting the completion added has changed. if complete -p "$alias_name" &> /dev/null; then # Get the -F argument from the existing completion for this alias. aliasCommandFunction=$(complete -p "$alias_name" | rev | cut -d " " -f 2 | rev) # Check if aliasCommandFunction starts with our namespace. if [[ "$aliasCommandFunction" != "_${namespace}::"* ]]; then continue fi # Remove existing completion. It will be replaced by the new one. We need to # delete it in case the new alias does not support having completion added. complete -r "$alias_name" fi alias_defn="${line#*=\'}" # alias definition alias_defn="${alias_defn%\'}" alias_cmd="${alias_defn%%[[:space:]]*}" # first word of alias if [[ ${alias_defn} == "${alias_cmd}" ]]; then alias_args='' else alias_args="${alias_defn#*[[:space:]]}" # everything after first word fi # skip aliases to pipes, boolean control structures and other command lists chars=$'|&;()<>\n' if [[ "${alias_defn}" =~ [$chars] ]]; then continue fi # avoid expanding wildcards read -ra alias_arg_words <<< "$alias_args" # skip alias if there is no completion function triggered by the aliased command if ! _bash-it-array-contains-element "$alias_cmd" "${completions[@]}"; then if [[ -n "$completion_loader" ]]; then # force loading of completions for the aliased command "${completion_loader:?}" "${alias_cmd}" # 124 means completion loader was successful [[ $? -eq 124 ]] || continue completions+=("$alias_cmd") else continue fi fi new_completion="$(complete -p "$alias_cmd" 2> /dev/null)" compl_func="${new_completion/#* -F /}" compl_func="${compl_func%% *}" # avoid recursive call loops by ignoring our own functions if [[ "${compl_func#_"$namespace"::}" == "$compl_func" ]]; then compl_wrapper="_${namespace}::${alias_name}" if [[ -z $alias_args ]]; then # Create a wrapper without arguments. # This allows identifying the completions added by this script on reload. echo "function $compl_wrapper { $compl_func \"\$@\" }" >> "$tmp_file" else # Create a wrapper inserting the alias arguments # The use of printf on alias_arg_words is needed to ensure each element of # the array is quoted. E.X. (one two three) -> ('one' 'two' 'three') echo "function $compl_wrapper { local compl_word=\${2?} local prec_word=\${3?} # check if prec_word is the alias itself. if so, replace it # with the last word in the unaliased form, i.e., # alias_cmd + ' ' + alias_args. if [[ \$COMP_LINE == \"\$prec_word \$compl_word\" ]]; then prec_word='$alias_cmd $alias_args' prec_word=\${prec_word#* } fi (( COMP_CWORD += ${#alias_arg_words[@]} )) COMP_WORDS=(\"$alias_cmd\" $(printf "%q " "${alias_arg_words[@]}") \"\${COMP_WORDS[@]:1}\") (( COMP_POINT -= \${#COMP_LINE} )) COMP_LINE=\${COMP_LINE/$alias_name/$alias_cmd $alias_args} (( COMP_POINT += \${#COMP_LINE} )) \"$compl_func\" \"$alias_cmd\" \"\$compl_word\" \"\$prec_word\" }" >> "$tmp_file" fi new_completion="${new_completion/ -F $compl_func / -F $compl_wrapper }" fi # replace completion trigger by alias if [[ -n $new_completion ]]; then new_completion="${new_completion% *} $alias_name" echo "$new_completion" >> "$tmp_file" fi done < <(alias -p) # shellcheck source=/dev/null source "$tmp_file" && command rm -f "$tmp_file" } _bash-it-component-completion-callback-on-init-aliases ================================================ FILE: completion/available/apm.completion.bash ================================================ # shellcheck shell=bash about-completion "apm completion" # shellcheck source-path=SCRIPTDIR/../../vendor/github.com/vigo/apm-bash-completion source "${BASH_IT?}/vendor/github.com/vigo/apm-bash-completion/apm" ================================================ FILE: completion/available/artisan.completion.bash ================================================ # shellcheck shell=bash cite "about-completion" about-completion "Laravel artisan completion" group "php" url "https://laravel.com/docs/artisan" # Completion function for Laravel artisan _artisan_completion() { local cur artisan_commands COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" # Only provide completions if artisan file exists in current directory if [[ ! -f "artisan" ]]; then return 0 fi # Get list of available artisan commands # Use command prefix to bypass user aliases # shellcheck disable=SC2034 artisan_commands=$(command php artisan --raw --no-ansi list 2> /dev/null | command sed "s/[[:space:]].*//") # shellcheck disable=SC2016,SC2207 COMPREPLY=($(compgen -W '${artisan_commands}' -- "${cur}")) return 0 } # Complete for both 'artisan' and common alias 'art' complete -F _artisan_completion artisan art ================================================ FILE: completion/available/awless.completion.bash ================================================ # shellcheck shell=bash # Make sure awless is installed _bash-it-completion-helper-necessary awless || return # Don't handle completion if it's already managed _bash-it-completion-helper-sufficient awless || return # shellcheck disable=SC1090 source <(awless completion bash) ================================================ FILE: completion/available/awscli.completion.bash ================================================ # shellcheck shell=bash cite "about-completion" about-completion "aws - Amazon Web Services command-line interface" group "cloud" url "https://aws.amazon.com/cli/" # Make sure aws is installed _bash-it-completion-helper-necessary aws aws_completer || return # Don't handle completion if it's already managed _bash-it-completion-helper-sufficient aws || return complete -C aws_completer aws ================================================ FILE: completion/available/bash-it.completion.bash ================================================ # shellcheck shell=bash cite "about-completion" about-completion "bash-it - completion for bash-it framework commands" group "bash-it" url "https://bash-it.readthedocs.io/" function _compreply_candidates() { local IFS=$'\n' read -d '' -ra COMPREPLY < <(compgen -W "${candidates[*]}" -- "${cur}") } function _bash-it() { local cur prev verb file_type candidates suffix COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD - 1]}" verb="${COMP_WORDS[1]}" file_type="${COMP_WORDS[2]:-}" candidates=('disable' 'enable' 'help' 'migrate' 'reload' 'restart' 'preview' 'profile' 'doctor' 'search' 'show' 'update' 'version') case "${verb}" in show) candidates=('aliases' 'completions' 'plugins') _compreply_candidates ;; help) if [[ "${prev}" == "aliases" ]]; then candidates=('all' "$(_bash-it-component-list "${file_type}")") _compreply_candidates else candidates=('aliases' 'completions' 'migrate' 'plugins' 'update') _compreply_candidates fi ;; profile) case "${file_type}" in load | rm) if [[ "${file_type}" == "$prev" ]]; then candidates=("${BASH_IT}/profiles"/*.bash_it) candidates=("${candidates[@]##*/}") candidates=("${candidates[@]%%.bash_it}") _compreply_candidates fi ;; save | list) ;; *) candidates=('load' 'save' 'list' 'rm') _compreply_candidates ;; esac ;; doctor) candidates=('errors' 'warnings' 'all') _compreply_candidates ;; update) if [[ "${cur}" == -* ]]; then candidates=('-s' '--silent') else candidates=('stable' 'dev') fi _compreply_candidates ;; migrate | reload | restart | search | version) ;; preview) _bash-it-preview # completes itself return 0 ;; enable | disable) if [[ "${verb}" == "enable" ]]; then suffix="disabled" else suffix="enabled" fi case "${file_type}" in alias | completion | plugin) candidates=('all' "$("_bash-it-component-list-${suffix}" "${file_type}")") _compreply_candidates ;; *) candidates=('alias' 'completion' 'plugin') _compreply_candidates ;; esac ;; *) _compreply_candidates ;; esac } # Activate completion for bash-it and its common misspellings complete -F _bash-it bash-it complete -F _bash-it bash-ti complete -F _bash-it shit complete -F _bash-it bashit complete -F _bash-it batshit complete -F _bash-it bash_it ================================================ FILE: completion/available/brew.completion.bash ================================================ # shellcheck shell=bash cite "about-completion" about-completion "brew completion" group "package-manager" url "https://brew.sh/" # Load late to make sure `system` completion loads first # BASH_IT_LOAD_PRIORITY: 375 if [[ "$OSTYPE" != 'darwin'* ]]; then _log_warning "unsupported operating system - only 'Darwin' is supported" return 0 fi # Make sure brew is installed _bash_it_homebrew_check || return 0 if [[ -r "$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew" ]]; then # shellcheck disable=1090,1091 source "$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew" elif [[ -r "$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh" ]]; then # shellcheck disable=1090,1091 source "$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh" elif [[ -f "$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew" ]]; then # For the git-clone based installation, see here for more info: # https://github.com/Bash-it/bash-it/issues/1458 # https://docs.brew.sh/Shell-Completion # shellcheck disable=1090,1091 source "$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew" fi ================================================ FILE: completion/available/bundler.completion.bash ================================================ # shellcheck shell=bash # shellcheck disable=SC2207 cite "about-completion" about-completion "bundler - Ruby dependency manager for managing gem dependencies" group "ruby" url "https://bundler.io/" # bash completion for the `bundle` command. # # Copyright (c) 2008 Daniel Luz # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following # conditions: # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # # To use, source this file on bash: # . completion-bundle __bundle() { local bundle_bin=("${_RUBY_COMMAND_PREFIX[@]}" "$1") local cur prev _get_comp_words_by_ref -n : cur prev local bundle_command local bundle_command_index __bundle_get_command COMPREPLY=() local options if [[ $cur = -* && $bundle_command != exec ]]; then options="-V --help --no-color --no-no-color --verbose --no-verbose" case $bundle_command in "") options="$options --version" ;; check) options="$options --dry-run --gemfile --path -r --retry" ;; clean) options="$options --dry-run --force" ;; config) options="$options --local --global --delete" ;; doctor) options="$options --gemfile --quiet --no-quiet" ;; gem) options="$options -b -e -t --bin --coc --no-coc --edit --exe --no-exe --ext --no-ext --mit --no-mit --test" ;; init) options="$options --gemspec" ;; install) options="$options --binstubs --clean --deployment --force --frozen --full-index --gemfile --jobs --local --no-cache --no-prune --path --quiet --retry --shebang --standalone --system --trust-policy --with --without" ;; lock) options="$options --add-platform --conservative --full-index --local --lockfile --major --minor --patch --print --remove-platform --strict --update" ;; package) options="$options --all --all-platforms" ;; platform) options="$options --ruby" ;; show) options="$options --outdated --paths --no-paths" ;; update) options="$options --bundler --conservative --force --full-index --group --jobs --local --major --minor --patch --quiet --ruby --source --strict" ;; viz) options="$options -f -F -R -v -W --file --format --requirements --no-requirements --version --no-version --without" ;; esac else case $bundle_command in "" | help) options="help install update package exec config check show outdated console open lock viz init gem platform clean doctor" ;; check | install) case $prev in --binstubs | --path) _filedir -d return ;; --standalone | --with | --without) __bundle_complete_groups return ;; --trust-policy) options="HighSecurity MediumSecurity LowSecurity AlmostNoSecurity NoSecurity" ;; esac ;; config) case $prev in config | --*) case $cur in local.*) options=($(__bundle_exec_ruby 'puts Bundler.definition.specs.to_hash.keys')) options=("${options[*]/#/local.}") ;; *) options=(path frozen without bin gemfile ssl_ca_cert ssl_client_cert cache_path disable_multisource ignore_messages retry redirect timeout force_ruby_platform specific_platform disable_checksum_validation disable_version_check allow_offline_install auto_install cache_all_platforms cache_all clean console disable_exec_load disable_local_branch_check disable_shared_gems jobs major_deprecations no_install no_prune only_update_to_newer_versions plugins shebang silence_root_warning ssl_verify_mode system_bindir user_agent) # We want to suggest the options above as complete words, # and also "local." and "mirror." as prefixes # To achieve that, disable automatic space insertion, # insert it manually, then add the non-spaced prefixes compopt -o nospace options=("${options[@]/%/ }") # And add prefix suggestions options+=(local. mirror.) # Override $IFS for completion to work local IFS=$'\n' # shellcheck disable=SC2016 COMPREPLY=($(compgen -W '${options[@]}' -- "$cur")) return ;; esac ;; path | local.*) _filedir -d return ;; esac ;; exec) if [[ $COMP_CWORD -eq $bundle_command_index ]]; then # Figure out Bundler's binaries dir local bundler_bin bundler_bin=$(__bundle_exec_ruby 'puts Bundler.bundle_path + "bin"') if [[ -d $bundler_bin ]]; then local binaries binaries=("$bundler_bin"/*) # If there are binaries, strip directory name and use them [[ -f "${binaries[0]}" ]] && options=("${binaries[@]##*/}") else # No binaries found; use full command completion COMPREPLY=($(compgen -c -- "$cur")) return fi else local _RUBY_COMMAND_PREFIX=("${bundle_bin[@]}" exec) _command_offset "$bundle_command_index" return fi ;; gem) case $prev in -e | --edit) COMPREPLY=($(compgen -c -- "$cur")) return ;; -t | --test) options=("minitest" "rspec") ;; esac ;; update) case $prev in --group) __bundle_complete_groups return ;; *) options=($(__bundle_exec_ruby 'puts Bundler.definition.specs.to_hash.keys')) ;; esac ;; viz) case $prev in -F | --format) options=("dot" "jpg" "png" "svg") ;; -W | --without) __bundle_complete_groups return ;; esac ;; esac fi COMPREPLY=($(compgen -W "${options[*]}" -- "$cur")) } __bundle_get_command() { local i for ((i = 1; i < COMP_CWORD; ++i)); do local arg=${COMP_WORDS[$i]} case $arg in [^-]*) bundle_command=$arg bundle_command_index=$((i + 1)) return ;; --version) # Command-killer bundle_command=- return ;; --help) bundle_command=help bundle_command_index=$((i + 1)) return ;; esac done } # Provides completion for Bundler group names. # # Multiple groups can be entered, separated either by spaces or by colons. # Input is read from $cur, and the result is directly written to $COMPREPLY. __bundle_complete_groups() { # Group being currently written local cur_group=${cur##*[ :]} # All groups written before local prefix=${cur%"$cur_group"} local groups groups=$(__bundle_exec_ruby 'puts Bundler.definition.dependencies.map(&:groups).reduce(:|).map(&:to_s)') if [[ ! $groups ]]; then COMPREPLY=() return fi # Duplicate "default" and anything already in $prefix, so that `uniq` # strips it; groups may be separated by ':', ' ', or '\ ' local excluded=$'\ndefault\n'${prefix//[: \'\"\\]/$'\n'} # Include them twice to ensure they are duplicates groups=$groups$excluded$excluded COMPREPLY=($(compgen -W "$(sort <<< "$groups" | uniq -u)" -- "$cur_group")) # Prepend prefix to all entries COMPREPLY=("${COMPREPLY[@]/#/$prefix}") __ltrim_colon_completions "$cur" } # __bundle_exec_ruby