Release new version 1.6.0
[grml-etc.git] / etc / skel / .kshrc
1 # Filename:      .kshrc
2 # Purpose:       configuration file for the korn shell
3 # Authors:       grml-team (grml.org), (c) Matthias Kopfermann <maddi@grml.org>, (c) Michael Prokop <mika@grml.org
4 # Bug-Reports:   see http://grml.org/bugs/
5 # License:       This file is licensed under the GPL v2.
6 # Latest change: Son Nov 12 12:00:23 CET 2006 [mika]
7 ################################################################################
8
9 # ksh93 requires an editor
10   set -o emacs
11
12 # The $() has to be done to work around a bug in ksh that
13 # isn't able to substitute with // inside the $HOME variable to have ~/
14 # The control-character in the prompt is sadly neccessary foR
15 # color to be not disturbing for the command line editor.
16 [[ $USER != root ]] && PS1='\ f\e[1;34m'"\
17 \$USER\ f\e[0m\ f@\$HOSTNAME \$(echo \$PWD | sed s,/home/\$USER,~,) $ "
18
19 [[ $USER  = root ]] && PS1='\ f\e[1;31m'"\$USER\ f\e[\ f0m@\$HOSTNAME \$(
20         if [[ $PWD = /root/* ]] ; then
21                 echo \$PWD|sed s,/root/,~/,
22         elif [[ $PWD = /root ]] ; then
23                 echo \$PWD|sed s,/root,\~,
24         fi
25 )# "
26
27   export PS1
28   alias ls='ls --color -F -trA'
29   ff() { cd $1 && ls ; }
30   alias md='mkdir -p'
31
32 ## END OF FILE #################################################################