-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc.windows
96 lines (70 loc) · 1.72 KB
/
.zshrc.windows
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
95
96
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <[email protected]>
#
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Customize to your needs...
source ~/antigen/antigen.zsh
antigen bundles << EOBUNDLES
git
git-extras
EOBUNDLES
antigen apply
COMPLETION_WAITING_DOTS="true"
setopt NO_HUP
setopt NO_CHECK_JOBS
alias -g G="| grep -i"
alias gclean='git remote prune origin'
source ~/.localrc
##### SSH-AGENT #####
#section stolen from github so ssh won't harrass me about the passphrase every
#time
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
agent_is_running() {
if [ "$SSH_AUTH_SOCK" ]; then
# ssh-add returns:
# 0 = agent running, has keys
# 1 = agent running, no keys
# 2 = agent not running
ssh-add -l >/dev/null 2>&1 || [ $? -eq 1 ]
else
false
fi
}
agent_has_keys() {
ssh-add -l >/dev/null 2>&1
}
agent_load_env() {
. "$env" >/dev/null
}
agent_start() {
(umask 077; ssh-agent >"$env")
. "$env" >/dev/null
}
agent_load_keys(){
for key in ~/.ssh/*rsa; do
ssh-add "$key"
done
}
#if ! agent_is_running; then
#agent_load_env
#fi
# if your keys are not stored in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub, you'll need
# to paste the proper path after ssh-add
#if ! agent_is_running; then
# agent_start
#fi
#if ! agent_has_keys; then
# agent_load_keys
#fi
unset env