Skip to content

Instantly share code, notes, and snippets.

@CarlosSMA
Last active September 29, 2022 17:44
Show Gist options
  • Save CarlosSMA/5bb8827f896174924beb990c2ae1e2be to your computer and use it in GitHub Desktop.
Save CarlosSMA/5bb8827f896174924beb990c2ae1e2be to your computer and use it in GitHub Desktop.
autoload -Uz compinit
autoload -Uz bashcompinit
for dump in ~/.zcompdump(N.mh+24); do
compinit
bashcompinit
done
compinit -C
bashcompinit -C
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' menu select
bindkey '^[[Z' reverse-menu-complete
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey '^[[Z' reverse-menu-complete
zstyle ":completion:*:default" list-colors ${(s.:.)LS_COLORS} "ma=48;5;153;1"
#ZSH_THEME="spaceship"
stty -ixon
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
# FIX HISTORY
setopt INC_APPEND_HISTORY
export HISTFILE=~/.zsh_history
export HISTSIZE=1000
export SAVEHIST=1000
setopt HIST_IGNORE_ALL_DUPS
alias history="history 1"
alias bcat="batcat"
alias cp="/opt/advcpmv/advcp -rg"
alias mv="/opt/advcpmv/advmv -g"
alias g="git"
alias d="docker"
alias lg="lazygit"
alias fd="fdfind"
alias ldo="lazydocker"
alias lad="lazydocker"
alias watch-1="watch -n1 "
alias psrg="ps -ef | rg"
# Kubernetes
alias kgp="kubectl get pods"
alias kubectx="kubectl ctx"
alias kubens="kubectl ns"
alias k="kubectl"
alias keti="kubectl exec -ti"
alias watch-1="watch -n1 "
unsetopt PROMPT_SP
setopt autocd
alias ls="exa --icons --group-directories-first"
lslw() {
ls -l $(which $1)
}
source <(kubectl completion zsh)
source <(helm completion zsh)
source <(k3d completion zsh)
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
eval "$(starship init zsh)"
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/zsh-z/zsh-z.plugin.zsh
source ~/.zsh/zsh-completion/src/
source ~/.zsh/kubectx-completion/
. $HOME/.asdf/asdf.sh
source ~/.asdf/completions/asdf.bash
# append completions to fpath
fpath=(${ASDF_DIR}/completions $fpath)
# initialise completions with ZSH's compinit
backward-kill-dir () {
local WORDCHARS=${WORDCHARS/\/}
zle backward-kill-word
zle -f kill
}
zle -N backward-kill-dir
bindkey '^[^?' backward-kill-dir
bindkey '^H' backward-kill-word
bindkey -M emacs '^[[3;5~' kill-word
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[[3~" delete-char
set +o prompt_cr +o prompt_sp
bindkey -e
bindkey '^R' history-incremental-search-backward
# Terraform complete
complete -o nospace -C /home/carlos/.tfenv/versions/1.2.5/terraform terraform
tele() {
telepresence intercept $1 --port 3002 -- npm run $2
}
[[ -e "/home/carlos/lib/oci_autocomplete.sh" ]] && source "/home/carlos/lib/oci_autocomplete.sh"
complete -o nospace -C /home/carlos/.tfenv/versions/1.2.5/terraform terraform
export PATH="${PATH}:${HOME}/.krew/bin"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/carlos/google-cloud-sdk/path.zsh.inc' ]; then . '/home/carlos/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/carlos/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/carlos/google-cloud-sdk/completion.zsh.inc'; fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export USE_GKE_GCLOUD_AUTH_PLUGIN=True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment