-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
76 lines (65 loc) · 1.83 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Append to history on execution
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=$HISTSIZE
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt EXTENDED_HISTORY
setopt SHARE_HISTORY
# export mac os paths
export PATH="$PATH:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/usr/local/bin/"
# preferred editor for local and remote sessions
export EDITOR='vim'
# aliases
alias grep="grep"
alias vi="vim"
alias vim="vim"
alias ls='ls -FG'
alias ll='ls -lartFGh'
alias view='vim -R'
alias publicip='curl http://ifconfig.me'
alias diff='diff --side-by-side -W $(( $(tput cols) - 2 ))'
alias h='helm'
alias tf='terraform'
alias k='kubectl'
alias kx='kubectx'
alias kc='kubectl config current-context'
# Set emacs keybinding (ctrl+a usage etc)
bindkey -e
# load zgen
source "${HOME}/.zgen/zgen.zsh"
if ! zgen saved; then
echo "Creating a zgen save"
zgen load mafredri/zsh-async
zgen load junegunn/fzf
zgen load junegunn/fzf shell/completion.zsh
zgen load junegunn/fzf shell/key-bindings.zsh
zgen load felixr/docker-zsh-completion
zgen load superbrothers/zsh-kubectl-prompt
zgen load spaceship-prompt/spaceship-prompt spaceship
zgen save
fi
# Use FZF for history
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Use GPG agent for ssh for use with U2F keys
#export GPG_TTY="$(tty)"
#export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
#gpgconf --launch gpg-agent
## Case Statement to change behaviour based on OS
#case "$OSTYPE" in
# darwin*)
# # ...
# ;;
# linux*)
# setxkbmap -layout us -option ctrl:nocaps
# if [ "$(tty)" = "/dev/tty1" ]; then
# exec sway > /var/log/sway.log 2>&1
# fi
# ;;
#esac
#
SPACESHIP_CHAR_SYMBOL="$ "
# Ensure these is as the end as per documentation
# May need to install Starship separately
zgen load zsh-users/zsh-syntax-highlighting
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"