]> git.pld-linux.org Git - packages/mksh.git/blame - mksh-mkshrc
- rel 2; search history in typed prefix range
[packages/mksh.git] / mksh-mkshrc
CommitLineData
bbdaf468
KK
1# For interactive shell
2
3# PROMPT
09685ada
AM
4PS1='[${LOGNAME-$USER}@${HOSTNAME} $(
5if [[ $PWD = "$HOME" ]]; then
6 echo "~"
7elif [[ $PWD = "/${PWD##*/}" ]]; then
8 print -r -- "$PWD"
bbdaf468 9else
09685ada
AM
10 print -r -- "${PWD##*/}"
11fi)]'
12if (( USER_ID == 0 )); then
13 PS1+='# '
14else
15 PS1+='$ '
bbdaf468 16fi
bbdaf468
KK
17
18# EDITING FUNCTIONS
19set -o emacs
bbdaf468 20bind '^I'=complete-list >/dev/null 2>&1
dbc54c4b
AM
21# search history with prefix support
22bind '^XA'=search-history-up
23bind '^XB'=search-history-down
bbdaf468 24
bbdaf468 25# SYSTEM WIDE ALIASES ETC.
09685ada
AM
26for i in /etc/shrc.d/*.sh; do
27 [[ -e $i ]] || continue
28 . "$i"
29done
30unset i
bbdaf468 31
71cdadf2
KK
32HISTFILE=~/.history.mksh
33
bbdaf468 34# vi:syntax=sh
09685ada 35
This page took 0.063991 seconds and 4 git commands to generate.