Skip to content

Instantly share code, notes, and snippets.

@Endevir
Last active October 22, 2025 17:52
Show Gist options
  • Select an option

  • Save Endevir/60d3420185b9a17c6f9a9303ad9eeac8 to your computer and use it in GitHub Desktop.

Select an option

Save Endevir/60d3420185b9a17c6f9a9303ad9eeac8 to your computer and use it in GitHub Desktop.
ZSHA_BASE=$HOME/.zsh
[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'
DISABLE_MAGIC_FUNCTIONS=true # https://stackoverflow.com/questions/25614613/how-to-disable-zsh-substitution-autocomplete-with-url-and-backslashes
zstyle ':omz:alpha:lib:git' async-prompt no # https://github.com/ohmyzsh/ohmyzsh/issues/12328#issuecomment-2043492331
source $ZSHA_BASE/antigen.zsh
HIST_STAMPS="dd.mm.yyyy"
UPDATE_ZSH_DAYS="30"
COMPLETION_WAITING_DOTS="true"
ANTIGEN_PLUGIN_UPDATE_DAYS=30
ANTIGEN_SYSTEM_UPDATE_DAYS=30
antigen use oh-my-zsh
antigen bundle git
antigen bundle colored-man-pages
antigen bundle common-aliases
antigen bundle dircycle
antigen bundle extract
antigen bundle kubectl
antigen bundle kubectx
antigen bundle kubens
antigen bundle superbrothers/zsh-kubectl-prompt
antigen bundle zsh_reload
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-history-substring-search
#antigen theme pygmalion
antigen apply
# The following two modules (compinit and bashcompinit) are needed to get auto
# completion to work: https://github.com/ohmyzsh/ohmyzsh/issues/6323
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
# The following module need to use colors variables
autoload -U colors && colors
# Applying custom theme
source $ZSHA_BASE/themes/endevir.zsh-theme
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=240" # gray highlight
alias ll="ls -hl"
alias lla="ls -ahl"
alias cpr="rsync --progress -r"
alias dc="docker compose"
alias k="kubectl"
# Install kubectl completion for k shortcut
complete -F __start_kubectl k
EDITOR=vim
LANGUAGE="en_US:en"
LC_CTYPE="en_US.UTF-8"
LANG="en_US.UTF-8"
SSH_ENV="$HOME/.ssh/agent-environment"
export PATH=$PATH:/usr/local/go/bin
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
/usr/bin/ssh-add;
}
# Source SSH settings, if applicable
# UNCOMMENT THESE LINES TO USE SSH AGENT HOST
# if [ -f "${SSH_ENV}" ]; then
# . "${SSH_ENV}" > /dev/null
# #ps ${SSH_AGENT_PID} doesn't work under cywgin
# ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
# start_agent;
# }
#else
# start_agent;
#fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment