Renamed the function to _bash-it_update_migrate_and_restart
Use pushd/popd instead of passing another parameter
Document the function so it will be clear that it does not return
* lib/helpers: use `$OSTYPE` instead of `$(uname)`
* plugins/osx: use `$OSTYPE` instead of `$(uname)`
* plugins/boot2docker: use `$OSTYPE` instead of `$(uname)`
* plugins/python: use `$OSTYPE` instead of `$(uname)`
* plugins/base: use `$OSTYPE` instead of `$(uname)`
Alsö, use `[[` instead of `[` as the former has less insane argument handling being shell syntax rather than a builtin command that must emulate being a real binary
* completion/brew: use `$OSTYPE` instead of `$(uname)`
* completion/git: use `$OSTYPE` instead of `$(uname)`
Alsö, use `[[` instead of `[`.
* completion/fabric: use `$OSTYPE` instead of `uname`
* theme/demula: use `$OSTYPE` instead of `$(uname)`
* theme/rana: use `$OSTYPE` instead of `$(uname)`
In e5b6869 (part of #1283), a regression was introduced, which caused
`bash-it reload` to return with the working directory set to
`.bash_it` and the original working directory discarded.
The root cause is the function wrapper of `bash-it reload`, which has
always relied on the working directory not to change during execution
of the wrapped code. This assumption no longer holds with the changes
introduced in #1283.
This commit fixes the regression by using `pushd`/`popd` in `bash-it
reload`.
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 ]