Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eced6802d0 | ||
|
|
02f6654841 | ||
|
|
7b5f758eba | ||
|
|
6f02b8d194 | ||
|
|
c8ef6c9146 | ||
|
|
8ae2b1e73d | ||
|
|
ffc1701c0a | ||
|
|
96586dd575 | ||
|
|
c59886b8ab | ||
|
|
5c6306deb7 | ||
|
|
6093ecbb60 | ||
|
|
e289549a50 | ||
|
|
9d7738d14d | ||
|
|
7827907154 | ||
|
|
0ed6f045f6 |
@@ -84,7 +84,7 @@ alias glsum='git diff --name-only --diff-filter=U' # Show unmerged (conflicted)
|
|||||||
alias ggui='git gui'
|
alias ggui='git gui'
|
||||||
|
|
||||||
# home
|
# home
|
||||||
alias ghm='cd '\''$(git rev-parse --show-toplevel)'\''' # Git home
|
alias ghm='cd "$(git rev-parse --show-toplevel)"' # Git home
|
||||||
# appendage to ghm
|
# appendage to ghm
|
||||||
if ! _command_exists gh; then
|
if ! _command_exists gh; then
|
||||||
alias gh='ghm'
|
alias gh='ghm'
|
||||||
@@ -127,6 +127,7 @@ alias grm='git rm'
|
|||||||
|
|
||||||
# rebase
|
# rebase
|
||||||
alias grb='git rebase'
|
alias grb='git rebase'
|
||||||
|
alias grbc='git rebase --continue'
|
||||||
alias grm='git rebase master'
|
alias grm='git rebase master'
|
||||||
alias grmi='git rebase master -i'
|
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
|
alias gprom='git fetch origin master && git rebase origin/master && git update-ref refs/heads/master origin/master' # Rebase with latest remote master
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ function _set_pkg_aliases()
|
|||||||
alias kcgpan='kubectl get pods --all-namespaces'
|
alias kcgpan='kubectl get pods --all-namespaces'
|
||||||
alias kcgdan='kubectl get deployments --all-namespaces'
|
alias kcgdan='kubectl get deployments --all-namespaces'
|
||||||
# launches a disposable netshoot pod in the k8s cluster
|
# launches a disposable netshoot pod in the k8s cluster
|
||||||
alias kcnetshoot='kubectl run --generator=run-pod/v1 netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
|
alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ alias nud='npm update'
|
|||||||
alias nr='npm run'
|
alias nr='npm run'
|
||||||
alias nls='npm list --depth=0 2>/dev/null'
|
alias nls='npm list --depth=0 2>/dev/null'
|
||||||
alias nlsg='npm list -g --depth=0 2>/dev/null'
|
alias nlsg='npm list -g --depth=0 2>/dev/null'
|
||||||
|
alias nt='npm test'
|
||||||
|
|
||||||
# npx
|
# npx
|
||||||
alias nx='npx'
|
alias nx='npx'
|
||||||
|
|||||||
@@ -3,13 +3,20 @@ about-alias 'systemd service'
|
|||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
linux*)
|
linux*)
|
||||||
|
# Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user
|
||||||
alias sc='systemctl'
|
alias sc='systemctl'
|
||||||
alias scr='systemctl daemon-reload'
|
|
||||||
alias scu='systemctl --user'
|
alias scu='systemctl --user'
|
||||||
alias scur='systemctl --user daemon-reload'
|
alias scdr='systemctl daemon-reload'
|
||||||
|
alias scdru='systemctl --user daemon-reload'
|
||||||
|
alias scr='systemctl restart'
|
||||||
|
alias scru='systemctl --user restart'
|
||||||
alias sce='systemctl stop'
|
alias sce='systemctl stop'
|
||||||
alias scue='systemctl --user stop'
|
alias sceu='systemctl --user stop'
|
||||||
alias scs='systemctl start'
|
alias scs='systemctl start'
|
||||||
alias scus='systemctl --user start'
|
alias scsu='systemctl --user start'
|
||||||
|
# Keeping previous aliases for a non-breaking change.
|
||||||
|
alias scue='sceu'
|
||||||
|
alias scus='scsu'
|
||||||
|
alias scur='scdru'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -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)
|
* ``battery`` - Battery information (you'll need to enable the ``battery`` plugin)
|
||||||
* ``clock`` - Current time in ``HH:MM:SS`` format
|
* ``clock`` - Current time in ``HH:MM:SS`` format
|
||||||
* ``cwd`` - Current working directory including full folder hierarchy (c.f. ``wd``\ )
|
* ``cwd`` - Current working directory including full folder hierarchy (c.f. ``wd``\ )
|
||||||
|
* ``gcloud`` - Current gcloud active account
|
||||||
* ``hostname`` - Host name of machine
|
* ``hostname`` - Host name of machine
|
||||||
* ``in_toolbox`` - Show identifier if running inside a `toolbox <https://github.com/containers/toolbox>`_
|
* ``in_toolbox`` - Show identifier if running inside a `toolbox <https://github.com/containers/toolbox>`_
|
||||||
* ``in_vim`` - Show identifier if running in ``:terminal`` from vim
|
* ``in_vim`` - Show identifier if running in ``:terminal`` from vim
|
||||||
|
|||||||
@@ -742,14 +742,14 @@ _help-plugins()
|
|||||||
printf '%s' 'please wait, building help...'
|
printf '%s' 'please wait, building help...'
|
||||||
typeset grouplist=$(mktemp -t grouplist.XXXXXX)
|
typeset grouplist=$(mktemp -t grouplist.XXXXXX)
|
||||||
typeset func
|
typeset func
|
||||||
for func in $(typeset_functions)
|
for func in $(_typeset_functions)
|
||||||
do
|
do
|
||||||
typeset group="$(typeset -f $func | metafor group)"
|
typeset group="$(typeset -f $func | metafor group)"
|
||||||
if [ -z "$group" ]; then
|
if [ -z "$group" ]; then
|
||||||
group='misc'
|
group='misc'
|
||||||
fi
|
fi
|
||||||
typeset about="$(typeset -f $func | metafor about)"
|
typeset about="$(typeset -f $func | metafor about)"
|
||||||
letterpress "$about" $func >> $grouplist.$group
|
_letterpress "$about" $func >> $grouplist.$group
|
||||||
echo $grouplist.$group >> $grouplist
|
echo $grouplist.$group >> $grouplist
|
||||||
done
|
done
|
||||||
# clear progress message
|
# clear progress message
|
||||||
@@ -788,7 +788,7 @@ all_groups ()
|
|||||||
|
|
||||||
typeset func
|
typeset func
|
||||||
typeset file=$(mktemp -t composure.XXXX)
|
typeset file=$(mktemp -t composure.XXXX)
|
||||||
for func in $(typeset_functions)
|
for func in $(_typeset_functions)
|
||||||
do
|
do
|
||||||
typeset -f $func | metafor group >> $file
|
typeset -f $func | metafor group >> $file
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -69,6 +69,11 @@ function local_setup {
|
|||||||
assert_line -n 0 ""
|
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" {
|
@test "helpers: bash-it help list aliases without any aliases enabled" {
|
||||||
run _help-list-aliases "$BASH_IT/aliases/available/ag.aliases.bash"
|
run _help-list-aliases "$BASH_IT/aliases/available/ag.aliases.bash"
|
||||||
assert_line -n 0 "ag:"
|
assert_line -n 0 "ag:"
|
||||||
|
|||||||
@@ -188,6 +188,12 @@ function terraform_workspace_prompt {
|
|||||||
fi
|
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 {
|
function git_prompt_minimal_info {
|
||||||
SCM_STATE=${SCM_THEME_PROMPT_CLEAN}
|
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_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
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_LEFT_PROMPT=${POWERLINE_LEFT_PROMPT:="scm python_venv ruby node cwd"}
|
||||||
POWERLINE_RIGHT_PROMPT=${POWERLINE_RIGHT_PROMPT:="in_vim clock battery user_info"}
|
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_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=254}
|
||||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
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"}
|
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||||
|
|
||||||
safe_append_prompt_command __powerline_prompt_command
|
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_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
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"}
|
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||||
|
|
||||||
safe_append_prompt_command __powerline_prompt_command
|
safe_append_prompt_command __powerline_prompt_command
|
||||||
|
|||||||
@@ -49,6 +49,13 @@ function __powerline_terraform_prompt() {
|
|||||||
fi
|
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() {
|
function __powerline_node_prompt() {
|
||||||
local node_version=""
|
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_COLOR=${POWERLINE_COMMAND_NUMBER_COLOR:=0}
|
||||||
COMMAND_NUMBER_THEME_PROMPT_CHAR=${POWERLINE_COMMAND_NUMBER_CHAR:="#"}
|
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"}
|
POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby node cwd"}
|
||||||
|
|
||||||
safe_append_prompt_command __powerline_prompt_command
|
safe_append_prompt_command __powerline_prompt_command
|
||||||
|
|||||||
Reference in New Issue
Block a user