4 # System wide environment and startup programs
5 # Functions and aliases go into the shells dependent startup files
7 echo "$PATH" | grep -q /usr/X11R6/bin || PATH="$PATH:/usr/X11R6/bin"
8 echo "$PATH" | grep -q /usr/local/bin || PATH="$PATH:/usr/local/bin"
9 echo "$PATH" | grep -q "$HOME/bin" || PATH="$PATH:$HOME/bin"
11 if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
20 HOSTNAME=`/bin/uname -n`
21 HISTFILE="$HOME/.history"
25 # Setup the environment for various shells
28 if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
34 if [ "$SH" = "sh" ]; then
35 if [ -n "$KSH_VERSION" ]; then
37 elif [ -n "$ZSH_VERSION" ]; then
39 elif [ -n "$BASH_VERSION" ]; then
41 elif [ -n "`$SH -c 'echo ${.sh.version}' 2>/dev/null`" ]; then
50 PS1="\[\033]0;\u@\h: \w\007\][\u@\h \W]\\$ "
58 if [ `id -u` -eq 0 ]; then
59 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
60 if [ "$PWD" = "/${PWD##*/}" ]; then
66 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
67 if [ "$PWD" = "/${PWD##*/}" ]; then
75 bind '^I'=complete >/dev/null 2>&1
76 bind '^[^I'=complete-list >/dev/null 2>&1
78 # Setup some of the most basic editing functions
79 # to work properly under different terminal emulators.
82 nxterm|xterm|xterm-color)
83 bind '^[[H'=beginning-of-line >/dev/null 2>&1
84 bind '^[[F'=end-of-line >/dev/null 2>&1
87 bind '^[[1~'=beginning-of-line >/dev/null 2>&1
88 bind '^[[4~'=end-of-line >/dev/null 2>&1
93 if [ `id -u` -eq 0 ]; then
94 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
95 if [ "$PWD" = "/${PWD##*/}" ]; then
101 PS1='[${LOGNAME-$USER}@${HOSTNAME} `
102 if [ "$PWD" = "/${PWD##*/}" ]; then
112 nxterm|xterm|xterm-color)
113 trap 'case ${.sh.edchar} in "
\e[F") .sh.edchar="
\ 5" ;; "
\e[H") .sh.edchar="
\ 1" ;; esac' KEYBD
116 trap 'case ${.sh.edchar} in "
\e[4~") .sh.edchar="
\ 5" ;; "
\e[1~") .sh.edchar="
\ 1" ;; esac' KEYBD
121 PS1='[%n@%m %~]%(!.#.%\$) '
123 # other HISTFILE, zsh uses diffrent fmt
125 # w/o this hist file won't get saved!
131 export PATH USER LOGNAME HOSTNAME HISTFILE HISTSIZE PS1 PS2
133 # Put all of the variables as files in /etc/env.d/
135 # cat /etc/env.d/VARIABLE
137 for i in /etc/env.d/* ; do
140 *~ | *.bak | *.old | *.rpmnew | *.rpmsave )
152 for i in /etc/profile.d/*.sh ; do