Mercurial > ec-dotfiles
comparison rc/shellinit-posix @ 527:cb4e2a6595ea
Add ksh support.
author | edogawaconan <me@myconan.net> |
---|---|
date | Mon, 15 Sep 2014 14:46:50 +0900 |
parents | |
children | 92eb89781346 |
comparison
equal
deleted
inserted
replaced
526:f579b5310a1b | 527:cb4e2a6595ea |
---|---|
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 |