rc

Added a small script that allows for my SSH keys to work throughout my session.

Author
Maarten 'Vngngdn' Vangeneugden
Date
Nov. 13, 2016, 1:29 a.m.
Hash
67bd48acdd2dc4bde7422800900153ca2b9f7bcc
Parent
7bee5fafb1dc2f0032cee78caa21603d3b7f3c31
Modified file
.zshrc

.zshrc

9 additions and 0 deletions.

View changes Hide changes
1
1
HISTFILE=~/.histfile
2
2
HISTSIZE=1000
3
3
SAVEHIST=1000
4
4
bindkey -e
5
5
# End of lines configured by zsh-newuser-install
6
6
# The following lines were added by compinstall
7
7
zstyle :compinstall filename '/home/maarten/.zshrc'
8
8
9
9
autoload -Uz compinit
10
10
compinit
11
11
# End of lines added by compinstall
12
12
13
13
#By myself; these will explicitely tell ZSH to autoload this file.
14
14
autoload -U promptinit
15
15
promptinit
16
16
17
17
#This is for colors:
18
18
autoload -U colors && colors
19
19
20
20
#This is for the Powerline font:
21
21
# Eum, this doesn't work. commented out until further notice.
22
22
#. /usr/share/zsh/site-contrib-powerline.zsh
23
23
24
24
# Ignore useless files and directories:
25
25
zstyle ':completion:*' ignored-patterns '*?.pyc' '__pycache__' '*?.class' 'Cargo.lock' '*.pdf'
26
26
27
27
# A list of aliases:
28
28
29
29
alias install="sudo pacman -S"  # Install a package.
30
30
alias delete="sudo pacman -Rscu"  # Delete a package and orphan dependencies/packages.
31
31
+
32
# Settings that allow for my SSH keys to work through all terminals.
+
33
# (Verbatim copied from Arch Wiki)
+
34
if ! pgrep -u $USER ssh-agent > /dev/null; then
+
35
    ssh-agent > ~/.ssh-agent-thing
+
36
fi
+
37
if [[ "$SSH_AGENT_PID" == "" ]]; then
+
38
    eval $(<~/.ssh-agent-thing)
+
39
fi
+
40