Commit Graph

168 Commits (c88a4bfa8900541adb23f8e88fd9e3a80f624cae)

Author SHA1 Message Date
Noah Gorny c060eb46ea
Merge pull request #2001 from gaelicWizard/plugin-dirs
Plugin/dirs: use `$XDG_STATE_HOME`
2022-01-07 08:42:24 +02:00
Noah Gorny dba610cdc8
Merge pull request #2009 from gaelicWizard/plugin-man
Plugin/man: Add `R` to `$LESS`
2022-01-07 08:41:41 +02:00
Noah Gorny 5d68fca7e5
Merge pull request #2008 from gaelicWizard/plugin-osx
Plugin/OSX: cleanup
2022-01-07 08:41:17 +02:00
Noah Gorny 48a1ff7fb4
Merge pull request #2005 from gaelicWizard/plugin-todo
Plugin/todo: cleanup and simplify
2022-01-07 08:40:52 +02:00
John D Pell d1b7166358 theme/essential: `shfmt` 2022-01-03 20:45:39 -08:00
John D Pell 29216c0fd4 plugin/python: `shfmt`
My apologies to future `git blame` hunters ♥
2022-01-01 23:00:48 -08:00
John D Pell c030f2108b plugin/git-subrepo: `shellcheck` 2022-01-01 22:48:01 -08:00
John D Pell 02b57a83ef plugins/todo: lint
plugin/base: use `_bash-it-component-item-is-enabled()`
2022-01-01 17:50:55 -08:00
John D Pell 03653fc141 plugins/osx-timemachine: `shellcheck` && `shfmt`
Use bash functionality rather than external binaries. Alsö, if $SUDO_ASKPASS is set then pass -A to sudo.
2022-01-01 17:50:22 -08:00
John D Pell 75aabd5d20 plugin/osx: `shellcheck` && `shfmt`
plugins/osx: dead code removal

No need for gymnastics to determine if variable had been exported priort to modification. If it was, then it still is. See man bash(1).
2022-01-01 17:50:22 -08:00
John D Pell 290aab4efe plugins/man: Add "R" to `$LESS`
Otherwise, `-R` must be added on the command line or colors just won't be rendered and these variables will be ignored.
2022-01-01 17:49:45 -08:00
John D Pell 71b4f3c1bc plugin/dirs: `shfmt` && `shellcheck` 2022-01-01 17:49:15 -08:00
Noah Gorny 2dd4426a7c
Merge branch 'master' into plugin-java 2022-01-01 22:53:18 +02:00
John D Pell f03a89836e plugins/java: quote path && `shfmt`
Provides an error message if no file is specified.
2021-12-30 20:25:19 -08:00
John D Pell e38eeefc5f plugin/jekyll: second `shellcheck` pass 2021-12-27 12:22:42 -08:00
cornfeedhobo bdb5289660
Wholesale cleanup of all history plugins
- remove the use of redundant cite
- minor cleanups to history.plugin.bash
- set explicit load orders for history-search and history-substring-search
- add new plugin history-eternal
- replace superfluous trap for managing HISTTIMEFORMAT changes
2021-12-02 09:13:56 -06:00
Ajeet D'Souza a89f2f8f13 plugin: add zoxide 2021-11-24 16:49:46 +05:30
Noah Gorny cf08fcaff2
Merge pull request #1965 from gaelicWizard/completion-git
completion/git: improvements and linting
2021-10-07 00:10:47 +03:00
Noah Gorny c360f0c7c5 plugins: Add ble.sh plugin 2021-09-28 16:48:16 +03:00
John D Pell 3eed0f033f
Lint: prepare `lib/utilities` for `shellcheck` (#1933)
* lib/utilities: shellcheck

SC2059

* lib/utilities: fix `_bash-it-get-component-type-from-path()`

Account for plugins with names that contain periods.

* lib/utilities: fix `_bash-it-array-dedup()`

Use fewer subprocesses and newline-delimited not space-delimited.

* lib/utilities: fix `_bash-it-component-list()`

Use fewer subprocesses and return newline-delimited, not space-delimited.

* lib/utilities: fix `_bash-it-component-list-matching()`

Use `sort -u` instead of `sort | uniq`

* lib/utilities: fix `_bash-it-component-list-enabled()`

Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort`

* lib/utilities: fix `_bash-it-component-list-disabled()`

Use fewer subprocesses, return newline-delimited instead of space-delimited, and use `sort -u` instead of `uniq | sort`

* lib/utilities: fix `_bash-it-grep()`

1. Executing `'/usr/bin/grep'` does *not* return the path to grep...
2. use `type -p` instead of external binary `which`.
3. Simplify parameter definition.
4. Why was there a space after `%s`?

* lib/utilities: use `_bash-it-grep`

Alsö, lose a spurious `cat`

* lib/utilities: lint `_bash-it-component-help`

* lib/utilities: lint `_bash-it-component-cache-file()`

* lib/utilities: `shfmt`

My apologies to future `git blame` hunters ♥

* lib/helpers: fix `_bash-it-get-component-name-from-path()`

Use `${BASH_IT_LOAD_PRIORITY_SEPARATOR}`
2021-09-28 15:24:18 +03:00
John D Pell c2c76a380a
plugin/base: improvements (#1930)
* plugins/base: code style improvements

Quote variables, use $@ and $array[@] instead of $*, typeset some integers, remove unneccesasary binary invocation, use shell features when possible, remove `eval`, &c.

* plugins/base: conditional function definitions

Instead of functions failing when required tools aren't installed, just don't define the function.
Alsö, don't redefine del() if it already exists.

* plugins/base: rewrite `usage()`

Reimplement disk usage function using Bash syntax and simpler layout, without having to invoke an external binary.

* plugins/base: revamp `quiet()`

New implementation that is even quieter.

* plugins/base: `myip()`

* plugins/base: `pickfrom()`

* plugins/base: `passgen()`

Fix `passgen()` to not need `tr`, remove one subshell, and eliminate a useless `echo`.

* plugins/base: `mkcd()`

* plugins/base: `mkiso()`

* plugins/base: remove `banish-cookies()`

Adobe Flash is gone with the wind. Alsö, this would be something someone would do *once* and shouldn't be a function...

* plugins/base: `lsgrep` is SC2010

The `lsgrep()` function is *itself* explicitly forbidden by `shellcheck` rule SC2010.

Alsö, s/`$*`/`$@`

* plugins/base: `mkiso()`

Expressly handle unbound parameters.

* plugins/base: remove `command_exists`

* plugin/base: lint SC2154 && SC2144

Newly undisabled `shellcheck` rules

* plugin/base: import libs for tests

* plugin/base: `shfmt`

Apply `shfmt` using current project settings. My apologies to future `git blame` hunters. ♥
2021-09-28 15:13:27 +03:00
Noah Gorny 127cbbd4e3
Merge pull request #1957 from gaelicWizard/plugin-less-pretty-cat
plugin/less-pretty-cat improvements
2021-09-28 15:09:28 +03:00
Noah Gorny 05aac8ef39
Merge pull request #1956 from gaelicWizard/plugin-percol
plugin/percol `shellcheck`
2021-09-28 15:06:33 +03:00
Noah Gorny 37577550e1
Merge pull request #1963 from gaelicWizard/completion-laravel
completion/laravel: simplify code flow
2021-09-28 14:34:51 +03:00
John D Pell b0750fa49f completion/git: `shfmt` && `shellcheck` 2021-09-24 21:11:28 -07:00
John D Pell 92282c4795 plugin/percol: `shellcheck` & `shfmt`
According to `shellcheck`, the `_tac` alias simply doesn't work. At all. Ever. See SC2262 and SC2263.
2021-09-24 00:39:07 -07:00
John D Pell 5857648377 plugins/less-pretty-cat: simplify code flow
Convert from indented if-block to return then unindented code. This should have basically one line change at the top, one line removed at the bottom, and then all whitespace.
2021-09-23 10:17:28 -07:00
John D Pell be90e655f1 completion/laravel: simplify code flow
And apply `shfmt` and fix `shellcheck`
2021-09-22 13:48:10 -07:00
John D Pell 8a81fd7271 plugins/ruby: prepare for `shellcheck` 2021-09-22 13:33:34 -07:00
John D Pell c98424308a plugins/direnv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell b038ea5869 plugins/nodenv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell f0179c79ce plugins/plenv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell a31145335e plugins/pyenv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell cff6f3464a plugins/rbenv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell de58fdd73f plugins/autojump: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell 3e2ec1232d plugins/hub: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell 635e5488ba plugins/jump: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:58:47 -07:00
John D Pell e701660ff1 plugins/node: use `_command_exists`
Addresses bash-it/bash-it#1632

alsö, quote variable, use `[[`, &c.
2021-09-19 21:54:21 -07:00
John D Pell f6c5717a7a plugins/textmate: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:52:46 -07:00
Noah Gorny 9ea290a5ed
Merge pull request #1852 from tbhaxor/feature/completion/dart
Added completion for dart cli
2021-08-03 23:58:16 +03:00
Noah Gorny e89403d59b
Merge pull request #1881 from NoahGorny/lint-pure-theme
Refactor scm_prompt usage in many themes
2021-08-03 23:22:09 +03:00
Gurkirat Singh 682fd32a13
lint (bugfix): wpscan completion linting fix 2021-06-17 08:51:02 +05:30
Noah Gorny 7f193a2e05 Add pure theme to clean_files.txt 2021-05-16 13:52:36 +03:00
Noah Gorny d3bb347786
Merge pull request #1837 from NoahGorny/vendor-jboss-completion
vendor jboss completion
2021-04-27 01:32:34 +03:00
Noah Gorny 716b49fa0e lint: Sort clean_files.txt according to check-clean-files-txt.sh 2021-04-22 20:53:30 +03:00
Noah Gorny c731e45770 lint: Make clean_files.txt more tidy 2021-04-22 01:48:13 +03:00
John Fred Fadrigalan 7b8dbd39bc
Clean alias completion plugin (#1872)
* Sort plugins/available

* Clean alias-completion plugin

* Fix shellcheck warning. SC1090

* Change shellcheck source to /dev/null for explicity

* Disable shellcheck warning SC2162
2021-04-22 01:46:50 +03:00
Noah Gorny 31bea24da6
Merge pull request #1859 from tbhaxor/feature/completion/dmidecode
Feature/completion/dmidecode
2021-04-22 01:41:56 +03:00
John Fred Fadrigalan 370c5b349e
Sort theme section 2021-04-20 01:48:37 +08:00
John Fred Fadrigalan c0fa514f7d
Place 'theme/clean' alphabetically on clean_files.txt 2021-04-20 01:40:52 +08:00
John Fred Fadrigalan 409e18f7cb
Clean candy theme 2021-04-20 01:18:40 +08:00
Noah Gorny ebe59c9adc
Merge pull request #1850 from tbhaxor/feature/completion/ngrok
Added completion for ngrok tool
2021-04-04 22:36:13 +03:00
Gurkirat Singh ab011cd9ba completion (improvement): fixed linting 2021-04-01 00:34:37 +03:00
Titivoot Pangrit 6866648ac6 Add theme Easy 2021-04-01 00:28:28 +03:00
Gurkirat Singh e481eb41e5
completion (improvement): dmidecode lint fixed 2021-03-30 11:03:18 +05:30
Gurkirat Singh 19db142aae
completion (feature): dart cli 2021-03-26 01:43:53 +05:30
tiago cda81f3d74 cleaned and linted purity theme 2021-03-24 21:39:57 +00:00
Noah Gorny 64d827c3da completion: Use vendored jboss completion
Also include new jboss5 vendored completion
2021-02-13 10:41:16 +02:00
Noah Gorny 4607ee7452
Merge pull request #1836 from buhl/django-complete
vendoring django completion
2021-02-13 10:30:31 +02:00
buhl 0e77a94140 Vendored django completion 2021-02-09 11:01:37 +01:00
buhl 7fb7e27921 Added vendored apm completion 2021-02-08 16:05:45 +01:00
Noah Gorny 2d56cc4167
Merge pull request #1788 from tbhaxor/lint/notify-send-completion
Lint/notify send completion
2021-02-08 10:24:24 +02:00
Noah Gorny 25c1c8978e
Merge pull request #1807 from NoahGorny/cleanup/composer-completions
formatted composer completion and used helper function
2021-02-06 23:32:58 +02:00
cornfeedhobo 6870abc4fc
ensure go completion works well with goenv 2021-02-06 14:34:24 -06:00
Gurkirat Singh 77654875e5 fixed git-changelog plugin 2021-02-06 00:26:12 +02:00
Gurkirat Singh dbfcb431a8 formatted composer completion and used helper function 2021-02-06 00:23:31 +02:00
Gurkirat Singh 1d2a2fcd9a added completion for notify-send command 2021-02-06 00:23:14 +02:00
Noah Gorny 1fbd91ebf9
Merge pull request #1824 from cornfeedhobo/goenv-go
Ensure goenv and go play together well
2021-02-06 00:14:07 +02:00
cornfeedhobo e690f21e4e
Ensure goenv and go play together well
This PR seeks to address several issues surrounding the go and goenv plugins.
The nature of goenv allows for a situation where the initial shell does not
point to a working go binary, and instead at the included shim script. The
result is that one must run reload after moving to a project directory with a
version file, however in doing so, PATH is updated, requiring they exit the
shell or risk lookup collisions and unexpected behavior.

This is solved by using preexec to check the version before changing
directories and restarting the shell if the version has changed. The exec
pattern is copied from _bash-it-restart, but is edited to support this specific
use case.

Additionally, tests have been uploaded and these are now being linted.
2021-02-04 23:51:17 -06:00
buhl 49d7d2e8c4 Getting Bash-it to use the vendored composure
Fixed tests
Fixed install.sh and bash_it.sh
Added gitattributes to the vendor folder
Changed documentation
2021-02-02 16:34:04 +01:00
Noah Gorny 2500fe7dda docker-machine: Deprecate both plugin and completion file 2021-01-29 16:06:51 +02:00
Gurkirat Singh 69e5a28ed3 formatted lerna completion and used helper function 2021-01-28 20:53:34 +02:00
Gurkirat Singh 3d3322d0c9 formatted npm completion and used helper function 2021-01-28 19:23:56 +02:00
Gurkirat Singh 645054a8c4 formatted minikube completion and used helper function 2021-01-28 19:18:36 +02:00
Gurkirat Singh 202531321d formatted kubectl completion and used helper function 2021-01-28 18:57:00 +02:00
Gurkirat Singh d4bf4e6a89 formatted kontena completion and used helper function 2021-01-28 18:32:51 +02:00
Gurkirat Singh 714bf84528 formatted jungle completion and used helper function 2021-01-28 18:10:25 +02:00
Gurkirat Singh a8695edc8f formatted gem completion 2021-01-28 17:55:50 +02:00
Noah Gorny 5df1e653d9 completion: pip: Lint all pip files and clarify comment 2021-01-28 17:46:22 +02:00
Noah Gorny adc77bb622 completion: Lint github-cli completion and use completion_exists 2021-01-28 17:40:35 +02:00
Gurkirat Singh 9915f85e8b formatted helm completion and used helper function 2021-01-28 17:30:26 +02:00
Gurkirat Singh ba5700e555 formatted gcloud completion and used helper function 2021-01-28 17:18:51 +02:00
Noah Gorny 2e3cf0b3c0 completion: Lint docker completion and add about-completion 2021-01-28 17:03:25 +02:00
Gurkirat Singh 846a576978 formatted consul completion and used helper function 2021-01-28 16:35:55 +02:00
Gurkirat Singh f9bc244718 formatted conda completion and used helper function 2021-01-28 16:27:34 +02:00
Gurkirat Singh b93ac7785c formatted awless completion and used helper function 2021-01-28 16:19:48 +02:00
Gurkirat Singh 1d569573da formatted brew completion 2021-01-28 16:09:00 +02:00
tiago 3a846a2d47 cleanup modern theme 2021-01-27 22:55:44 +00:00
Noah Gorny c79d6cd609 vendor: Add init.d directory to clean_files.txt
Also fix and lint the directory.
This is our code, and as such, should be linted.
2021-01-27 23:21:14 +02:00
Noah Gorny 9b04e11bfc
Merge branch 'master' into vendor 2021-01-27 16:43:34 +02:00
Noah Gorny 4f8fd5957f
Merge pull request #1780 from tbhaxor/lint/vue-completions
Lint/vue completions
2021-01-26 20:03:34 +02:00
Noah Gorny 7b817f388d
Merge pull request #1790 from BarbUk/clean/theme_starting_by_b
Clean b* themes
2021-01-26 19:57:45 +02:00
Gurkirat Singh 812efaab90 added vuejs completion in clean_files 2021-01-23 23:14:24 +02:00
buhl 29855ed1e6 Adding preexec as a vendored library
Added a vendored lib loading routine in bash-it.sh
Added documentation on how to vendor libs in bash-it
Added and fixed plugins using preexec
Added tests for two plugins
Removed the old preexec lib
2021-01-23 18:31:18 +01:00
BarbUk 59fc8c818d
Update clean_files.txt 2021-01-16 09:11:26 +01:00
cornfeedhobo 61f727fb96
refactor all history modifications into discrete plugins 2021-01-15 11:53:28 -06:00
BarbUk bd6dbd3edf
Merge branch 'master' into clean/theme_atomic_and_axin 2021-01-14 13:45:31 +01:00
Noah Gorny a9b0ec7d1d
Merge pull request #1785 from marcospereira/lint/themes/base.theme.bash
Add themes/base.theme.bash to clean files
2021-01-13 19:15:09 +02:00
Ron Green 436381de93 refactor(aliases): sort git aliases file and lint it
- move all comments to the same line so they wont be jumbled
- also add to clean_files.txt
2021-01-13 18:24:13 +02:00
Marcos Pereira 3f29862478
Add themes/base.theme.bash to clean files 2021-01-11 15:12:39 -05:00