Some of the docker aliases use functions found in the docker plugin. If the plugin is not enabled, these aliases do not work. This commit only defines the aliases if the plugin is enabled.
Also changed: `dkelc` now creates an explicit login shell, has the synonym `dkbash` and uses no backticks. Reason: on some docker images the status as login-shell is not set automatically, which causes e.g. `/etc/bash.bashrc` and `/etc/profile` not to be loaded in these images.
Note: There should be a convenience function in `lib/helpers.bash` that checks if a plugin is available/enabled/disabled. The if-statement if rather clonky.
The tests are failing because $1 is being passed through from the
initial loading. When this loads in the shell, $1 is empty though so
the code works-for-me, but just not the tests.
This filters the $1 input to ensure its one of the valid types
expected inside the ./enabled directory.
Adding `--first-parent` ensures that only commits from the master branch
are used when showing the history. I've verified this change directly
by comparing the `rev-list` output for `703105c..97df5c45`:
```console
$ git rev-list --merges 703105c...97df5c4
97df5c4540b5976ada25
$ git rev-list --merges --first-parent 703105c...97df5c4
97df5c4540
```
Note: I've created this branch from 703105c so that I can merge `master`
into it and test `bash-it update` once merged.
This utilizes the body of the merged PR requests to show the commits
that are included in this update. It gives the user a chance to
decline the upgrades by pressing n or N.
* Extracting common utilities into utilities.bash
* Adding new tests for utilities
* Relocating the cache file to be under $BASH_IT
* Removing cache cleanup deferral code for now
* Wiping the cache in local_setup in tests.
This commit improves Bash-It search functionality in a couple of ways:
* bash-it search (with no arguments) will print detailed help.
* bash-it search now accepts terms prefixed with '@' sign, indicating an exact match.
* bash-it search now performs smarter caching of the component listings/status
New search syntax is as follows:
bash-it search [-|@]term1 [-|@]term2 [ --enable | --disable | --help ]