sshagent plugin:
- manage setup of sshagent in bash session:
- force opinionated agent management based on ~/.ssh/ file
- support for shared file systems on different host (file name contains hostname)
- check env for any live/dead agents
if alive - use it
otherwise - spawn our own
Signed-off-by: Max Kovgan <max@opsguru.io>
These will not work yet, since they are used across component types, but this will start working once everything is loaded from the same "enabled" directory.
This allows the user to see only last level of the current path (if dirname is longer than 8 chars),
and only first word of the ongoing command line if it's longer than 8 chars.
Instead of piping the standard output of `docker ps` and `docker images`
through a series of heads, tails, and awks, use the flags available to
the `docker` command to achieve the same goal.
Without the `function` keyword, the file did not load when using Bash
v3.x. With the added `function` keyword, the file can be parsed and the
error message about having to install Bash v4 is shown.
Closes#881
According to fasd README, fasd can be also used by sourcing it and not only by including it into path. This patch will ensure that fasd will be properly recognized, even when it is sourced and not included in path.
Only function so far: docker-compose-fresh, which shuts down a running
docker-compose instance, deletes the containers, and starts up fresh
instances, then tails the container logs.
Converted this from an alias to a function so that a parameter can be
provided for the name of the docker-compose.yaml file name.
This commit fixes an issue with themes on OS X which are sometimes
left in a partially broken environment with missing dependencies.
When a `BASH_IT_THEME` is active on OS X and has a
dynamic `PROMPT_COMMAND` which is not exported, and such
`PROMPT_COMMAND` is backed by shell functions which are not
exported either, and at the same time the theme is not
OS-X-aware (regarding `update_terminal_cwd`), and the
user launches a (non-login) interactive subshell from
the OS X Terminal, a `command not found` appears on every
command invocation.
The issue is caused by a regression in PR #514, which attempts to
inject `update_terminal_cwd` into the prompt. As a side effect, it
also escalates the exportedness of `PROMPT_COMMAND` while the
theme-specific backing functions (which power the dynamic prompt)
remain unexported.
The subshell cannot recover from this partially broken environment
because unlike in Linux, Bash-it on OS X is not invoked for non-login
subshells. The dependencies remain broken which leads to the error.
The fix is to preserve `PROMPT_COMMAND`’s exportedness on OS X,
leaving the individual theme responsible for consistently
exporting either all or nothing of its environment.
Avoiding the if statements, using exit code of `grep -q` instead.
Reverted the change that adds a space after the AC char. Opting for a
default value, allowing to override from one's profile.
See https://github.com/wting/autojump for more details.
Currently only supports the version installed through Homebrew on OS X.
Please feel free to provide a PR for supporting additional installation
options.
There are multiple ways to install fasd, but the initialization
still needs to happen. Currently, fasd is broken in bash in that
it doesn't maintain the exit code properly. This custom init removes
the call to `fasd --init bash-hook` and replaces it with the version
that would be generated once fasd PR #72 is merged.
See: https://github.com/clvv/fasd/pull/72
The update_terminal_cmd is interfering with the $? variable. Somehow it
is always 0.
```
caesium@Mac:~/Documents/projects/git/bash-it 0 >export
PROMPT_COMMAND="update_terminal_cwd;set_prompt"
caesium@Mac:~/Documents/projects/git/bash-it 0 >false
caesium@Mac:~/Documents/projects/git/bash-it 0 >true
caesium@Mac:~/Documents/projects/git/bash-it 0 >export
PROMPT_COMMAND="set_prompt;update_terminal_cwd"
caesium@Mac:~/Documents/projects/git/bash-it 0 >false
caesium@Mac:~/Documents/projects/git/bash-it 1 >true
caesium@Mac:~/Documents/projects/git/bash-it 0 >
```
After the fix it is working properly.