Updates from my work laptop
This commit is contained in:
parent
bf5b529e05
commit
8d94bab5ef
16
.alias
16
.alias
|
@ -1,23 +1,29 @@
|
|||
# exa and ls
|
||||
# utils
|
||||
alias ls="exa --group-directories-first -gm"
|
||||
alias ll="ls -lhF"
|
||||
alias lt="ll -TL $1"
|
||||
alias ld="ll -d"
|
||||
alias la="ll -a"
|
||||
|
||||
alias cat="bat -pp"
|
||||
|
||||
# applications
|
||||
alias code="code-oss"
|
||||
|
||||
# dotfiles
|
||||
alias dot="git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"
|
||||
|
||||
# sane mkdir
|
||||
alias mkdir="mkdir -p"
|
||||
|
||||
# k8s
|
||||
alias k="kubectl"
|
||||
alias kga="k get all"
|
||||
alias kgp="k get pod"
|
||||
alias kgsc="k get secrets"
|
||||
alias kgsv="k get services"
|
||||
|
||||
which kubectx kubens &>/dev/null && \
|
||||
alias dps='docker ps --format '\''table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Networks}}'\'''
|
||||
|
||||
# kx, kn
|
||||
command -v kubectx kubens &>/dev/null && \
|
||||
alias kx="kubectx" && \
|
||||
alias kn="kubens"
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# alias for kubectl to k
|
||||
|
||||
source <(kubectl completion bash)
|
||||
|
||||
complete -o default -F __start_kubectl k
|
||||
|
|
|
@ -2,15 +2,21 @@
|
|||
email = fanyx@posteo.net
|
||||
name = fanyx
|
||||
|
||||
[includeIf "gitdir:~/b1/"]
|
||||
path = ~/b1/.config/git/config
|
||||
|
||||
[includeIf "gitdir:~/b1/sap/"]
|
||||
path = ~/b1/sap/.config/git/config
|
||||
|
||||
[alias]
|
||||
co = checkout
|
||||
cn = checkout -b
|
||||
l = log --pretty='format:%h %G? %s%d' -n20 --graph
|
||||
tags = tag -l
|
||||
branches = branch -a
|
||||
remotes = remote -v
|
||||
s = status -sb
|
||||
ss = s -uno
|
||||
l = log --pretty='format:%h %G? %s%d' -n20 --graph --color
|
||||
tags = tag -l
|
||||
branches = branch -a
|
||||
remotes = remote -v
|
||||
s = status -sb
|
||||
ss = s -uno
|
||||
|
||||
[color]
|
||||
diff = auto
|
||||
|
|
4
.ps1
4
.ps1
|
@ -10,10 +10,10 @@ SMILEY="${GREEN}:)${NC}"
|
|||
FROWNY="${RED}:(${NC}"
|
||||
SELECT="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi"
|
||||
|
||||
GIT_BRANCH="$(__git_ps1 ' [%s]')"
|
||||
export PROMPT_DIRTRIM=2
|
||||
|
||||
export PROMPT_DIRTRIM=2
|
||||
|
||||
# actually export PS1
|
||||
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \`${SELECT}\` \$ "
|
||||
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC}\`${SELECT}\` \$ "
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ alias cs="vim ~/.config/sxhkd/sxhkdrc"
|
|||
# use xtools instead
|
||||
# alias xin="doas xbps-install -S"
|
||||
alias xup="xi -Su"
|
||||
alias xun="xi -Sun | awk '{print \$2 \"\t\" \$1}' | sed \"s/-\([^- ]*_.*\)/ -> \1/\""
|
||||
|
||||
complete -F _xbps_complete xi
|
||||
|
||||
|
@ -26,3 +27,5 @@ alias xcln="xr -oO"
|
|||
|
||||
# Docker
|
||||
alias dc=docker-compose
|
||||
|
||||
eval "$(thefuck --alias)"
|
||||
|
|
|
@ -21,12 +21,16 @@ if [[ -d ~/.config/completions ]]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# source distro and general purpose aliases
|
||||
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
|
||||
|
||||
# integrate git prompt functions
|
||||
# will break PS1 if not used
|
||||
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh
|
||||
|
||||
# source distro and general purpose aliases
|
||||
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
|
||||
# kube-ps1
|
||||
# located in ~/git/kube-ps1
|
||||
[[ -r ~/git/kube-ps1/kube-ps1.sh ]] && . ~/git/kube-ps1/kube-ps1.sh
|
||||
|
||||
# set PS1 from file
|
||||
# USE ONLY AFTER GIT PROMPT
|
||||
|
|
Loading…
Reference in New Issue