64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
# Rename existing tools
|
||
alias _cat=`which cat`
|
||
alias _curl=`which curl`
|
||
alias _ls="/bin/ls"
|
||
alias _grep="/bin/grep"
|
||
alias _diff="/usr/bin/diff"
|
||
alias _du=`which du`
|
||
alias _df=`which df`
|
||
alias _find=`which find`
|
||
alias _top=`which top`
|
||
alias _ps="/bin/ps"
|
||
alias _dig=`which dig`
|
||
alias _git=`which git`
|
||
|
||
# Aliases
|
||
alias cat='bat '
|
||
alias curl='curlie'
|
||
alias ls='exa --group-directories-first --icons --header --git --ignore-glob=.git'
|
||
alias grep='rg'
|
||
alias diff='delta'
|
||
alias du='dust'
|
||
alias df='duf -hide special'
|
||
alias find='fd'
|
||
alias bandwhich='sudo bandwhich'
|
||
alias top='btm'
|
||
alias ps='procs'
|
||
alias dig='dog'
|
||
alias kubectx='switch'
|
||
alias kctx='switch'
|
||
alias machine-info='macchina -t Boron --bar'
|
||
alias watch='watch '
|
||
alias tmp='cd $(mktemp -d)'
|
||
|
||
lt() {
|
||
DEPTH=$(echo $1 | grep "^[0-9]*$")
|
||
if [ "$DEPTH" = "" ]; then
|
||
DEPTH=2
|
||
else
|
||
shift
|
||
fi
|
||
ls -l --tree -L $DEPTH -I ".git|cache|log|logs|node_modules|vendor" $@
|
||
}
|
||
|
||
git() {
|
||
if [ "$1" = "take" ]; then # Git clone then cd into new directory
|
||
_git clone $2
|
||
cd $(basename $2 | sed 's/\.git$//')
|
||
elif [ "$1" = "commit" ]; then # Sign all commits
|
||
shift
|
||
_git commit -s $@
|
||
else
|
||
_git $@
|
||
fi
|
||
}
|
||
|
||
# Giant Swarm specific
|
||
alias prom='opsctl open -a prometheus --sso -i'
|
||
alias happa='opsctl open -a happa --sso -i'
|
||
alias grafana='opsctl open -a grafana --sso -i'
|
||
alias argo='opsctl open -a argocd --sso -i'
|
||
alias cloud-provider='opsctl open -a cloudprovider -i'
|
||
alias get-cluster='gs-get-cluster'
|
||
alias create-cluster='gs-create-cluster'
|