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`.
A simple, console-compatible Bash-it theme.
Features:
* Reactive coloring for:
* Privileged and standard users.
* Local and remote hosts.
* Exit status for prompt strings 1 and 2.
* Console-compatible!
* No unicode "tofu" in console sessions.
* Matching alignment for prompt strings 1 and 2.
Preview:
$PS1| $TIME $USER@$HOST:$PWD
$PS1| + function foo() {
$PS2| | bar
$PS2| | baz
$PS2| | }
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.