# HG changeset patch # User edogawaconan # Date 1410760010 -32400 # Node ID cb4e2a6595ea5e860a9e96637ff5e550672a2026 # Parent f579b5310a1b46c0e7f0cba5b4f200890f739698 Add ksh support. diff -r f579b5310a1b -r cb4e2a6595ea rc/kshrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rc/kshrc Mon Sep 15 14:46:50 2014 +0900 @@ -0,0 +1,5 @@ +#!/bin/ksh + +# This is mainly for OpenBSD + +. "${HOME}/.ec.shellinit-posix" diff -r f579b5310a1b -r cb4e2a6595ea rc/shellinit-posix --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rc/shellinit-posix Mon Sep 15 14:46:50 2014 +0900 @@ -0,0 +1,40 @@ +#!/bin/sh + +_os="$(uname)" + +export LANG="en_US.UTF-8" +export LC_CTYPE="en_US.UTF-8" +# The en_US.UTF-8 causes weird sorting. +# (not really, but I prefer C based sort.) +export LC_COLLATE=C +export LC_MESSAGES=C + +if command -v tmux > /dev/null 2>&1; then + case "${_os}" in + OpenBSD) + # FIXME: OpenBSD version check + _tmux_conf_ver=1.9 + ;; + *) + case "$(tmux -V 2> /dev/null)" in + "tmux 1."[1-9][0-9]*|"tmux 1.9"*) _tmux_conf_ver=1.9;; + "tmux 1."[4-8]*) _tmux_conf_ver=1.4;; + *) _tmux_conf_ver=1.3;; + esac + ;; + esac + alias tmux="tmux -f '""${HOME}""/.tmux-""${_tmux_conf_ver}"".conf'" + unset _tmux_conf_ver +fi + +if command -v vim > /dev/null 2>&1; then + alias vi=vim + export EDITOR=vim +fi + +if command -v less > /dev/null 2>&1; then + export PAGER=less + export LESS=-FMRXginsz-2 +fi + +unset _os diff -r f579b5310a1b -r cb4e2a6595ea setup --- a/setup Sat Aug 09 00:24:45 2014 +0900 +++ b/setup Mon Sep 15 14:46:50 2014 +0900 @@ -57,6 +57,15 @@ esac } +_ksh() { + case "${1}" in + uninstall|install) + _rc "${1}" "kshrc" ".ec.ksh" + _init "${1}" '[ -r "${HOME}/.ec.ksh" ] && . "${HOME}/.ec.ksh" #ECCORE_KSH' ".profile" + ;; + esac +} + _zsh() { case "${1}" in uninstall|install) @@ -150,7 +159,9 @@ install|uninstall) _tcsh "${1}" _bash "${1}" + _ksh "${1}" _zsh "${1}" + _rc "${1}" "shellinit-posix" ".ec.shellinit-posix" _rc "${1}" "../bin" ".ecos_bin" _rc "${1}" "gemrc" ".gemrc" _rc "${1}" "gitconfig" ".gitconfig"