]> git.pld-linux.org Git - packages/zsh.git/blame - zshrc
do not unroll precmd alias when defining precmd function
[packages/zsh.git] / zshrc
CommitLineData
3cad6678
TP
1# for interactive shell
2
3alias which=whence
4alias cd='builtin cd'
78101b75
TP
5
6# mc: don't clutter history
3cad6678
TP
7alias precmd=' precmd'
8
78101b75
TP
9# avoid accidental execution from history by inhibiting saving in the first place
10# (easier to mitigate than HISTORY_IGNORE, which in turn might be used for mkfs*)
11alias kill=' kill'
12alias halt=' halt'
13alias init=' init'
14alias poweroff=' poweroff'
15alias reboot=' reboot'
78101b75
TP
16alias shutdown=' shutdown'
17alias telinit=' telinit'
18
7d939b92 19# SYSTEM WIDE ALIASES ETC.
020d4f77 20for i in /etc/shrc.d/**/*.sh(N); do
7d939b92 21 . $i
22done
23unset i
24
ce11a4fe 25setopt hist_ignore_space hist_ignore_all_dups list_packed transient_rprompt hist_verify
adef8d5b 26
3cad6678
TP
27bindkey -e >/dev/null 2>&1
28
a3a239c3
AM
29bindkey $terminfo[khome] beginning-of-line >/dev/null 2>&1
30bindkey $terminfo[kend] end-of-line >/dev/null 2>&1
31bindkey $terminfo[kich1] quoted-insert >/dev/null 2>&1
32bindkey $terminfo[kdch1] delete-char >/dev/null 2>&1
33bindkey $terminfo[kpp] up-history >/dev/null 2>&1
34bindkey $terminfo[knp] end-of-history >/dev/null 2>&1
35bindkey $terminfo[kcuu1] history-beginning-search-backward >/dev/null 2>&1
36bindkey $terminfo[kcud1] history-beginning-search-forward >/dev/null 2>&1
3cad6678 37
4f928441 38PS1='[%n@%m %~]%(!.#.%\$) '
4f928441 39
3cad6678 40case "$TERM" in
5088c8e7 41 xterm*|nxterm|gnome*|rxvt*|konsole*)
53e16d61 42 function precmd () { print -Pn "\e]0;%n@%m: %~\a" }
3cad6678
TP
43 bindkey '^[[H' beginning-of-line >/dev/null 2>&1
44 bindkey '^[[F' end-of-line >/dev/null 2>&1
65df4e3b
TP
45 bindkey '^[[A' history-beginning-search-backward >/dev/null 2>&1
46 bindkey '^[[B' history-beginning-search-forward >/dev/null 2>&1
3cad6678
TP
47 ;;
48esac
949fb358
TP
49if [ "$TERM" = 'screen' ]; then
50 screen_title () { print -Pn "\ek%n@%m: %~\e\\" }
51 precmd_functions=(screen_title)
52fi
This page took 0.064911 seconds and 4 git commands to generate.