Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eced6802d0 | ||
|
|
02f6654841 | ||
|
|
7b5f758eba | ||
|
|
6f02b8d194 | ||
|
|
c8ef6c9146 | ||
|
|
8ae2b1e73d | ||
|
|
ffc1701c0a | ||
|
|
96586dd575 | ||
|
|
c59886b8ab | ||
|
|
5c6306deb7 |
@@ -127,6 +127,7 @@ alias grm='git rm'
|
||||
|
||||
# rebase
|
||||
alias grb='git rebase'
|
||||
alias grbc='git rebase --continue'
|
||||
alias grm='git rebase master'
|
||||
alias grmi='git rebase master -i'
|
||||
alias gprom='git fetch origin master && git rebase origin/master && git update-ref refs/heads/master origin/master' # Rebase with latest remote master
|
||||
|
||||
@@ -22,6 +22,7 @@ alias nud='npm update'
|
||||
alias nr='npm run'
|
||||
alias nls='npm list --depth=0 2>/dev/null'
|
||||
alias nlsg='npm list -g --depth=0 2>/dev/null'
|
||||
alias nt='npm test'
|
||||
|
||||
# npx
|
||||
alias nx='npx'
|
||||
|
||||
@@ -70,6 +70,7 @@ The contents of the prompt can be "reordered", all the "segments" (every piece o
|
||||
* ``battery`` - Battery information (you'll need to enable the ``battery`` plugin)
|
||||
* ``clock`` - Current time in ``HH:MM:SS`` format
|
||||
* ``cwd`` - Current working directory including full folder hierarchy (c.f. ``wd``\ )
|
||||
* ``gcloud`` - Current gcloud active account
|
||||
* ``hostname`` - Host name of machine
|
||||
* ``in_toolbox`` - Show identifier if running inside a `toolbox <https://github.com/containers/toolbox>`_
|
||||
* ``in_vim`` - Show identifier if running in ``:terminal`` from vim
|
||||
|
||||
@@ -742,14 +742,14 @@ _help-plugins()
|
||||
printf '%s' 'please wait, building help...'
|
||||
typeset grouplist=$(mktemp -t grouplist.XXXXXX)
|
||||
typeset func
|
||||
for func in $(typeset_functions)
|
||||
for func in $(_typeset_functions)
|
||||
do
|
||||
typeset group="$(typeset -f $func | metafor group)"
|
||||
if [ -z "$group" ]; then
|
||||
group='misc'
|
||||
fi
|
||||
typeset about="$(typeset -f $func | metafor about)"
|
||||
letterpress "$about" $func >> $grouplist.$group
|
||||
_letterpress "$about" $func >> $grouplist.$group
|
||||
echo $grouplist.$group >> $grouplist
|
||||
done
|
||||
# clear progress message
|
||||
@@ -788,7 +788,7 @@ all_groups ()
|
||||
|
||||
typeset func
|
||||
typeset file=$(mktemp -t composure.XXXX)
|
||||
for func in $(typeset_functions)
|
||||
for func in $(_typeset_functions)
|
||||
do
|
||||
typeset -f $func | metafor group >> $file
|
||||
done
|
||||
|
||||
@@ -69,6 +69,11 @@ function local_setup {
|
||||
assert_line -n 0 ""
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help plugins" {
|
||||
run bash-it help plugins
|
||||
assert_line -n 1 "base:"
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help list aliases without any aliases enabled" {
|
||||
run _help-list-aliases "$BASH_IT/aliases/available/ag.aliases.bash"
|
||||
assert_line -n 0 "ag:"
|
||||
|
||||
@@ -188,6 +188,12 @@ function terraform_workspace_prompt {
|
||||
fi
|
||||
}
|
||||
|
||||
function active_gcloud_account_prompt {
|
||||
if _command_exists gcloud; then
|
||||
echo -e "$(gcloud config list account --format "value(core.account)" 2> /dev/null)"
|
||||
fi
|
||||
}
|
||||
|
||||
function git_prompt_minimal_info {
|
||||
SCM_STATE=${SCM_THEME_PROMPT_CLEAN}
|
||||
|
||||
|
||||
@@ -91,6 +91,9 @@ HISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:="#"}
|
||||
COMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
||||
|
||||
GCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}
|
||||
GCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:="❲G❳ "}
|
||||
|
||||
POWERLINE_LEFT_PROMPT=${POWERLINE_LEFT_PROMPT:="scm python_venv ruby node cwd"}
|
||||
POWERLINE_RIGHT_PROMPT=${POWERLINE_RIGHT_PROMPT:="in_vim clock battery user_info"}
|
||||
|
||||
|
||||
@@ -86,6 +86,9 @@ HISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:="#"}
|
||||
COMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=254}
|
||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
||||
|
||||
GCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}
|
||||
GCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:="❲G❳ "}
|
||||
|
||||
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||
|
||||
safe_append_prompt_command __powerline_prompt_command
|
||||
|
||||
@@ -83,6 +83,9 @@ HISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:="#"}
|
||||
COMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
||||
|
||||
GCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}
|
||||
GCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:="❲G❳ "}
|
||||
|
||||
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||
|
||||
safe_append_prompt_command __powerline_prompt_command
|
||||
|
||||
@@ -49,6 +49,13 @@ function __powerline_terraform_prompt() {
|
||||
fi
|
||||
}
|
||||
|
||||
function __powerline_gcloud_prompt() {
|
||||
local active_gcloud_account=""
|
||||
|
||||
active_gcloud_account="$(active_gcloud_account_prompt)"
|
||||
[[ -n "${active_gcloud_account}" ]] && echo "${GCLOUD_CHAR}${active_gcloud_account}|${GCLOUD_THEME_PROMPT_COLOR}"
|
||||
}
|
||||
|
||||
function __powerline_node_prompt() {
|
||||
local node_version=""
|
||||
|
||||
|
||||
@@ -88,6 +88,9 @@ HISTORY_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_HISTORY_NUMBER_CHAR:="#"}
|
||||
COMMAND_NUMBER_THEME_PROMPT_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
||||
|
||||
GCLOUD_THEME_PROMPT_COLOR=${POWERLINE_GCLOUD_COLOR:=161}
|
||||
GCLOUD_CHAR=${POWERLINE_GCLOUD_CHAR:="❲G❳ "}
|
||||
|
||||
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||
|
||||
safe_append_prompt_command __powerline_prompt_command
|
||||
|
||||
Reference in New Issue
Block a user