]> TLD Linux GIT Repositories - packages/mksh.git/blob - mksh-mkshrc
- merged 58 from PLD
[packages/mksh.git] / mksh-mkshrc
1 # For interactive shell
2
3 # PROMPT
4 PS1='[${LOGNAME-$USER}@${HOSTNAME} $(
5 if [[ $PWD = "$HOME" ]]; then
6         echo "~"
7 elif [[ $PWD = "/${PWD##*/}" ]]; then
8         print -r -- "$PWD"
9 else
10         print -r -- "${PWD##*/}"
11 fi)]'
12 if (( USER_ID == 0 )); then
13         PS1+='# '
14 else
15         PS1+='$ '
16 fi
17
18 # EDITING FUNCTIONS
19 set -o emacs
20 bind '^I'=complete-list >/dev/null 2>&1
21 # search history with prefix support
22 bind '^XA'=search-history-up
23 bind '^XB'=search-history-down
24
25 # SYSTEM WIDE ALIASES ETC.
26 for i in /etc/shrc.d/*.sh; do
27         [[ -e $i ]] || continue
28         . "$i"
29 done
30 unset i
31
32 HISTFILE=~/.history.mksh
33
34 # vi:syntax=sh
35