forked from peikk0/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.shrc
105 lines (90 loc) · 2.53 KB
/
.shrc
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
97
98
99
100
101
102
103
104
105
# This file is sourced by sh, zsh and bash
PATH="/usr/local/bin:/usr/local/sbin:/usr/games:/usr/bin:/usr/sbin:/bin:/sbin"
[ -d "${HOME}/.rvm" ] && PATH="${HOME}/.rvm/bin:${PATH}"
PATH="${HOME}/.local/bin:${PATH}"
export PATH
LOCALE="en_NZ.UTF-8"
LANG="${LOCALE}"
# LC_ALL="${LOCALE}"
LC_COLLATE="${LOCALE}"
LC_CTYPE="${LOCALE}"
LC_MESSAGES="${LOCALE}"
LC_MONETARY="${LOCALE}"
LC_NUMERIC="${LOCALE}"
LC_TIME="${LOCALE}"
MM_CHARSET="UTF-8"
export LANG LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME MM_CHARSET
if which vim >/dev/null 2>&1; then
EDITOR="vim"
VISUAL="vim"
else
EDITOR="vi"
VISUAL="vi"
fi
export EDITOR VISUAL
if which less >/dev/null 2>&1; then
PAGER="less"
LESS="-I -M -R --shift 5"; export LESS
if which lesspipe >/dev/null 2>&1; then
eval `lesspipe`
elif which lesspipe.sh >/dev/null 2>&1; then
LESSOPEN='|lesspipe.sh %s'; export LESSOPEN
fi
else
PAGER="more"
fi
export PAGER
BLOCKSIZE="K"; export BLOCKSIZE
# Only if not root, and keychain is available, and the .keychain directory was created
if [ `id -u` -ne 0 ] && which keychain >/dev/null 2>&1 && [ -d "${HOME}/.keychain" ]; then
keychain --nogui --noask --quiet
if [ -f "${HOME}/.keychain/`hostname`-sh" ]; then
. "${HOME}/.keychain/`hostname`-sh"
fi
if [ -f "${HOME}/.keychain/`hostname`-sh-gpg" ]; then
. "${HOME}/.keychain/`hostname`-sh-gpg"
fi
fi
umask 0022
# interactive shell
if [ -t 1 ] && [ $- != "*i*" ]; then
case `uname -s` in
FreeBSD|Darwin)
export LSCOLORS="exgxfxcxcxdxdxhbadacec"
alias ls="ls -G"
if [ `uname -s` = "FreeBSD" ]; then
alias ll="ls -h -l -D '%F %T'"
else
alias ll="ls -h -l -T"
fi
;;
Linux)
if which dircolors >/dev/null 2>&1; then
eval `dircolors -b "${HOME}/.dir_colors"`
fi
alias ls="ls --color=auto -N"
alias ll="ls -h -l --time-style='+%F %T'"
;;
esac
alias l="ls -A -F"
alias la="ls -a"
if which bsdtar >/dev/null 2>&1; then
alias tar="bsdtar"
fi
if which bsdgrep >/dev/null 2>&1; then
alias grep="bsdgrep --color=auto"
else
alias grep="grep --color=auto"
fi
alias egrep="grep -E --color=auto"
alias fgrep="grep -F --color=auto"
[ "${EDITOR}" = "vim" ] && alias vi="vim"
# Base16 Shell
BASE16_SCHEME="default-dark"
BASE16_SHELL="${HOME}/.config/base16-shell/scripts/base16-${BASE16_SCHEME}.sh"
[ -s "${BASE16_SHELL}" ] && . "${BASE16_SHELL}"
fi
if [ -f "${HOME}/.shrc.local" ]; then
. "${HOME}/.shrc.local"
fi
# vim:filetype=sh:tabstop=2:shiftwidth=2:fdm=marker: