bash-it/test
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
..
bash_it Getting Bash-it to use the vendored composure 2021-02-02 16:34:04 +01:00
completion Getting Bash-it to use the vendored composure 2021-02-02 16:34:04 +01:00
fixtures themes/base: don't invoke svn if possible 2021-09-11 00:02:27 -07:00
install Getting Bash-it to use the vendored composure 2021-02-02 16:34:04 +01:00
lib plugin/base: improvements (#1930) 2021-09-28 15:13:27 +03:00
plugins plugin/base: improvements (#1930) 2021-09-28 15:13:27 +03:00
themes lib/theme: new `_bash_it_appearance_scm_init()` 2021-09-11 10:22:17 -07:00
lint-requirements.txt ci: Add pre-commit run and remove trailling spaces 2020-10-28 11:51:04 +02:00
run test: Use `${PWD}` instead of `$(pwd)` 2021-09-18 13:15:13 -07:00
test_helper.bash Getting Bash-it to use the vendored composure 2021-02-02 16:34:04 +01:00