Merge branch 'master' of https://github.com/xlogerais/config-bash
This commit is contained in:
38
rc.d/broot
38
rc.d/broot
@ -1,23 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
if (command -v broot &>/dev/null); then
|
||||
# This script was automatically generated by the broot program
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
# This function starts broot and executes the command
|
||||
# it produces, if any.
|
||||
# It's needed because some shell commands, like `cd`,
|
||||
# have no useful effect if executed in a subshell.
|
||||
function br {
|
||||
local cmd cmd_file code
|
||||
cmd_file=$(mktemp)
|
||||
if broot --outcmd "$cmd_file" "$@"; then
|
||||
cmd=$(<"$cmd_file")
|
||||
rm -f "$cmd_file"
|
||||
eval "$cmd"
|
||||
else
|
||||
code=$?
|
||||
rm -f "$cmd_file"
|
||||
return "$code"
|
||||
fi
|
||||
}
|
||||
# This script was automatically generated by the broot program
|
||||
# More information can be found in https://github.com/Canop/broot
|
||||
# This function starts broot and executes the command
|
||||
# it produces, if any.
|
||||
# It's needed because some shell commands, like `cd`,
|
||||
# have no useful effect if executed in a subshell.
|
||||
function br {
|
||||
local cmd cmd_file code
|
||||
cmd_file=$(mktemp)
|
||||
if broot --outcmd "$cmd_file" "$@"; then
|
||||
cmd=$(<"$cmd_file")
|
||||
rm -f "$cmd_file"
|
||||
eval "$cmd"
|
||||
else
|
||||
code=$?
|
||||
rm -f "$cmd_file"
|
||||
return "$code"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
@ -10,7 +10,7 @@ if [ "${POWERLINE}" = "powerline-go" ]; then
|
||||
echo "Using $POWERLINE"
|
||||
|
||||
function _update_ps1() {
|
||||
PS1=$($POWERLINE -jobs "$(jobs -p | wc -l)" -error $? -modules "ssh,host,wsl,user,cwd,direnv,venv,perms,git,jobs,exit,root" -modules-right "docker,docker-context,kube,terraform-workspace" -newline)
|
||||
PS1=$($POWERLINE -jobs "$(jobs -p | wc -l)" -error $? -modules "ssh,host,wsl,user,cwd,direnv,venv,perms,git,jobs,exit,root" -modules-right "docker,docker-context,kube,terraform-workspace,termtitle" -newline)
|
||||
}
|
||||
|
||||
if [ "$TERM" != "linux" ]; then PROMPT_COMMAND="$PROMPT_COMMAND; _update_ps1"; fi
|
||||
|
Reference in New Issue
Block a user