- 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
* 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}`
* 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. ♥
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.
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.
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