2020-09-04 13:12:11 -04:00
|
|
|
PATH=$PATH:${HOME}/bin:${HOME}/.local/bin
|
2020-08-24 17:26:56 -04:00
|
|
|
|
2024-04-10 21:46:57 -04:00
|
|
|
# Set Vars for ssh via gpg
|
|
|
|
export GPG_TTY=$(tty)
|
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
#gpgconf --launch gpg-agent
|
|
|
|
|
|
|
|
# Settings for the *omz/lib/history*
|
|
|
|
#
|
|
|
|
# Set the timestamp format for history for ISO format
|
|
|
|
export HIST_STAMPS="yyyy-mm-dd"
|
|
|
|
# Don't bother storing these commands in history
|
2020-08-24 17:26:56 -04:00
|
|
|
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|.* --help)"
|
2024-04-10 21:46:57 -04:00
|
|
|
# Set the location for the zsh_history file to be inside our .zsh foler
|
2020-08-24 17:26:56 -04:00
|
|
|
export HISTFILE="$ZDOTDIR/.zsh_history"
|
2024-04-10 21:46:57 -04:00
|
|
|
# Keep this many history events in per-shell memory
|
|
|
|
export HISTSIZE=100000
|
|
|
|
# Keep this many history events in the log file
|
|
|
|
export SAVEHIST=50000
|
2020-08-24 17:26:56 -04:00
|
|
|
|
|
|
|
export ZSH_TMUX_AUTOSTART=true
|
|
|
|
|
2020-08-24 17:39:49 -04:00
|
|
|
if [ -e ${HOME}/.zplug/init.zsh ]; then
|
|
|
|
# For local manual installs
|
|
|
|
source ~/.zplug/init.zsh
|
2020-09-04 13:12:11 -04:00
|
|
|
elif [ -e /usr/share/zplug/init.zsh ]; then
|
|
|
|
# For system-wide installs
|
|
|
|
source /usr/share/zplug/init.zsh
|
2020-08-24 17:39:49 -04:00
|
|
|
elif [ -e /usr/local/opt/zplug/init.zsh ]; then
|
|
|
|
# For homebrew MacOSX
|
|
|
|
export ZPLUG_HOME=/usr/local/opt/zplug
|
|
|
|
source $ZPLUG_HOME/init.zsh
|
|
|
|
fi
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:26:56 -04:00
|
|
|
alias pip=pip3
|
2024-04-10 21:46:57 -04:00
|
|
|
alias vim="nvim"
|
|
|
|
alias vi="nvim"
|
|
|
|
alias vimdiff="nvim -d"
|
|
|
|
alias dlports="docker container ls --format table '{{.ID}}\t{{.Names}}\t{{.Ports}} -a'"
|
2024-04-10 23:59:11 -04:00
|
|
|
alias gpb=git-parent-branch
|
2024-04-10 21:46:57 -04:00
|
|
|
|
|
|
|
export EDITOR=nvim
|
|
|
|
# Prefer case sensitive autocomplete
|
|
|
|
export CASE_SENSITIVE="true"
|
|
|
|
# Default all my venv to python3
|
2020-08-24 17:26:56 -04:00
|
|
|
export AUTOSWITCH_DEFAULT_PYTHON=$(which python3)
|
2024-04-10 21:46:57 -04:00
|
|
|
# My prompt reflects my venv automatically, don't pollute it by default
|
|
|
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2024-04-10 23:59:11 -04:00
|
|
|
# Use this to define the git lg alias
|
|
|
|
function define_gitlg {
|
|
|
|
git config --global alias.lg log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --abbrev-commit
|
|
|
|
}
|
|
|
|
|
2020-08-24 17:26:56 -04:00
|
|
|
# Code to maintain pagent connections to tmux through link drops
|
|
|
|
#SOCK="/tmp/ssh-agent-$USER-tmux"
|
|
|
|
#if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != $SOCK ]; then
|
|
|
|
# rm -f $SOCK
|
|
|
|
# ln -sf $SSH_AUTH_SOCK $SOCK
|
|
|
|
# SSH_AUTH_SOCK=$SOCK
|
|
|
|
#fi
|
|
|
|
|
2020-08-31 13:28:32 -04:00
|
|
|
#zplug "zsh-users/zsh-completions"
|
|
|
|
zplug "marlonrichert/zsh-autocomplete"
|
2024-04-10 21:46:57 -04:00
|
|
|
|
|
|
|
zplug "plugins/docker-compose", from:oh-my-zsh
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "plugins/git", from:oh-my-zsh
|
2024-04-10 21:46:57 -04:00
|
|
|
zplug "lib/history", from:oh-my-zsh
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "plugins/sudo", from:oh-my-zsh
|
2024-04-10 21:46:57 -04:00
|
|
|
zplug "plugins/vi-mode", from:oh-my-zsh
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "plugins/vagrant", from:oh-my-zsh
|
2020-08-24 17:26:56 -04:00
|
|
|
zplug "lib/termsupport", from:oh-my-zsh
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:26:56 -04:00
|
|
|
zplug "tcnksm/docker-alias", use:zshrc
|
2024-04-10 21:46:57 -04:00
|
|
|
|
|
|
|
zplug "MichaelAquilina/zsh-autoswitch-virtualenv"
|
2024-04-10 23:59:11 -04:00
|
|
|
#zplug "jqlang/jq"
|
2024-04-10 21:46:57 -04:00
|
|
|
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "b4b4r07/httpstat", as:command, use:'(*).sh', rename-to:'$1'
|
|
|
|
zplug "drwetter/testssl.sh", as:command, use:'(*).sh', rename-to:'$1'
|
2024-04-10 21:46:57 -04:00
|
|
|
#zplug "drwetter/testssl.sh", as:command, use: 'testssl.sh'
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:26:56 -04:00
|
|
|
#zplug "nichus/zsh-tmux-multisession"
|
|
|
|
zplug "nichus/zsh-todotxt"
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "nichus/qi3ber2", as:theme
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
2024-04-10 21:46:57 -04:00
|
|
|
zplug "zsh-users/zsh-history-substring-search", defer: 2
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug "zplug/zplug", hook-build: "zplug --self-manage"
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:26:56 -04:00
|
|
|
zplug check || zplug install
|
2016-03-04 19:56:05 -05:00
|
|
|
|
2020-08-24 17:10:07 -04:00
|
|
|
zplug load
|
2017-01-30 15:15:34 -05:00
|
|
|
|
2024-04-10 21:46:57 -04:00
|
|
|
unsetopt share_history
|
|
|
|
unsetopt hist_verify
|
|
|
|
setopt hist_ignore_all_dups
|
|
|
|
setopt hist_find_no_dups
|
|
|
|
|
|
|
|
source <(kubectl completion zsh)
|
|
|
|
eval "$(zoxide init zsh)"
|
2020-08-24 17:26:56 -04:00
|
|
|
|
|
|
|
bindkey '^U' backward-kill-line
|
|
|
|
bindkey '^K' kill-line
|
|
|
|
bindkey '^Y' yank
|
|
|
|
|
|
|
|
function git-parent-branch {
|
|
|
|
git show-branch -a \
|
|
|
|
| grep '\*' \
|
|
|
|
| grep -v `git-rev-parse --abbrev-ref HEAD` \
|
|
|
|
| head -n1 \
|
|
|
|
| sed 's/.*\[\(.*\)\].*/\1/' \
|
|
|
|
| sed 's/[\^~].*//'
|
|
|
|
}
|