aboutsummaryrefslogtreecommitdiff
path: root/shell/conf
blob: dd7e6e25ab6ef7ce29db75755a41371bd6175f43 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

SHELL_CONFIG=".mkshrc"
COLOR=0
case "$TERM" in
	xterm*) COLOR=1;;
	*256color) COLOR=1;;
esac

export EDITORS="ed vi vim "
export PATH="$HOME/bin:$PATH"

UPDATE_URL="https://git.riedstra.dev/mitch/dotfiles/plain/"
VIM_GIT_URL="https://git.riedstra.dev/mitch/vim-cfg"
VIM_BASIC_URL="https://git.riedstra.dev/mitch/dotfiles/plain/vimrc"

PRELOAD="$HOME/${SHELL_CONFIG}.pre"
LOCAL="$HOME/${SHELL_CONFIG}.local"

# Don't put any variables below this, as they can't be overridden before the
# functions if you do that

# Load pre config
if [ -e $PRELOAD ] ; then
	. $PRELOAD
fi

set_pager
set_editor
# set_go

export PASSWORD_STORE_ENABLE_EXTENSIONS=true

setaliases
setsudoaliases

# checkSSHAgent
	

# Nasty conditional for support of many different shells
if
	! [ -z "$KSH_VERSION" ] ||
	[ $SHELL = "/bin/ksh" ] ||
	[ $SHELL = "/bin/mksh" ] ||
	[ $SHELL = "/usr/bin/mksh" ] ||
	[ $SHELL = "/usr/local/bin/mksh" ]
then
	export HISTFILE="$HOME/.ksh_history"
	set -o emacs
	bind ^L=clear-screen
	export PS1="$(whoami)@$(hostname) \$PWD \$ "
elif	[ $SHELL = "/bin/sh" ] && [ "$(uname)" = "FreeBSD" ] ; then
	set -o emacs
	export PS1="$(whoami)"'@\h:\w \$ '
elif	! [ -z "$BASH" ] ; then
	HISTFILE="$HOME/.bash_history"
	HISTSIZE=10000
	HISTFILESIZE=10000
	shopt -s histappend
	export PROMPT_COMMAND="set_my_title;history -a; history -c; history -r"
fi

if [ $COLOR -eq 1 ] ; then
	colormanpages
	setcolorterminal
	setcoloraliases
	setlscolors
fi

# Include local configuration options
if [ -f $LOCAL ] ; then
	. $LOCAL
fi