]> git.pld-linux.org Git - packages/mksh.git/blob - mksh-mkshrc
e15906dcc5381aa9fd780f2346304460657e0437
[packages/mksh.git] / mksh-mkshrc
1 # For interactive shell
2
3 # PROMPT
4 if [ `id -u` -eq 0 ]; then
5         PS1='[${LOGNAME-$USER}@${HOSTNAME} `
6         if [ "$PWD" = "$HOME" ]; then
7                 echo "~";
8         elif [ "$PWD" = "/${PWD##*/}" ]; then
9                 echo $PWD;      
10         else
11                 echo ${PWD##*/};
12         fi`]# '
13 else
14         PS1='[${LOGNAME-$USER}@${HOSTNAME} `
15         if [ "$PWD" = "$HOME" ]; then
16                 echo "~";
17         elif [ "$PWD" = "/${PWD##*/}" ]; then
18                 echo $PWD;      
19         else
20                 echo ${PWD##*/};
21         fi`]$ '
22 fi
23 export PS1
24
25 # EDITING FUNCTIONS
26 set -o emacs
27 bind '^I'=complete >/dev/null 2>&1
28 bind '^I'=complete-list >/dev/null 2>&1
29
30 case $TERM in
31         nxterm|xterm*|konsole*)
32                 bind '^[[H'=beginning-of-line >/dev/null 2>&1
33                 bind '^[[F'=end-of-line >/dev/null 2>&1
34                 ;;
35         linux|rxvt*)
36                 bind '^[[1~'=beginning-of-line >/dev/null 2>&1
37                 bind '^[[4~'=end-of-line >/dev/null 2>&1
38                 ;;
39 esac
40
41 # SYSTEM WIDE ALIASES ETC.
42 if [ "`echo /etc/shrc.d/*.sh`" != "/etc/shrc.d/*.sh" ]; then
43         for i in /etc/shrc.d/*.sh ; do
44                 . $i
45         done
46         unset i
47 fi
48
49 HISTFILE=~/.history.mksh
50
51 # vi:syntax=sh
This page took 0.016913 seconds and 2 git commands to generate.