]> git.pld-linux.org Git - packages/zsh.git/blame_incremental - zshrc
do not unroll precmd alias when defining precmd function
[packages/zsh.git] / zshrc
... / ...
CommitLineData
1# for interactive shell
2
3alias which=whence
4alias cd='builtin cd'
5
6# mc: don't clutter history
7alias precmd=' precmd'
8
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'
16alias shutdown=' shutdown'
17alias telinit=' telinit'
18
19# SYSTEM WIDE ALIASES ETC.
20for i in /etc/shrc.d/**/*.sh(N); do
21 . $i
22done
23unset i
24
25setopt hist_ignore_space hist_ignore_all_dups list_packed transient_rprompt hist_verify
26
27bindkey -e >/dev/null 2>&1
28
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
37
38PS1='[%n@%m %~]%(!.#.%\$) '
39
40case "$TERM" in
41 xterm*|nxterm|gnome*|rxvt*|konsole*)
42 function precmd () { print -Pn "\e]0;%n@%m: %~\a" }
43 bindkey '^[[H' beginning-of-line >/dev/null 2>&1
44 bindkey '^[[F' end-of-line >/dev/null 2>&1
45 bindkey '^[[A' history-beginning-search-backward >/dev/null 2>&1
46 bindkey '^[[B' history-beginning-search-forward >/dev/null 2>&1
47 ;;
48esac
49if [ "$TERM" = 'screen' ]; then
50 screen_title () { print -Pn "\ek%n@%m: %~\e\\" }
51 precmd_functions=(screen_title)
52fi
This page took 0.074018 seconds and 4 git commands to generate.