aboutsummaryrefslogtreecommitdiffstats
path: root/.bashrc
blob: bdbe1fb1fd68bdbbf28951080155ed835b534c0b (plain)
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
#!/bin/bash

case $- in
*i*) ;;
*) return ;;
esac

# use a tty for gpg
# solves error: "gpg: signing failed: Inappropriate ioctl for device"
GPG_TTY=$(tty)
export GPG_TTY

# Shell
if [ -z "$SSH_AUTH_SOCK" ]; then
	eval $(ssh-agent -s)
	{
		/usr/bin/ssh-add -K
	} &>/dev/null
fi

{
	/usr/bin/ssh-add -K
} &>/dev/null

# Set Emacs as VISUAL
export VISUAL="emacs"

for file in ~/.{aliases,path,extras}; do
	if [[ -r "$file" ]] && [[ -f "$file" ]]; then
		# shellcheck source=/dev/null
		source "$file"
	fi
done
unset file