aboutsummaryrefslogtreecommitdiffstats
path: root/.profile
blob: 1d23029ac8315395105948dd3d47e30ce672cdad (plain) (blame)
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
# Initialization for all Bourne-compatible shells.

PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

# Add pkgsrc directories to PATH on macOS.
if [ "$(uname)" = "Darwin" ]; then
	PATH="/opt/pkg/bin:/opt/pkg/sbin:$PATH"
fi

export PATH="$HOME/bin:$HOME/.local/bin:$PATH"

export ENV="$HOME"/.shrc

if [ "$(uname)" = Linux ] && [ -n "${BASH_VERSION-}" ]; then
    export BASH_ENV="$HOME"/.bashrc
    # shellcheck disable=SC1090
    . "$BASH_ENV"
fi

export LC_CTYPE=en_US.UTF-8

# UTF-8 on FreeBSD (requires the vt console driver; see vt(4)).
if [ "$(uname)" = "FreeBSD" ]; then
    export CHARSET="UTF-8"
    export LANG="en_US.UTF-8"
fi

# Set editor. Use vim if available, or vi otherwise.
if type vim >/dev/null 2>&1; then
    export VISUAL='vim'
else
    export VISUAL=vi
fi

export PAGER=less
export MANPAGER=$PAGER

# Don't kill shell due to inactivity.
unset TMOUT

export NO_COLOR=1

export LESSHISTFILE=-

# Windows Subsystem for Linux
if [ -f /proc/version ] && grep -qi microsoft /proc/version; then
	# Run keychain to enable ssh-agent sharing across shells.
	/usr/bin/keychain -q --nogui "$HOME"/.ssh/id_rsa
    # shellcheck disable=SC1090
	. "$HOME"/.keychain/"$(hostname -s)"-sh

	# Add Windows OpenSSH directory to PATH to enable 1Password integration.
	export PATH="${PATH}:/mnt/c/Windows/System32/OpenSSH"
fi