Commit Graph

3746 Commits (2a9ee7e34434c80a822b0b13f57d01f03d06e62b)

Author SHA1 Message Date
John D Pell 0ad1af8306 aliases/apt: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell 88d66bbfca aliases/curl: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell 6618457f9e aliases/general: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell 699d893bef completion/awscli: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell dca96e0c39 completion/consul: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell bb555aefbf completion/pew: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell ef0c64322f completion/travis: use `_command_exists` 2021-09-19 21:58:48 -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 b14bb4735e plugins/ruby: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell ccd8b52e89 plugins/virtualenv: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell c29eb16dfc completion/git_flow: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell 5eccc59d27 completion/git_flow_avh: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell 757a5bf25b aliases/vim: use `_command_exists` 2021-09-19 21:58:48 -07:00
John D Pell cace3a591d main: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell 8e169388d2 completions/laravel: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:58:48 -07:00
John D Pell e2915df1e5 completions/wpscan: use `_command_exists`
Addresses bash-it/bash-it#1632
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 39d6488c6b plugins/base: 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 9378a8318f plugins/nvm: use `_command_exists`
Addresses bash-it/bash-it#1632

alsö, quote variable, &c.
2021-09-19 21:54:00 -07:00
John D Pell a7955b972c plugins/powerline: use `_command_exists`
Addresses bash-it/bash-it#1632
2021-09-19 21:53:59 -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
John D Pell a375e7131e Remove executable bit 2021-09-18 22:26:27 -07:00
Noah Gorny 77e9404c7d
Merge pull request #1927 from gaelicWizard/pwd
Use `$PWD` instead of `$(pwd)`
2021-09-19 08:18:54 +03:00
John D Pell 8d1e802565 test: Use `${PWD}` instead of `$(pwd)` 2021-09-18 13:15:13 -07:00
John D Pell 5fc418e479 Use `${PWD}` instead of `$(pwd)`
Don't subshell when there's a shell parameter for it.
2021-09-18 13:15:13 -07:00
John D Pell 1f6d6aa147 Use `$PWD` instead of `\`pwd\``
Don't subshell when there's a shell parameter for it.
2021-09-18 13:14:52 -07:00
Noah Gorny 0dbf1d593c
Merge pull request #1926 from gaelicWizard/basenamed
Use parameter substitution instead of `dirname`/`basename`, where safe to do so
2021-09-18 18:26:55 +03:00
John D Pell 1c3cbf7ca6
Delete `.shellcheckrc` (#1947)
* CI: disable Ubuntu 16.04 as it's EOL

https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/

* main: lint false positive

* install: lint

* plugins/cmd-returned-notify: don't `export`

* plugins/xterm: lint

* plugins/git: lint

* plugins/goenv: lint

* plugins/alias-completion: lint false positives

* plugins/alias-completion: fix SC2155, SC2154

Declare `locals` at the top of the function

* completion: lint completions using `bash_completion` functions

Match the style of the existing code

* completion/knife: lint false positives

* completion/knife: lint

* completion/sdkman: lint

* completion/composer: lint

* Move `.shellcheckrc` under `themes/`

* lib/theme: fix SC2155, SC2154, SC2034

* lib/colors: don't warn on unused variables

We assign a large number of variables here and they may or may not be used anywhere else, so disable SC2034 for this file (only).

Alsö disable SC2005 as the functions in this file were written before `printf` was invented and have to do some fancy metascripting to get escape sequences interpreted reliably. I’m not smart enough to fix this to use `printf`, so leave it for now.

* themes/agnoster: lint

* themes: disable SC2154 for colors

Each one of these themes will need it’s own fix for SC2154, possibly upstream.

Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.

* themes: disable SC2154, fix SC2155

Each one of these themes will need it’s own fix for SC2154, possibly upstream.

Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.

* Delete `.shellcheckrc`

* remove executable bit
2021-09-18 12:50:59 +03:00
Noah Gorny b48f3fd7d3
Merge pull request #1909 from gaelicWizard/SVN
themes/base: don't invoke svn if possible
2021-09-18 12:39:48 +03:00
Noah Gorny b72588edfd
Merge pull request #1949 from gaelicWizard/EditorTab
EditorConfig: set `indent_size = tab`
2021-09-18 12:38:42 +03:00
John D Pell 435151819f EditorConfig: set `indent_size = tab`
Despite `indent_size` being set to `tab` by default, it turns out that we set `indent_size` to `2` for `*` at the top of this file. So, for everywhere else, explicitly set `indent_size` to the default (`tab`). This should achieve the goal of my last patch to `.editorconfig`.
2021-09-17 10:44:53 -07:00
John D Pell 470341b23a Drop `basename` in favor of Bash strings
Convert `var=$(basename $file)` to `var="${file##*/}"`
2021-09-16 16:59:02 -07:00
John D Pell dee55a03cc drop `dirname` in favor of native Bash strings (1 of 2)
Convert `var=${dirname $filename)` to `var="${filename%/*}` in cases where there is no ambiguity.

Make sure that the path in `$BASH_IT` is absolute because this path gets embedded in the template `.bash_profile` file if selected by the user.
2021-09-16 16:59:02 -07:00
Noah Gorny f9de8d170a
Merge pull request #1941 from gaelicWizard/themes_autosave
Themes: use `_save-and-reload-history()`
2021-09-16 21:22:21 +03:00
Noah Gorny 99eab7a76c
Merge pull request #1936 from NoahGorny/fix-shellcheck-warnings
plugins: Fix shellcheck warnings on already linted files
2021-09-12 08:13:44 +03:00
John D Pell 9d656747a9 themes: remove executable bit 2021-09-11 21:25:14 -07:00
John D Pell ffe15ebfe0 themes: use `_save-and-reload-history()`
First pass to use _Bash It_'s automatic history management.
2021-09-11 21:25:14 -07:00
John D Pell 476fcb4325 lib/theme: new `_bash_it_appearance_scm_init()`
Wrap init code in a function and call the function immediately. Several plugins do this, and it allows us to more easily implement a hooks-based system in the future.

Alsö, avoid external binary `which`. Use built-in `type -P` instead. Uppercase `-P` forces a path search to avoid hashed matches and functions/aliases and whatnot.
2021-09-11 10:22:17 -07:00
Noah Gorny f0690c09fb
Merge pull request #1939 from Bash-it/revert-1767-disable-macos-11
Reinstate macOS 11 job
2021-09-11 16:43:36 +03:00
John D Pell 9c1dbbcf12 lib/scmhelpers: reorder SCM detection waterfall
This reduces the need to invoke subprocesses
2021-09-11 00:02:27 -07:00
John D Pell 8c0860588d themes/base: don't invoke svn if possible
If we are specifically in the situation #1612, then check for a working `svn` command. If we're not in that situation, then don't waste time on it.
2021-09-11 00:02:27 -07:00
Noah Gorny ec3b8d645f
Revert "ci: Remove macos-11.0 as it is unreliable" 2021-09-10 16:54:51 +03:00
Noah Gorny c6f6d8c27a plugins: Fix shellcheck warnings on already linted files 2021-09-09 20:57:03 +03:00