├── .ackrc ├── .editorconfig ├── .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 ├── 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 │ ├── dnf.aliases.bash │ ├── docker-compose.aliases.bash │ ├── docker.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.txt-cli.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 │ ├── 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 ├── _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 ├── 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.png │ ├── 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.png │ └── 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 ├── appearance.bash ├── colors.bash ├── command_duration.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 │ ├── battery.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 └── bash_profile.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 │ ├── composure.bats │ ├── helpers.bats │ ├── log.bats │ ├── preexec.bats │ ├── search.bats │ └── utilities.bats ├── lint-requirements.txt ├── plugins │ ├── base.plugin.bats │ ├── battery.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 │ ├── README.rst │ └── barbuk.theme.bash ├── base.theme.bash ├── binaryanomaly │ └── binaryanomaly.theme.bash ├── bira │ └── bira.theme.bash ├── bobby-python │ └── bobby-python.theme.bash ├── bobby │ └── bobby.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 ├── liquidprompt │ ├── .gitignore │ └── liquidprompt.theme.bash ├── luan │ └── luan.theme.bash ├── mairan │ └── mairan.theme.bash ├── mbriggs │ └── mbriggs.theme.bash ├── metal │ └── metal.theme.bash ├── minimal │ └── minimal.theme.bash ├── modern-t │ └── modern-t.theme.bash ├── modern-time │ └── modern-time.theme.bash ├── modern │ └── modern.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-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 ├── powerline │ ├── powerline.base.bash │ └── powerline.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 │ ├── .travis.yml │ ├── 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 /.ackrc: -------------------------------------------------------------------------------- 1 | --ignore-dir=enabled/ 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [**.{md,rst}] 13 | trim_trailing_whitespace = false 14 | 15 | [.git*] 16 | indent_size = tab 17 | indent_style = tab 18 | 19 | [{**.*sh,test/run,**.bats}] 20 | indent_size = tab 21 | indent_style = tab 22 | 23 | shell_variant = bash 24 | binary_next_line = true # like -bn 25 | switch_case_indent = true # like -ci 26 | space_redirects = true # like -sr 27 | keep_padding = false # like -kp 28 | end_of_line = lf 29 | charset = utf-8 30 | trim_trailing_whitespace = true 31 | insert_final_newline = true 32 | 33 | [**.bats] 34 | indent_size = tab 35 | indent_style = tab 36 | shell_variant = bats 37 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.sh text eol=lf 2 | *.bash text eol=lf 3 | *.bats text eol=lf 4 | 5 | # Docs allow trailing whitespaces 6 | *.md whitespace=-blank-at-eol 7 | *.rst whitespace=-blank-at-eol 8 | 9 | # Windows files 10 | *.bat text eol=crlf 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Libera chat 4 | url: https://web.libera.chat/?channel=#bash-it 5 | about: You can ask and answer questions here 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 💡 Feature request 2 | title: "[Feature]: " 3 | description: Suggest an idea for this project 4 | labels: "feature request" 5 | body: 6 | - type: textarea 7 | attributes: 8 | label: Expected behavior 9 | description: Tell us how your feature should work. 10 | validations: 11 | required: true 12 | - type: textarea 13 | attributes: 14 | label: Current behavior 15 | description: Explain the difference your feature will have from current behavior. 16 | validations: 17 | required: true 18 | - type: textarea 19 | attributes: 20 | label: Possible solution 21 | description: Tell us how it could be fixed at your glance. 22 | validations: 23 | required: false 24 | - type: textarea 25 | attributes: 26 | label: Context 27 | description: > 28 | How has this issue affected you? What are you trying to accomplish? 29 | Providing context helps us come up with a solution that is most useful in the real world. 30 | - type: textarea 31 | attributes: 32 | label: Notes 33 | description: > 34 | Provide any extra details here. 35 | -------------------------------------------------------------------------------- /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-no-response - https://github.com/probot/no-response 2 | 3 | # Number of days of inactivity before an Issue is closed for lack of response 4 | daysUntilClose: 14 5 | # Label requiring a response 6 | responseRequiredLabel: waiting-for-response 7 | # Comment to post when closing an Issue for lack of response. Set to `false` to disable 8 | closeComment: > 9 | This issue has been automatically closed because there has been no response 10 | to our request for more information from the original author. 11 | You can always reopen the issue if needed. 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .atom-build.json 2 | */enabled/* 3 | .DS_Store 4 | custom/* 5 | !custom/example.bash 6 | .rvmrc 7 | aliases/custom.aliases.bash 8 | completion/custom.completion.bash 9 | lib/custom.bash 10 | plugins/custom.plugins.bash 11 | *.swp 12 | .*.un~ 13 | bats 14 | .idea 15 | *.sublime-workspace 16 | *.sublime-project 17 | enabled/* 18 | /enabled 19 | tmp/ 20 | 21 | # Do not save profiles 22 | profiles/* 23 | # apart from the default one 24 | !profiles/default.bash_it 25 | 26 | /vendor/github.com/nojhan/liquidprompt 27 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test_lib/bats-core"] 2 | path = test_lib/bats-core 3 | url = https://github.com/bats-core/bats-core 4 | branch = tags/v1.9.0 5 | [submodule "test_lib/bats-support"] 6 | path = test_lib/bats-support 7 | url = https://github.com/bats-core/bats-support 8 | branch = tags/v0.3.0 9 | [submodule "test_lib/bats-assert"] 10 | path = test_lib/bats-assert 11 | url = https://github.com/bats-core/bats-assert 12 | branch = tags/v2.1.0 13 | [submodule "test_lib/bats-file"] 14 | path = test_lib/bats-file 15 | url = https://github.com/bats-core/bats-file 16 | branch = tags/v0.4.0 17 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | sphinx: 4 | builder: htmldir 5 | configuration: docs/conf.py 6 | 7 | python: 8 | version: 3.7 9 | install: 10 | - requirements: docs/requirements.txt 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020-2021 Bash-it 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /aliases/available/ag.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'the silver searcher (ag) aliases' 3 | 4 | ## Summary for args to less: 5 | # less(1) 6 | # -M (-M or --LONG-PROMPT) Prompt very verbosely 7 | # -I (-I or --IGNORE-CASE) Searches with '/' ignore case 8 | # -R (-R or --RAW-CONTROL-CHARS) For handling ANSI colors 9 | # -F (-F or --quit-if-one-screen) Auto exit if <1 screen 10 | # -X (-X or --no-init) Disable termcap init & deinit 11 | 12 | alias ag='ag --smart-case --pager="less -MIRFX"' 13 | -------------------------------------------------------------------------------- /aliases/available/ansible.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'ansible abbreviations' 3 | 4 | alias ans=ansible 5 | alias ap=ansible-playbook 6 | -------------------------------------------------------------------------------- /aliases/available/apt.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # -binaryanomaly 4 | 5 | cite 'about-alias' 6 | about-alias 'Apt and dpkg aliases for Ubuntu and Debian distros.' 7 | 8 | # set apt aliases 9 | function _set_pkg_aliases() { 10 | if _command_exists apt; then 11 | alias apts='apt-cache search' 12 | alias aptshow='apt-cache show' 13 | alias aptinst='sudo apt-get install -V' 14 | alias aptupd='sudo apt-get update' 15 | alias aptupg='sudo apt-get dist-upgrade -V && sudo apt-get autoremove' 16 | alias aptupgd='sudo apt-get update && sudo apt-get dist-upgrade -V && sudo apt-get autoremove' 17 | alias aptrm='sudo apt-get remove' 18 | alias aptpurge='sudo apt-get remove --purge' 19 | 20 | alias chkup='/usr/lib/update-notifier/apt-check -p --human-readable' 21 | alias chkboot='cat /var/run/reboot-required' 22 | 23 | alias pkgfiles='dpkg --listfiles' 24 | fi 25 | } 26 | 27 | _set_pkg_aliases 28 | -------------------------------------------------------------------------------- /aliases/available/atom.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Atom.io editor abbreviations' 3 | 4 | alias a='atom' 5 | alias ah='atom .' 6 | alias apmup='apm update --no-confirm' 7 | alias apmi='apm install' 8 | -------------------------------------------------------------------------------- /aliases/available/bash-it.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Aliases for the bash-it command (these aliases are automatically included with the "general" aliases)' 3 | 4 | # Common misspellings of bash-it 5 | alias shit='bash-it' 6 | alias batshit='bash-it' 7 | alias bashit='bash-it' 8 | alias batbsh='bash-it' 9 | alias babsh='bash-it' 10 | alias bash_it='bash-it' 11 | alias bash_ti='bash-it' 12 | 13 | # Additional bash-it aliases for help/show 14 | alias bshsa='bash-it show aliases' 15 | alias bshsc='bash-it show completions' 16 | alias bshsp='bash-it show plugins' 17 | alias bshha='bash-it help aliases' 18 | alias bshhc='bash-it help completions' 19 | alias bshhp='bash-it help plugins' 20 | alias bshsch="bash-it search" 21 | alias bshenp="bash-it enable plugin" 22 | alias bshena="bash-it enable alias" 23 | alias bshenc="bash-it enable completion" 24 | -------------------------------------------------------------------------------- /aliases/available/bolt.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'puppet bolt aliases' 3 | 4 | # Aliases 5 | alias bolt='bolt command run --tty --no-host-key-check' 6 | alias boltas='bolt -p -u' 7 | alias sudobolt='bolt --run-as root --sudo-password' 8 | alias sudoboltas='sudobolt -p -u' 9 | -------------------------------------------------------------------------------- /aliases/available/bundler.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'ruby bundler' 3 | 4 | # Bundler Commands 5 | alias be='bundle exec' 6 | alias bi='bundle install' 7 | alias bl='bundle list' 8 | alias bu='bundle update' 9 | alias bp='bundle package' 10 | -------------------------------------------------------------------------------- /aliases/available/clipboard.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'xclip shortcuts' 3 | 4 | alias pbcopy="xclip -selection clipboard" 5 | alias pbpaste="xclip -selection clipboard -o" 6 | 7 | alias xcpy="xclip -selection clipboard" 8 | alias xpst="xclip -selection clipboard -o" 9 | # to use it just install xclip on your distribution and it would work like: 10 | # $ echo "hello" | xcpy 11 | # $ xpst 12 | # hello 13 | 14 | # very useful for things like: 15 | # cat ~/.ssh/id_rsa.pub | xcpy 16 | # have fun! 17 | -------------------------------------------------------------------------------- /aliases/available/composer.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'common composer abbreviations' 3 | 4 | # Aliases 5 | alias coab='composer about' 6 | alias coar='composer archive' 7 | alias cob='composer browser' 8 | alias cocpr='composer check-platform-reqs' 9 | alias cocc='composer clear-cache' 10 | alias cocfg='composer config' 11 | alias cocp='composer create-project' 12 | alias codp='composer depends' 13 | alias codiag='composer diagnose' 14 | alias codmp='composer dump-autoload' 15 | alias coex='composer exec' 16 | alias coglob='composer global' 17 | alias coh='composer help' 18 | alias cohome='composer home' 19 | alias coi='composer install' 20 | alias coinf='composer info' 21 | alias coini='composer init' 22 | alias coli='composer license' 23 | alias colis='composer list' 24 | alias coout='composer outdated' 25 | alias cop='composer prohibits' 26 | alias corem='composer remove' 27 | alias coreq='composer require' 28 | alias coreqd='composer require --dev' 29 | alias cors='composer run-script' 30 | alias cos='composer search' 31 | alias cosu='composer self-update' 32 | alias coshow='composer show' 33 | alias costat='composer status' 34 | alias cosugg='composer suggest' 35 | alias coup='composer update' 36 | alias coupg='composer upgrade' 37 | alias coval='composer validate' 38 | alias cowhy='composer why' 39 | alias cowhyn='composer why-not' 40 | -------------------------------------------------------------------------------- /aliases/available/curl.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Curl aliases for convenience.' 3 | 4 | # set apt aliases 5 | function _set_pkg_aliases() { 6 | if _command_exists curl; then 7 | # follow redirects 8 | alias cl='curl -L' 9 | # follow redirects, download as original name 10 | alias clo='curl -L -O' 11 | # follow redirects, download as original name, continue 12 | alias cloc='curl -L -C - -O' 13 | # follow redirects, download as original name, continue, retry 5 times 14 | alias clocr='curl -L -C - -O --retry 5' 15 | # follow redirects, fetch banner 16 | alias clb='curl -L -I' 17 | # see only response headers from a get request 18 | alias clhead='curl -D - -so /dev/null' 19 | fi 20 | } 21 | 22 | _set_pkg_aliases 23 | -------------------------------------------------------------------------------- /aliases/available/dnf.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'dnf aliases for fedora 22+ distros' 3 | 4 | if _command_exists dnf; then 5 | alias dnfp="dnf info" # Show package information 6 | alias dnfl="dnf list" # List packages 7 | alias dnfli="dnf list installed" # List installed packages 8 | alias dnfgl="dnf grouplist" # List package groups 9 | alias dnfmc="dnf makecache" # Generate metadata cache 10 | alias dnfs="dnf search" # Search package 11 | 12 | alias dnfi="sudo dnf install" # Install package 13 | alias dnfr="sudo dnf remove" # Remove package 14 | alias dnfu="sudo dnf upgrade" # Upgrade package 15 | alias dnfc="sudo dnf clean all" # Clean cache 16 | alias dnfri="sudo dnf reinstall" # Reinstall package 17 | alias dnfgi="sudo dnf groupinstall" # Install package group 18 | alias dnfgr="sudo dnf groupremove" # Remove package group 19 | fi 20 | -------------------------------------------------------------------------------- /aliases/available/docker-compose.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'docker-compose abbreviations' 3 | 4 | alias dco="docker-compose" 5 | 6 | # Defined in the `docker-compose` plugin, please check there for details. 7 | alias dcofresh="docker-compose-fresh" 8 | alias dcol="docker-compose logs -f --tail 100" 9 | alias dcou="docker-compose up" 10 | alias dcouns="dcou --no-start" 11 | -------------------------------------------------------------------------------- /aliases/available/emacs.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'emacs editor' 3 | 4 | case $OSTYPE in 5 | linux*) 6 | alias em='emacs' 7 | alias en='emacs -nw' 8 | alias e='emacsclient -n' 9 | alias et='emacsclient -t' 10 | alias ed='emacs --daemon' 11 | alias E='SUDO_EDITOR=emacsclient sudo -e' 12 | ;; 13 | darwin*) 14 | alias em='open -a emacs' 15 | ;; 16 | esac 17 | -------------------------------------------------------------------------------- /aliases/available/fuck.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'fuck/please to retry last command with sudo' 3 | 4 | # Play nicely with 'thefuck' plugin 5 | if ! _command_exists fuck; then 6 | alias fuck='sudo $(fc -ln -1)' 7 | fi 8 | alias please=fuck 9 | alias plz=please 10 | alias fucking=sudo 11 | -------------------------------------------------------------------------------- /aliases/available/git-omz.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite 'about-alias' 3 | about-alias 'git aliases from oh-my-zsh (incompatible with regular git aliases option)' 4 | 5 | if _bash-it-component-item-is-enabled aliases git; then 6 | _log_warning "git-omz aliases are incompatible with regular git aliases" 7 | return 1 8 | fi 9 | 10 | # Load after regular git aliases 11 | # BASH_IT_LOAD_PRIORITY: 160 12 | 13 | # Setup git version 14 | read -ra git_version_arr <<< "$(git version 2> /dev/null)" 15 | # shellcheck disable=SC2034 16 | git_version="${git_version_arr[2]}" 17 | 18 | # Setup is-at-least 19 | function is-at-least { 20 | local expected_version=$1 21 | local actual_version=$2 22 | local versions 23 | 24 | printf -v versions '%s\n%s' "$expected_version" "$actual_version" 25 | [[ $versions = "$(sort -V <<< "$versions")" ]] 26 | } 27 | 28 | # Setup git_current_branch 29 | function git_current_branch { 30 | _git-branch 31 | } 32 | 33 | # shellcheck disable=SC1090 34 | source "${BASH_IT}"/vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/git.plugin.zsh 35 | -------------------------------------------------------------------------------- /aliases/available/gitsvn.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'common git-svn abbreviations' 3 | 4 | # Aliases 5 | alias gsr='git svn rebase' 6 | alias gsc='git svn dcommit' 7 | alias gsi='git svn info' 8 | -------------------------------------------------------------------------------- /aliases/available/heroku.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'heroku task abbreviations' 3 | 4 | # heroku 5 | alias h='heroku' 6 | alias hl='heroku list' 7 | alias hi='heroku info' 8 | alias ho='heroku open' 9 | 10 | # dynos and workers 11 | alias hd='heroku dynos' 12 | alias hw='heroku workers' 13 | 14 | # rake console 15 | alias hr='heroku rake' 16 | alias hcon='heroku console' 17 | 18 | # new and restart 19 | alias hnew='heroku create' 20 | alias hrestart='heroku restart' 21 | 22 | # logs 23 | alias hlog='heroku logs' 24 | alias hlogs='heroku logs' 25 | 26 | # maint 27 | alias hon='heroku maintenance:on' 28 | alias hoff='heroku maintenance:off' 29 | 30 | # heroku configs 31 | alias hc='heroku config' 32 | alias hca='heroku config:add' 33 | alias hcr='heroku config:remove' 34 | alias hcc='heroku config:clear' 35 | -------------------------------------------------------------------------------- /aliases/available/hg.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'mercurial abbreviations' 3 | 4 | alias hs='hg status' 5 | alias hsum='hg summary' 6 | alias hcm='hg commit -m' 7 | -------------------------------------------------------------------------------- /aliases/available/homebrew-cask.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Some aliases for Homebrew Cask' 3 | 4 | alias bcin='brew cask install' 5 | alias bcrm='brew cask uninstall' 6 | alias bczp='brew cask zap' 7 | alias bccl='brew cask cleanup' 8 | alias bcls='brew cask list' 9 | alias bcinf='brew cask info' 10 | alias bcdr='brew cask doctor' 11 | alias bced='brew cask edit' 12 | -------------------------------------------------------------------------------- /aliases/available/homebrew.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Some aliases for Homebrew' 3 | 4 | if _command_exists brew; then 5 | alias bed='brew edit' 6 | alias bls='brew list' 7 | alias bsr='brew search' 8 | alias bdr='brew doctor' 9 | alias bin='brew install' 10 | alias bcl='brew cleanup' 11 | alias brm='brew uninstall' 12 | alias bout='brew outdated' 13 | alias binf='brew info' 14 | alias bup='brew update && brew upgrade' 15 | fi 16 | -------------------------------------------------------------------------------- /aliases/available/homesick.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'homesick aliases' 3 | 4 | # Aliases 5 | alias sikhm="homesick cd dotfiles" 6 | alias sikclone="homesick clone" 7 | alias sikcomt="homesick commit dotfiles" 8 | alias sikdstry="homesick destroy" 9 | alias sikdif="homesick diff dotfiles" 10 | alias sikexec="homesick exec dotfiles" 11 | alias sikexeca="homesick exec_all" 12 | alias sikgen="homesick generate" 13 | alias sikhlp="homesick help" 14 | alias siklnk="homesick link dotfiles" 15 | alias sikls="homesick list" 16 | alias sikopn="homesick open dotfiles" 17 | alias sikpll="homesick pull dotfiles" 18 | alias sikpsh="homesick push dotfiles" 19 | alias sikrc="homesick rc dotfiles" 20 | alias sikpth="homesick show_path dotfiles" 21 | alias sikst="homesick status dotfiles" 22 | alias sikulnk="homesick unlink dotfiles" 23 | alias sikv="homesick version" 24 | -------------------------------------------------------------------------------- /aliases/available/jitsu.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'jitsu task abbreviations' 3 | 4 | # jitsu 5 | alias j='jitsu' 6 | alias jl='jitsu login' 7 | alias jo='jitsu logout' 8 | 9 | # deploy and update 10 | alias jd='jitsu apps deploy' 11 | alias ju='jitsu apps update' 12 | 13 | # new and start, restart, stop 14 | alias jn='jitsu apps create' 15 | alias js='jitsu apps start' 16 | alias jr='jitsu apps restart' 17 | alias jx='jitsu apps stop' 18 | 19 | # logs 20 | alias jll='jitsu logs' 21 | alias jlog='jitsu logs' 22 | alias jlogs='jitsu logs' 23 | 24 | # env 25 | alias je='jitsu env' 26 | alias jel='jitsu env list' 27 | alias jes='jitsu env set' 28 | alias jeg='jitsu env get' 29 | alias jed='jitsu env delete' 30 | alias jec='jitsu env clear' 31 | alias jesv='jitsu env save' 32 | alias jeld='jitsu env load' 33 | 34 | # configuration 35 | alias jc='jitsu conf' 36 | alias jcl='jitsu config list' 37 | alias jcs='jitsu config set' 38 | alias jcg='jitsu config get' 39 | alias jcd='jitsu config delete' 40 | 41 | # list and install, view 42 | alias jls='jitsu list' 43 | alias jin='jitsu install' 44 | alias jv='jitsu apps view' 45 | 46 | # Database, Snapshots and Tokens 47 | alias jdb='jitsu databases' 48 | alias jss='jitsu snapshots' 49 | alias jto='jitsu tokens' 50 | -------------------------------------------------------------------------------- /aliases/available/kubectl.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'kubectl aliases' 3 | 4 | if _command_exists kubectl; then 5 | alias kc='kubectl' 6 | alias kcgp='kubectl get pods' 7 | alias kcgd='kubectl get deployments' 8 | alias kcgn='kubectl get nodes' 9 | alias kcdp='kubectl describe pod' 10 | alias kcdd='kubectl describe deployment' 11 | alias kcdn='kubectl describe node' 12 | alias kcgpan='kubectl get pods --all-namespaces' 13 | alias kcgdan='kubectl get deployments --all-namespaces' 14 | # launches a disposable netshoot pod in the k8s cluster 15 | alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash' 16 | fi 17 | -------------------------------------------------------------------------------- /aliases/available/maven.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'maven abbreviations' 3 | 4 | alias mci='mvn clean install' 5 | alias mi='mvn install' 6 | alias mc='mvn clean' 7 | alias mct='mvn clean test' 8 | alias mcc='mvn clean compile' 9 | alias mccnt='mvn clean compile -DskipTests=true' 10 | alias mp='mvn package' 11 | alias mcp='mvn clean package' 12 | alias mcpnt='mvn clean package -DskipTests=true' 13 | alias mrprep='mvn release:prepare' 14 | alias mrperf='mvn release:perform' 15 | alias mrrb='mvn release:rollback' 16 | alias mdep='mvn dependency:tree' 17 | alias mpom='mvn help:effective-pom' 18 | alias mcisk='mci -Dmaven.test.skip=true' 19 | alias mcpsk='mcp -Dmaven.test.skip=true' 20 | 21 | # Maven service plugin aliases 22 | alias mspring='mvn spring-boot:run' 23 | alias mjetty='mvn jetty:run' 24 | alias mquark='mvn quarkus:dev' 25 | alias mmicro='mvn mn:run' 26 | -------------------------------------------------------------------------------- /aliases/available/msys2.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'MSYS2 aliases' 3 | 4 | LS_COMMON="-hG" 5 | LS_COMMON="$LS_COMMON --color=auto" 6 | LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat\*" 7 | 8 | # alias 9 | # setup the main ls alias if we've established common args 10 | alias ls='command ls ${LS_COMMON:-}' 11 | alias ll="ls -l" 12 | alias la="ls -a" 13 | alias lal="ll -a" 14 | alias lf="ls -F" 15 | -------------------------------------------------------------------------------- /aliases/available/node.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'the Node.js environment aliases' 3 | 4 | # alias to setup nodejs development environment 5 | alias node-dev='export NODE_ENV=development' 6 | 7 | # alias to setup nodejs production environment 8 | alias node-prod='export NODE_ENV=production' 9 | -------------------------------------------------------------------------------- /aliases/available/npm.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'common npm abbreviations' 3 | 4 | # Aliases 5 | 6 | # npm 7 | alias ni='npm install' 8 | alias nis='npm install --save' 9 | alias nid='npm install --save-dev' 10 | alias nit='npm install-test' 11 | alias nits='npm install-test --save' 12 | alias nitd='npm install-test --save-dev' 13 | alias nu='npm uninstall' 14 | alias nus='npm uninstall --save' 15 | alias nusd='npm uninstall --save-dev' 16 | alias np='npm publish' 17 | alias nup='npm unpublish' 18 | alias nlk='npm link' 19 | alias nod='npm outdated' 20 | alias nrb='npm rebuild' 21 | alias nud='npm update' 22 | alias nr='npm run' 23 | alias nls='npm list --depth=0 2>/dev/null' 24 | alias nlsg='npm list -g --depth=0 2>/dev/null' 25 | alias nt='npm test' 26 | 27 | # npx 28 | alias nx='npx' 29 | alias nxplease='npx $(fc -ln -1)' 30 | alias nxn='npx --no-install ' 31 | alias nxp='npx -p ' 32 | alias nxnp='npx --no-install -p ' 33 | alias nxq='npx -q ' 34 | alias nxnq='npx --no-install -q ' 35 | alias nxqp='npx -q -p ' 36 | alias nxnqp='npx --no-install -q -p ' 37 | alias nxni='npx --no-install --ignore-existing ' 38 | alias nxip='npx --ignore-existing -p ' 39 | alias nxnip='npx --no-install --ignore-existing -p ' 40 | alias nxqi='npx -q --ignore-existing ' 41 | alias nxniq='npx --no-install --ignore-existing -q ' 42 | alias nxiqp='npx --ignore-existing -q -p ' 43 | alias nxniqp='npx --no-install --ignore-existing -q -p ' 44 | -------------------------------------------------------------------------------- /aliases/available/puppet.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'puppet aliases' 3 | 4 | # Aliases 5 | alias pupval="puppet parser validate *.pp" 6 | alias puplint="puppet-lint *.pp" 7 | alias pupagt="puppet agent -t" 8 | alias pupagtd="puppet agent -t --debug" 9 | alias pupapp="puppet apply" 10 | -------------------------------------------------------------------------------- /aliases/available/rails.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'rails abbreviations' 3 | 4 | # Rails Commands 5 | alias r='rails' 6 | alias rg='rails g' 7 | alias rs='rails s' 8 | alias rc='rails c' 9 | alias rn='rails new' 10 | alias rb='rails dbconsole' 11 | alias rp='rails plugin' 12 | alias ra='rails application' 13 | alias rd='rails destroy' 14 | alias dbm='rake db:migrate' 15 | 16 | alias ss='script/server' 17 | alias ts="thin start" # thin server 18 | alias sc='script/console' 19 | alias restartapp='touch tmp/restart.txt' 20 | alias restart='touch tmp/restart.txt' # restart passenger 21 | alias devlog='tail -f log/development.log' 22 | alias taild='tail -f log/development.log' # tail dev log 23 | -------------------------------------------------------------------------------- /aliases/available/svn.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'common svn abbreviations' 3 | 4 | # Aliases 5 | alias svs='svn status' 6 | alias sa='svn add' 7 | alias sci='svn ci -m' 8 | alias sco='svn co' 9 | alias sup='svn up' 10 | alias scu='svn cleanup' 11 | alias sli='svn list' 12 | alias sdel='svn delete' 13 | alias sdif='svn diff' 14 | alias slog='svn log' 15 | alias smv='svn move' 16 | -------------------------------------------------------------------------------- /aliases/available/systemd.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'systemd service' 3 | 4 | case $OSTYPE in 5 | linux*) 6 | # Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user 7 | alias sc='systemctl' 8 | alias scu='systemctl --user' 9 | alias scdr='systemctl daemon-reload' 10 | alias scdru='systemctl --user daemon-reload' 11 | alias scr='systemctl restart' 12 | alias scru='systemctl --user restart' 13 | alias sce='systemctl stop' 14 | alias sceu='systemctl --user stop' 15 | alias scs='systemctl start' 16 | alias scsu='systemctl --user start' 17 | # Keeping previous aliases for a non-breaking change. 18 | alias scue='sceu' 19 | alias scus='scsu' 20 | alias scur='scdru' 21 | ;; 22 | esac 23 | -------------------------------------------------------------------------------- /aliases/available/terraform.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Aliases for Terraform/OpenTofu and Terragrunt' 3 | 4 | if _command_exists terraform; then 5 | alias tf='terraform' 6 | elif _command_exists tofu; then 7 | alias tf='tofu' 8 | fi 9 | 10 | if _command_exists tf; then 11 | alias tfa='tf apply' 12 | alias tfp='tf plan' 13 | alias tfd='tf destroy' 14 | alias tfv='tf validate' 15 | alias tfi='tf init' 16 | alias tfo='tf output' 17 | alias tfr='tf refresh' 18 | alias tfw='tf workspace' 19 | alias tfae='tf apply -auto-approve' 20 | alias tfpa='tf plan -out=tfplan && tf apply tfplan' 21 | alias tfpaf='tf plan -out=tfplan && tf apply -auto-approve tfplan' 22 | fi 23 | -------------------------------------------------------------------------------- /aliases/available/terragrunt.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Aliases for Terraform and Terragrunt' 3 | 4 | alias tg='terragrunt' 5 | alias tgv='terragrunt validate' 6 | alias tgp='terragrunt plan' 7 | alias tga='terragrunt apply' 8 | alias tgd='terragrunt destroy' 9 | 10 | alias tgva='terragrunt validate-all' 11 | alias tgpa='terragrunt plan-all' 12 | alias tgaa='terragrunt apply-all' 13 | alias tgda='terragrunt destroy-all' 14 | -------------------------------------------------------------------------------- /aliases/available/textmate.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'textmate abbreviations' 3 | 4 | case $OSTYPE in 5 | darwin*) 6 | # Textmate 7 | alias e='mate . &' 8 | alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &' 9 | ;; 10 | esac 11 | -------------------------------------------------------------------------------- /aliases/available/tmux.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'Tmux terminal multiplexer' 3 | 4 | alias txl='tmux ls' 5 | alias txn='tmux new -s' 6 | alias txa='tmux a -t' 7 | -------------------------------------------------------------------------------- /aliases/available/todo.txt-cli.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'todo.txt-cli abbreviations' 3 | 4 | alias tls='"${TODO?}" ls' 5 | alias ta='"${TODO?}" a' 6 | alias trm='"${TODO?}" rm' 7 | alias tdo='"${TODO?}" do' 8 | alias tpri='"${TODO?}" pri' 9 | -------------------------------------------------------------------------------- /aliases/available/uuidgen.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'uuidgen aliases' 3 | 4 | if _command_exists uuid; then # Linux 5 | alias uuidu="uuid | tr '[:lower:]' '[:upper:]'" 6 | alias uuidl=uuid 7 | elif _command_exists uuidgen; then # macOS/BSD 8 | alias uuidu="uuidgen" 9 | alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" # because upper case is like YELLING 10 | alias uuidl=uuid 11 | fi 12 | -------------------------------------------------------------------------------- /aliases/available/vagrant.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'vagrant aliases' 3 | 4 | # Aliases 5 | alias vhl='vagrant hosts list' 6 | alias vscp='vagrant scp' 7 | alias vsl='vagrant snapshot list' 8 | alias vst='vagrant snapshot take' 9 | alias vup="vagrant up" 10 | alias vupl="vagrant up 2>&1 | tee vagrant.log" 11 | alias vh="vagrant halt" 12 | alias vs="vagrant suspend" 13 | alias vr="vagrant resume" 14 | alias vrl="vagrant reload" 15 | alias vssh="vagrant ssh" 16 | alias vst="vagrant status" 17 | alias vp="vagrant provision" 18 | alias vdstr="vagrant destroy" 19 | # requires vagrant-list plugin 20 | alias vl="vagrant list" 21 | # requires vagrant-hostmanager plugin 22 | alias vhst="vagrant hostmanager" 23 | -------------------------------------------------------------------------------- /aliases/available/vault.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'vault aliases' 3 | 4 | # Aliases 5 | alias vad="vault delete" 6 | alias val="vault list" 7 | alias var="vault read" 8 | alias varn="vault renew" 9 | alias varv="vault revoke" 10 | alias vasrv="vault server" 11 | alias vas="vault status" 12 | alias vav="vault version" 13 | alias vaw="vault write" 14 | alias vag="vault login -method=github" 15 | alias varv="vault read -field=value" 16 | -------------------------------------------------------------------------------- /aliases/available/vim.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'vim abbreviations' 3 | 4 | _command_exists vim || return 5 | 6 | alias v='vim' 7 | # open the vim help in fullscreen incorporated from 8 | # https://stackoverflow.com/a/4687513 9 | alias vimh='vim -c ":h | only"' 10 | 11 | # open vim in new tab is taken from 12 | # http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek 13 | _command_exists mvim && function mvimt { command mvim --remote-tab-silent "$@" || command mvim "$@"; } 14 | _command_exists gvim && function gvimt { command gvim --remote-tab-silent "$@" || command gvim "$@"; } 15 | -------------------------------------------------------------------------------- /aliases/available/yarn.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-alias 'yarn package manager aliases' 3 | 4 | # Aliases 5 | alias ya='yarn' 6 | alias yai='yarn init' 7 | alias yaa='yarn add' 8 | alias yaga='yarn global add' 9 | alias yaad='yarn add --dev' 10 | alias yau='yarn upgrade' 11 | alias yarm='yarn remove' 12 | alias yagrm='yarn global remove' 13 | alias yaod='yarn outdated' 14 | alias yapa='yarn pack' 15 | alias yap='yarn publish' 16 | alias yasu='yarn self-update' 17 | alias yaru='yarn run' 18 | alias yat='yarn test' 19 | alias yas='yarn serve' 20 | alias yacc='yarn cache clean' 21 | alias yack='yarn check' 22 | alias yals='yarn list' 23 | alias yain='yarn info' 24 | alias yali='yarn licenses ls' 25 | alias yaloi='yarn login' 26 | alias yaloo='yarn logout' 27 | -------------------------------------------------------------------------------- /completion/available/apm.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "apm completion" 3 | # shellcheck disable=SC1090 4 | source "${BASH_IT}"/vendor/github.com/vigo/apm-bash-completion/apm 5 | -------------------------------------------------------------------------------- /completion/available/awless.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | if _command_exists awless; then 3 | # shellcheck disable=SC1090 4 | source <(awless completion bash) 5 | fi 6 | -------------------------------------------------------------------------------- /completion/available/awscli.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | if _command_exists aws_completer; then 4 | complete -C "$(command -v aws_completer)" aws 5 | fi 6 | -------------------------------------------------------------------------------- /completion/available/brew.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "brew completion" 4 | 5 | # Load late to make sure `system` completion loads first 6 | # BASH_IT_LOAD_PRIORITY: 375 7 | 8 | if [[ "$OSTYPE" != 'darwin'* ]]; then 9 | _log_warning "unsupported operating system - only 'Darwin' is supported" 10 | return 0 11 | fi 12 | 13 | # Make sure brew is installed 14 | _bash_it_homebrew_check || return 0 15 | 16 | if [[ -r "$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew" ]]; then 17 | # shellcheck disable=1090,1091 18 | source "$BASH_IT_HOMEBREW_PREFIX/etc/bash_completion.d/brew" 19 | 20 | elif [[ -r "$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh" ]]; then 21 | # shellcheck disable=1090,1091 22 | source "$BASH_IT_HOMEBREW_PREFIX/Library/Contributions/brew_bash_completion.sh" 23 | 24 | elif [[ -f "$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew" ]]; then 25 | # For the git-clone based installation, see here for more info: 26 | # https://github.com/Bash-it/bash-it/issues/1458 27 | # https://docs.brew.sh/Shell-Completion 28 | # shellcheck disable=1090,1091 29 | source "$BASH_IT_HOMEBREW_PREFIX/completions/bash/brew" 30 | fi 31 | -------------------------------------------------------------------------------- /completion/available/capistrano.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # Bash completion support for Capistrano. 3 | 4 | export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/} 5 | 6 | _capcomplete() { 7 | if [ -f Capfile ]; then 8 | # shellcheck disable=SC2012 9 | recent=$(ls -t .cap_tasks~ Capfile ./**/*.cap 2> /dev/null | head -n 1) 10 | if [[ $recent != '.cap_tasks~' ]]; then 11 | if cap --version | grep -q 'Capistrano v2.'; then 12 | # Capistrano 2.x 13 | cap --tool --verbose --tasks | cut -d " " -f 2 > .cap_tasks~ 14 | else 15 | # Capistrano 3.x 16 | cap --all --tasks | cut -d " " -f 2 > .cap_tasks~ 17 | fi 18 | fi 19 | # shellcheck disable=SC2207 20 | COMPREPLY=($(compgen -W "$(cat .cap_tasks~)" -- "${COMP_WORDS[COMP_CWORD]}")) 21 | return 0 22 | fi 23 | } 24 | 25 | complete -o default -o nospace -F _capcomplete cap 26 | -------------------------------------------------------------------------------- /completion/available/cargo.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # cargo (Rust package manager) completion 3 | 4 | if _binary_exists rustup && _binary_exists cargo; then 5 | eval "$(rustup completions bash cargo)" 6 | fi 7 | -------------------------------------------------------------------------------- /completion/available/conda.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "conda completion" 4 | 5 | if _command_exists conda; then 6 | if _command_exists register-python-argcomplete; then 7 | eval "$(register-python-argcomplete conda)" 8 | else 9 | _log_warning "Argcomplete not found. Please run 'conda install argcomplete'" 10 | fi 11 | fi 12 | -------------------------------------------------------------------------------- /completion/available/consul.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "Hashicorp consul completion" 4 | 5 | if _command_exists consul; then 6 | complete -C "$(command -v consul)" consul 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/crystal.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning 'Bash completion for "crystal" is now covered by "system". This completion can be disabled.' 3 | -------------------------------------------------------------------------------- /completion/available/defaults.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1090 3 | 4 | if test -s "${BASH_IT?}/vendor/github.com/gaelicWizard/bash-progcomp/defaults.completion.bash"; then 5 | source "$_" 6 | fi 7 | -------------------------------------------------------------------------------- /completion/available/dirs.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # Bash completion support for the 'dirs' plugin (commands G, R). 3 | 4 | _dirs-complete() { 5 | local CURRENT_PROMPT="${COMP_WORDS[COMP_CWORD]}" 6 | 7 | # parse all defined shortcuts from ~/.dirs 8 | if [ -r "$HOME/.dirs" ]; then 9 | # shellcheck disable=SC2207 10 | COMPREPLY=($(compgen -W "$(grep -v '^#' ~/.dirs | sed -e 's/\(.*\)=.*/\1/')" -- "${CURRENT_PROMPT}")) 11 | fi 12 | 13 | return 0 14 | } 15 | 16 | complete -o default -o nospace -F _dirs-complete G R 17 | -------------------------------------------------------------------------------- /completion/available/django.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "django completion" 3 | # shellcheck disable=SC1090 4 | source "${BASH_IT}"/vendor/github.com/django/django/extras/django_bash_completion 5 | -------------------------------------------------------------------------------- /completion/available/dmidecode.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | function __dmidecode_completion() { 4 | # shellcheck disable=SC2155 5 | local prev=$(_get_pword) 6 | # shellcheck disable=SC2155 7 | local curr=$(_get_cword) 8 | 9 | case $prev in 10 | -s | --string | -t | --type) 11 | OPTS=$(dmidecode "$prev" 2>&1 | grep -E '^ ' | sed 's/ *//g') 12 | # shellcheck disable=SC2207 13 | COMPREPLY=($(compgen -W "$OPTS" -- "$curr")) 14 | ;; 15 | dmidecode) 16 | # shellcheck disable=SC2207 17 | COMPREPLY=($(compgen -W "-d --dev-mem -h --help -q --quiet -s --string -t --type -H --handle -u --dump{,-bin} --from-dump --no-sysfs --oem-string -V --version" -- "$curr")) 18 | ;; 19 | esac 20 | } 21 | 22 | complete -F __dmidecode_completion dmidecode 23 | -------------------------------------------------------------------------------- /completion/available/docker-machine.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning '"docker-machine" is now deprecated, and as such the bash completion for it is also deprecated. 3 | Please disable this completion.' 4 | -------------------------------------------------------------------------------- /completion/available/docker.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "docker completion" 4 | 5 | # Make sure docker is installed 6 | _command_exists docker || return 7 | 8 | # Don't handle completion if it's already managed 9 | _completion_exists docker && return 10 | 11 | _docker_bash_completion_paths=( 12 | # MacOS 13 | '/Applications/Docker.app/Contents/Resources/etc/docker.bash-completion' 14 | # Linux 15 | '/usr/share/bash-completion/completions/docker' 16 | ) 17 | 18 | for fn in "${_docker_bash_completion_paths[@]}"; do 19 | if [ -r "$fn" ]; then 20 | # shellcheck disable=SC1090 21 | source "$fn" 22 | break 23 | fi 24 | done 25 | -------------------------------------------------------------------------------- /completion/available/dotnet.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "bash parameter completion for the dotnet CLI" 3 | # see https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#bash 4 | 5 | function _dotnet_bash_complete() { 6 | local cur="${COMP_WORDS[COMP_CWORD]}" IFS=$'\n' 7 | local candidates 8 | 9 | read -d '' -ra candidates < <(dotnet complete --position "${COMP_POINT}" "${COMP_LINE}" 2> /dev/null) 10 | 11 | read -d '' -ra COMPREPLY < <(compgen -W "${candidates[*]:-}" -- "$cur") 12 | } 13 | 14 | complete -f -F _dotnet_bash_complete dotnet 15 | -------------------------------------------------------------------------------- /completion/available/drush.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning 'Bash completion for "drush" is now deprecated, as it used code with incompatible license. 3 | Please disable this completion and use the instructions from "drush" developers instead.' 4 | -------------------------------------------------------------------------------- /completion/available/export.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | complete -o nospace -S = -W "$(printenv | awk -F= "{print \$1}")" export 4 | -------------------------------------------------------------------------------- /completion/available/flutter.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | if _command_exists flutter; then 4 | eval "$(flutter bash-completion)" 5 | fi 6 | -------------------------------------------------------------------------------- /completion/available/gcloud.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "Google Cloud SDK completion" 4 | 5 | if _command_exists gcloud; then 6 | # get install path 7 | GOOGLE_SDK_ROOT=${GOOGLE_SDK_ROOT:-$(gcloud info --format="value(installation.sdk_root)")} 8 | 9 | # source all the bash completion file that are available 10 | for i in "${GOOGLE_SDK_ROOT}"/*.bash.inc; do 11 | # shellcheck disable=SC1090 12 | source "$i" 13 | done 14 | fi 15 | -------------------------------------------------------------------------------- /completion/available/gem.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "gem completion" 4 | 5 | __gem_completion() { 6 | local cur=${COMP_WORDS[COMP_CWORD]} 7 | local prev=${COMP_WORDS[COMP_CWORD - 1]} 8 | case $prev in 9 | install) 10 | # list the remote gems and add to completion 11 | if [ -z "$REMOTE_GEMS" ]; then 12 | read -r -a REMOTE_GEMS <<< "$(gem list --remote --no-versions | sed 's/\*\*\* REMOTE GEMS \*\*\*//' | tr '\n' ' ')" 13 | fi 14 | 15 | local cur=${COMP_WORDS[COMP_CWORD]} 16 | # shellcheck disable=SC2207 17 | COMPREPLY=($(compgen -W "${REMOTE_GEMS[*]}" -- "$cur")) 18 | return 0 19 | ;; 20 | uninstall) 21 | # list all local installed gems and add to completion 22 | read -r -a LOCAL_GEMS <<< "$(gem list --no-versions | sed 's/\*\*\* LOCAL GEMS \*\*\*//' | tr '\n' ' ')" 23 | 24 | local cur=${COMP_WORDS[COMP_CWORD]} 25 | # shellcheck disable=SC2207 26 | COMPREPLY=($(compgen -W "${LOCAL_GEMS[*]}" -- "$cur")) 27 | return 0 28 | ;; 29 | esac 30 | local commands=(build cert check cleanup contents dependency environment fetch generate_index help install list lock outdated owner pristine push query rdoc search server sources specification stale uninstall unpack update which) 31 | # shellcheck disable=SC2207 32 | COMPREPLY=($(compgen -W "${commands[*]}" -- "$cur")) 33 | } 34 | 35 | complete -F __gem_completion gem 36 | -------------------------------------------------------------------------------- /completion/available/git.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # Locate and load completions for `git`. 4 | 5 | # Make sure git is installed 6 | _command_exists git || return 7 | 8 | # Don't handle completion if it's already managed 9 | if complete -p git &> /dev/null; then 10 | _log_warning "completion already loaded - this usually means it is safe to stop using this completion" 11 | return 0 12 | fi 13 | 14 | _git_bash_completion_xcrun_git= 15 | if _command_exists xcrun; then 16 | _git_bash_completion_xcrun_git="$(xcrun --find git)" 17 | fi 18 | _git_bash_completion_paths=( 19 | # Standard locations 20 | "${GIT_EXE%/*}/../share/git-core/git-completion.bash" 21 | "${GIT_EXE%/*}/../share/git-core/contrib/completion/git-completion.bash" 22 | "${GIT_EXE%/*}/../etc/bash_completion.d/git-completion.bash" 23 | # MacOS non-system locations 24 | "${_git_bash_completion_xcrun_git%/bin/git}/share/git-core/git-completion.bash" 25 | ) 26 | 27 | # Load the first completion file found 28 | _git_bash_completion_found=false 29 | for _comp_path in "${_git_bash_completion_paths[@]}"; do 30 | if [[ -r "$_comp_path" ]]; then 31 | _git_bash_completion_found=true 32 | # shellcheck disable=SC1090 # don't follow 33 | source "$_comp_path" 34 | break 35 | fi 36 | done 37 | 38 | # Cleanup 39 | if [[ "${_git_bash_completion_found}" == false ]]; then 40 | _log_warning "no completion files found - please try enabling the 'system' completion instead." 41 | fi 42 | unset "${!_git_bash_completion@}" 43 | -------------------------------------------------------------------------------- /completion/available/github-cli.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "GitHub CLI completion" 4 | 5 | if _binary_exists gh; then 6 | # If gh already completed, stop 7 | _completion_exists gh && return 8 | eval "$(gh completion --shell=bash)" 9 | fi 10 | -------------------------------------------------------------------------------- /completion/available/go.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "completion for go command using gocomplete" 3 | 4 | # bash completion for go tool 5 | # https://github.com/posener/complete 6 | 7 | # Test `go version` because goenv creates shim scripts that will be found in PATH 8 | # but do not always resolve to a working install. 9 | if _command_exists go && go version &> /dev/null; then 10 | # Same idea here, but no need to test a subcommand 11 | if _command_exists gocomplete && gocomplete &> /dev/null; then 12 | # finally, apply completion 13 | complete -C gocomplete go 14 | fi 15 | fi 16 | -------------------------------------------------------------------------------- /completion/available/helm.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "helm (Kubernetes Package Manager) completion" 4 | 5 | if _command_exists helm; then 6 | eval "$(helm completion bash)" 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/homesick.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning 'Bash completion for "homesick" is now deprecated, as it used unlicensed code. 3 | Please disable this completion and use the instructions from "homesick" bash completion developers instead.' 4 | -------------------------------------------------------------------------------- /completion/available/jboss5.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "jboss5 completion" 3 | # shellcheck disable=SC1090 4 | source "${BASH_IT}"/vendor/github.com/rparree/jboss-bash-completion/jboss5 5 | -------------------------------------------------------------------------------- /completion/available/jboss7.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "jboss7 completion" 3 | # shellcheck disable=SC1090 4 | source "${BASH_IT}"/vendor/github.com/rparree/jboss-bash-completion/jboss7 5 | -------------------------------------------------------------------------------- /completion/available/jungle.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "jungle(AWS cli tool) completion" 4 | 5 | if _command_exists jungle; then 6 | eval "$(_JUNGLE_COMPLETE=source jungle)" 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/kind.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | if _command_exists kind; then 4 | eval "$(kind completion bash)" 5 | fi 6 | -------------------------------------------------------------------------------- /completion/available/kontena.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | if _command_exists kontena; then 3 | # shellcheck disable=SC1090 4 | source "$(kontena whoami --bash-completion-path)" 5 | fi 6 | -------------------------------------------------------------------------------- /completion/available/kubectl.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "kubectl (Kubernetes CLI) completion" 4 | 5 | if _binary_exists kubectl; then 6 | eval "$(kubectl completion bash)" 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/laravel.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | _command_exists laravel || return 4 | 5 | function __laravel_completion() { 6 | local OPTS=('-h' '--help' '-q' '--quiet' '--ansi' '--no-ansi' '-n' '--no-interaction' '-v' '-vv' '-vvv' '--verbose' 'help' 'list' 'new') 7 | local _opt_ 8 | COMPREPLY=() 9 | for _opt_ in "${OPTS[@]}"; do 10 | if [[ "$_opt_" == "$2"* ]]; then 11 | COMPREPLY+=("$_opt_") 12 | fi 13 | done 14 | } 15 | 16 | complete -F __laravel_completion laravel 17 | -------------------------------------------------------------------------------- /completion/available/lerna.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "lerna(javascript project manager tool) completion" 4 | 5 | function __lerna_completion() { 6 | local cur compls 7 | 8 | # The currently-being-completed word. 9 | cur="${COMP_WORDS[COMP_CWORD]}" 10 | 11 | # Options 12 | compls="add bootstrap changed clean create diff exec \ 13 | import init link list publish run version \ 14 | --loglevel --concurrency --reject-cycles \ 15 | --progress --sort --no-sort --help \ 16 | --version" 17 | 18 | # Tell complete what stuff to show. 19 | # shellcheck disable=2207 20 | COMPREPLY=($(compgen -W "$compls" -- "$cur")) 21 | } 22 | complete -o default -F __lerna_completion lerna 23 | -------------------------------------------------------------------------------- /completion/available/makefile.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # Bash completion for Makefile 4 | # Loosely adapted from http://stackoverflow.com/a/38415982/1472048 5 | 6 | _makecomplete() { 7 | COMPREPLY=() 8 | 9 | # https://www.gnu.org/software/make/manual/html_node/Makefile-Names.html 10 | local files=() 11 | for f in 'GNUmakefile' 'makefile' 'Makefile'; do 12 | [ -f "$f" ] && files+=("$f") 13 | done 14 | 15 | [ "${#files[@]}" -eq 0 ] && return 0 16 | 17 | # collect all targets 18 | local targets=() 19 | for f in "${files[@]}"; do 20 | while IFS='' read -r line; do 21 | targets+=("$line") 22 | done < <(grep -E -o '^[a-zA-Z0-9_-]+:([^=]|$)' "$f" | cut -d':' -f1) 23 | done 24 | 25 | [ "${#targets[@]}" -eq 0 ] && return 0 26 | 27 | # use the targets for completion 28 | while IFS='' read -r line; do 29 | COMPREPLY+=("$line") 30 | done < <(compgen -W "$(tr ' ' '\n' <<< "${targets[@]}" | sort -u)" -- "${COMP_WORDS[COMP_CWORD]}") 31 | 32 | return 0 33 | } 34 | 35 | complete -o nospace -F _makecomplete make 36 | complete -o nospace -F _makecomplete gnumake 37 | -------------------------------------------------------------------------------- /completion/available/minikube.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # minikube (Local Kubernetes) completion 3 | 4 | if _command_exists minikube; then 5 | eval "$(minikube completion bash)" 6 | fi 7 | -------------------------------------------------------------------------------- /completion/available/minishift.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1090 3 | _command_exists minishift && source <(minishift completion bash) 4 | -------------------------------------------------------------------------------- /completion/available/ng.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | if _command_exists ng; then 3 | # No longer supported, please see https://github.com/angular/angular-cli/issues/11043 4 | # Fix courtesy of https://stackoverflow.com/questions/50194674/ng-completion-no-longer-exists 5 | # . <(ng completion --bash) 6 | 7 | NG_COMMANDS="add build config doc e2e generate help lint new run serve test update version xi18n" 8 | complete -W "$NG_COMMANDS" ng 9 | fi 10 | -------------------------------------------------------------------------------- /completion/available/ngrok.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | __ngrok_completion() { 4 | # shellcheck disable=SC2155 5 | local prev=$(_get_pword) 6 | # shellcheck disable=SC2155 7 | local curr=$(_get_cword) 8 | 9 | local BASE_NO_CONF="--log --log-format --log-level --help" 10 | local BASE="--config $BASE_NO_CONF" 11 | local DEFAULT="$BASE --authtoken --region" 12 | 13 | case $prev in 14 | authtoken) 15 | # shellcheck disable=SC2207 16 | COMPREPLY=($(compgen -W "$BASE" -- "$curr")) 17 | ;; 18 | http) 19 | # shellcheck disable=SC2207 20 | COMPREPLY=($(compgen -W "$DEFAULT --auth --bind-tls --host-header --hostname --inspect --subdomain" -- "$curr")) 21 | ;; 22 | start) 23 | # shellcheck disable=SC2207 24 | COMPREPLY=($(compgen -W "$DEFAULT --all --none" -- "$curr")) 25 | ;; 26 | tcp) 27 | # shellcheck disable=SC2207 28 | COMPREPLY=($(compgen -W "$DEFAULT --remote-addr" -- "$curr")) 29 | ;; 30 | tls) 31 | # shellcheck disable=SC2207 32 | COMPREPLY=($(compgen -W "$DEFAULT --client-cas --crt --hostname --key --subdomain" -- "$curr")) 33 | ;; 34 | update) 35 | # shellcheck disable=SC2207 36 | COMPREPLY=($(compgen -W "$BASE_NO_CONF --channel" -- "$curr")) 37 | ;; 38 | ngrok) 39 | # shellcheck disable=SC2207 40 | COMPREPLY=($(compgen -W "authtoken credits http start tcp tls update version help" -- "$curr")) 41 | ;; 42 | *) ;; 43 | 44 | esac 45 | } 46 | 47 | complete -F __ngrok_completion ngrok 48 | -------------------------------------------------------------------------------- /completion/available/notify-send.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | function __notify-send_completions() { 4 | # shellcheck disable=SC2155 5 | local curr=$(_get_cword) 6 | # shellcheck disable=SC2155 7 | local prev=$(_get_pword) 8 | 9 | case $prev in 10 | -u | --urgency) 11 | # shellcheck disable=SC2207 12 | COMPREPLY=($(compgen -W "low normal critical" -- "$curr")) 13 | ;; 14 | *) 15 | # shellcheck disable=SC2207 16 | COMPREPLY=($(compgen -W "-? --help -u --urgency -t --expire-time -a --app-name -i --icon -c --category -h --hint -v --version" -- "$curr")) 17 | ;; 18 | esac 19 | } 20 | 21 | complete -F __notify-send_completions notify-send 22 | -------------------------------------------------------------------------------- /completion/available/npm.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "npm (Node Package Manager) completion" 4 | 5 | if _command_exists npm; then 6 | eval "$(npm completion)" 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/nvm.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # nvm (Node Version Manager) completion 4 | 5 | if [ "$NVM_DIR" ] && [ -r "$NVM_DIR"/bash_completion ]; then 6 | . "$NVM_DIR"/bash_completion 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/openshift.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1090 3 | _command_exists oc && source <(oc completion bash) 4 | -------------------------------------------------------------------------------- /completion/available/packer.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "packer completion" 4 | 5 | if _binary_exists packer; then 6 | complete -C packer packer 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/pew.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1090 3 | 4 | if _command_exists pew; then 5 | source "$(pew shell_config)" 6 | fi 7 | -------------------------------------------------------------------------------- /completion/available/pip.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # https://pip.pypa.io/en/stable/user_guide/#command-completion 4 | # Of course, you should first install pip, say on Debian: 5 | # sudo apt-get install python-pip 6 | # If the pip package is installed within virtual environments, say, python managed by pyenv, 7 | # you should first initialize the corresponding environment. 8 | # So that pip is in the system's path. 9 | _command_exists pip || return 10 | 11 | function __bash_it_complete_pip() { 12 | if _command_exists _pip_completion; then 13 | complete -o default -F _pip_completion pip 14 | _pip_completion "$@" 15 | else 16 | eval "$(pip completion --bash)" 17 | _pip_completion "$@" 18 | fi 19 | } 20 | complete -o default -F __bash_it_complete_pip pip 21 | -------------------------------------------------------------------------------- /completion/available/pip3.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # https://pip.pypa.io/en/stable/user_guide/#command-completion 4 | # Of course, you should first install pip, say on Debian: 5 | # sudo apt-get install python3-pip 6 | # If the pip package is installed within virtual environments, say, python managed by pyenv, 7 | # you should first initialize the corresponding environment. 8 | # So that pip3 is in the system's path. 9 | _command_exists pip3 || return 10 | 11 | function __bash_it_complete_pip3() { 12 | if _command_exists _pip_completion; then 13 | complete -o default -F _pip_completion pip3 14 | _pip_completion "$@" 15 | else 16 | eval "$(pip3 completion --bash)" 17 | _pip_completion "$@" 18 | fi 19 | } 20 | complete -o default -F __bash_it_complete_pip3 pip3 21 | -------------------------------------------------------------------------------- /completion/available/pipenv.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | if _command_exists pipenv; then 3 | eval "$(_PIPENV_COMPLETE=bash_source pipenv)" 4 | fi 5 | -------------------------------------------------------------------------------- /completion/available/pipx.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # pipx completion 3 | 4 | if _command_exists register-python-argcomplete && _command_exists pipx; then 5 | eval "$(register-python-argcomplete pipx)" 6 | fi 7 | -------------------------------------------------------------------------------- /completion/available/rake.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # Bash completion support for Rake, Ruby Make. 3 | 4 | export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/} 5 | 6 | _rakecomplete() { 7 | if [ -f Rakefile ]; then 8 | #shellcheck disable=SC2012 9 | recent=$(ls -t -- .rake_tasks~ Rakefile **/*.rake 2> /dev/null | head -n 1) 10 | if [[ $recent != '.rake_tasks~' ]]; then 11 | rake --silent --tasks | cut -d " " -f 2 > .rake_tasks~ 12 | fi 13 | local line 14 | while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "$(cat .rake_tasks~)" -- "${COMP_WORDS[COMP_CWORD]}") 15 | return 0 16 | fi 17 | } 18 | 19 | complete -o default -o nospace -F _rakecomplete rake 20 | -------------------------------------------------------------------------------- /completion/available/rustup.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # rustup (Rust toolchain installer) completion 4 | 5 | if _binary_exists rustup; then 6 | eval "$(rustup completions bash)" 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/rvm.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2154,SC1091 3 | # Bash completion support for RVM. 4 | # Source: https://rvm.io/workflow/completion 5 | 6 | [[ -r $rvm_path/scripts/completion ]] && . "$rvm_path/scripts/completion" 7 | -------------------------------------------------------------------------------- /completion/available/svn.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # Locate and load completions for `svn`. 4 | 5 | # Make sure svn is installed 6 | _command_exists svn || return 7 | 8 | # Don't handle completion if it's already managed 9 | if _completion_exists svn; then 10 | _log_warning "completion already loaded - this usually means it is safe to stop using this completion" 11 | return 0 12 | fi 13 | 14 | _svn_bash_completion_xcrun_svn= 15 | if _command_exists xcrun; then 16 | _svn_bash_completion_xcrun_svn="$(xcrun --find svn)" 17 | fi 18 | _svn_bash_completion_paths=( 19 | # Standard locations 20 | "${SVN_EXE%/*}/../etc/bash_completion.d/subversion" 21 | # MacOS non-system locations 22 | "${_svn_bash_completion_xcrun_svn%/bin/svn}/etc/bash_completion.d/subversion" 23 | ) 24 | 25 | # Load the first completion file found 26 | _svn_bash_completion_found=false 27 | for _comp_path in "${_svn_bash_completion_paths[@]}"; do 28 | if [[ -r "$_comp_path" ]]; then 29 | _svn_bash_completion_found=true 30 | # shellcheck disable=SC1090 # don't follow 31 | source "$_comp_path" 32 | break 33 | fi 34 | done 35 | 36 | # Cleanup 37 | if [[ "${_svn_bash_completion_found}" == false ]]; then 38 | _log_warning "no completion files found - please try enabling the 'system' completion instead." 39 | fi 40 | unset "${!_svn_bash_completion@}" 41 | -------------------------------------------------------------------------------- /completion/available/terraform.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | if _command_exists terraform; then 4 | 5 | # Don't handle completion if it's already managed 6 | complete -p terraform &> /dev/null && return 7 | 8 | # Terraform completes itself 9 | complete -C terraform terraform 10 | 11 | elif _command_exists tofu; then 12 | 13 | # Don't handle completion if it's already managed 14 | complete -p tofu &> /dev/null && return 15 | 16 | # OpenTofu completes itself 17 | complete -C tofu tofu 18 | 19 | fi 20 | -------------------------------------------------------------------------------- /completion/available/test_kitchen.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2120,SC2207 3 | __kitchen_instance_list() { 4 | # cache to .kitchen.list.yml 5 | if [[ .kitchen.yml -nt .kitchen.list.yml || .kitchen.local.yml -nt .kitchen.list.yml ]]; then 6 | # update list if config has updated 7 | kitchen list --bare > .kitchen.list.yml 8 | fi 9 | cat .kitchen.list.yml 10 | } 11 | 12 | __kitchen_options() { 13 | cur="${COMP_WORDS[COMP_CWORD]}" 14 | prev="${COMP_WORDS[COMP_CWORD - 1]}" 15 | COMPREPLY=() 16 | 17 | case $prev in 18 | converge | create | destroy | diagnose | list | login | setup | test | verify) 19 | COMPREPLY=($(compgen -W "$(__kitchen_instance_list)" -- "${cur}")) 20 | return 0 21 | ;; 22 | driver) 23 | COMPREPLY=($(compgen -W "create discover help" -- "${cur}")) 24 | return 0 25 | ;; 26 | *) 27 | COMPREPLY=($(compgen -W "console converge create destroy driver help init list login setup test verify version" -- "${cur}")) 28 | return 0 29 | ;; 30 | esac 31 | } 32 | complete -F __kitchen_options kitchen 33 | -------------------------------------------------------------------------------- /completion/available/todo.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning 'Bash completion for "todo.txt-cli" is now deprecated, as it used code with incompatible license. 3 | Please disable this completion and use the instructions from "todo.txt-cli" developers instead.' 4 | -------------------------------------------------------------------------------- /completion/available/travis.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1090 3 | 4 | if _command_exists travis; then 5 | if [[ -s "${__TRAVIS_COMPLETION_SCRIPT:=${TRAVIS_CONFIG_PATH:-${HOME}/.travis}/travis.sh}" ]]; then 6 | source "${__TRAVIS_COMPLETION_SCRIPT}" 7 | fi 8 | unset __TRAVIS_COMPLETION_SCRIPT 9 | fi 10 | -------------------------------------------------------------------------------- /completion/available/vault.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite "about-completion" 3 | about-completion "vault completion" 4 | 5 | if _binary_exists vault; then 6 | complete -C vault vault 7 | fi 8 | -------------------------------------------------------------------------------- /completion/available/virsh.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | _log_warning 'Bash completion for "virsh" is now deprecated, as it used code with incompatible license. 3 | Please disable this completion and use the instructions from "virsh" developers instead.' 4 | -------------------------------------------------------------------------------- /completion/available/wpscan.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | _command_exists wpscan || return 4 | 5 | function __wpscan_completion() { 6 | local _opt_ 7 | local OPTS=('--help' '--hh' '--version' '--url' '--ignore-main-redirect' '--verbose' '--output' '--format' '--detection-mode' '--scope' '--headers' '--user-agent' '--vhost' '--random-user-agent' '--user-agents-list' '--http-auth' '--max-threads' '--throttle' '--request-timeout' '--connect-timeout' '--disable-tlc-checks' '--proxy' '--proxy-auth' '--cookie-string' '--cookie-jar' '--cache-ttl' '--clear-cache' '--server' '--cache-dir' '--update' '--no-update' '--wp-content-dir' '--wp-plugins-dir' '--wp-version-detection' '--main-theme-detection' '--enumerate' '--exclude-content-based' '--plugins-list' '--plugins-detection' '--plugins-version-all' '--plugins-version-detection' '--themes-list' '--themes-detection' '--themes-version-all' '--themes-version-detection' '--timthumbs-list' '--timthumbs-detection' '--config-backups-list' '--config-backups-detection' '--db-exports-list' '--db-exports-detection' '--medias-detection' '--users-list' '--users-detection' '--passwords' '--usernames' '--multicall-max-passwords' '--password-attack' '--stealthy') 8 | COMPREPLY=() 9 | for _opt_ in "${OPTS[@]}"; do 10 | if [[ "$_opt_" == "$2"* ]]; then 11 | COMPREPLY+=("$_opt_") 12 | fi 13 | done 14 | } 15 | 16 | complete -F __wpscan_completion wpscan 17 | -------------------------------------------------------------------------------- /completion/available/yarn.completion.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-completion "yarn cli completions" 3 | 4 | # shellcheck disable=SC1090 source=../../vendor/github.com/dsifford/yarn-completion/yarn 5 | source "${BASH_IT}/vendor/github.com/dsifford/yarn-completion/yarn" 6 | -------------------------------------------------------------------------------- /custom/example.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # This is an example file. Don't use this for your custom scripts. Instead, create another file within the 4 | # custom directory. 5 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_static/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/docs/_static/.keep -------------------------------------------------------------------------------- /docs/_templates/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/docs/_templates/.keep -------------------------------------------------------------------------------- /docs/commands/doctor.rst: -------------------------------------------------------------------------------- 1 | .. _doctor: 2 | 3 | Bash-it doctor 4 | ^^^^^^^^^^^^^^ 5 | 6 | If you encounter problems with any part of Bash-it, run the following command: 7 | 8 | .. code-block:: bash 9 | 10 | bash-it doctor 11 | 12 | This will reload your bash profile and print out logs of various parts in Bash-it. 13 | Note that this command at default will print all logs, including debug logs. 14 | You can call it like this: 15 | 16 | .. code-block:: bash 17 | 18 | bash-it doctor [errors/warnings/all] 19 | 20 | In order to get wanted verbosity. 21 | -------------------------------------------------------------------------------- /docs/commands/index.rst: -------------------------------------------------------------------------------- 1 | .. _commands: 2 | 3 | Bash-it Commands 4 | ================ 5 | 6 | **Bash-it** boasts a wide range of available commands. 7 | You should be familiar with them in order to fully utilize Bash-it. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | update 13 | search 14 | reload 15 | doctor 16 | profile 17 | -------------------------------------------------------------------------------- /docs/commands/profile.rst: -------------------------------------------------------------------------------- 1 | .. _profile: 2 | 3 | Bash-it Profile 4 | --------------- 5 | 6 | Have you ever wanted to port your *Bash-it* configuration into another machine? 7 | 8 | If you did, then ``bash-it profile`` is for you! 9 | 10 | This command can save and load custom *"profile"* files, that can be later 11 | used to load and recreate your configuration, in any machine you would like |:smile:| 12 | 13 | When porting your configuration into a new machine, you just need to save your current profile, copy the resulting *"profile"* file, and load it in the other machine. 14 | 15 | Example 16 | ^^^^^^^ 17 | 18 | .. code-block:: bash 19 | 20 | # Saves your current profile 21 | bash-it profile save my_profile 22 | # Load the default profile, which is the one used in the default installation. 23 | bash-it profile load default 24 | 25 | # Do whatever you want: 26 | # Disable stuff 27 | bash-it disable ... 28 | # Enable stuff 29 | bash-it enable ... 30 | # If you want to get back into your original configuration, you can do it easily 31 | bash-it profile load my_profile 32 | -------------------------------------------------------------------------------- /docs/commands/reload.rst: -------------------------------------------------------------------------------- 1 | .. _reload: 2 | 3 | Bash-it reload 4 | ^^^^^^^^^^^^^^ 5 | 6 | Bash-it creates a ``reload`` alias that makes it convenient to reload 7 | your Bash profile when you make changes. 8 | 9 | Additionally, if you export ``BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE`` as a non-null value, 10 | Bash-it will automatically reload itself after activating or deactivating plugins, aliases, or completions. 11 | 12 | .. warning:: 13 | When changing theme, do not use ``bash-it reload``. Instead, use :ref:`restart`. 14 | 15 | .. _restart: 16 | 17 | Bash-it restart 18 | ^^^^^^^^^^^^^^^ 19 | 20 | Similar to :ref:`reload`, ``bash-it restart`` can be used to restart your shell. 21 | Instead of reloading your Bash profile, this command re-runs Bash (using exec). 22 | 23 | This is stronger than simple reload, and is similar to the effect of closing and reopening your terminal. 24 | -------------------------------------------------------------------------------- /docs/commands/update.rst: -------------------------------------------------------------------------------- 1 | .. _update: 2 | 3 | Bash-it update 4 | ^^^^^^^^^^^^^^ 5 | 6 | To update Bash-it to the latest stable version, simply run: 7 | 8 | .. code-block:: bash 9 | 10 | bash-it update stable 11 | 12 | If you want to update to the latest dev version (directly from master), run: 13 | 14 | .. code-block:: bash 15 | 16 | bash-it update dev 17 | 18 | If you want to update automatically and unattended, you can add the optional 19 | ``-s/--silent`` flag, for example: 20 | 21 | .. code-block:: bash 22 | 23 | bash-it update dev --silent 24 | 25 | .. _migrate: 26 | 27 | Bash-it migrate 28 | ^^^^^^^^^^^^^^^ 29 | 30 | If you are using an older version of Bash-it, it's possible that some functionality has changed, or that the internal structure of how Bash-it organizes its functionality has been updated. 31 | For these cases, we provide a ``migrate`` command: 32 | 33 | .. code-block:: bash 34 | 35 | bash-it migrate 36 | 37 | This command will automatically migrate the Bash-it structure to the latest version. 38 | The ``migrate`` command is run automatically if you run the ``update``\ , ``enable`` or ``disable`` commands. 39 | -------------------------------------------------------------------------------- /docs/custom.rst: -------------------------------------------------------------------------------- 1 | .. _custom: 2 | 3 | Custom Content 4 | -------------- 5 | 6 | For custom scripts, and aliases, just create the following files (they'll be ignored by the git repo): 7 | 8 | 9 | * ``aliases/custom.aliases.bash`` 10 | * ``completion/custom.completion.bash`` 11 | * ``lib/custom.bash`` 12 | * ``plugins/custom.plugins.bash`` 13 | * ``custom/themes//.theme.bash`` 14 | 15 | Anything in the custom directory will be ignored, with the exception of ``custom/example.bash``. 16 | 17 | Alternately, if you would like to keep your custom scripts under version control, you can set ``BASH_IT_CUSTOM`` in your ``~/.bashrc`` to another location outside of the ``$BASH_IT`` folder. 18 | In this case, any ``*.bash`` file under every directory below ``BASH_IT_CUSTOM`` folder will be used. 19 | -------------------------------------------------------------------------------- /docs/help_screens.rst: -------------------------------------------------------------------------------- 1 | .. _help_screens: 2 | 3 | Help Screens 4 | ^^^^^^^^^^^^ 5 | 6 | .. code-block:: bash 7 | 8 | bash-it show aliases # shows installed and available aliases 9 | bash-it show completions # shows installed and available completions 10 | bash-it show plugins # shows installed and available plugins 11 | bash-it help aliases # shows help for installed aliases 12 | bash-it help completions # shows help for installed completions 13 | bash-it help plugins # shows help for installed plugins 14 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/misc.rst: -------------------------------------------------------------------------------- 1 | .. _misc: 2 | 3 | Misc 4 | ---- 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | help_screens 10 | proxy_support 11 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx==4.5.0 2 | sphinx-rtd-theme==0.5.0 3 | sphinxemoji==0.1.8 4 | docutils==0.17.1 5 | -------------------------------------------------------------------------------- /docs/themes-list/bira.rst: -------------------------------------------------------------------------------- 1 | .. _bira: 2 | 3 | Bira Theme 4 | ========== 5 | 6 | This is a port of Oh My Zsh's `'Bira' `_ theme. It looks the same as the original, except for the following changes: 7 | 8 | 9 | * Exit code of last command is not shown 10 | * More informative git prompt (if you want to keep it minimal, please read: :ref:`git_prompt`) 11 | * Position and colour of virtualenv prompt 12 | * No ruby version prompt 13 | -------------------------------------------------------------------------------- /docs/themes-list/codeword.rst: -------------------------------------------------------------------------------- 1 | .. _codeword: 2 | 3 | Codeword Theme 4 | ============== 5 | 6 | Single line PS1 theme w/realtime history among windows. 7 | Minimal theme overrides from bash_it base theming 8 | 9 | ``user@host:path[virt-env][scm] $`` 10 | --------------------------------------- 11 | 12 | Breakdown of the segments: 13 | 14 | 15 | * **user@host:path** - *convienient for LAN based ``ssh`` and ``scp`` tasks* 16 | * [\ **virtualenv**\ ] - *only appears when activated* 17 | * [\ **scm**\ ] - *only appears when activated* 18 | * **marker** - *$ or # depending on current user* 19 | 20 | Examples 21 | ^^^^^^^^ 22 | 23 | .. code-block:: bash 24 | 25 | user@example.lan:~ $ cd /tmp/foo/bar/baz 26 | user@example.lan:/tmp/foo/bar/baz $ cd $HOME/workspace 27 | user@example.lan:~/workspace $ cd sampleRepo/ 28 | user@example.lan:~/workspace/sampleRepo [± |master ↑1 ↓3 {1} S:2 ?:1 ✗|] $ 29 | -------------------------------------------------------------------------------- /docs/themes-list/easy.rst: -------------------------------------------------------------------------------- 1 | .. _easy: 2 | 3 | Easy Theme 4 | ========== 5 | 6 | A simple theme 7 | 8 | Examples 9 | -------- 10 | 11 | .. code-block:: bash 12 | 13 | user@hostname ~/.bash_it 14 | [ master ✓ ] ❯ 15 | -------------------------------------------------------------------------------- /docs/themes-list/inretio.rst: -------------------------------------------------------------------------------- 1 | .. _inretio: 2 | 3 | Inretio Theme 4 | ============= 5 | 6 | Simple theme showing date and time, username and hostname, current folder, Git details and as a bonus - virtual environment along with Python version available in it. 7 | 8 | Inspired by existing themes: 9 | - metal 10 | - bobby 11 | 12 | Examples 13 | -------- 14 | 15 | In Git-tracked folder: 16 | 17 | .. code-block:: bash 18 | 19 | ┌──[2024-03-20 12:05:07] 🐧 gytis 💻 gytis-legion 📂 bash-it on 🌵 theme-inretio ⌀1 ✗ 20 | └> ls 21 | aliases clean_files.txt custom hooks lib lint_clean_files.sh profiles template test_lib uninstall.sh 22 | bash_it.sh completion docs install.sh LICENSE plugins scripts test themes vendor 23 | 24 | 25 | In Python virtual environment: 26 | 27 | .. code-block:: bash 28 | 29 | ┌──[2024-03-20 12:07:32] 🐧 gytis 💻 gytis-legion 🐍 3.12.2 on [general] 📂 general 30 | └> ls 31 | bin include lib lib64 pyvenv.cfg share 32 | -------------------------------------------------------------------------------- /docs/themes-list/nwinkler_random_colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/docs/themes-list/nwinkler_random_colors.png -------------------------------------------------------------------------------- /docs/themes-list/nwinkler_random_colors.rst: -------------------------------------------------------------------------------- 1 | .. _nwinkler_random_color: 2 | 3 | Nwinkler Random Color Theme 4 | =========================== 5 | 6 | Description 7 | ----------- 8 | 9 | The *Nwinkler Random Color* Theme is based on the :ref:`Nwinkler Theme ` , but it randomizes the colors for: 10 | 11 | 12 | * time 13 | * username 14 | * hostname 15 | * path 16 | 17 | The random colors are chosen the first time this theme is used and saved to the ``~/.nwinkler_random_colors`` file. So, the next time you connect to the same machine, you will get the same colors. 18 | 19 | To force new random colors to be selected, run the command: 20 | 21 | .. code-block:: sh 22 | 23 | randomize_nwinkler 24 | 25 | Screenshot 26 | ---------- 27 | 28 | Here it is in action: 29 | 30 | 31 | .. image:: nwinkler_random_colors.png 32 | :target: nwinkler_random_colors.png 33 | :alt: alt text 34 | 35 | 36 | Usage Scenario 37 | -------------- 38 | 39 | This theme is especially useful when connecting to many different machines and switching between them often. Yes, the hostname *is* present in the prompt. But I argue that it's a lot faster to get a "feel" of what machine you are currently on because of the custom colors on that machine's prompt than by reading the hostname. 40 | -------------------------------------------------------------------------------- /docs/themes-list/oh-my-posh.rst: -------------------------------------------------------------------------------- 1 | .. _oh-my-posh: 2 | 3 | Oh-My-Posh Theme 4 | ================ 5 | 6 | The oh-my-posh ״theme״ is really a plug to a whole other system 7 | of managing your prompt. To use it please start here: 8 | `Oh-My-Posh homepage `_ 9 | 10 | It is beyond the scope of bash-it to install and manage oh-my-posh, 11 | this theme is here just to make sure your OMP setup doesn't clash 12 | with other bash-it themes. Once installed, OMP will load a default 13 | OMP theme (jandedobbeleer), which you can then customize or override. 14 | 15 | Note: Nerd Fonts are highly recommended, as most of the themes are graphic candies. 16 | -------------------------------------------------------------------------------- /docs/themes-list/powerline-naked.rst: -------------------------------------------------------------------------------- 1 | .. _powerline_naked: 2 | 3 | Powerline Naked Theme 4 | ===================== 5 | 6 | A colorful theme, where shows a lot information about your shell session. 7 | The naked powerline theme provides a cleaner shell with less background colors. 8 | 9 | See :ref:`powerline_base` for general information about the powerline theme. 10 | -------------------------------------------------------------------------------- /docs/themes-list/powerline-plain.rst: -------------------------------------------------------------------------------- 1 | .. _powerline_plain: 2 | 3 | Powerline Plain Theme 4 | ===================== 5 | 6 | A colorful theme, where shows a lot information about your shell session. 7 | The plain powerline theme provides a simpler shell with less information. 8 | 9 | See :ref:`powerline_base` for general information about the powerline theme. 10 | 11 | Soft Separators 12 | ^^^^^^^^^^^^^^^ 13 | 14 | Adjacent segments having the same background color will use a less-pronouced (i.e. soft) separator between them. 15 | -------------------------------------------------------------------------------- /docs/themes-list/powerline.rst: -------------------------------------------------------------------------------- 1 | .. _powerline: 2 | 3 | Powerline Theme 4 | =============== 5 | 6 | A colorful theme, where shows a lot information about your shell session. 7 | 8 | See :ref:`powerline_base` for general information about the powerline theme. 9 | 10 | Soft Separators 11 | ^^^^^^^^^^^^^^^ 12 | 13 | Adjacent segments having the same background color will use a less-pronouced (i.e. soft) separator between them. 14 | -------------------------------------------------------------------------------- /docs/themes-list/radek.rst: -------------------------------------------------------------------------------- 1 | .. _radek: 2 | 3 | Radek Theme 4 | =========== 5 | 6 | A colorful theme for Python developers. 7 | It does not have any requirements. 8 | 9 | Provided Information 10 | -------------------- 11 | 12 | 13 | * Current username and hostname 14 | * Current path 15 | * Git repository status 16 | * Current Python environment (venv, Conda ) 17 | * Current Python version 18 | 19 | Examples 20 | -------- 21 | 22 | .. code-block:: bash 23 | 24 | [radek@photon][~/src/nokia2/cbis] ±[master → origin ↑1 {1}✓][venv-cbis][py-3.7.5] 25 | → 26 | -------------------------------------------------------------------------------- /docs/themes-list/redline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/docs/themes-list/redline.png -------------------------------------------------------------------------------- /docs/themes-list/redline.rst: -------------------------------------------------------------------------------- 1 | .. _redline: 2 | 3 | Redline Theme 4 | ============= 5 | 6 | changed up the powerline base a little. 7 | 8 | It plays nicest with this font: `DroidSansMonoForPowerline `_ 9 | 10 | Read the :ref:`powerline theme documentation ` 11 | 12 | added 13 | ----- 14 | 15 | 16 | * hostname 17 | * distro logo 18 | 19 | changed 20 | ------- 21 | 22 | 23 | * sudo credential check 24 | * required font 25 | * some icons 26 | 27 | Works real good like with: 28 | 29 | .. code-block:: bash 30 | 31 | ## set the theme 32 | export BASH_IT_THEME='redline' 33 | 34 | # Set this to false to turn off version control status checking within the prompt for all themes 35 | export SCM_CHECK=true 36 | 37 | ## Set Xterm/screen/Tmux title with only a short hostname. 38 | export SHORT_HOSTNAME=$(hostname -s) 39 | 40 | ## enable sudo prompt 41 | export POWERLINE_PROMPT_USER_INFO_MODE="sudo" 42 | 43 | ## prompt part string 44 | export POWERLINE_PROMPT="python_venv user_info hostname cwd scm" 45 | 46 | enable your distro logo with 47 | ---------------------------- 48 | 49 | .. code-block:: bash 50 | 51 | export POWERLINE_PROMPT_DISTRO_LOGO="yes" 52 | 53 | 54 | .. image:: redline.png 55 | :target: redline.png?raw=true 56 | :alt: screenshot 57 | -------------------------------------------------------------------------------- /docs/uninstalling.rst: -------------------------------------------------------------------------------- 1 | .. _uninstalling: 2 | 3 | Uninstalling 4 | ------------ 5 | 6 | To uninstall Bash-it, run the ``uninstall.sh`` script found in the ``$BASH_IT`` directory: 7 | 8 | .. code-block:: 9 | 10 | cd $BASH_IT 11 | ./uninstall.sh 12 | 13 | This will restore your previous Bash profile. 14 | After the uninstall script finishes, remove the Bash-it directory from your machine (\ ``rm -rf $BASH_IT``\ ) and start a new shell. 15 | -------------------------------------------------------------------------------- /hooks/check-clean-files-txt.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | file=$1 4 | # Should only be run on clean_files.txt 5 | if [ "$file" != "clean_files.txt" ]; then 6 | echo "Please run this script on clean_files.txt only!" 7 | exit 1 8 | fi 9 | 10 | function compare_lines() { 11 | prev="" 12 | local line 13 | while read -r line; do 14 | # Skip unimportant lines 15 | [[ $line =~ "#" ]] && continue 16 | [[ $line == "" ]] && continue 17 | # Actual check 18 | if [[ $prev > $line ]]; then 19 | echo "$line should be before $prev" 20 | exit 1 21 | fi 22 | prev=$line 23 | done <<< "$1" 24 | } 25 | 26 | # We compare using the legacy way 27 | shopt -s compat31 28 | 29 | # Test root files 30 | compare_lines "$(grep -v "/" "$file")" 31 | 32 | # Test root directory 33 | compare_lines "$(grep "/$" "$file")" 34 | 35 | # Test non root directories 36 | compare_lines "$(grep "/." "$file")" 37 | 38 | shopt -u compat31 39 | # Yay, all good! 40 | exit 0 41 | -------------------------------------------------------------------------------- /hooks/dot-bash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exit_code=0 4 | for file in "$@"; do 5 | # Confirm file is not executable 6 | # 7 | if [[ -x "${file}" ]]; then 8 | echo "Bash include file \`${file}\` should not be executable" 9 | exit_code=1 10 | fi 11 | 12 | # Confirm expected schellcheck header 13 | # 14 | LINE1="$(head -n 1 "${file}")" 15 | SCSH="${file##*.}" 16 | if [[ "${LINE1}" != "# shellcheck shell=${SCSH}" ]]; then 17 | echo "Bash include file \`${file}\` has bad/missing shellcheck header" 18 | exit_code=1 19 | fi 20 | done 21 | 22 | exit "${exit_code:-0}" 23 | -------------------------------------------------------------------------------- /hooks/dot-sh.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | exit_code=0 4 | for file in "$@"; do 5 | # Confirm file is executable 6 | # 7 | if [[ ! -x "${file}" ]]; then 8 | echo "Bash file \`${file}\` is not executable" 9 | exit_code=1 10 | fi 11 | 12 | # Confirm expected #! header 13 | # 14 | LINE1="$(head -n 1 "${file}")" 15 | if [[ "${LINE1}" != "#!/usr/bin/env bash" ]]; then 16 | echo "Bash file \`${file}\` has bad/missing #! header" 17 | exit_code=1 18 | fi 19 | done 20 | 21 | exit "${exit_code:-0}" 22 | -------------------------------------------------------------------------------- /lib/appearance.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | : "${CLICOLOR:=$(tput colors)}" 4 | export CLICOLOR 5 | 6 | : "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM:=${BASH_IT}/custom}/themes"}" 7 | 8 | # Load the theme 9 | # shellcheck disable=SC1090 10 | if [[ -n "${BASH_IT_THEME:-}" ]]; then 11 | if [[ -f "${BASH_IT_THEME}" ]]; then 12 | source "${BASH_IT_THEME}" 13 | elif [[ -f "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" ]]; then 14 | source "$CUSTOM_THEME_DIR/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" 15 | else 16 | source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash" 17 | fi 18 | fi 19 | -------------------------------------------------------------------------------- /lib/history.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # Functions for working with Bash's command history. 4 | 5 | function _bash-it-history-init() { 6 | safe_append_preexec '_bash-it-history-auto-save' 7 | safe_append_prompt_command '_bash-it-history-auto-load' 8 | } 9 | 10 | function _bash-it-history-auto-save() { 11 | case $HISTCONTROL in 12 | *'noauto'* | *'autoload'*) 13 | : # Do nothing, as configured. 14 | ;; 15 | *'auto'*) 16 | # Append new history from this session to the $HISTFILE 17 | history -a 18 | ;; 19 | *) 20 | # Append *only* if shell option `histappend` has been enabled. 21 | shopt -q histappend && history -a && return 22 | ;; 23 | esac 24 | } 25 | 26 | function _bash-it-history-auto-load() { 27 | case $HISTCONTROL in 28 | *'noauto'*) 29 | : # Do nothing, as configured. 30 | ;; 31 | *'autosave'*) 32 | # Append new history from this session to the $HISTFILE 33 | history -a 34 | ;; 35 | *'autoloadnew'*) 36 | # Read new entries from $HISTFILE 37 | history -n 38 | ;; 39 | *'auto'*) 40 | # Blank in-memory history, then read entire $HISTFILE fresh from disk. 41 | history -a && history -c && history -r 42 | ;; 43 | *) 44 | : # Do nothing, default. 45 | ;; 46 | esac 47 | } 48 | 49 | _bash_it_library_finalize_hook+=('_bash-it-history-init') 50 | -------------------------------------------------------------------------------- /lib/preview.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # Displays the prompt from each _Bash It_ theme. 4 | 5 | function _bash-it-preview() { 6 | local BASH_IT_THEME BASH_IT_LOG_LEVEL 7 | local themes IFS=$'\n' cur 8 | 9 | if [[ $# -gt '0' ]]; then 10 | themes=("$@") 11 | else 12 | themes=("${BASH_IT?}/themes"/*/*.theme.bash) 13 | themes=("${themes[@]##*/}") 14 | themes=("${themes[@]%.theme.bash}") 15 | fi 16 | 17 | if [[ ${COMP_CWORD:-} -gt '0' ]]; then 18 | cur="${COMP_WORDS[COMP_CWORD]}" 19 | read -d '' -ra COMPREPLY < <(compgen -W "all${IFS}${themes[*]}" -- "${cur}") 20 | return 21 | fi 22 | printf '\n\n\t%s\n\n' "Previewing Bash-it Themes" 23 | 24 | # shellcheck disable=SC2034 25 | for BASH_IT_THEME in "${themes[@]}"; do 26 | BASH_IT_LOG_LEVEL=0 27 | bash --init-file "${BASH_IT?}/bash_it.sh" -i <<< '_bash-it-flash-term "${#BASH_IT_THEME}" "${BASH_IT_THEME}"' 28 | done 29 | } 30 | 31 | if [[ -n "${BASH_PREVIEW:-}" ]]; then 32 | _bash-it-preview "${BASH_PREVIEW}" "$@" 33 | unset BASH_PREVIEW #Prevent infinite looping 34 | fi 35 | -------------------------------------------------------------------------------- /lint_clean_files.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Pull list of checkable files from clean_files.txt 4 | # - Folder references are allowed 5 | # - Empty lines are ignored 6 | # - Comment lines (#) are ignored 7 | # 8 | # shellcheck disable=SC2002 # Prefer 'cat' for cleaner script 9 | FILES=() 10 | while IFS='' read -r line; do FILES+=("$line"); done < <( 11 | cat clean_files.txt \ 12 | | grep -E -v '^\s*$' \ 13 | | grep -E -v '^\s*#' \ 14 | | xargs -I{} find "{}" -type f 15 | ) 16 | 17 | # We clear the BASH_IT variable to help the shellcheck checker 18 | # identify source includes within our scripts that require a 19 | # 'source' directive. For more information, see: 20 | # 21 | # "Shellcheck SC1090 - Can't follow non-constant source" 22 | # https://www.shellcheck.net/wiki/SC1090 23 | # 24 | BASH_IT='' pre-commit run --files "${FILES[@]}" 25 | -------------------------------------------------------------------------------- /plugins/available/alias-completion.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # stub for renamed file 3 | 4 | _enable-completion aliases && _disable-plugin alias-completion 5 | # shellcheck disable=SC1091 6 | source "${BASH_IT?}/completion/available/aliases.completion.bash" 7 | -------------------------------------------------------------------------------- /plugins/available/autojump.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Autojump configuration, see https://github.com/wting/autojump for more details' 4 | 5 | # Only supports the Homebrew variant, Debian and Arch at the moment. 6 | # Feel free to provide a PR to support other install locations 7 | # shellcheck disable=SC1090 8 | if _bash_it_homebrew_check && [[ -s "${BASH_IT_HOMEBREW_PREFIX}/etc/profile.d/autojump.sh" ]]; then 9 | # shellcheck disable=SC1091 10 | source "${BASH_IT_HOMEBREW_PREFIX}/etc/profile.d/autojump.sh" 11 | elif _command_exists dpkg && dpkg -s autojump &> /dev/null; then 12 | source "$(dpkg-query -S autojump.sh | cut -d' ' -f2)" 13 | elif _command_exists pacman && pacman -Q autojump &> /dev/null; then 14 | source "$(pacman -Ql autojump | grep autojump.sh | cut -d' ' -f2)" 15 | fi 16 | -------------------------------------------------------------------------------- /plugins/available/basher.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'initializes basher, the shell package manager' 4 | 5 | # https://github.com/basherpm/basher 6 | 7 | if ! _command_exists basher; then 8 | if [[ -x "$HOME/.basher/bin/basher" ]]; then 9 | pathmunge "$HOME/.basher/bin" 10 | else 11 | _log_warning 'basher not found' 12 | return 0 13 | fi 14 | fi 15 | 16 | eval "$(basher init - bash)" 17 | -------------------------------------------------------------------------------- /plugins/available/blesh.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load ble.sh, the Bash line editor!' 4 | 5 | if [[ ${BLE_VERSION-} ]]; then 6 | _log_warning "ble.sh is already loaded!" 7 | return 8 | fi 9 | 10 | _bash_it_ble_path=${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh 11 | if [[ -f $_bash_it_ble_path ]]; then 12 | # shellcheck disable=1090 13 | source "$_bash_it_ble_path" --attach=prompt 14 | if _bash-it-component-item-is-enabled plugin fzf; then 15 | ble-import -d integration/fzf-key-bindings 16 | ble-import -d integration/fzf-completion 17 | fi 18 | else 19 | _log_error "Could not find ble.sh in $_bash_it_ble_path" 20 | _log_error "Please install using the following command:" 21 | _log_error "git clone https://github.com/akinomyoga/ble.sh && make -C ble.sh install" 22 | fi 23 | unset _bash_it_ble_path 24 | -------------------------------------------------------------------------------- /plugins/available/boot2docker.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Helpers to get Docker setup correctly for boot2docker' 4 | 5 | # Note, this might need to be different if you have an older version 6 | # of boot2docker, or its configured for a different IP 7 | if [[ "$OSTYPE" == 'darwin'* ]]; then 8 | export DOCKER_HOST="tcp://192.168.59.103:2376" 9 | export DOCKER_CERT_PATH="${HOME}/.boot2docker/certs/boot2docker-vm" 10 | export DOCKER_TLS_VERIFY=1 11 | fi 12 | -------------------------------------------------------------------------------- /plugins/available/chruby-auto.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1091 3 | cite about-plugin 4 | about-plugin 'load chruby + auto-switching (from /usr/local/share/chruby)' 5 | 6 | source /usr/local/share/chruby/chruby.sh 7 | source /usr/local/share/chruby/auto.sh 8 | -------------------------------------------------------------------------------- /plugins/available/chruby.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC1091 3 | cite about-plugin 4 | about-plugin 'load chruby (from /usr/local/share/chruby)' 5 | 6 | source /usr/local/share/chruby/chruby.sh 7 | -------------------------------------------------------------------------------- /plugins/available/cht-sh.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | # shellcheck disable=SC2016 4 | about-plugin 'Simplify `curl cht.sh/` to `cht.sh `' 5 | 6 | # Play nicely if user already installed cht.sh cli tool 7 | if ! _command_exists cht.sh; then 8 | function cht.sh() { 9 | about 'Executes a cht.sh curl query using the provided arguments' 10 | param ' [ ( topic [sub-topic] ) | ~keyword ] [ :list | :help | :learn ]' 11 | example '$ cht.sh :help' 12 | example '$ cht.sh :list' 13 | example '$ cht.sh tar' 14 | example '$ cht.sh js "parse json"' 15 | example '$ cht.sh python :learn' 16 | example '$ cht.sh rust :list' 17 | group 'cht-sh' 18 | 19 | # Separate arguments with '/', preserving spaces within them 20 | local query 21 | query=$( 22 | IFS=/ 23 | echo "$*" 24 | ) 25 | curl "cht.sh/${query}" 26 | } 27 | fi 28 | -------------------------------------------------------------------------------- /plugins/available/cmd-returned-notify.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Alert (BEL) when process ends after a threshold of seconds' 4 | 5 | function precmd_return_notification() { 6 | local command_start="${COMMAND_DURATION_START_SECONDS:=0}" 7 | local current_time 8 | current_time="$(_shell_duration_en)" 9 | local -i command_duration="$((${current_time%.*} - ${command_start%.*}))" 10 | if [[ "${command_duration}" -gt "${NOTIFY_IF_COMMAND_RETURNS_AFTER:-5}" ]]; then 11 | printf '\a' 12 | fi 13 | return 0 14 | } 15 | 16 | safe_append_prompt_command 'precmd_return_notification' 17 | safe_append_preexec '_command_duration_pre_exec' 18 | -------------------------------------------------------------------------------- /plugins/available/direnv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load direnv, if you are using it: https://direnv.net/' 4 | 5 | if _command_exists direnv; then 6 | eval "$(direnv hook bash)" 7 | fi 8 | -------------------------------------------------------------------------------- /plugins/available/docker-compose.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Helper functions for using docker-compose' 4 | 5 | function docker-compose-fresh() { 6 | about 'Shut down, remove and start again the docker-compose setup, then tail the logs' 7 | group 'docker-compose' 8 | param '1: name of the docker-compose.yaml file to use (optional). Default: docker-compose.yaml' 9 | example 'docker-compose-fresh docker-compose-foo.yaml' 10 | 11 | local DCO_FILE_PARAM=() 12 | if [ -n "$1" ]; then 13 | echo "Using docker-compose file: $1" 14 | DCO_FILE_PARAM=(--file "$1") 15 | fi 16 | 17 | docker-compose "${DCO_FILE_PARAM[@]}" stop 18 | docker-compose "${DCO_FILE_PARAM[@]}" rm -f 19 | docker-compose "${DCO_FILE_PARAM[@]}" up -d 20 | docker-compose "${DCO_FILE_PARAM[@]}" logs -f --tail 100 21 | } 22 | -------------------------------------------------------------------------------- /plugins/available/docker-machine.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Helpers to get Docker setup correctly for docker-machine' 4 | _log_warning '"docker-machine" is now deprecated, and as such the plugin for it is also deprecated. 5 | Please disable this plugin.' 6 | -------------------------------------------------------------------------------- /plugins/available/edit-mode-emacs.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Enable emacs editing mode' 4 | 5 | set -o emacs 6 | -------------------------------------------------------------------------------- /plugins/available/edit-mode-vi.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Enable vi editing mode' 4 | 5 | set -o vi 6 | -------------------------------------------------------------------------------- /plugins/available/explain.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'mankier.com explain function to explain other commands' 4 | 5 | explain() { 6 | about 'explain any bash command via mankier.com manpage API' 7 | param '1: Name of the command to explain' 8 | example '$ explain # interactive mode. Type commands to explain in REPL' 9 | example '$ explain '"'"'cmd -o | ...'"'"' # one quoted command to explain it.' 10 | group 'explain' 11 | 12 | if [ "$#" -eq 0 ]; then 13 | while read -r -p "Command: " cmd; do 14 | curl -Gs "https://www.mankier.com/api/explain/?cols=$(tput cols)" --data-urlencode "q=$cmd" 15 | done 16 | echo "Bye!" 17 | elif [ "$#" -eq 1 ]; then 18 | curl -Gs "https://www.mankier.com/api/explain/?cols=$(tput cols)" --data-urlencode "q=$1" 19 | else 20 | echo "Usage" 21 | echo "explain interactive mode." 22 | echo "explain 'cmd -o | ...' one quoted command to explain it." 23 | fi 24 | } 25 | -------------------------------------------------------------------------------- /plugins/available/fasd.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load fasd, if you are using it' 4 | 5 | _command_exists fasd || return 6 | 7 | eval "$(fasd --init auto)" 8 | -------------------------------------------------------------------------------- /plugins/available/git-subrepo.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'load git-subrepo if you are using it, and initialize completions' 3 | 4 | if [[ -s "${GIT_SUBREPO_ROOT:=$HOME/.git-subrepo}/init" ]]; then 5 | # shellcheck disable=SC1091 6 | source "$GIT_SUBREPO_ROOT/init" 7 | fi 8 | -------------------------------------------------------------------------------- /plugins/available/gitstatus.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'speeds up your life by using gitstatus for git status calculations. install from https://github.com/romkatv/gitstatus' 4 | 5 | function gitstatus_on_disable() { 6 | about 'Destructor of gitstatus plugin' 7 | group 'gitstatus' 8 | 9 | unset SCM_GIT_USE_GITSTATUS 10 | _command_exists gitstatus_stop && gitstatus_stop 11 | } 12 | 13 | # No scm-check 14 | [[ $SCM_CHECK == "true" ]] || return 15 | 16 | # non-interactive shell 17 | [[ $- == *i* ]] || return 18 | 19 | : "${SCM_GIT_GITSTATUS_DIR:="$HOME/gitstatus"}" 20 | if [[ -d ${SCM_GIT_GITSTATUS_DIR} ]]; then 21 | # shellcheck disable=SC1091 22 | source "${SCM_GIT_GITSTATUS_DIR}/gitstatus.plugin.sh" 23 | # Start the actual gitstatus binary 24 | gitstatus_stop && gitstatus_start -s -1 -u -1 -c -1 -d -1 25 | export SCM_GIT_USE_GITSTATUS=true 26 | else 27 | _log_warning "Could not find gitstatus directory in ${SCM_GIT_GITSTATUS_DIR}. Please specify directory location using SCM_GIT_GITSTATUS_DIR." 28 | fi 29 | -------------------------------------------------------------------------------- /plugins/available/go.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'go environment variables & path configuration' 4 | 5 | # Load after basher and goenv 6 | # BASH_IT_LOAD_PRIORITY: 270 7 | 8 | # Test `go version` because goenv creates shim scripts that will be found in PATH 9 | # but do not always resolve to a working install. 10 | { _command_exists go && go version &> /dev/null; } || return 0 11 | 12 | export GOROOT="${GOROOT:-$(go env GOROOT)}" 13 | export GOPATH="${GOPATH:-$(go env GOPATH)}" 14 | 15 | # $GOPATH/bin is the default location for binaries. Because GOPATH accepts a list of paths and each 16 | # might be managed differently, we add each path's /bin folder to PATH using pathmunge, 17 | # while preserving ordering. 18 | # e.g. GOPATH=foo:bar -> PATH=foo/bin:bar/bin 19 | _bash-it-gopath-pathmunge() { 20 | _about 'Ensures paths in GOPATH are added to PATH using pathmunge, with /bin appended' 21 | _group 'go' 22 | if [[ -z $GOPATH ]]; then 23 | echo 'GOPATH empty' >&2 24 | return 1 25 | fi 26 | local paths i 27 | IFS=: read -r -a paths <<< "$GOPATH" 28 | i=${#paths[@]} 29 | while [[ $i -gt 0 ]]; do 30 | i=$((i - 1)) 31 | if [[ -n "${paths[i]}" ]]; then 32 | pathmunge "${paths[i]}/bin" 33 | fi 34 | done 35 | } 36 | _bash-it-gopath-pathmunge 37 | -------------------------------------------------------------------------------- /plugins/available/goenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load goenv, if you are using it' 4 | 5 | # https://github.com/syndbg/goenv 6 | 7 | # Load after basher 8 | # BASH_IT_LOAD_PRIORITY: 260 9 | 10 | # Don't modify the environment if we can't find the tool: 11 | # - Check if in $PATH already 12 | # - Check if installed manually to $GOENV_ROOT 13 | # - Check if installed manually to $HOME 14 | _command_exists goenv \ 15 | || [[ -n "$GOENV_ROOT" && -x "$GOENV_ROOT/bin/goenv" ]] \ 16 | || [[ -x "$HOME/.goenv/bin/goenv" ]] \ 17 | || return 0 18 | 19 | # Set GOENV_ROOT, if not already set 20 | export GOENV_ROOT="${GOENV_ROOT:-$HOME/.goenv}" 21 | 22 | # Add GOENV_ROOT/bin to PATH, if that's where it's installed 23 | if ! _command_exists goenv && [[ -x "$GOENV_ROOT/bin/goenv" ]]; then 24 | pathmunge "$GOENV_ROOT/bin" 25 | fi 26 | 27 | # Initialize goenv 28 | eval "$(goenv init - bash)" 29 | 30 | # If moving to a directory with a goenv version set, reload the shell 31 | # to ensure the shell environment matches expectations. 32 | _bash-it-goenv-preexec() { 33 | GOENV_OLD_VERSION="$(goenv version-name)" 34 | } 35 | _bash-it-goenv-precmd() { 36 | if [[ -n $GOENV_OLD_VERSION ]] && [[ "$GOENV_OLD_VERSION" != "$(goenv version-name)" ]]; then 37 | exec env -u PATH -u GOROOT -u GOPATH -u GOENV_OLD_VERSION "${0/-/}" --login 38 | fi 39 | unset GOENV_OLD_VERSION 40 | } 41 | preexec_functions+=(_bash-it-goenv-preexec) 42 | precmd_functions+=(_bash-it-goenv-precmd) 43 | -------------------------------------------------------------------------------- /plugins/available/gradle.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Add a gw command to use gradle wrapper if present, else use system gradle' 4 | 5 | function gw() { 6 | local file="gradlew" 7 | local result 8 | 9 | result="$(_bash-it-find-in-ancestor "${file}")" 10 | 11 | # Call gradle 12 | "${result:-gradle}" "$@" 13 | } 14 | -------------------------------------------------------------------------------- /plugins/available/hg.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'hg helper functions' 4 | 5 | hg_dirty() { 6 | about 'displays dirty status of hg repository' 7 | group 'hg' 8 | 9 | hg status --no-color 2> /dev/null \ 10 | | awk '$1 == "?" { print "?" } $1 != "?" { print "!" }' \ 11 | | sort | uniq | head -c1 12 | } 13 | 14 | hg_in_repo() { 15 | about 'determine if pwd is an hg repo' 16 | group 'hg' 17 | 18 | [[ $(hg branch 2> /dev/null) ]] && echo 'on ' 19 | } 20 | 21 | hg_branch() { 22 | about 'display current hg branch' 23 | group 'hg' 24 | 25 | hg branch 2> /dev/null 26 | } 27 | -------------------------------------------------------------------------------- /plugins/available/history-eternal.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'eternal bash history' 3 | 4 | if [[ ${BASH_VERSINFO[0]} -lt 4 ]] || [[ ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 3 ]]; then 5 | _log_warning "Bash version 4.3 introduced the 'unlimited' history size capability." 6 | return 1 7 | fi 8 | 9 | # Modify history sizes before changing location to avoid unintentionally 10 | # truncating the history file early. 11 | 12 | # "Numeric values less than zero result in every command being saved on the history list (there is no limit)" 13 | HISTSIZE=-1 2> /dev/null || true 14 | 15 | # "Non-numeric values and numeric values less than zero inhibit truncation" 16 | HISTFILESIZE='unlimited' 2> /dev/null || true 17 | 18 | # Use a custom history file location so history is not truncated 19 | # if the environment ever loses this "eternal" configuration. 20 | HISTDIR="${XDG_STATE_HOME:-${HOME?}/.local/state}/bash" 21 | [[ -d ${HISTDIR?} ]] || mkdir -p "${HISTDIR?}" 22 | HISTFILE="${HISTDIR?}/history" 2> /dev/null || true 23 | -------------------------------------------------------------------------------- /plugins/available/history-search.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'search history using the prefix already entered' 3 | 4 | # enter a few characters and press UpArrow/DownArrow 5 | # to search backwards/forwards through the history 6 | if [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then 7 | bind '"\e[A":history-search-backward' 8 | bind '"\e[B":history-search-forward' 9 | fi 10 | -------------------------------------------------------------------------------- /plugins/available/history-substring-search.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'search history using the substring already entered' 3 | 4 | # enter a few characters and press UpArrow/DownArrow 5 | # to search backwards/forwards through the history 6 | if [[ ${SHELLOPTS} =~ (vi|emacs) ]]; then 7 | bind '"\e[A":history-substring-search-backward' 8 | bind '"\e[B":history-substring-search-forward' 9 | fi 10 | -------------------------------------------------------------------------------- /plugins/available/history.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'improve history handling with sane defaults' 3 | 4 | # Append the history list to the file named by the value of the HISTFILE 5 | # variable when the shell exits, rather than overwriting the file. 6 | shopt -s histappend 7 | 8 | # 'ignorespace': don't save command lines which begin with a space to history 9 | # 'erasedups' (alternative 'ignoredups'): don't save duplicates to history 10 | # 'autoshare': automatically share history between multiple running shells 11 | : "${HISTCONTROL:=ignorespace:erasedups:autoshare}" 12 | 13 | # resize history to 100x the default (500) 14 | : "${HISTSIZE:=50000}" 15 | 16 | function top-history() { 17 | about 'print the name and count of the most commonly run tools' 18 | 19 | # - Make sure formatting doesn't interfer with our parsing 20 | # - Use awk to count how many times the first command on each line has been called 21 | # - Truncate to 10 lines 22 | # - Print in column format 23 | HISTTIMEFORMAT='' history \ 24 | | awk '{ 25 | a[$2]++ 26 | }END{ 27 | for(i in a) 28 | printf("%s\t%s\n", a[i], i) 29 | }' \ 30 | | sort --reverse --numeric-sort \ 31 | | head \ 32 | | column \ 33 | --table \ 34 | --table-columns 'Command Count,Command Name' \ 35 | --output-separator ' | ' 36 | } 37 | -------------------------------------------------------------------------------- /plugins/available/hub.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load hub, if you are using it' 4 | 5 | if _command_exists hub; then 6 | eval "$(hub alias -s)" 7 | fi 8 | -------------------------------------------------------------------------------- /plugins/available/java.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'Java and JAR helper functions' 3 | 4 | function jar_manifest { 5 | about "extracts the specified JAR file's MANIFEST file and prints it to stdout" 6 | group 'java' 7 | param '1: JAR file to extract the MANIFEST from' 8 | example 'jar_manifest lib/foo.jar' 9 | 10 | unzip -c "${1:?${FUNCNAME[0]}: JAR file must be specified}" META-INF/MANIFEST.MF 11 | } 12 | -------------------------------------------------------------------------------- /plugins/available/javascript.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # The install directory is hard-coded. TODO: allow the directory to be specified on the command line. 3 | 4 | cite about-plugin 5 | about-plugin 'download jquery files into current project' 6 | 7 | [[ -z "$JQUERY_VERSION_NUMBER" ]] && JQUERY_VERSION_NUMBER="1.6.1" 8 | [[ -z "$JQUERY_UI_VERSION_NUMBER" ]] && JQUERY_UI_VERSION_NUMBER="1.8.13" 9 | 10 | function rails_jquery { 11 | about 'download rails.js into public/javascripts' 12 | group 'javascript' 13 | 14 | curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js 15 | } 16 | 17 | function jquery_install { 18 | about 'download jquery.js into public/javascripts' 19 | group 'javascript' 20 | 21 | if [ -z "$1" ]; then 22 | version=$JQUERY_VERSION_NUMBER 23 | else 24 | version="$1" 25 | fi 26 | curl -o public/javascripts/jquery.js "http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js" 27 | } 28 | 29 | function jquery_ui_install { 30 | about 'download jquery_us.js into public/javascripts' 31 | group 'javascript' 32 | 33 | if [ -z "$1" ]; then 34 | version=$JQUERY_UI_VERSION_NUMBER 35 | else 36 | version="$1" 37 | fi 38 | 39 | curl -o public/javascripts/jquery_ui.js "http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js" 40 | } 41 | -------------------------------------------------------------------------------- /plugins/available/jenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load jenv, if you are using it' 4 | 5 | # Don't modify the environment if we can't find the tool: 6 | # - Check if in $PATH already 7 | # - Check if installed manually to $JENV_ROOT 8 | # - Check if installed manually to $HOME 9 | _command_exists jenv \ 10 | || [[ -n "$JENV_ROOT" && -x "$JENV_ROOT/bin/jenv" ]] \ 11 | || [[ -x "$HOME/.jenv/bin/jenv" ]] \ 12 | || return 13 | 14 | # Set JENV_ROOT, if not already set 15 | export JENV_ROOT="${JENV_ROOT:-$HOME/.jenv}" 16 | 17 | # Add JENV_ROOT/bin to PATH, if that's where it's installed 18 | ! _command_exists jenv \ 19 | && [[ -x "$JENV_ROOT/bin/jenv" ]] \ 20 | && pathmunge "$JENV_ROOT/bin" 21 | 22 | # Initialize jenv 23 | eval "$(jenv init - bash)" 24 | -------------------------------------------------------------------------------- /plugins/available/jump.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2016 3 | cite about-plugin 4 | about-plugin 'initialize jump (see https://github.com/gsamokovarov/jump). Add `export JUMP_OPTS=("--bind=z")` to change keybinding' 5 | 6 | function __init_jump() { 7 | if _command_exists jump; then 8 | eval "$(jump shell bash "${JUMP_OPTS[@]}")" 9 | fi 10 | } 11 | 12 | __init_jump 13 | -------------------------------------------------------------------------------- /plugins/available/latex.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'add MacTeX to PATH' 3 | 4 | _bash_it_plugin_latex_paths=( 5 | # Standard locations 6 | /usr/local/texbin 7 | # MacOS locations 8 | /Library/TeX/texbin 9 | ) 10 | 11 | # add mactex to the path if its present 12 | for _bash_it_plugin_latex_path in "${_bash_it_plugin_latex_paths[@]}"; do 13 | if [[ -d "$_bash_it_plugin_latex_path/" ]]; then 14 | pathmunge "$_bash_it_plugin_latex_path" after && break 15 | fi 16 | done 17 | 18 | # Cleanup 19 | unset "${!_bash_it_plugin_latex_@}" 20 | -------------------------------------------------------------------------------- /plugins/available/less-pretty-cat.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'pygmentize instead of cat to terminal if possible' 4 | 5 | _command_exists pygmentize || return 6 | 7 | # pigmentize cat and less outputs - call them ccat and cless to avoid that 8 | # especially cat'ed output in scripts gets mangled with pygemtized meta characters 9 | function ccat() { 10 | about 'runs pygmentize on each file passed in' 11 | param '*: files to concatenate (as normally passed to cat)' 12 | example 'ccat mysite/manage.py dir/text-file.txt' 13 | 14 | pygmentize -f 256 -O style="${BASH_IT_CCAT_STYLE:-default}" -g "$@" 15 | } 16 | 17 | function cless() { 18 | about 'pigments the files passed in and passes to less for pagination' 19 | param '*: the files to paginate with less' 20 | example 'cless mysite/manage.py' 21 | 22 | pygmentize -f 256 -O style="${BASH_IT_CLESS_STYLE:-default}" -g "$@" | command less -R 23 | } 24 | -------------------------------------------------------------------------------- /plugins/available/man.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'colorize man pages for better readability' 3 | 4 | : "${LESS_TERMCAP_mb:=$'\e[1;32m'}" 5 | : "${LESS_TERMCAP_md:=$'\e[1;32m'}" 6 | : "${LESS_TERMCAP_me:=$'\e[0m'}" 7 | : "${LESS_TERMCAP_se:=$'\e[0m'}" 8 | : "${LESS_TERMCAP_so:=$'\e[01;33m'}" 9 | : "${LESS_TERMCAP_ue:=$'\e[0m'}" 10 | : "${LESS_TERMCAP_us:=$'\e[1;4;31m'}" 11 | 12 | : "${LESS:=}" 13 | export "${!LESS_TERMCAP@}" 14 | export LESS="--RAW-CONTROL-CHARS ${LESS}" 15 | -------------------------------------------------------------------------------- /plugins/available/nginx.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'manage your nginx service' 3 | 4 | pathmunge "${NGINX_PATH:=/opt/nginx}/sbin" after 5 | export NGINX_PATH 6 | 7 | function nginx_reload() { 8 | about 'reload your nginx config' 9 | group 'nginx' 10 | 11 | local FILE="${NGINX_PATH?}/logs/nginx.pid" 12 | if [[ -s $FILE ]]; then 13 | echo "Reloading NGINX..." 14 | read -r PID < "${FILE}" 15 | sudo kill -HUP "${PID?}" 16 | else 17 | echo "Nginx pid file not found" 18 | return 0 19 | fi 20 | } 21 | 22 | function nginx_stop() { 23 | about 'stop nginx' 24 | group 'nginx' 25 | 26 | local FILE="${NGINX_PATH?}/logs/nginx.pid" 27 | if [[ -s $FILE ]]; then 28 | echo "Stopping NGINX..." 29 | read -r PID < "${FILE}" 30 | sudo kill -INT "${PID?}" 31 | else 32 | echo "Nginx pid file not found" 33 | return 0 34 | fi 35 | } 36 | 37 | function nginx_start() { 38 | about 'start nginx' 39 | group 'nginx' 40 | 41 | local FILE="${NGINX_PATH?}/sbin/nginx" 42 | if [[ -x $FILE ]]; then 43 | echo "Starting NGINX..." 44 | sudo "${FILE}" 45 | else 46 | echo "Couldn't start nginx" 47 | fi 48 | } 49 | 50 | function nginx_restart() { 51 | about 'restart nginx' 52 | group 'nginx' 53 | 54 | nginx_stop && nginx_start 55 | } 56 | -------------------------------------------------------------------------------- /plugins/available/node.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Node.js helper functions' 4 | 5 | # Check that we have npm 6 | _command_exists npm || return 7 | 8 | # Ensure local modules are preferred in PATH 9 | pathmunge "./node_modules/.bin" "after" 10 | 11 | # If not using nodenv, ensure global modules are in PATH 12 | if [[ ! "$(type -p npm)" == *"nodenv/shims"* ]]; then 13 | pathmunge "$(npm config get prefix)/bin" "after" 14 | fi 15 | -------------------------------------------------------------------------------- /plugins/available/nodenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load nodenv, if you are using it' 4 | 5 | export NODENV_ROOT="$HOME/.nodenv" 6 | pathmunge "$NODENV_ROOT/bin" 7 | 8 | if _command_exists nodenv; then 9 | eval "$(nodenv init - bash)" 10 | fi 11 | -------------------------------------------------------------------------------- /plugins/available/nvm.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # BASH_IT_LOAD_PRIORITY: 225 4 | # 5 | # Bash-it no longer bundles nvm, as this was quickly becoming outdated. 6 | # Please install nvm from https://github.com/creationix/nvm.git if you want to use it. 7 | 8 | cite about-plugin 9 | about-plugin 'node version manager configuration' 10 | 11 | export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" 12 | 13 | # first check if NVM is managed by brew 14 | NVM_BREW_PREFIX="" 15 | if _bash_it_homebrew_check; then 16 | NVM_BREW_PREFIX=$(brew --prefix nvm 2> /dev/null) 17 | fi 18 | 19 | # This loads nvm 20 | if [[ -n "$NVM_BREW_PREFIX" && -s "${NVM_BREW_PREFIX}/nvm.sh" ]]; then 21 | # shellcheck disable=SC1091 22 | source "${NVM_BREW_PREFIX}/nvm.sh" 23 | else 24 | # shellcheck disable=SC1091 25 | [[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" 26 | fi 27 | 28 | if ! _command_exists nvm; then 29 | function nvm() { 30 | echo "Bash-it no longer bundles the nvm script. Please install the latest version from" 31 | echo "" 32 | echo "https://github.com/creationix/nvm.git" 33 | echo "" 34 | echo "if you want to use nvm. You can keep this plugin enabled once you have installed nvm." 35 | } 36 | 37 | nvm 38 | fi 39 | -------------------------------------------------------------------------------- /plugins/available/percol.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Search&Select history with percol' 4 | 5 | # Notice 6 | ## You have to upgrade bash to bash 4.x on Mac OS X. 7 | ## http://stackoverflow.com/questions/16416195/how-do-i-upgrade-bash-in-mac-osx-mountain-lion-and-set-it-the-correct-path 8 | 9 | # Install 10 | ## (sudo) pip install percol 11 | ## bash-it enable percol 12 | 13 | # Usage 14 | ## C-r to search&select from history 15 | 16 | _command_exists percol || return 17 | 18 | if [[ ${BASH_VERSINFO[0]} -lt 4 ]]; then 19 | _log_warning "You have to upgrade Bash to Bash v4.x to use the 'percol' plugin." 20 | _log_warning "Your current Bash version is $BASH_VERSION." 21 | return 22 | fi 23 | 24 | function _replace_by_history() { 25 | local HISTTIMEFORMAT= # Ensure we can parse history properly 26 | #TODO: "${histlines[@]/*( )+([[:digit:]])*( )/}" 27 | local l 28 | l="$(history | tail -r | sed -e 's/^\ *[0-9]*\ *//' | percol --query "${READLINE_LINE:-}")" 29 | READLINE_LINE="${l}" 30 | READLINE_POINT=${#l} 31 | } 32 | bind -x '"\C-r": _replace_by_history' 33 | -------------------------------------------------------------------------------- /plugins/available/pipsi.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load pipsi, if you are using it' 4 | 5 | if [[ -f "$HOME/.local/bin/pipsi" ]]; then 6 | pathmunge ~/.local/bin 7 | fi 8 | -------------------------------------------------------------------------------- /plugins/available/plenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # plugin for plenv 4 | 5 | cite about-plugin 6 | about-plugin 'plenv plugin for Perl' 7 | 8 | if [[ -d "${HOME}/.plenv/bin" ]]; then 9 | # load plenv bin dir into path if it exists 10 | pathmunge "${HOME}/.plenv/bin" 11 | fi 12 | 13 | if _command_exists plenv; then 14 | # init plenv 15 | eval "$(plenv init - bash)" 16 | fi 17 | -------------------------------------------------------------------------------- /plugins/available/powerline.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 3 | 4 | cite about-plugin 5 | about-plugin 'enables powerline daemon' 6 | 7 | _command_exists powerline-daemon || return 8 | powerline-daemon -q 9 | 10 | #the following should not be executed if bashit powerline themes in use 11 | case "$BASH_IT_THEME" in 12 | *powerline*) 13 | return 14 | ;; 15 | esac 16 | POWERLINE_BASH_CONTINUATION=1 17 | POWERLINE_BASH_SELECT=1 18 | bashPowerlineInit="$(python -c \ 19 | "import os; \ 20 | import powerline;\ 21 | print(os.path.join(os.path.dirname(\ 22 | powerline.__file__),\ 23 | 'bindings', \ 24 | 'bash', \ 25 | 'powerline.sh'))")" 26 | [ -e "$bashPowerlineInit" ] || return 27 | # shellcheck disable=SC1090 28 | source "$bashPowerlineInit" 29 | -------------------------------------------------------------------------------- /plugins/available/projects.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'quickly navigate configured project paths' 3 | 4 | : "${BASH_IT_PROJECT_PATHS:=$HOME/Projects:$HOME/src:$HOME/work}" 5 | 6 | function pj() { 7 | about 'navigate quickly to your various project directories' 8 | group 'projects' 9 | 10 | local proj="${1?${FUNCNAME[0]}: project name required}" 11 | local cmd PS3 dest d 12 | local -a dests 13 | 14 | if [[ "$proj" == "open" ]]; then 15 | shift 16 | proj="${1}" 17 | cmd="${EDITOR?}" 18 | fi 19 | 20 | # collect possible destinations to account for directories 21 | # with the same name in project directories 22 | IFS=':' read -ra dests <<< "${BASH_IT_PROJECT_PATHS?${FUNCNAME[0]}: project working folders must be configured}" 23 | for d in "${!dests[@]}"; do 24 | if [[ ! -d "${dests[d]}/${proj}" ]]; then 25 | unset 'dests[d]' 26 | fi 27 | done 28 | 29 | case ${#dests[@]} in 30 | 0) 31 | _log_error "BASH_IT_PROJECT_PATHS must contain at least one existing location" 32 | return 1 33 | ;; 34 | 1) 35 | dest="${dests[*]}/${proj}" 36 | ;; 37 | *) 38 | PS3="Multiple project directories found. Please select one: " 39 | dests+=("cancel") 40 | select d in "${dests[@]}"; do 41 | case $d in 42 | "cancel") 43 | return 44 | ;; 45 | *) 46 | dest="${d}/${proj}" 47 | break 48 | ;; 49 | esac 50 | done 51 | ;; 52 | esac 53 | 54 | "${cmd:-cd}" "${dest}" 55 | } 56 | 57 | alias pjo="pj open" 58 | -------------------------------------------------------------------------------- /plugins/available/pyenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load pyenv, if you are using it' 4 | 5 | # https://github.com/pyenv/pyenv 6 | 7 | # Load after basher 8 | # BASH_IT_LOAD_PRIORITY: 260 9 | 10 | # Don't modify the environment if we can't find the tool: 11 | # - Check if in $PATH already 12 | # - Check if installed manually to $PYENV_ROOT 13 | # - Check if installed manually to $HOME 14 | _command_exists pyenv \ 15 | || [[ -n "$PYENV_ROOT" && -x "$PYENV_ROOT/bin/pyenv" ]] \ 16 | || [[ -x "$HOME/.pyenv/bin/pyenv" ]] \ 17 | || return 0 18 | 19 | # Set PYENV_ROOT, if not already set 20 | export PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}" 21 | 22 | # Add PYENV_ROOT/bin to PATH, if that's where it's installed 23 | if ! _command_exists pyenv && [[ -x "$PYENV_ROOT/bin/pyenv" ]]; then 24 | pathmunge "$PYENV_ROOT/bin" 25 | fi 26 | 27 | # Initialize pyenv 28 | pathmunge "$PYENV_ROOT/shims" 29 | eval "$(pyenv init - bash)" 30 | 31 | # Load pyenv virtualenv if the virtualenv plugin is installed. 32 | if pyenv virtualenv-init - &> /dev/null; then 33 | eval "$(pyenv virtualenv-init - bash)" 34 | fi 35 | -------------------------------------------------------------------------------- /plugins/available/python.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'alias "shttp" to SimpleHTTPServer' 3 | 4 | if _command_exists python3; then 5 | alias shttp='python3 -m http.server' 6 | elif _command_exists python; then 7 | alias shttp='python -m http.server' 8 | else 9 | _log_warning "Unable to load 'plugin/python' due to being unable to find a working 'python'" 10 | return 1 11 | fi 12 | 13 | function pyedit() { 14 | about 'opens python module in your EDITOR' 15 | param '1: python module to open' 16 | example '$ pyedit requests' 17 | group 'python' 18 | 19 | xpyc="$(python -c "import os, sys; f = open(os.devnull, 'w'); sys.stderr = f; module = __import__('$1'); sys.stdout.write(module.__file__)")" 20 | 21 | if [[ "$xpyc" == "" ]]; then 22 | echo "Python module $1 not found" 23 | return 1 24 | elif [[ "$xpyc" == *__init__.py* ]]; then 25 | xpydir="${xpyc%/*}" 26 | echo "$EDITOR $xpydir" 27 | ${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "$xpydir" 28 | else 29 | echo "$EDITOR ${xpyc%.*}.py" 30 | ${VISUAL:-${EDITOR:-${ALTERNATE_EDITOR:-nano}}} "${xpyc%.*}.py" 31 | fi 32 | } 33 | -------------------------------------------------------------------------------- /plugins/available/rails.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Helper functions for Ruby on Rails' 4 | 5 | # Quick function to kill a daemonized Rails server 6 | function killrails() { 7 | about 'Searches for a daemonized Rails server in tmp/pids and attempts to kill it.' 8 | group 'rails' 9 | 10 | railsPid="$(cat tmp/pids/server.pid)" 11 | if [ -n "$railsPid" ]; then 12 | echo "[OK] Rails Server Process Id : ${railsPid}" 13 | kill -9 "$railsPid" 14 | echo "[OK] Process Killed" 15 | else 16 | echo "[FAIL] Error killing Rails server" 17 | return 1 18 | fi 19 | } 20 | -------------------------------------------------------------------------------- /plugins/available/rbenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'load rbenv, if you are using it' 4 | 5 | export RBENV_ROOT="$HOME/.rbenv" 6 | pathmunge "$RBENV_ROOT/bin" 7 | 8 | if _command_exists rbenv; then 9 | eval "$(rbenv init - bash)" 10 | fi 11 | -------------------------------------------------------------------------------- /plugins/available/ruby.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'ruby and rubygems specific functions and settings' 4 | 5 | # Make commands installed with 'gem install --user-install' available 6 | # ~/.gem/ruby/${RUBY_VERSION}/bin/ 7 | if _command_exists ruby && _command_exists gem; then 8 | pathmunge "$(ruby -e 'print Gem.user_dir')/bin" after 9 | fi 10 | 11 | function remove_gem() { 12 | about 'removes installed gem' 13 | param '1: installed gem name' 14 | group 'ruby' 15 | 16 | gem list | grep "${1:?${FUNCNAME[0]}: no gem name provided}" | awk '{ print $1; }' | xargs sudo gem uninstall 17 | } 18 | -------------------------------------------------------------------------------- /plugins/available/rvm.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # Load RVM, if you are using it 3 | 4 | cite about-plugin 5 | about-plugin 'load rvm, if you are using it' 6 | 7 | # shellcheck disable=SC1091 8 | [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 9 | 10 | # Check to make sure that RVM is actually loaded before adding 11 | # the customizations to it. 12 | if [ "$rvm_path" ]; then 13 | # Load the auto-completion script if RVM was loaded. 14 | # shellcheck disable=SC1091 15 | [[ -r "$rvm_path/scripts/completion" ]] && . "$rvm_path/scripts/completion" 16 | 17 | switch() { 18 | rvm "$1" 19 | local v 20 | v=$(rvm_version) 21 | rvm wrapper "$1" textmate 22 | echo "Switch to Ruby version: $v" 23 | } 24 | 25 | rvm_default() { 26 | rvm --default "$1" 27 | rvm wrapper "$1" textmate 28 | } 29 | 30 | function rvm_version() { 31 | ruby --version 32 | } 33 | 34 | fi 35 | -------------------------------------------------------------------------------- /plugins/available/sdkman.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Load Software Development Kit Manager' 4 | 5 | # Use $SDKMAN_DIR if defined, 6 | # otherwise default to ~/.sdkman 7 | export SDKMAN_DIR=${SDKMAN_DIR:-$HOME/.sdkman} 8 | 9 | # shellcheck disable=SC1091 10 | [[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh" 11 | -------------------------------------------------------------------------------- /plugins/available/ssh.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'ssh helper functions' 4 | 5 | function add_ssh() { 6 | about 'add entry to ssh config' 7 | param '1: host' 8 | param '2: hostname' 9 | param '3: user' 10 | group 'ssh' 11 | 12 | [[ $# -ne 3 ]] && echo "add_ssh host hostname user" && return 1 13 | [[ ! -d ~/.ssh ]] && mkdir -m 700 ~/.ssh 14 | [[ ! -e ~/.ssh/config ]] && touch ~/.ssh/config && chmod 600 ~/.ssh/config 15 | echo -en "\n\nHost $1\n HostName $2\n User $3\n ServerAliveInterval 30\n ServerAliveCountMax 120" >> ~/.ssh/config 16 | } 17 | 18 | function sshlist() { 19 | about 'list hosts defined in ssh config' 20 | group 'ssh' 21 | 22 | awk '$1 ~ /Host$/ {for (i=2; i<=NF; i++) print $i}' ~/.ssh/config 23 | } 24 | 25 | function ssh-add-all() { 26 | about 'add all ssh private keys to agent' 27 | group 'ssh' 28 | 29 | grep -slR "PRIVATE" ~/.ssh | xargs ssh-add 30 | } 31 | -------------------------------------------------------------------------------- /plugins/available/subversion.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'svn helper functions' 4 | 5 | rm_svn() { 6 | about 'remove ".svn" files from directory' 7 | param '1: directory to search for files' 8 | group 'svn' 9 | 10 | if [ -z "$1" ]; then 11 | reference rm_svn 12 | return 13 | fi 14 | find "$1" -name .svn -print0 | xargs -0 rm -rf 15 | } 16 | 17 | svn_add() { 18 | about 'add to svn repo' 19 | group 'svn' 20 | 21 | svn status | grep '^\?' | sed -e 's/? *//' | sed -e 's/ /\ /g' | xargs svn add 22 | } 23 | -------------------------------------------------------------------------------- /plugins/available/sudo.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Toggle sudo at the beginning of the current or the previous command by hitting the ESC key twice' 4 | 5 | function sudo-command-line() { 6 | about "toggle sudo at the beginning of the current or the previous command by hitting the ESC key twice" 7 | group "sudo" 8 | 9 | [[ ${#READLINE_LINE} -eq 0 ]] && READLINE_LINE=$(fc -l -n -1 | xargs) 10 | if [[ $READLINE_LINE == sudo\ * ]]; then 11 | READLINE_LINE="${READLINE_LINE#sudo }" 12 | else 13 | READLINE_LINE="sudo $READLINE_LINE" 14 | fi 15 | READLINE_POINT=${#READLINE_LINE} 16 | } 17 | 18 | # Define shortcut keys: [Esc] [Esc] 19 | 20 | # Readline library requires bash version 4 or later 21 | if [ "${BASH_VERSINFO[0]}" -ge 4 ]; then 22 | bind -x '"\e\e": sudo-command-line' 23 | fi 24 | -------------------------------------------------------------------------------- /plugins/available/textmate.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'set textmate as a default editor' 4 | 5 | if _command_exists mate; then 6 | EDITOR="$(type -p mate) -w" 7 | GIT_EDITOR="$EDITOR" 8 | export EDITOR GIT_EDITOR 9 | fi 10 | -------------------------------------------------------------------------------- /plugins/available/thefuck.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Initialization for fuck' 4 | 5 | # https://github.com/nvbn/thefuck 6 | 7 | if _command_exists thefuck; then 8 | # shellcheck disable=SC2046 9 | eval $(thefuck --alias) 10 | fi 11 | -------------------------------------------------------------------------------- /plugins/available/tmux.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # make sure that tmux is launched in 256 color mode 3 | 4 | cite about-plugin 5 | about-plugin 'make sure that tmux is launched in 256 color mode' 6 | 7 | alias tmux="TERM=xterm-256color tmux" 8 | -------------------------------------------------------------------------------- /plugins/available/tmuxinator.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'sources tmuxinator script if available' 4 | 5 | # shellcheck disable=SC1091 6 | [[ -s "$HOME/.tmuxinator/scripts/tmuxinator" ]] && . "$HOME/.tmuxinator/scripts/tmuxinator" 7 | -------------------------------------------------------------------------------- /plugins/available/todo.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | about-plugin 'Todo.txt integration' 3 | 4 | # you may override any of the exported variables below in your .bash_profile 5 | : "${TODOTXT_DEFAULT_ACTION:=ls}" 6 | export TODOTXT_DEFAULT_ACTION 7 | -------------------------------------------------------------------------------- /plugins/available/url.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'Basic url handling and manipulation functions' 4 | 5 | function slugify() { 6 | about 'takes the text and transform to slug url, also supports formats like (html,link,rst,md)' 7 | group 'url' 8 | param "1: Text to transform (optional)" 9 | param "2: Output format (html,rst,link,md). Omit or pass any text to return only output" 10 | 11 | local TXT=$1 12 | local OUTPUT=$2 13 | local SLUG 14 | 15 | if [[ -z $TXT ]]; then 16 | read -rp "Enter the valid string: " TXT 17 | fi 18 | 19 | # Pass 1 - Clean the url 20 | # Credits: https://stackoverflow.com/a/20007549/10362396 21 | SLUG=$(echo -n "$TXT" | tr -cd ' [:alnum:]._-' | tr -s ' ') 22 | 23 | # Pass 2 - Transformation 24 | SLUG=$(echo -n "$SLUG" | tr '[:upper:]' '[:lower:]' | tr ' ' '-') 25 | 26 | case "$OUTPUT" in 27 | html | htm) 28 | echo "$TXT" 29 | ;; 30 | href | link) 31 | echo "#$SLUG" 32 | ;; 33 | md) 34 | echo "[$TXT](#$SLUG)" 35 | ;; 36 | rst) 37 | echo "\`$TXT <#$SLUG>\`_" 38 | ;; 39 | 40 | *) 41 | echo "$SLUG" 42 | ;; 43 | esac 44 | 45 | } 46 | -------------------------------------------------------------------------------- /plugins/available/virtualenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # 3 | # make sure virtualenvwrapper is enabled if available 4 | 5 | cite about-plugin 6 | about-plugin 'virtualenvwrapper and pyenv-virtualenvwrapper helper functions' 7 | 8 | # Check for whole command instead of just pyenv 9 | if [ -n "$(command pyenv virtualenvwrapper --help 2> /dev/null)" ]; then 10 | pyenv virtualenvwrapper 11 | elif _command_exists virtualenvwrapper.sh; then 12 | # shellcheck disable=SC1091 13 | source virtualenvwrapper.sh 14 | else 15 | _log_debug "${2:-'virtualenvwrapper' was not found}" 16 | fi 17 | 18 | function mkvenv { 19 | about 'create a new virtualenv for this directory' 20 | group 'virtualenv' 21 | 22 | local cwd="${PWD##*/}" 23 | mkvirtualenv --distribute "$cwd" 24 | } 25 | 26 | function mkvbranch { 27 | about 'create a new virtualenv for the current branch' 28 | group 'virtualenv' 29 | 30 | local cwd="${PWD##*/}" 31 | mkvirtualenv --distribute "${cwd}@${SCM_BRANCH}" 32 | } 33 | 34 | function wovbranch { 35 | about 'sets workon branch' 36 | group 'virtualenv' 37 | 38 | local cwd="${PWD##*/}" 39 | workon "${cwd}@${SCM_BRANCH}" 40 | } 41 | 42 | function wovenv { 43 | about 'works on the virtualenv for this directory' 44 | group 'virtualenv' 45 | 46 | workon "${PWD##*/}" 47 | } 48 | -------------------------------------------------------------------------------- /plugins/available/xterm.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'automatically set your xterm title with host and location info' 4 | 5 | _short-dirname() { 6 | local dir_name="${PWD/~/\~}" 7 | if [[ "${SHORT_TERM_LINE:-}" == true && "${#dir_name}" -gt 8 ]]; then 8 | echo "${dir_name##*/}" 9 | else 10 | echo "${dir_name}" 11 | fi 12 | } 13 | 14 | _short-command() { 15 | local input_command="$*" 16 | if [[ "${SHORT_TERM_LINE:-}" == true && "${#input_command}" -gt 8 ]]; then 17 | echo "${input_command%% *}" 18 | else 19 | echo "${input_command}" 20 | fi 21 | } 22 | 23 | set_xterm_title() { 24 | local title="${1:-}" 25 | echo -ne "\033]0;${title}\007" 26 | } 27 | 28 | precmd_xterm_title() { 29 | set_xterm_title "${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}} $(_short-dirname) ${PROMPT_CHAR:-\$}" 30 | } 31 | 32 | preexec_xterm_title() { 33 | local command_line="${BASH_COMMAND:-${1:-}}" 34 | local directory_name short_command 35 | directory_name="$(_short-dirname)" 36 | short_command="$(_short-command "${command_line}")" 37 | set_xterm_title "${short_command} {${directory_name}} (${SHORT_USER:-${USER}}@${SHORT_HOSTNAME:-${HOSTNAME}})" 38 | } 39 | 40 | case "${TERM:-dumb}" in 41 | xterm* | rxvt*) 42 | precmd_functions+=(precmd_xterm_title) 43 | preexec_functions+=(preexec_xterm_title) 44 | ;; 45 | esac 46 | -------------------------------------------------------------------------------- /plugins/available/z_autoenv.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2207,SC2120,SC2034 3 | cite about-plugin 4 | about-plugin 'source into environment when cding to directories' 5 | 6 | if [[ -n "${ZSH_VERSION}" ]]; then 7 | __array_offset=0 8 | else 9 | __array_offset=1 10 | fi 11 | 12 | autoenv_init() { 13 | typeset target home _file 14 | typeset -a _files 15 | target=$1 16 | home="${HOME%/*}" 17 | 18 | _files=($( 19 | while [[ "$PWD" != "/" && "$PWD" != "$home" ]]; do 20 | _file="$PWD/.env" 21 | if [[ -e "${_file}" ]]; then 22 | echo "${_file}" 23 | fi 24 | builtin cd .. || true 25 | done 26 | )) 27 | 28 | _file=${#_files[@]} 29 | while ((_file > 0)); do 30 | #shellcheck disable=SC1090 31 | source "${_files[_file - __array_offset]}" 32 | : $((_file -= 1)) 33 | done 34 | } 35 | 36 | cd() { 37 | local return_code 38 | if builtin cd "$@"; then 39 | autoenv_init 40 | return 0 41 | else 42 | return_code=$? 43 | echo "else?" 44 | return "$return_code" 45 | fi 46 | } 47 | -------------------------------------------------------------------------------- /plugins/available/zoxide.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | cite about-plugin 3 | about-plugin 'zoxide is a smarter cd command for your shell.' 4 | 5 | if _command_exists zoxide; then 6 | eval "$(zoxide init bash)" 7 | else 8 | _log_error 'zoxide not found, please install it from https://github.com/ajeetdsouza/zoxide' 9 | fi 10 | -------------------------------------------------------------------------------- /profiles/default.bash_it: -------------------------------------------------------------------------------- 1 | # This is the default profile of Bash-it 2 | 3 | # plugins 4 | plugins base 5 | 6 | # completion 7 | completion aliases 8 | completion bash-it 9 | completion system 10 | 11 | # aliases 12 | aliases general 13 | -------------------------------------------------------------------------------- /test/completion/aliases.completion.bats: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bats 2 | 3 | load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" 4 | 5 | function local_setup_file() { 6 | setup_libs "helpers" 7 | # Load something, anything... 8 | load ../../completion/available/capistrano.completion 9 | } 10 | 11 | @test "alias-completion: See that aliases with double quotes and brackets do not break the plugin" { 12 | alias gtest="git log --graph --pretty=format:'%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset' --abbrev-commit --date=relative" 13 | run load "${BASH_IT?}/completion/available/aliases.completion.bash" 14 | 15 | assert_success 16 | } 17 | 18 | @test "alias-completion: See that aliases with single quotes and brackets do not break the plugin" { 19 | alias gtest='git log --graph --pretty=format:"%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset" --abbrev-commit --date=relative' 20 | run load "${BASH_IT?}/completion/available/aliases.completion.bash" 21 | 22 | assert_success 23 | } 24 | 25 | @test "alias-completion: See that having aliased rm command does not output unnecessary output" { 26 | alias rm='rm -v' 27 | run load "${BASH_IT?}/completion/available/aliases.completion.bash" 28 | 29 | assert_output "" 30 | } 31 | -------------------------------------------------------------------------------- /test/fixtures/bash_it/aliases/available/a.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | alias test_alias="a" 4 | -------------------------------------------------------------------------------- /test/fixtures/bash_it/aliases/available/b.aliases.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | alias test_alias="b" 4 | -------------------------------------------------------------------------------- /test/fixtures/bash_it/plugins/available/c.plugin.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | alias test_alias="c" 4 | -------------------------------------------------------------------------------- /test/fixtures/bash_it/profiles/test-bad-component.bash_it: -------------------------------------------------------------------------------- 1 | # plugins 2 | plugins base 3 | 4 | # completion 5 | completion aliases 6 | completion bash-it 7 | completion system 8 | 9 | # aliases 10 | aliases general 11 | # Bad component 12 | aliases bla 13 | -------------------------------------------------------------------------------- /test/fixtures/bash_it/profiles/test-bad-type.bash_it: -------------------------------------------------------------------------------- 1 | # plugins 2 | plugins base 3 | # Bad type 4 | compleetion aliases 5 | 6 | # completion 7 | completion aliases 8 | completion bash-it 9 | completion system 10 | 11 | # aliases 12 | aliases general 13 | -------------------------------------------------------------------------------- /test/fixtures/go/go path/bin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/go/go path/bin/.keep -------------------------------------------------------------------------------- /test/fixtures/go/gopath/bin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/go/gopath/bin/.keep -------------------------------------------------------------------------------- /test/fixtures/go/gopath2/bin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/go/gopath2/bin/.keep -------------------------------------------------------------------------------- /test/fixtures/plugin/xterm/files/arg0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/plugin/xterm/files/arg0 -------------------------------------------------------------------------------- /test/fixtures/plugin/xterm/files/arg1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/plugin/xterm/files/arg1 -------------------------------------------------------------------------------- /test/fixtures/svn/broken/svn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Simply return an error code to simulate a broken SVN installation 4 | exit 72 5 | -------------------------------------------------------------------------------- /test/fixtures/svn/broken/xcrun: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/svn/broken/xcrun -------------------------------------------------------------------------------- /test/fixtures/svn/working/svn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # If the info command is called 4 | # AND the parent folder contains the .svn folder 5 | # THEN return the current path, similar to what `svn info` does 6 | if [[ "$1" == "info" ]] && [[ -d "../.svn" ]]; then 7 | echo "$PWD" 8 | fi 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /test/fixtures/svn/working/xcrun: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bash-it/bash-it/7488d6082f8a0a591000113b6a5138fd5d44fae4/test/fixtures/svn/working/xcrun -------------------------------------------------------------------------------- /test/lib/composure.bats: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bats 2 | 3 | load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" 4 | 5 | function local_setup_file() { 6 | true 7 | # don't load any libraries as the tests here test the *whole* kit 8 | } 9 | 10 | @test "lib composure: _composure_keywords()" { 11 | run _composure_keywords 12 | assert_output "about author example group param version" 13 | } 14 | -------------------------------------------------------------------------------- /test/lint-requirements.txt: -------------------------------------------------------------------------------- 1 | pre-commit==2.3.0 2 | -------------------------------------------------------------------------------- /test/plugins/cmd-returned-notify.plugin.bats: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bats 2 | # shellcheck disable=SC2034 3 | 4 | load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" 5 | 6 | function local_setup_file() { 7 | setup_libs "command_duration" 8 | load "${BASH_IT?}/plugins/available/cmd-returned-notify.plugin.bash" 9 | } 10 | 11 | @test "plugins cmd-returned-notify: notify after elapsed time" { 12 | NOTIFY_IF_COMMAND_RETURNS_AFTER=0 13 | COMMAND_DURATION_START_SECONDS="$(_shell_duration_en)" 14 | export COMMAND_DURATION_START_SECONDS NOTIFY_IF_COMMAND_RETURNS_AFTER 15 | sleep 1 16 | run precmd_return_notification 17 | assert_success 18 | assert_output $'\a' 19 | } 20 | 21 | @test "plugins cmd-returned-notify: do not notify before elapsed time" { 22 | NOTIFY_IF_COMMAND_RETURNS_AFTER=10 23 | COMMAND_DURATION_START_SECONDS="$(_shell_duration_en)" 24 | export COMMAND_DURATION_START_SECONDS NOTIFY_IF_COMMAND_RETURNS_AFTER 25 | sleep 1 26 | run precmd_return_notification 27 | assert_success 28 | assert_output $'' 29 | } 30 | 31 | @test "lib command_duration: preexec no output" { 32 | COMMAND_DURATION_START_SECONDS= 33 | run _command_duration_pre_exec 34 | assert_success 35 | assert_output "" 36 | } 37 | @test "lib command_duration: preexec set COMMAND_DURATION_START_SECONDS" { 38 | COMMAND_DURATION_START_SECONDS= 39 | assert_equal "${COMMAND_DURATION_START_SECONDS}" "" 40 | NOW="$(_shell_duration_en)" 41 | _command_duration_pre_exec 42 | # We need to make sure to account for nanoseconds... 43 | assert_equal "${COMMAND_DURATION_START_SECONDS%.*}" "${NOW%.*}" 44 | } 45 | -------------------------------------------------------------------------------- /test/plugins/ruby.plugin.bats: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bats 2 | 3 | load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" 4 | 5 | function local_setup_file() { 6 | setup_libs "helpers" 7 | } 8 | 9 | @test "plugins ruby: remove_gem is defined" { 10 | run load "${BASH_IT?}/plugins/available/ruby.plugin.bash" 11 | assert_success 12 | load "${BASH_IT?}/plugins/available/ruby.plugin.bash" 13 | 14 | run type remove_gem 15 | assert_line -n 1 "remove_gem () " 16 | } 17 | 18 | @test "plugins ruby: PATH includes ~/.gem/ruby/bin" { 19 | local last_path_entry 20 | if ! type ruby > /dev/null; then 21 | skip 'ruby not installed' 22 | fi 23 | 24 | mkdir -p "$(ruby -e 'print Gem.user_dir')/bin" 25 | 26 | run load "${BASH_IT?}/plugins/available/ruby.plugin.bash" 27 | assert_success 28 | load "${BASH_IT?}/plugins/available/ruby.plugin.bash" 29 | 30 | last_path_entry="$(tail -1 <<< "${PATH//:/$'\n'}")" 31 | [[ "${last_path_entry}" == "$(ruby -e 'print Gem.user_dir')/bin" ]] 32 | } 33 | -------------------------------------------------------------------------------- /test/plugins/xterm.plugin.bats: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bats 2 | # shellcheck disable=SC2034 3 | 4 | load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash" 5 | 6 | function local_setup_file() { 7 | setup_libs "helpers" 8 | load "${BASH_IT?}/plugins/available/xterm.plugin.bash" 9 | } 10 | 11 | @test "plugins xterm: shorten command output" { 12 | SHORT_TERM_LINE=true 13 | run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/* 14 | assert_success 15 | assert_output "${BASH_IT}/test/fixtures/plugin/xterm/files/arg0" 16 | } 17 | 18 | @test "plugins xterm: full command output" { 19 | SHORT_TERM_LINE=false 20 | run _short-command "${BASH_IT}/test/fixtures/plugin/xterm/files"/* 21 | assert_success 22 | assert_output "$(echo "${BASH_IT}/test/fixtures/plugin/xterm/files"/*)" 23 | } 24 | 25 | @test "plugins xterm: shorten dirname output" { 26 | SHORT_TERM_LINE=true 27 | run _short-dirname 28 | assert_success 29 | assert_output "$(basename "${PWD}")" 30 | } 31 | 32 | @test "plugins xterm: full dirname output" { 33 | SHORT_TERM_LINE=false 34 | run _short-dirname 35 | assert_success 36 | assert_output "${PWD}" 37 | } 38 | 39 | @test "plugins xterm: set xterm title" { 40 | run set_xterm_title title 41 | assert_success 42 | assert_output $'\033]0;title\007' 43 | } 44 | -------------------------------------------------------------------------------- /themes/90210/90210.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 5 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 6 | SCM_THEME_PROMPT_PREFIX=" |" 7 | SCM_THEME_PROMPT_SUFFIX="${green?}|" 8 | 9 | GIT_THEME_PROMPT_DIRTY=" ${red?}✗" 10 | GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 11 | GIT_THEME_PROMPT_PREFIX=" ${green?}|" 12 | GIT_THEME_PROMPT_SUFFIX="${green?}|" 13 | 14 | # Nicely formatted terminal prompt 15 | function prompt_command() { 16 | local scm_prompt_info 17 | scm_prompt_info="$(scm_prompt_info)" 18 | PS1="\n${bold_black?}[${blue?}\@${bold_black?}]-${bold_black?}[${green?}\u${yellow?}@${green?}\h${bold_black?}]-${bold_black?}[${purple?}\w${bold_black?}]-${scm_prompt_info?}\n${reset_color?}\$ " 19 | } 20 | 21 | safe_append_prompt_command prompt_command 22 | -------------------------------------------------------------------------------- /themes/axin/axin.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # Axin Bash Prompt, inspired by theme "Sexy" and "Bobby" 4 | # thanks to them 5 | 6 | if tput setaf 1 &> /dev/null; then 7 | if [[ $(tput colors) -ge 256 ]] 2> /dev/null; then 8 | MAGENTA=$(tput setaf 9) 9 | ORANGE=$(tput setaf 172) 10 | GREEN=$(tput setaf 190) 11 | PURPLE=$(tput setaf 141) 12 | WHITE=$(tput setaf 0) 13 | else 14 | MAGENTA=$(tput setaf 5) 15 | ORANGE=$(tput setaf 4) 16 | GREEN=$(tput setaf 2) 17 | PURPLE=$(tput setaf 1) 18 | WHITE=$(tput setaf 7) 19 | fi 20 | BOLD=$(tput bold) 21 | RESET=$(tput sgr0) 22 | else 23 | MAGENTA="\033[1;31m" 24 | ORANGE="\033[1;33m" 25 | GREEN="\033[1;32m" 26 | PURPLE="\033[1;35m" 27 | WHITE="\033[1;37m" 28 | BOLD="" 29 | RESET="\033[m" 30 | fi 31 | 32 | function prompt_command() { 33 | PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]@ \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\[$SCM_THEME_PROMPT_PREFIX\]$(clock_prompt) \[$PURPLE\]$(scm_prompt_info) \n\$ \[$RESET\]" 34 | } 35 | 36 | THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${white}"} 37 | 38 | safe_append_prompt_command prompt_command 39 | -------------------------------------------------------------------------------- /themes/bakke/bakke.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 5 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 6 | SCM_THEME_PROMPT_PREFIX=" |" 7 | SCM_THEME_PROMPT_SUFFIX="${green?}|" 8 | 9 | GIT_THEME_PROMPT_DIRTY=" ${red?}✗" 10 | GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 11 | GIT_THEME_PROMPT_PREFIX=" ${green?}|" 12 | GIT_THEME_PROMPT_SUFFIX="${green?}|" 13 | 14 | RVM_THEME_PROMPT_PREFIX="|" 15 | RVM_THEME_PROMPT_SUFFIX="|" 16 | 17 | function prompt_command() { 18 | #PS1="${bold_cyan}$(scm_char)${green}$(scm_prompt_info)${purple}$(ruby_version_prompt) ${yellow}\h ${reset_color}in ${green}\w ${reset_color}\n${green}→${reset_color} " 19 | #PS1="\n${purple}\h: ${reset_color} ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " 20 | #PS1="\n${cyan}\h: ${reset_color} ${yellow}\w\n${red}$(scm_char)${red}$(scm_prompt_info) ${green}→${reset_color} " 21 | local virtualenv_prompt scm_prompt_info 22 | virtualenv_prompt="$(virtualenv_prompt)" 23 | scm_prompt_info="$(scm_prompt_info)" 24 | PS1="\n${cyan?}\h:${virtualenv_prompt} ${reset_color?} ${yellow?}\w ${green?}${scm_prompt_info}\n${reset_color?}→ " 25 | } 26 | 27 | safe_append_prompt_command prompt_command 28 | -------------------------------------------------------------------------------- /themes/barbuk/README.rst: -------------------------------------------------------------------------------- 1 | ../../docs/themes-list/barbuk.rst -------------------------------------------------------------------------------- /themes/bira/bira.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_PREFIX=" ${yellow?}‹" 5 | SCM_THEME_PROMPT_SUFFIX="›${reset_color?}" 6 | 7 | VIRTUALENV_THEME_PROMPT_PREFIX=" ${cyan?}‹" 8 | VIRTUALENV_THEME_PROMPT_SUFFIX="›${reset_color?}" 9 | CONDAENV_THEME_PROMPT_PREFIX=" ${cyan?}‹" 10 | CONDAENV_THEME_PROMPT_SUFFIX="›${reset_color?}" 11 | 12 | bold="\[\e[1m\]" 13 | 14 | if [[ ${UID} -eq 0 ]]; then 15 | user_host="${bold_red?}\u@\h${normal?}${reset_color?}" 16 | else 17 | user_host="${bold_green?}\u@\h${normal?}${reset_color?}" 18 | fi 19 | 20 | function prompt_command() { 21 | local current_dir=" ${bold_blue?}\w${normal?}${reset_color?}" 22 | local virtualenv_prompt scm_prompt_info 23 | virtualenv_prompt="${virtualenv_prompt:-$(condaenv_prompt)}" 24 | scm_prompt_info="$(scm_prompt_info)" 25 | PS1="╭─${user_host?}${current_dir}${virtualenv_prompt}${scm_prompt_info}\n╰─${bold?}\\$ ${normal?}" 26 | } 27 | 28 | safe_append_prompt_command prompt_command 29 | -------------------------------------------------------------------------------- /themes/bobby-python/bobby-python.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 5 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 6 | SCM_THEME_PROMPT_PREFIX=" |" 7 | SCM_THEME_PROMPT_SUFFIX="${green?}|" 8 | 9 | GIT_THEME_PROMPT_DIRTY=" ${red?}✗" 10 | GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 11 | GIT_THEME_PROMPT_PREFIX=" ${green?}|" 12 | GIT_THEME_PROMPT_SUFFIX="${green?}|" 13 | 14 | CONDAENV_THEME_PROMPT_SUFFIX="|" 15 | 16 | function prompt_command() { 17 | PS1="\n${yellow?}$(python_version_prompt) " # Name of virtual env followed by python version 18 | PS1+="${purple?}\h " 19 | PS1+="${reset_color?}in " 20 | PS1+="${green?}\w\n" 21 | PS1+="${bold_cyan?}$(scm_char)" 22 | PS1+="${green?}$(scm_prompt_info) " 23 | PS1+="${green?}→${reset_color?} " 24 | } 25 | 26 | safe_append_prompt_command prompt_command 27 | -------------------------------------------------------------------------------- /themes/bobby/bobby.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 5 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 6 | SCM_THEME_PROMPT_PREFIX=" ${green?}|" 7 | SCM_THEME_PROMPT_SUFFIX="${green?}|" 8 | 9 | GIT_THEME_PROMPT_DIRTY=" ${red?}✗" 10 | GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 11 | GIT_THEME_PROMPT_PREFIX=" ${green?}|" 12 | GIT_THEME_PROMPT_SUFFIX="${green?}|" 13 | 14 | RVM_THEME_PROMPT_PREFIX="|" 15 | RVM_THEME_PROMPT_SUFFIX="|" 16 | 17 | function __bobby_clock() { 18 | printf '%s' "$(clock_prompt) " 19 | 20 | if [[ "${THEME_SHOW_CLOCK_CHAR:-}" == "true" ]]; then 21 | printf '%s' "$(clock_char) " 22 | fi 23 | } 24 | 25 | function prompt_command() { 26 | PS1="\n$(battery_char) $(__bobby_clock)" 27 | PS1+="${yellow?}$(ruby_version_prompt) " 28 | PS1+="${purple?}\h " 29 | PS1+="${reset_color?}in " 30 | PS1+="${green?}\w\n" 31 | PS1+="${bold_cyan?}$(scm_prompt_char_info) " 32 | PS1+="${green?}→${reset_color?} " 33 | } 34 | 35 | : "${THEME_SHOW_CLOCK_CHAR:="true"}" 36 | : "${THEME_CLOCK_CHAR_COLOR:=${red?}}" 37 | : "${THEME_CLOCK_COLOR:=${bold_cyan?}}" 38 | : "${THEME_CLOCK_FORMAT:="%Y-%m-%d %H:%M:%S"}" 39 | 40 | safe_append_prompt_command prompt_command 41 | -------------------------------------------------------------------------------- /themes/brunton/brunton.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_PREFIX="" 5 | SCM_THEME_PROMPT_SUFFIX="" 6 | 7 | SCM_THEME_PROMPT_DIRTY=" ${bold_red?}✗${normal?}" 8 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓${normal?}" 9 | SCM_GIT_CHAR="${bold_green?}±${normal?}" 10 | SCM_SVN_CHAR="${bold_cyan?}⑆${normal?}" 11 | SCM_HG_CHAR="${bold_red?}☿${normal?}" 12 | 13 | function is_vim_shell() { 14 | if [[ -n "${VIMRUNTIME:-}" ]]; then 15 | echo "[${cyan?}vim shell${normal?}]" 16 | fi 17 | } 18 | 19 | function prompt() { 20 | local SCM_PROMPT_FORMAT=' %s (%s)' clock_prompt battery_charge scm_prompt is_vim_shell 21 | clock_prompt="$(clock_prompt)" 22 | battery_charge="$(battery_charge)" 23 | scm_prompt="$(scm_prompt)" 24 | is_vim_shell="$(is_vim_shell)" 25 | PS1="${white?}${background_blue?} \u${normal?}${background_blue?}@${red?}${background_blue?}\h ${clock_prompt} ${reset_color?}${normal?} ${battery_charge}\n${bold_black?}${background_white?} \w ${normal?}${scm_prompt}${is_vim_shell}\n${white?}>${normal?} " 26 | } 27 | 28 | : "${THEME_CLOCK_COLOR:=${blue?}${background_white?}}" 29 | : "${THEME_CLOCK_FORMAT:=" %H:%M:%S"}" 30 | 31 | safe_append_prompt_command prompt 32 | -------------------------------------------------------------------------------- /themes/candy/candy.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | function prompt_command() { 5 | local clock_prompt scm_prompt_info 6 | clock_prompt="$(clock_prompt)" 7 | scm_prompt_info="$(scm_prompt_info)" 8 | PS1="${green?}\u@\h ${clock_prompt} ${reset_color?}${white?}\w${reset_color?}${scm_prompt_info}${blue?} →${bold_blue?} ${reset_color?} ${normal?}" 9 | } 10 | 11 | : "${THEME_CLOCK_COLOR:=${blue?}}" 12 | : "${THEME_CLOCK_FORMAT:="%I:%M:%S"}" 13 | 14 | safe_append_prompt_command prompt_command 15 | -------------------------------------------------------------------------------- /themes/clean/clean.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | # git theming 5 | SCM_THEME_PROMPT_PREFIX="${bold_blue?}(${yellow?}" 6 | SCM_THEME_PROMPT_SUFFIX="${bold_blue?})${reset_color?} " 7 | SCM_THEME_PROMPT_CLEAN="" 8 | SCM_THEME_PROMPT_DIRTY="${bold_red?}✗" 9 | 10 | # LS colors, made with http://geoff.greer.fm/lscolors/ 11 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 12 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' 13 | 14 | function prompt_command() { 15 | if [ "$(whoami)" = root ]; then 16 | no_color=${red?} 17 | else 18 | no_color=${white?} 19 | fi 20 | 21 | PS1="${no_color}\u${reset_color}:${blue?}\W/${reset_color} $(scm_prompt_info)${normal?}$ " 22 | } 23 | 24 | safe_append_prompt_command prompt_command 25 | -------------------------------------------------------------------------------- /themes/codeword/codeword.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_PREFIX="${SCM_THEME_PROMPT_SUFFIX:-}" 5 | SCM_THEME_PROMPT_DIRTY="${bold_red?} ✗${normal?}" 6 | SCM_THEME_PROMPT_CLEAN="${bold_green?} ✓${normal?}" 7 | SCM_GIT_CHAR="${green?}±${normal?}" 8 | 9 | function mark_prompt() { 10 | echo "${green?}\$${normal?}" 11 | } 12 | 13 | function user_host_path_prompt() { 14 | ps_user="${green?}\u${normal?}" 15 | ps_host="${blue?}\H${normal?}" 16 | ps_path="${yellow?}\w${normal?}" 17 | echo "${ps_user?}@${ps_host?}:${ps_path?}" 18 | } 19 | 20 | function prompt() { 21 | local SCM_PROMPT_FORMAT=' [%s%s]' 22 | PS1="$(user_host_path_prompt)$(virtualenv_prompt)$(scm_prompt) $(mark_prompt) " 23 | } 24 | 25 | safe_append_prompt_command '_save-and-reload-history 1' 26 | safe_append_prompt_command prompt 27 | -------------------------------------------------------------------------------- /themes/dos/dos.theme.bash: -------------------------------------------------------------------------------- 1 | PROMPT="\w>>" 2 | -------------------------------------------------------------------------------- /themes/doubletime/doubletime.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034,SC2154 3 | 4 | SCM_THEME_PROMPT_DIRTY='' 5 | SCM_THEME_PROMPT_CLEAN='' 6 | SCM_GIT_CHAR="${bold_cyan}±${normal}" 7 | SCM_SVN_CHAR="${bold_cyan}⑆${normal}" 8 | SCM_HG_CHAR="${bold_red}☿${normal}" 9 | SCM_THEME_PROMPT_PREFIX="" 10 | SCM_THEME_PROMPT_SUFFIX="" 11 | if [[ -n "$RVM_THEME_PROMPT_COLOR" ]]; then 12 | RVM_THEME_PROMPT_COLOR=$(eval "echo $$(echo ${RVM_THEME_PROMPT_COLOR})") 13 | else 14 | RVM_THEME_PROMPT_COLOR="${red}" 15 | fi 16 | RVM_THEME_PROMPT_PREFIX="(${RVM_THEME_PROMPT_COLOR}rb${normal}: " 17 | RVM_THEME_PROMPT_SUFFIX=") " 18 | if [[ -n "$VIRTUALENV_THEME_PROMPT_COLOR" ]]; then 19 | VIRTUALENV_THEME_PROMPT_COLOR=$(eval "echo $$(echo ${VIRTUALENV_THEME_PROMPT_COLOR})") 20 | else 21 | VIRTUALENV_THEME_PROMPT_COLOR="${green}" 22 | fi 23 | VIRTUALENV_THEME_PROMPT_PREFIX="(${VIRTUALENV_THEME_PROMPT_COLOR}py${normal}: " 24 | VIRTUALENV_THEME_PROMPT_SUFFIX=") " 25 | 26 | if [[ -n "$THEME_PROMPT_HOST_COLOR" ]]; then 27 | THEME_PROMPT_HOST_COLOR=$(eval "echo $$(echo ${THEME_PROMPT_HOST_COLOR})") 28 | else 29 | THEME_PROMPT_HOST_COLOR="$blue" 30 | fi 31 | 32 | function prompt_setter() { 33 | # Save history 34 | _save-and-reload-history 1 35 | PS1=" 36 | $(clock_prompt) $(scm_char) [${THEME_PROMPT_HOST_COLOR}\u@${THEME_PROMPT_HOST}$reset_color] $(virtualenv_prompt)$(ruby_version_prompt)\w 37 | $(scm_prompt)$reset_color $ " 38 | PS2='> ' 39 | PS4='+ ' 40 | } 41 | 42 | safe_append_prompt_command prompt_setter 43 | -------------------------------------------------------------------------------- /themes/doubletime_multiline/doubletime_multiline.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | source "$BASH_IT/themes/doubletime/doubletime.theme.bash" 5 | 6 | function prompt_setter() { 7 | # Save history 8 | _save-and-reload-history 1 9 | PS1=" 10 | $(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}${reset_color?}] $(virtualenv_prompt)$(ruby_version_prompt) 11 | \w 12 | $(scm_prompt)$reset_color $ " 13 | PS2='> ' 14 | PS4='+ ' 15 | } 16 | 17 | safe_append_prompt_command prompt_setter 18 | -------------------------------------------------------------------------------- /themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | source "$BASH_IT/themes/doubletime/doubletime.theme.bash" 5 | 6 | function prompt_setter() { 7 | # Save history 8 | _save-and-reload-history 1 9 | PS1=" 10 | $(clock_prompt) $(scm_char) [$THEME_PROMPT_HOST_COLOR\u@${THEME_PROMPT_HOST}${reset_color?}] $(virtualenv_prompt) 11 | \w 12 | $(scm_prompt)$reset_color $ " 13 | PS2='> ' 14 | PS4='+ ' 15 | } 16 | 17 | safe_append_prompt_command prompt_setter 18 | -------------------------------------------------------------------------------- /themes/duru/duru.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_PREFIX="${cyan?} on ${green?}" 5 | SCM_THEME_PROMPT_SUFFIX="" 6 | SCM_THEME_PROMPT_DIRTY=" ${red?}with changes" 7 | SCM_THEME_PROMPT_CLEAN="" 8 | 9 | venv() { 10 | if [ -n "$VIRTUAL_ENV" ]; then 11 | local env=$VIRTUAL_ENV 12 | echo "${gray?} in ${orange?}${env##*/} " 13 | fi 14 | } 15 | 16 | last_two_dirs() { 17 | # shellcheck disable=SC2001 18 | pwd | rev | awk -F / '{print $1,$2}' | rev | sed s_\ _/_ | sed "s|$(sed 's,\/,,' <<< "$HOME")|~|g" 19 | } 20 | 21 | prompt() { 22 | PS1="${yellow?}# ${reset_color?}$(last_two_dirs)$(scm_prompt_info)${reset_color?}$(venv)${reset_color?} ${cyan?}\n> ${reset_color?}" 23 | } 24 | 25 | safe_append_prompt_command prompt 26 | -------------------------------------------------------------------------------- /themes/easy/easy.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_PREFIX="${bold_green?}[ ${normal?}" 5 | SCM_THEME_PROMPT_SUFFIX="${bold_green?} ] " 6 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 7 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 8 | 9 | function prompt_command() { 10 | local scm_prompt_info 11 | if [ "${USER:-${LOGNAME?}}" = root ]; then 12 | cursor_color="${bold_red?}" 13 | user_color="${green?}" 14 | else 15 | cursor_color="${bold_green?}" 16 | user_color="${white?}" 17 | fi 18 | scm_prompt_info="$(scm_prompt_info)" 19 | PS1="${user_color}\u${normal?}@${white?}\h ${bold_black?}\w\n${reset_color?}${scm_prompt_info}${cursor_color}❯ ${normal?}" 20 | } 21 | 22 | safe_append_prompt_command prompt_command 23 | -------------------------------------------------------------------------------- /themes/elixr/elixr.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | SCM_THEME_PROMPT_DIRTY=" ${red?}✗" 5 | SCM_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 6 | SCM_THEME_PROMPT_PREFIX=" ${green?}| " 7 | SCM_THEME_PROMPT_SUFFIX="${green?} |" 8 | SCM_NONE_CHAR='◐ ' 9 | SCM_GIT_SHOW_MINIMAL_INFO=true 10 | GIT_THEME_PROMPT_DIRTY=" ${red?}✗" 11 | GIT_THEME_PROMPT_CLEAN=" ${bold_green?}✓" 12 | GIT_THEME_PROMPT_PREFIX=" ${green?}|" 13 | GIT_THEME_PROMPT_SUFFIX="${green?}|" 14 | 15 | RVM_THEME_PROMPT_PREFIX="|" 16 | RVM_THEME_PROMPT_SUFFIX=" d|" 17 | 18 | BOLD="\[\e[1m\]" 19 | 20 | function prompt_command() { 21 | PS1="\n${bold_cyan?}$(scm_prompt_char_info)$(virtualenv_prompt) ${bold_cyan}\w :${reset_color?}${normal?}${BOLD} " 22 | } 23 | 24 | safe_append_prompt_command prompt_command 25 | -------------------------------------------------------------------------------- /themes/emperor/emperor.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 4 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 5 | SCM_THEME_PROMPT_PREFIX=" |" 6 | SCM_THEME_PROMPT_SUFFIX="${green}|" 7 | 8 | GIT_THEME_PROMPT_DIRTY=" ${red}✗" 9 | GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" 10 | GIT_THEME_PROMPT_PREFIX=" ${green}|" 11 | GIT_THEME_PROMPT_SUFFIX="${green}|" 12 | 13 | RVM_THEME_PROMPT_PREFIX="|" 14 | RVM_THEME_PROMPT_SUFFIX="|" 15 | 16 | function get_hour_color { 17 | hour_color=$red 18 | min=$(date +%M) 19 | if [ "$min" -lt "15" ]; then 20 | hour_color=$white 21 | elif [ "$min" -lt "30" ]; then 22 | hour_color=$green 23 | elif [ "$min" -lt "45" ]; then 24 | hour_color=$yellow 25 | else 26 | hour_color=$red 27 | fi 28 | echo "$hour_color" 29 | } 30 | 31 | __emperor_clock() { 32 | THEME_CLOCK_COLOR=$(get_hour_color) 33 | clock_prompt 34 | } 35 | 36 | function prompt_command() { 37 | PS1="\n$(__emperor_clock)${purple}\h ${reset_color}in ${prompt_color}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " 38 | } 39 | 40 | THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H "} 41 | 42 | safe_append_prompt_command prompt_command 43 | -------------------------------------------------------------------------------- /themes/envy/envy.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 3 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 4 | SCM_THEME_PROMPT_PREFIX=" |" 5 | SCM_THEME_PROMPT_SUFFIX="${green}|" 6 | 7 | GIT_THEME_PROMPT_DIRTY=" ${red}✗" 8 | GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" 9 | GIT_THEME_PROMPT_PREFIX=" ${green}|" 10 | GIT_THEME_PROMPT_SUFFIX="${green}|" 11 | 12 | VIRTUALENV_THEME_PROMPT_PREFIX="${green}ⓔ " 13 | VIRTUALENV_THEME_PROMPT_SUFFIX="" 14 | 15 | function prompt_command() { 16 | PS1="\n$(virtualenv_prompt)${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " 17 | } 18 | 19 | safe_append_prompt_command prompt_command 20 | -------------------------------------------------------------------------------- /themes/kitsune/kitsune.theme.bash: -------------------------------------------------------------------------------- 1 | # This is combination of works from two different people which I combined for my requirement. 2 | # Original PS1 was from reddit user /u/Allevil669 which I found in thread: https://www.reddit.com/r/linux/comments/1z33lj/linux_users_whats_your_favourite_bash_prompt/ 3 | # I used that PS1 to the bash-it theme 'morris', and customized it to my liking. All credits to /u/Allevil669 and morris. 4 | # 5 | # prompt theming 6 | 7 | # added TITLEBAR for updating the tab and window titles with the pwd 8 | case $TERM in 9 | xterm*) 10 | TITLEBAR=$(printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") 11 | ;; 12 | screen) 13 | TITLEBAR=$(printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") 14 | ;; 15 | *) 16 | TITLEBAR="" 17 | ;; 18 | esac 19 | if [ "$?" == "0" ]; then 20 | SC="${green}^_^" 21 | else 22 | SC="${red}T_T" 23 | fi 24 | BC=$(battery_percentage) 25 | function prompt_command() { 26 | #PS1="${TITLEBAR}[\u@\h \W $(scm_prompt_info)]\$ " 27 | PS1="\n${cyan}┌─${bold_white}[\u@\h]${cyan}─${bold_yellow}(\w)$(scm_prompt_info)\n${cyan}└─${bold_green}[\A]-${green}($BC%)${bold_cyan}-[${green}${bold_green}\$${bold_cyan}]${green} " 28 | } 29 | 30 | # scm theming 31 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 32 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 33 | SCM_THEME_PROMPT_PREFIX="${bold_cyan}(" 34 | SCM_THEME_PROMPT_SUFFIX="${bold_cyan})${reset_color}" 35 | 36 | safe_append_prompt_command prompt_command 37 | -------------------------------------------------------------------------------- /themes/liquidprompt/.gitignore: -------------------------------------------------------------------------------- 1 | liquidprompt 2 | -------------------------------------------------------------------------------- /themes/luan/luan.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 4 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 5 | SCM_THEME_PROMPT_PREFIX="(${yellow}" 6 | SCM_THEME_PROMPT_SUFFIX="${normal})" 7 | 8 | GIT_THEME_PROMPT_DIRTY=" ${red}✗" 9 | GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" 10 | GIT_THEME_PROMPT_PREFIX="(${yellow}" 11 | GIT_THEME_PROMPT_SUFFIX="${normal})" 12 | 13 | RVM_THEME_PROMPT_PREFIX="" 14 | RVM_THEME_PROMPT_SUFFIX="" 15 | 16 | function prompt_command() { 17 | dtime="$(clock_prompt)" 18 | user_host="${green}\u@${cyan}\h${normal}" 19 | current_dir="${bold_blue}\w${normal}" 20 | rvm_ruby="${bold_red}$(ruby_version_prompt)${normal}" 21 | git_branch="$(scm_prompt_info)${normal}" 22 | prompt="${bold_green}\$${normal} " 23 | arrow="${bold_white}▶${normal} " 24 | prompt="${bold_green}\$${normal} " 25 | 26 | PS1="${dtime}${user_host}:${current_dir} ${rvm_ruby} ${git_branch} 27 | $arrow $prompt" 28 | } 29 | 30 | THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$yellow"} 31 | THEME_CLOCK_FORMAT=${THEME_TIME_FORMAT:-"%I:%M:%S "} 32 | 33 | safe_append_prompt_command prompt_command 34 | -------------------------------------------------------------------------------- /themes/mbriggs/mbriggs.theme.bash: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------# 2 | # FILE: mbriggs.zsh-theme # 3 | # BY: Matt Briggs (matt@mattbriggs.net) # 4 | # BASED ON: smt by Stephen Tudor (stephen@tudorstudio.com) # 5 | # ------------------------------------------------------------------# 6 | 7 | SCM_THEME_PROMPT_DIRTY="${red}⚡${reset_color}" 8 | SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}" 9 | SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}" 10 | SCM_THEME_PROMPT_PREFIX=" " 11 | SCM_THEME_PROMPT_SUFFIX="" 12 | GIT_SHA_PREFIX=" ${yellow}" 13 | GIT_SHA_SUFFIX="${reset_color}" 14 | 15 | function git_short_sha() { 16 | SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX" 17 | } 18 | 19 | function prompt() { 20 | local return_status="" 21 | local ruby="${red}$(ruby_version_prompt)${reset_color}" 22 | local user_host="${green}\h${reset_color}" 23 | local current_path="\w" 24 | local n_commands="\!" 25 | local git_branch="$(git_short_sha)$(scm_prompt_info)" 26 | local prompt_symbol='λ' 27 | local open='(' 28 | local close=')' 29 | local prompt_char=' \$ ' 30 | 31 | PS1="\n${n_commands} ${user_host} ${prompt_symbol} ${ruby} ${open}${current_path}${git_branch}${close}${return_status}\n${prompt_char}" 32 | } 33 | 34 | safe_append_prompt_command prompt 35 | -------------------------------------------------------------------------------- /themes/minimal/minimal.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_PREFIX="${cyan}(${green}" 4 | SCM_THEME_PROMPT_SUFFIX="${cyan})" 5 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 6 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 7 | 8 | prompt() { 9 | PS1="$(scm_prompt_info)${reset_color} ${cyan}\W${reset_color} " 10 | } 11 | 12 | safe_append_prompt_command prompt 13 | -------------------------------------------------------------------------------- /themes/modern-t/modern-t.theme.bash: -------------------------------------------------------------------------------- 1 | # The "modern-t" theme is a "modern" theme variant with support 2 | # for "t", the minimalist python todo list utility by Steve Losh. 3 | # Get and install "t" at https://github.com/sjl/t#installing-t 4 | # 5 | # Warning: The Bash-it plugin "todo.plugin" breaks the "t" 6 | # prompt integration, please disable it while using this theme. 7 | 8 | SCM_THEME_PROMPT_PREFIX="" 9 | SCM_THEME_PROMPT_SUFFIX="" 10 | 11 | SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" 12 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" 13 | SCM_GIT_CHAR="${bold_green}±${normal}" 14 | SCM_SVN_CHAR="${bold_cyan}⑆${normal}" 15 | SCM_HG_CHAR="${bold_red}☿${normal}" 16 | 17 | case $TERM in 18 | xterm*) 19 | TITLEBAR="\[\033]0;\w\007\]" 20 | ;; 21 | *) 22 | TITLEBAR="" 23 | ;; 24 | esac 25 | 26 | PS3=">> " 27 | 28 | is_vim_shell() { 29 | if [ ! -z "$VIMRUNTIME" ]; then 30 | echo "[${cyan}vim shell${normal}]" 31 | fi 32 | } 33 | 34 | prompt() { 35 | SCM_PROMPT_FORMAT='[%s][%s]' 36 | if [ $? -ne 0 ]; then 37 | # Yes, the indenting on these is weird, but it has to be like 38 | # this otherwise it won't display properly. 39 | 40 | PS1="${TITLEBAR}${bold_red}┌─[${cyan}$(t | wc -l | sed -e's/ *//')${reset_color}]${reset_color}$(scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) 41 | ${bold_red}└─▪${normal} " 42 | else 43 | PS1="${TITLEBAR}┌─[${cyan}$(t | wc -l | sed -e's/ *//')${reset_color}]$(scm_prompt)[${cyan}\W${normal}]$(is_vim_shell) 44 | └─▪ " 45 | fi 46 | } 47 | 48 | PS2="└─▪ " 49 | 50 | safe_append_prompt_command prompt 51 | -------------------------------------------------------------------------------- /themes/modern-time/modern-time.theme.bash: -------------------------------------------------------------------------------- 1 | # Modified version of the original modern theme in bash-it 2 | # Removes the battery charge and adds the current time 3 | 4 | SCM_THEME_PROMPT_PREFIX="" 5 | SCM_THEME_PROMPT_SUFFIX="" 6 | 7 | SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" 8 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" 9 | SCM_GIT_CHAR="${bold_green}±${normal}" 10 | SCM_SVN_CHAR="${bold_cyan}⑆${normal}" 11 | SCM_HG_CHAR="${bold_red}☿${normal}" 12 | 13 | case $TERM in 14 | xterm*) 15 | TITLEBAR="\[\033]0;\w\007\]" 16 | ;; 17 | *) 18 | TITLEBAR="" 19 | ;; 20 | esac 21 | 22 | PS3=">> " 23 | 24 | is_vim_shell() { 25 | if [ ! -z "$VIMRUNTIME" ]; then 26 | echo "[${cyan}vim shell${normal}]" 27 | fi 28 | } 29 | 30 | modern_current_time_prompt() { 31 | echo "[$(date '+%l:%M%p')]" 32 | } 33 | 34 | prompt() { 35 | SCM_PROMPT_FORMAT='[%s][%s]' 36 | if [ $? -ne 0 ]; then 37 | # Yes, the indenting on these is weird, but it has to be like 38 | # this otherwise it won't display properly. 39 | 40 | PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell) 41 | ${bold_red}└─▪${normal} " 42 | else 43 | PS1="${TITLEBAR}┌─$(scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell) 44 | └─▪ " 45 | fi 46 | } 47 | 48 | PS2="└─▪ " 49 | 50 | safe_append_prompt_command prompt 51 | -------------------------------------------------------------------------------- /themes/morris/morris.theme.bash: -------------------------------------------------------------------------------- 1 | # prompt theming 2 | 3 | # added TITLEBAR for updating the tab and window titles with the pwd 4 | case $TERM in 5 | xterm*) 6 | TITLEBAR=$(printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") 7 | ;; 8 | screen) 9 | TITLEBAR=$(printf "\033]0;%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}") 10 | ;; 11 | *) 12 | TITLEBAR="" 13 | ;; 14 | esac 15 | 16 | function prompt_command() { 17 | PS1="${TITLEBAR}[\u@\h \W $(scm_prompt_info)]\$ " 18 | } 19 | 20 | # scm theming 21 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 22 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 23 | SCM_THEME_PROMPT_PREFIX="${green}(" 24 | SCM_THEME_PROMPT_SUFFIX="${green})${reset_color}" 25 | 26 | safe_append_prompt_command prompt_command 27 | -------------------------------------------------------------------------------- /themes/n0qorg/n0qorg.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # n0qorg theme by Florian Baumann 3 | 4 | ## look-a-like 5 | # host directory (branch*)» 6 | # for example: 7 | # ananas ~/Code/bash-it/themes (master*)» 8 | function prompt_command() { 9 | PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» " 10 | } 11 | 12 | safe_append_prompt_command prompt_command 13 | 14 | ## git-theme 15 | # feel free to change git chars. 16 | GIT_THEME_PROMPT_DIRTY="${bold_blue}*${bold_white}" 17 | GIT_THEME_PROMPT_CLEAN="" 18 | GIT_THEME_PROMPT_PREFIX="${bold_blue}(${bold_white}" 19 | GIT_THEME_PROMPT_SUFFIX="${bold_blue})" 20 | 21 | ## alternate chars 22 | # 23 | SCM_THEME_PROMPT_DIRTY="*" 24 | SCM_THEME_PROMPT_CLEAN="" 25 | SCM_THEME_PROMPT_PREFIX="(" 26 | SCM_THEME_PROMPT_SUFFIX=")" 27 | -------------------------------------------------------------------------------- /themes/newin/newin.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 4 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 5 | SCM_THEME_PROMPT_PREFIX=" ${purple}|${green} " 6 | SCM_THEME_PROMPT_SUFFIX="${purple} |" 7 | 8 | prompt() { 9 | exit_code=$? 10 | PS1="$(if [[ ${exit_code} = 0 ]]; then echo "${green}${exit_code}"; else echo "${red}${exit_code}"; fi) ${yellow}\t ${cyan}\w$(scm_prompt_info)${reset_color}\n${orange}$ ${reset_color}" 11 | } 12 | 13 | safe_append_prompt_command prompt 14 | -------------------------------------------------------------------------------- /themes/norbu/norbu.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | function set_prompt_symbol() { 5 | if [[ $1 -eq 0 ]]; then 6 | prompt_symbol=">_" 7 | else 8 | prompt_symbol="${orange?}>_${normal?}" 9 | fi 10 | } 11 | 12 | function prompt_command() { 13 | local ret_val="$?" prompt_symbol scm_prompt_info 14 | if [[ -n "${VIRTUAL_ENV:-}" ]]; then 15 | PYTHON_VIRTUALENV="${bold_yellow?}[${VIRTUAL_ENV##*/}]" 16 | fi 17 | 18 | scm_prompt_info="$(scm_prompt_info)" 19 | set_prompt_symbol "${ret_val}" 20 | PS1="${bold_orange?}${PYTHON_VIRTUALENV:-}${reset_color?}${bold_green?}[\w]${bold_blue?}[${scm_prompt_info}]${normal?} \n${prompt_symbol} " 21 | } 22 | 23 | # scm themeing 24 | SCM_THEME_PROMPT_DIRTY=" ✗" 25 | SCM_THEME_PROMPT_CLEAN=" ✓" 26 | SCM_THEME_PROMPT_PREFIX="[" 27 | SCM_THEME_PROMPT_SUFFIX="]" 28 | 29 | safe_append_prompt_command prompt_command 30 | -------------------------------------------------------------------------------- /themes/nwinkler/nwinkler.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # Two line prompt showing the following information: 4 | # (time) SCM [username@hostname] pwd (SCM branch SCM status) 5 | # → 6 | # 7 | # Example: 8 | # (14:00:26) ± [foo@bar] ~/.bash_it (master ✓) 9 | # → 10 | # 11 | # The arrow on the second line is showing the exit status of the last command: 12 | # * Green: 0 exit status 13 | # * Red: non-zero exit status 14 | # 15 | # The exit code functionality currently doesn't work if you are using the 'fasd' plugin, 16 | # since 'fasd' is messing with the $PROMPT_COMMAND 17 | 18 | PROMPT_END_CLEAN="${green}→${reset_color}" 19 | PROMPT_END_DIRTY="${red}→${reset_color}" 20 | 21 | function prompt_end() { 22 | echo -e "$PROMPT_END" 23 | } 24 | 25 | prompt_setter() { 26 | local exit_status=$? 27 | if [[ $exit_status -eq 0 ]]; then 28 | PROMPT_END=$PROMPT_END_CLEAN 29 | else 30 | PROMPT_END=$PROMPT_END_DIRTY 31 | fi 32 | # Save history 33 | _save-and-reload-history 1 34 | PS1="($(clock_prompt)) $(scm_char) [${blue}\u${reset_color}@${green}\H${reset_color}] ${yellow}\w${reset_color}$(scm_prompt_info) ${reset_color}\n$(prompt_end) " 35 | PS2='> ' 36 | PS4='+ ' 37 | } 38 | 39 | safe_append_prompt_command prompt_setter 40 | 41 | SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" 42 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" 43 | SCM_THEME_PROMPT_PREFIX=" (" 44 | SCM_THEME_PROMPT_SUFFIX=")" 45 | RVM_THEME_PROMPT_PREFIX=" (" 46 | RVM_THEME_PROMPT_SUFFIX=")" 47 | -------------------------------------------------------------------------------- /themes/oh-my-posh/oh-my-posh.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | if _command_exists oh-my-posh; then 4 | export POSH_THEME=${POSH_THEME:-https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/v$(oh-my-posh --version)/themes/jandedobbeleer.omp.json} 5 | eval "$(oh-my-posh init bash --config "${POSH_THEME}")" 6 | else 7 | _log_warning "The oh-my-posh binary was not found on your PATH. Falling back to your existing PS1, please see the docs for more info." 8 | fi 9 | -------------------------------------------------------------------------------- /themes/p4helpers.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | function _p4-opened { 4 | timeout 2.0s p4 opened -s 2> /dev/null 5 | } 6 | 7 | function _p4-opened-counts { 8 | # Return the following counts seperated by tabs: 9 | # - count of opened files 10 | # - count of pending changesets (other than defaults) 11 | # - count of files in the default changeset 12 | # - count of opened files in add mode 13 | # - count of opened files in edit mode 14 | # - count of opened files in delete mode 15 | _p4-opened | awk ' 16 | BEGIN { 17 | opened=0; 18 | type_array["edit"]=0; 19 | type_array["add"]=0; 20 | type_array["delete"]=0; 21 | change_array["change"]=0; 22 | } 23 | { 24 | # p4 opened prints one file per line, and all lines begin with "//" 25 | # Here is an examples: 26 | # 27 | # $ p4 opened 28 | # //depot/some/file.py#4 - edit change 716431 (text) 29 | # //depot/another/file.py - edit default change (text) 30 | # //now/add/a/newfile.sh - add change 435645 (text+k) 31 | # 32 | # 33 | if ($1 ~ /^\/\//) { 34 | opened += 1 35 | change_array[$5] += 1 36 | type_array[$3] += 1 37 | } 38 | } 39 | END { 40 | default_changes=change_array["change"]; 41 | non_default_changes=length(change_array) - 1; 42 | print opened "\t" non_default_changes "\t" default_changes "\t" type_array["add"] "\t" type_array["edit"] "\t" type_array["delete"] 43 | } 44 | ' 45 | } 46 | -------------------------------------------------------------------------------- /themes/parrot/parrot.theme.bash: -------------------------------------------------------------------------------- 1 | # git branch parser 2 | function parse_git_branch() { 3 | echo -e "\[\033[1;34m\]$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')\[\033[0m\]" 4 | } 5 | 6 | function parse_git_branch_no_color() { 7 | echo -e "$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')" 8 | } 9 | 10 | function prompt() { 11 | # If not running interactively, don't do anything 12 | [[ $- != *i* ]] && return 13 | 14 | local force_color_prompt=yes 15 | 16 | if [ -n "$force_color_prompt" ]; then 17 | if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 18 | # We have color support; assume it's compliant with Ecma-48 19 | # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 20 | # a case would tend to support setf rather than setaf.) 21 | local color_prompt=yes 22 | else 23 | local color_prompt= 24 | fi 25 | fi 26 | 27 | if [ "$color_prompt" = yes ]; then 28 | PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\w\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]$(parse_git_branch) $\[\e[0m\] " 29 | 30 | else 31 | PS1='┌──[\u@\h]─[\w]\n└──╼ $(parse_git_branch_no_color) $ ' 32 | fi 33 | } 34 | 35 | safe_append_prompt_command prompt 36 | -------------------------------------------------------------------------------- /themes/pete/pete.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | function prompt_setter() { 5 | local clock_prompt scm_char scm_prompt_info ruby_version_prompt 6 | clock_prompt="$(clock_prompt)" 7 | scm_char="$(scm_char)" 8 | scm_prompt_info="$(scm_prompt_info)" 9 | ruby_version_prompt="$(ruby_version_prompt)" 10 | _save-and-reload-history 1 # Save history 11 | PS1="(${clock_prompt}) ${scm_char} [${blue?}\u${reset_color?}@${green?}\H${reset_color?}] ${yellow?}\w${reset_color?}${scm_prompt_info}${ruby_version_prompt} ${reset_color?} " 12 | PS2='> ' 13 | PS4='+ ' 14 | } 15 | 16 | safe_append_prompt_command prompt_setter 17 | 18 | SCM_THEME_PROMPT_DIRTY=" ✗" 19 | SCM_THEME_PROMPT_CLEAN=" ✓" 20 | SCM_THEME_PROMPT_PREFIX=" (" 21 | SCM_THEME_PROMPT_SUFFIX=")" 22 | RVM_THEME_PROMPT_PREFIX=" (" 23 | RVM_THEME_PROMPT_SUFFIX=")" 24 | -------------------------------------------------------------------------------- /themes/powerline-naked/powerline-naked.base.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034,SC1091 # Expected behavior for themes. 3 | source "${BASH_IT?}/themes/powerline/powerline.base.bash" 4 | 5 | function __powerline_left_segment { 6 | local OLD_IFS="${IFS}" params=() 7 | # shellcheck disable=SC2206 # not needed because we are splitting on "|" 8 | IFS="|" params=($1) 9 | IFS="${OLD_IFS}" 10 | local separator="" 11 | local pad_before_segment=" " 12 | 13 | if [[ "${SEGMENTS_AT_LEFT}" -eq 0 ]]; then 14 | if [[ "${POWERLINE_COMPACT_BEFORE_FIRST_SEGMENT}" -ne 0 ]]; then 15 | pad_before_segment="" 16 | fi 17 | else 18 | if [[ "${POWERLINE_COMPACT_AFTER_SEPARATOR}" -ne 0 ]]; then 19 | pad_before_segment="" 20 | fi 21 | # Since the previous segment wasn't the last segment, add padding, if needed 22 | # 23 | if [[ "${POWERLINE_COMPACT_BEFORE_SEPARATOR:-0}" -eq 0 ]]; then 24 | LEFT_PROMPT+=" " 25 | fi 26 | LEFT_PROMPT+="${POWERLINE_LEFT_SEPARATOR}" 27 | fi 28 | 29 | #change here to cahnge fg color 30 | LEFT_PROMPT+="$(set_color "${params[1]:-}" -)${pad_before_segment}${params[0]}${normal?}" 31 | #seperator char color == current bg 32 | LAST_SEGMENT_COLOR="${params[1]:-}" 33 | ((SEGMENTS_AT_LEFT += 1)) 34 | 35 | _save-and-reload-history "${HISTORY_AUTOSAVE:-0}" 36 | } 37 | 38 | function __powerline_left_last_segment_padding { 39 | LEFT_PROMPT+="$(set_color "${LAST_SEGMENT_COLOR?}" -) ${normal?}" 40 | } 41 | -------------------------------------------------------------------------------- /themes/primer/primer.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # based of the candy theme, but minimized by odbol 4 | function prompt_command() { 5 | PS1="$(clock_prompt) ${reset_color}${white}\w${reset_color}$(scm_prompt_info)${blue} →${bold_blue} ${reset_color} " 6 | } 7 | 8 | THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} 9 | THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%I:%M:%S"} 10 | 11 | safe_append_prompt_command prompt_command 12 | -------------------------------------------------------------------------------- /themes/pro/pro.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 4 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 5 | SCM_THEME_PROMPT_PREFIX=" ${blue}scm:( " 6 | SCM_THEME_PROMPT_SUFFIX="${blue} )" 7 | 8 | GIT_THEME_PROMPT_DIRTY=" ${red}✗" 9 | GIT_THEME_PROMPT_CLEAN=" ${green}✓" 10 | GIT_THEME_PROMPT_PREFIX="${green}git:( " 11 | GIT_THEME_PROMPT_SUFFIX="${green} )" 12 | 13 | function git_prompt_info { 14 | git_prompt_vars 15 | echo -e "$SCM_PREFIX$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" 16 | } 17 | 18 | function prompt() { 19 | PS1="\h: \W $(scm_prompt_info)${reset_color} $ " 20 | } 21 | 22 | safe_append_prompt_command prompt 23 | -------------------------------------------------------------------------------- /themes/pure/pure.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034 # Expected behavior for themes. 3 | 4 | # scm theming 5 | SCM_THEME_PROMPT_PREFIX="|" 6 | SCM_THEME_PROMPT_SUFFIX="" 7 | 8 | SCM_THEME_PROMPT_DIRTY=" ${bold_red?}✗${normal?}" 9 | SCM_THEME_PROMPT_CLEAN=" ${green?}✓${normal?}" 10 | SCM_GIT_CHAR="${green?}±${normal?}" 11 | SCM_SVN_CHAR="${bold_cyan?}⑆${normal?}" 12 | SCM_HG_CHAR="${bold_red?}☿${normal?}" 13 | 14 | VIRTUALENV_THEME_PROMPT_PREFIX="(" 15 | VIRTUALENV_THEME_PROMPT_SUFFIX=")" 16 | 17 | function pure_prompt() { 18 | local ps_host="${bold_blue?}\h${normal?}" 19 | local ps_user="${green?}\u${normal?}" 20 | local ps_user_mark="${green?} \$ ${normal?}" 21 | local ps_root="${red?}\u${red?}" 22 | local ps_root_mark="${red?} \$ ${normal?}" 23 | local ps_path="${yellow?}\w${normal?}" 24 | local virtualenv_prompt scm_prompt 25 | virtualenv_prompt="$(virtualenv_prompt)" 26 | scm_prompt="$(scm_prompt)" 27 | # make it work 28 | case "${EUID:-$UID}" in 29 | 0) 30 | ps_user_mark="${ps_root_mark}" 31 | ps_user="${ps_root}" 32 | ;; 33 | esac 34 | PS1="${virtualenv_prompt}${ps_user}@${ps_host}${scm_prompt}:${ps_path}${ps_user_mark}" 35 | } 36 | 37 | safe_append_prompt_command pure_prompt 38 | -------------------------------------------------------------------------------- /themes/radek/radek.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | GIT_THEME_PROMPT_DIRTY="${red}✗" 4 | GIT_THEME_PROMPT_CLEAN="${bold_green}✓" 5 | GIT_THEME_PROMPT_PREFIX="${bold_cyan}[" 6 | GIT_THEME_PROMPT_SUFFIX="${bold_cyan}]" 7 | 8 | VIRTUALENV_THEME_PROMPT_PREFIX="${bold_green}[" 9 | VIRTUALENV_THEME_PROMPT_SUFFIX="${bold_green}]" 10 | CONDAENV_THEME_PROMPT_PREFIX="${bold_green}[" 11 | CONDAENV_THEME_PROMPT_SUFFIX="${bold_green}]" 12 | PYTHON_THEME_PROMPT_PREFIX="${bold_green}[" 13 | PYTHON_THEME_PROMPT_SUFFIX="${bold_green}]" 14 | 15 | function prompt_command() { 16 | PS1="\n${bold_white}[\u@\h]${bold_yellow}[\w] ${bold_cyan}$(scm_prompt_char_info)$(python_version_prompt)${green}\n→${reset_color} " 17 | } 18 | 19 | safe_append_prompt_command prompt_command 20 | -------------------------------------------------------------------------------- /themes/rainbowbrite/rainbowbrite.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | 3 | # based off of n0qorg 4 | # looks like, if you're in a git repo: 5 | # ± ~/path/to (branch ✓) $ 6 | # in glorious red / blue / yellow color scheme 7 | 8 | prompt_setter() { 9 | # Save history 10 | _save-and-reload-history 1 11 | # displays user@server in purple 12 | # PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(ruby_version_prompt) $black\$$reset_color " 13 | # no user@server 14 | PS1="$red$(scm_char) $blue\w$yellow$(scm_prompt_info)$(ruby_version_prompt) $black\$$reset_color " 15 | PS2='> ' 16 | PS4='+ ' 17 | } 18 | 19 | safe_append_prompt_command prompt_setter 20 | 21 | SCM_NONE_CHAR='·' 22 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 23 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 24 | SCM_THEME_PROMPT_PREFIX=" (" 25 | SCM_THEME_PROMPT_SUFFIX="${yellow})" 26 | RVM_THEME_PROMPT_PREFIX=" (" 27 | RVM_THEME_PROMPT_SUFFIX=")" 28 | -------------------------------------------------------------------------------- /themes/robbyrussell/robbyrussell.theme.bash: -------------------------------------------------------------------------------- 1 | # shellcheck shell=bash 2 | # shellcheck disable=SC2034,SC2154 3 | SCM_THEME_PROMPT_DIRTY=" ${bold_yellow}✗" 4 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 5 | SCM_THEME_PROMPT_PREFIX=" ${bold_blue}scm:(" 6 | SCM_THEME_PROMPT_SUFFIX="${bold_blue})" 7 | 8 | GIT_THEME_PROMPT_DIRTY=" ${bold_yellow}✗" 9 | GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" 10 | GIT_THEME_PROMPT_PREFIX=" ${bold_blue}git:(" 11 | GIT_THEME_PROMPT_SUFFIX="${bold_blue})" 12 | 13 | RVM_THEME_PROMPT_PREFIX="|" 14 | RVM_THEME_PROMPT_SUFFIX="|" 15 | 16 | VIRTUALENV_THEME_PROMPT_PREFIX='(' 17 | VIRTUALENV_THEME_PROMPT_SUFFIX=') ' 18 | 19 | function git_prompt_info() { 20 | git_prompt_vars 21 | echo -e "$SCM_PREFIX${bold_red}$SCM_BRANCH$SCM_STATE$SCM_SUFFIX" 22 | } 23 | 24 | function prompt_command() { 25 | PS1="$(conda_or_venv_prompt)${bold_green}➜ ${bold_cyan}\W${reset_color}$(scm_prompt_info)${normal} " 26 | } 27 | 28 | PROMPT_COMMAND=prompt_command 29 | -------------------------------------------------------------------------------- /themes/roderik/roderik.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export GIT_PS1_SHOWDIRTYSTATE=true 4 | export GIT_PS1_SHOWUNTRACKEDFILES=true 5 | export GIT_PS1_SHOWSTASHSTATE=true 6 | 7 | export PROMPT_DIRTRIM=3 8 | 9 | function prompt_command() { 10 | if [[ ${EUID} == 0 ]]; then 11 | PS1="[$(clock_prompt)]${yellow}[${red}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ " 12 | else 13 | PS1="[$(clock_prompt)]${yellow}[${cyan}\u@\h ${green}\w${yellow}]${red}$(__git_ps1 "(%s)")${normal}\\$ " 14 | fi 15 | } 16 | 17 | safe_append_prompt_command prompt_command 18 | -------------------------------------------------------------------------------- /themes/simple/simple.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # prompt themeing 4 | 5 | #added TITLEBAR for updating the tab and window titles with the pwd 6 | case $TERM in 7 | xterm*) 8 | TITLEBAR="\[\033]0;\w\007\]" 9 | ;; 10 | *) 11 | TITLEBAR="" 12 | ;; 13 | esac 14 | 15 | function prompt_command() { 16 | PS1="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[$(scm_prompt_info)\]${normal} " 17 | } 18 | 19 | # scm themeing 20 | SCM_THEME_PROMPT_DIRTY=" ✗" 21 | SCM_THEME_PROMPT_CLEAN=" ✓" 22 | SCM_THEME_PROMPT_PREFIX="(" 23 | SCM_THEME_PROMPT_SUFFIX=")" 24 | 25 | safe_append_prompt_command prompt_command 26 | -------------------------------------------------------------------------------- /themes/sirup/sirup.theme.bash: -------------------------------------------------------------------------------- 1 | # For unstaged(*) and staged(+) values next to branch name in __git_ps1 2 | GIT_PS1_SHOWDIRTYSTATE="enabled" 3 | 4 | function rvm_version_prompt { 5 | local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}') 6 | 7 | [ "$gemset" != "" ] && gemset="@$gemset" 8 | local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}') 9 | 10 | [ "$version" == "1.9.2" ] && version="" 11 | 12 | local full="$version$gemset" 13 | 14 | [ "$full" != "" ] && echo "$full" 15 | } 16 | 17 | function prompt_command() { 18 | # Check http://github.com/Sirupsen/dotfiles for screenshot 19 | PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ " 20 | } 21 | 22 | safe_append_prompt_command prompt_command 23 | -------------------------------------------------------------------------------- /themes/standard/standard.theme.bash: -------------------------------------------------------------------------------- 1 | # scm themeing 2 | SCM_THEME_PROMPT_DIRTY="×" 3 | SCM_THEME_PROMPT_CLEAN="✓" 4 | SCM_THEME_PROMPT_PREFIX="" 5 | SCM_THEME_PROMPT_SUFFIX="" 6 | 7 | # TODO: need a check for OS before adding this to the prompt 8 | # ${debian_chroot:+($debian_chroot)} 9 | 10 | #added TITLEBAR for updating the tab and window titles with the pwd 11 | case $TERM in 12 | xterm*) 13 | TITLEBAR='\[\033]0;\w\007\]' 14 | ;; 15 | *) 16 | TITLEBAR="" 17 | ;; 18 | esac 19 | 20 | function prompt_command() { 21 | PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ ' 22 | } 23 | 24 | safe_append_prompt_command prompt_command 25 | -------------------------------------------------------------------------------- /themes/tonotdo/tonotdo.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | SCM_THEME_PROMPT_PREFIX=" ${purple}" 4 | SCM_THEME_PROMPT_SUFFIX=" ${normal}" 5 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 6 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 7 | SCM_GIT_SHOW_DETAILS="false" 8 | 9 | function prompt_command() { 10 | PS1="${yellow}\u${normal}${cyan}@\h${normal}${purple} ${normal}${green}\w${normal}$(scm_prompt_info)> " 11 | } 12 | 13 | safe_append_prompt_command prompt_command 14 | -------------------------------------------------------------------------------- /themes/tylenol/tylenol.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Based on 'bobby' theme with the addition of virtualenv_prompt 4 | # 5 | 6 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 7 | SCM_THEME_PROMPT_CLEAN=" ${green}✓" 8 | SCM_THEME_PROMPT_PREFIX=" ${yellow}|${reset_color}" 9 | SCM_THEME_PROMPT_SUFFIX="${yellow}|" 10 | 11 | RVM_THEME_PROMPT_PREFIX="|" 12 | RVM_THEME_PROMPT_SUFFIX="|" 13 | VIRTUALENV_THEME_PROMPT_PREFIX='|' 14 | VIRTUALENV_THEME_PROMPT_SUFFIX='|' 15 | 16 | function prompt_command() { 17 | PS1="\n${green}$(virtualenv_prompt)${red}$(ruby_version_prompt) ${reset_color}\h ${orange}in ${reset_color}\w\n${yellow}$(scm_char)$(scm_prompt_info) ${yellow}→${white} " 18 | } 19 | 20 | safe_append_prompt_command prompt_command 21 | -------------------------------------------------------------------------------- /themes/wanelo/wanelo.theme.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SCM_THEME_PROMPT_DIRTY=" ${red}✗" 3 | SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓" 4 | SCM_THEME_PROMPT_PREFIX=" |" 5 | SCM_THEME_PROMPT_SUFFIX="${green}|" 6 | 7 | GIT_THEME_PROMPT_DIRTY=" ${red}✗" 8 | GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓" 9 | GIT_THEME_PROMPT_PREFIX=" ${green}|" 10 | GIT_THEME_PROMPT_SUFFIX="${green}|" 11 | 12 | RVM_THEME_PROMPT_PREFIX="|" 13 | RVM_THEME_PROMPT_SUFFIX="|" 14 | 15 | function prompt_command() { 16 | if [ $? -eq 0 ]; then 17 | status=❤️ 18 | else 19 | status=💔 20 | fi 21 | PS1="\n${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w $status \n${bold_cyan} ${blue}|$(clock_prompt)|${green}$(scm_prompt_info) ${green}→${reset_color} " 22 | } 23 | 24 | THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} 25 | 26 | PROMPT_COMMAND=prompt_command 27 | -------------------------------------------------------------------------------- /uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [ -z "$BASH_IT" ]; then 3 | BASH_IT="$HOME/.bash_it" 4 | fi 5 | 6 | case $OSTYPE in 7 | darwin*) 8 | CONFIG_FILE=.bash_profile 9 | ;; 10 | *) 11 | CONFIG_FILE=.bashrc 12 | ;; 13 | esac 14 | 15 | # overriding CONFIG_FILE: 16 | CONFIG_FILE="${BASH_IT_CONFIG_FILE:-"${CONFIG_FILE}"}" 17 | 18 | BACKUP_FILE=$CONFIG_FILE.bak 19 | 20 | if [ ! -e "$HOME/$BACKUP_FILE" ]; then 21 | echo -e "\033[0;33mBackup file $HOME/$BACKUP_FILE not found.\033[0m" >&2 22 | 23 | test -w "$HOME/$CONFIG_FILE" \ 24 | && mv "$HOME/$CONFIG_FILE" "$HOME/$CONFIG_FILE.uninstall" \ 25 | && echo -e "\033[0;32mMoved your $HOME/$CONFIG_FILE to $HOME/$CONFIG_FILE.uninstall.\033[0m" 26 | else 27 | test -w "$HOME/$BACKUP_FILE" \ 28 | && cp -a "$HOME/$BACKUP_FILE" "$HOME/$CONFIG_FILE" \ 29 | && rm "$HOME/$BACKUP_FILE" \ 30 | && echo -e "\033[0;32mYour original $CONFIG_FILE has been restored.\033[0m" 31 | fi 32 | 33 | echo "" 34 | echo -e "\033[0;32mUninstallation finished successfully! Sorry to see you go!\033[0m" 35 | echo "" 36 | echo "Final steps to complete the uninstallation:" 37 | echo " -> Remove the $BASH_IT folder" 38 | echo " -> Open a new shell/tab/terminal" 39 | -------------------------------------------------------------------------------- /vendor/.gitattributes: -------------------------------------------------------------------------------- 1 | * -whitespace 2 | init.d/*.bash text eol=lf 3 | -------------------------------------------------------------------------------- /vendor/github.com/django/django/extras/Makefile: -------------------------------------------------------------------------------- 1 | all: sdist bdist_wheel 2 | 3 | sdist: 4 | python setup.py sdist 5 | 6 | bdist_wheel: 7 | python setup.py bdist_wheel 8 | 9 | .PHONY : sdist bdist_wheel 10 | -------------------------------------------------------------------------------- /vendor/github.com/django/django/extras/README.TXT: -------------------------------------------------------------------------------- 1 | This directory contains extra stuff that can improve your Django experience. 2 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/.gitignore: -------------------------------------------------------------------------------- 1 | composure_test/** 2 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | script: make tests 3 | branches: 4 | only: 5 | - testing 6 | - master 7 | before_install: 8 | - sudo apt-get update -qq 9 | - sudo apt-get install -qq ksh zsh 10 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/LICENSE: -------------------------------------------------------------------------------- 1 | License: The MIT License 2 | Copyright © 2012, 2016 Erich Smith 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | software and associated documentation files (the "Software"), to deal in the Software 5 | without restriction, including without limitation the rights to use, copy, modify, 6 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 7 | permit persons to whom the Software is furnished to do so, subject to the following 8 | conditions: 9 | The above copyright notice and this permission notice shall be included in all copies 10 | or substantial portions of the Software. 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 12 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 13 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 14 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 15 | CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 16 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TARGET = tests 3 | all: $(TARGET) 4 | 5 | tests: 6 | cd test && make tests 7 | 8 | clean:: 9 | rm -f test/*~ test/t/*~ 10 | rm -rf test/composure_test 11 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/composure.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | source ${0:h}/{composure,c_extras}.sh 3 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | TARGET = tests 3 | 4 | all: $(TARGET) 5 | 6 | runtests: 7 | ./runtests.sh 8 | 9 | runshellcheck: 10 | ./runshellcheck.sh 11 | 12 | tests: 13 | ./wvtestrun $(MAKE) runshellcheck 14 | 15 | clean:: 16 | rm -f *~ t/*~ 17 | rm -rf composure_test 18 | 19 | -------------------------------------------------------------------------------- /vendor/github.com/erichs/composure/test/runshellcheck.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # run code quality metrics 4 | echo "Testing \"code quality\" with shellcheck.net in ../composure.sh:" 5 | datafile=shellcheck.raw 6 | metricfile=shellcheck.out 7 | 8 | curl -s --data-urlencode script="$(cat ../composure.sh)" \ 9 | www.shellcheck.net/shellcheck.php > $datafile 10 | cat $datafile | python -mjson.tool > $metricfile 11 | rm $datafile 12 | cat $metricfile 13 | 14 | # check for shellcheck.net errors 15 | cat $metricfile | grep -q error 16 | if [ $? -eq 0 ]; then 17 | echo "! shellcheck.net:../composure.sh:0 [ errors ] FAILED" 18 | rm $metricfile 19 | exit 2 20 | fi 21 | 22 | # check for shellcheck.net warnings 23 | cat $metricfile | grep -q warning 24 | if [ $? -eq 0 ]; then 25 | echo "! shellcheck.net:../composure.sh:0 [ warnings ] FAILED" 26 | rm $metricfile 27 | exit 2 28 | fi 29 | 30 | echo "! shellcheck.net:../composure.sh:0 [ no errors or warnings ] ok" 31 | rm $metricfile 32 | -------------------------------------------------------------------------------- /vendor/github.com/gaelicWizard/bash-progcomp/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [**.md] 10 | indent_style = space 11 | indent_size = 2 12 | trim_trailing_whitespace = false 13 | 14 | [.git*] 15 | indent_style = tab 16 | 17 | [**.*sh] 18 | indent_style = tab 19 | indent_size = tab 20 | 21 | shell_variant = bash 22 | binary_next_line = true # like -bn 23 | switch_case_indent = false # like -ci 24 | space_redirects = true # like -sr 25 | keep_padding = false # like -kp 26 | function_next_line = true # like -fn 27 | end_of_line = lf 28 | charset = utf-8 29 | trim_trailing_whitespace = true 30 | insert_final_newline = true 31 | 32 | [**.bats] 33 | indent_style = tab 34 | indent_size = tab 35 | 36 | shell_variant = bash 37 | end_of_line = lf 38 | charset = utf-8 39 | trim_trailing_whitespace = true 40 | insert_final_newline = true 41 | -------------------------------------------------------------------------------- /vendor/github.com/ohmyzsh/ohmyzsh/LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2009-2021 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rcaloras/bash-preexec/.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | 3 | before_install: 4 | # To install bats and test our shell/bash functions 5 | - git clone -b "v1.1.0" "https://github.com/bats-core/bats-core.git" 6 | - sudo ./bats-core/install.sh /usr/local 7 | - rm -rf ./bats-core 8 | - sudo apt-get install -qq zsh 9 | 10 | # For bats functional tests 11 | env: 12 | - functional_test="true" 13 | 14 | # command to run tests 15 | script: 16 | - /usr/local/bin/bats test 17 | 18 | notifications: 19 | email: 20 | on_success: never 21 | -------------------------------------------------------------------------------- /vendor/github.com/rcaloras/bash-preexec/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017 Ryan Caloras and contributors (see https://github.com/rcaloras/bash-preexec) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rcaloras/bash-preexec/test/README.md: -------------------------------------------------------------------------------- 1 | Testing `bash-preexec` 2 | ====================== 3 | 4 | **Note on test conditions** 5 | 6 | When writing test conditions, use `[ ... ]` instead of `[[ ... ]]` since the 7 | former are supported by Bats on Bash versions before 4.1. In particular, macOS 8 | uses Bash 3.2, and `[[ ... ]]` tests always pass on macOS. 9 | 10 | In some cases, you may want to use a feature unique to `[[ ... ]]` such as 11 | pattern matching (`[[ $name = a* ]]`) or regular expressions (`[[ $(date) =~ 12 | ^Fri\ ...\ 13 ]]`). In those cases, use the following pattern to replace “bare” 13 | `[[ ... ]]`. 14 | 15 | ``` 16 | [[ ... ]] || return 1 17 | ``` 18 | 19 | References: 20 | * [Differences between `[` and `[[`](http://mywiki.wooledge.org/BashFAQ/031) 21 | * [Problems with `[[` in Bats](https://github.com/sstephenson/bats/issues/49) 22 | * [Using `|| return 1` instead of `|| false`](https://github.com/bats-core/bats-core/commit/e5695a673faad4d4d33446ed5c99d70dbfa6d8be) 23 | -------------------------------------------------------------------------------- /vendor/github.com/rcaloras/bash-preexec/test/include-test.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | @test "should not import if it's already defined" { 4 | __bp_imported="defined" 5 | source "${BATS_TEST_DIRNAME}/../bash-preexec.sh" 6 | [ -z $(type -t __bp_preexec_and_precmd_install) ] 7 | } 8 | 9 | @test "should import if not defined" { 10 | unset __bp_imported 11 | source "${BATS_TEST_DIRNAME}/../bash-preexec.sh" 12 | [ -n $(type -t __bp_install) ] 13 | } 14 | 15 | @test "bp should stop installation if HISTTIMEFORMAT is readonly" { 16 | readonly HISTTIMEFORMAT 17 | run source "${BATS_TEST_DIRNAME}/../bash-preexec.sh" 18 | [ $status -ne 0 ] 19 | [[ "$output" =~ "HISTTIMEFORMAT" ]] || return 1 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/rparree/jboss-bash-completion/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Raphael Parree 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/rparree/jboss-bash-completion/README.md: -------------------------------------------------------------------------------- 1 | jboss-bash-completion 2 | ===================== 3 | 4 | JBoss Bash Completion for JBoss 5 and 7 (EAP 6) 5 | 6 | 7 | 8 | Overview 9 | -------- 10 | 11 | Completion for the `run.sh` (JBoss5) and `standalone.sh`/`domain.sh` 12 | 13 | Some of the options available in jboss7: 14 | 15 | 16 | * `--admin-only` `-h` `-help` `-version` `-V` `-v` 17 | * `-Djboss.home.dir` 18 | * `--server-config` (options the xml files in the configuration directory relative to -Djboss.server.base.dir) 19 | * `-b` `-bmanagement` `-bunsecure` `-bpublic` `-Djboss.domain.master.address` `-Djboss.bind.address.*` (options: your local IP addresses and 0.0.0.0) 20 | * `-Djboss.socket.binding.port-offset` (options: 100 200 300 400 10000 20000 30000 40000) 21 | * `-u` (options 239.255.0.1 239.255.0.2 239.255.0.3) 22 | * `-P` -Djboss.node.name 23 | 24 | 25 | Install 26 | ------- 27 | 28 | Make sure you have installed bash_completion 1.3 (or higher): 29 | 30 | Debian/Ubuntu: `apt-get install bash-completion` 31 | RHEL/CentOS: `yum install bash-completion` 32 | 33 | Copy the file(s) to your `/etc/bash_completion.d` folder: 34 | 35 | `sudo cp jboss* /etc/bash_completion.d` 36 | 37 | 38 | -------------------------------------------------------------------------------- /vendor/github.com/vigo/apm-bash-completion/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Uğur "vigo" Özyılmazel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------