dotfiles/.zshrc

74 lines
1.4 KiB
Bash
Raw Normal View History

2018-04-04 17:37:05 +02:00
source ~/.zplug/init.zsh
zplug "plugins/git", from:oh-my-zsh
2020-08-21 08:28:02 +02:00
zplug "zsh-users/zsh-history-substring-search"
zplug "zsh-users/zsh-completions"
2018-04-04 17:37:05 +02:00
zplug "zsh-users/zsh-syntax-highlighting", defer:2
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
zplug load
2020-09-27 13:56:54 +02:00
## Completion
autoload -Uz compinit
compinit
2020-09-27 13:56:54 +02:00
## Gnupg / gpg / ssh / yubikey
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
2019-12-04 17:28:14 +01:00
2020-04-22 08:30:34 +02:00
## Pager
export LESS="--mouse --wheel-lines=1 -nRX"
2020-09-27 13:56:54 +02:00
## Aliases
alias cdiff='colordiff -u'
alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git'
alias l='less -nRX'
2019-10-19 12:36:29 +02:00
alias ls=exa
2020-09-27 13:56:54 +02:00
alias tail='tail -n $LINES'
alias timestamp='TZ=Z date "+%Y%m%dT%H%M%SZ"'
alias tree='exa --tree'
alias xc='xclip -selection clipboard'
2018-01-17 21:38:11 +01:00
2018-01-03 08:47:21 +01:00
## vim
2020-09-27 13:56:54 +02:00
export EDITOR=nvim
2018-01-03 08:47:21 +01:00
export NVIM_LISTEN_ADDRESS=/tmp/nvimsocket
e ()
{
tmux select-window -t1
2018-01-03 08:47:21 +01:00
nvr --remote $(readlink -f "$@")
}
2020-09-05 13:20:38 +02:00
## direnv
eval "$(direnv hook zsh)"
2020-09-27 13:56:54 +02:00
## Kubernetes
2020-04-22 18:54:47 +02:00
command -v kubectl >/dev/null 2>&1 && source <(kubectl completion zsh)
2019-12-02 11:30:13 +01:00
export PATH=$HOME/.krew/bin:$PATH
2020-09-27 13:56:54 +02:00
## Flux
2019-10-19 12:36:29 +02:00
export FLUX_FORWARD_NAMESPACE=flux
2020-09-27 13:56:54 +02:00
## Google Cloud
2017-08-09 08:43:48 +02:00
[ -f /opt/google-cloud-sdk/completion.zsh.inc ] && source /opt/google-cloud-sdk/completion.zsh.inc
2019-09-03 14:50:36 +02:00
## Golang
2020-09-27 13:56:54 +02:00
export PATH=$HOME/go/bin:$PATH
2019-09-03 14:50:36 +02:00
GOPROXY=https://proxy.golang.org/
## Ansible
export ANSIBLE_NOCOWS=1
2019-01-01 19:48:52 +01:00
2020-09-27 13:56:54 +02:00
## Prompt
eval "$(starship init zsh)"
2019-12-04 17:28:14 +01:00
2020-09-27 13:56:54 +02:00
export PATH=$HOME/bin:$PATH
2019-01-01 19:48:52 +01:00
2020-09-12 17:37:28 +02:00