527
|
1 #!/bin/sh
|
|
2
|
|
3 _os="$(uname)"
|
|
4
|
|
5 export LANG="en_US.UTF-8"
|
|
6 export LC_CTYPE="en_US.UTF-8"
|
|
7 # The en_US.UTF-8 causes weird sorting.
|
|
8 # (not really, but I prefer C based sort.)
|
|
9 export LC_COLLATE=C
|
|
10 export LC_MESSAGES=C
|
|
11
|
|
12 if command -v tmux > /dev/null 2>&1; then
|
|
13 case "${_os}" in
|
|
14 OpenBSD)
|
|
15 # FIXME: OpenBSD version check
|
|
16 _tmux_conf_ver=1.9
|
|
17 ;;
|
|
18 *)
|
|
19 case "$(tmux -V 2> /dev/null)" in
|
|
20 "tmux 1."[1-9][0-9]*|"tmux 1.9"*) _tmux_conf_ver=1.9;;
|
|
21 "tmux 1."[4-8]*) _tmux_conf_ver=1.4;;
|
|
22 *) _tmux_conf_ver=1.3;;
|
|
23 esac
|
|
24 ;;
|
|
25 esac
|
|
26 alias tmux="tmux -f '""${HOME}""/.tmux-""${_tmux_conf_ver}"".conf'"
|
|
27 unset _tmux_conf_ver
|
|
28 fi
|
|
29
|
|
30 if command -v vim > /dev/null 2>&1; then
|
|
31 alias vi=vim
|
|
32 export EDITOR=vim
|
|
33 fi
|
|
34
|
|
35 if command -v less > /dev/null 2>&1; then
|
|
36 export PAGER=less
|
|
37 export LESS=-FMRXginsz-2
|
|
38 fi
|
|
39
|
|
40 unset _os
|