: $h/.oshrc - " Modify to taste. "
:
: " @(#)$Id$ "
:
: " The author of this file, J.A. Neitzel <jan (at) v6shell (dot) org>, "
: " hereby grants it to the public domain. "
:
: " From: http://v6shell.org/rc_files "
:
: fd2 -e echo "debug: Executing `"$h/.oshrc"' now..."
printenv TERM >/dev/null
if $s = 0 goto TERM_OK
setenv TERM vt100
: fallthrough
: TERM_OK
if ! \( $n = 1 -a X$1 = Xsh6 \) goto TTY_CHECK
unsetenv TTY
: fallthrough
: TTY_CHECK
printenv TTY | grep \^$t\$ >/dev/null
if $s = 0 goto continue
setenv TTY $t
printenv TERM | grep '^rxvt$' >/dev/null
if $s = 0 goto C
:
: " The terminal I normally use is rxvt-unicode (urxvt), "
: " but I also use others on occasion. Normally, they're "
: " UTF-8 capable, but that's not always true. "
:
setenv LC_ALL en_US.UTF-8
setenv LESSCHARSET utf-8
printf "%b" '\033]701;en_US.UTF-8\007' >/dev/tty
goto Next
: C - " Default to the C locale for rxvt. "
setenv LC_ALL C
: fallthrough
: Next - " Set the window title for terminal emulators under X. "
if $n = 1 -a X$1 = Xsh6 goto sh6
xtitle ; goto stty
: sh6
sh6 -c xtitle
: fallthrough
: stty - " Set terminal options. "
stty altwerase imaxbel -oxtabs <-
stty status '^T' <-
: fallthrough
: continue - " Okay, continue as normal. "
:
: " Other initialization routines that the user wishes to execute "
: " for each interactive shell can be placed here. "
:
if ! \( $n = 1 -a X$1 = Xsh6 \) goto osh
if ! { which sh6 >/dev/null } goto shift
: " Replace osh w/ sh6 . " ; exec sh6 <-
: shift
shift
: osh