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