-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
51 lines (41 loc) · 1.39 KB
/
dot_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
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="jared"
plugins=(common-aliases git git-extras pip aws copyfile encode64 jsontools)
source $ZSH/oh-my-zsh.sh
export EDITOR='vim'
export PROJECT_HOME="${HOME}/projects"
export GOPATH="${HOME}/go"
export GPG_TTY=$(tty)
# History
export HISTSIZE=50000000
export HISTFILESIZE=$HISTSIZE
export HISTCONTROL=ignoredups
# Aliases and functions
for file in ~/.{aliases,functions,secrets}; do
if [[ -r "$file" ]] && [[ -f "$file" ]]; then
source "$file"
fi
done
unset file
# Create or attach to a tmux session when SSHing into a machine
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux
fi
export PATH=${HOME}/.local/bin:${PATH}:${GOPATH}/bin
# Podman setup for WSL2
# https://dev.to/bowmanjd/using-podman-on-windows-subsystem-for-linux-wsl-58ji
if [[ -z "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/run/user/$UID
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/tmp/$USER-runtime
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
mkdir -m 0700 "$XDG_RUNTIME_DIR"
fi
fi
fi
# Fix for openshift-install on Apple silicon
# https://veducate.co.uk/openshift-install-apple-macbook-m1/
export GODEBUG=asyncpreemptoff=1
# Fix for Ansible on MacOS
# https://github.com/ansible/ansible/issues/76322#issuecomment-974147955
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES