forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.exports
executable file
·94 lines (75 loc) · 3.25 KB
/
.exports
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
export PATH=~/.rbenv/bin:~/.cargo/bin:/usr/local/sbin:/usr/local/bin:$PATH
export RUBY_GC_MALLOC_LIMIT=50000000
# Enable persistent REPL history for `node`.
export NODE_REPL_HISTORY=~/.node_history
# Allow 32³ entries; the default is 1000.
export NODE_REPL_HISTORY_SIZE='32768'
# Use sloppy mode by default, matching web browsers.
export NODE_REPL_MODE='sloppy'
# Make Python use UTF-8 encoding for output to stdin, stdout, and stderr.
export PYTHONIOENCODING='UTF-8';
# Increase Bash history size. Allow 32³ entries; the default is 500.
export HISTSIZE='32768'
export HISTFILESIZE="${HISTSIZE}"
# Omit duplicates and commands that begin with a space from history.
export HISTCONTROL='ignoreboth'
# Prefer US English and use UTF-8
export LANG="en_US"
export LC_ALL="en_US.UTF-8"
export DEFAULT_USER=kris
# ssh
export SSH_KEY_PATH="~/.ssh/id_rsa"
# Don’t clear the screen after quitting a manual page
export MANPAGER="less -X"
# Highlight section titles in manual pages.
export LESS_TERMCAP_md="${yellow}";
# Set editor
if [[ -n $VSCODE_INJECTION ]]; then
export EDITOR="code --wait"
export VISUAL="code --wait"
fi
if type shadowenv &> /dev/null; then
eval "$(shadowenv init zsh)"
fi
if type rbenv &> /dev/null; then
eval "$(rbenv init -)"
fi
if [[ $(uname) == "Darwin" ]]; then
export EDITOR="code --wait"
export VISUAL="code --wait"
[ -d /opt/homebrew ] && export PATH=/opt/homebrew/bin:$PATH
[ -d /usr/local/opt/coreutils/libexec/gnubin ] && export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
[ -f /usr/libexec/java_home ] && export JAVA_HOME=$(/usr/libexec/java_home)
[ -d /usr/local/opt/yarn ] && export PATH="`yarn global bin`:$PATH"
[ -d /usr/local/opt/rustup-init ] && export PATH=/usr/local/opt/rustup-init/bin:$PATH
[ -d ~/Library/pnpm ] && export PATH=~/Library/pnpm:$PATH
export BYOBU_PREFIX=/usr/local
export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH"
eval $(gpg-connect-agent --quiet /bye)
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
elif [[ $(uname) == "Linux" ]]; then
[ -d /commandhistory ] && export HISTFILE=/commandhistory/.zsh_history
elif [[ $(grep microsoft /proc/version) ]]; then
[ -d /home/linuxbrew ] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
[ -d /usr/local/go/bin ] && export PATH=$PATH:/usr/local/go/bin
[ -d ~/code/go ] && export PATH=~/code/go/bin:$PATH
[ -d ~/code/go ] && export GOPATH=~/code/go
# Removing Linux SSH socket and replacing it by link to wsl2-ssh-pageant socket
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
ss -a | grep -q $SSH_AUTH_SOCK
if [ $? -ne 0 ]; then
rm -f $SSH_AUTH_SOCK
setsid nohup socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:$HOME/.ssh/wsl2-ssh-pageant.exe &>/dev/null &
fi
# Removing Linux GPG Agent socket and replacing it by link to wsl2-ssh-pageant GPG socket
export GPG_AGENT_SOCK=$HOME/.gnupg/S.gpg-agent
ss -a | grep -q $GPG_AGENT_SOCK
if [ $? -ne 0 ]; then
rm -rf $GPG_AGENT_SOCK
setsid nohup socat UNIX-LISTEN:$GPG_AGENT_SOCK,fork EXEC:"$HOME/.ssh/wsl2-ssh-pageant.exe --gpg S.gpg-agent" &>/dev/null &
fi
export SPACESHIP_BATTERY_SHOW=false
fi