]> git.pld-linux.org Git - packages/zsh.git/blob - zshrc
up to 5.6.1 (fixes CVE-2018-0502, CVE-2018-13259)
[packages/zsh.git] / zshrc
1 # for interactive shell
2
3 alias which=whence
4 alias cd='builtin cd'
5
6 # mc: don't clutter history
7 alias 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*)
11 alias kill=' kill'
12 alias halt=' halt'
13 alias init=' init'
14 alias poweroff=' poweroff'
15 alias reboot=' reboot'
16 alias shutdown=' shutdown'
17 alias telinit=' telinit'
18
19 # SYSTEM WIDE ALIASES ETC.
20 for i in /etc/shrc.d/**/*.sh(N); do
21         . $i
22 done
23 unset i
24
25 setopt hist_ignore_space hist_ignore_all_dups list_packed transient_rprompt hist_verify
26
27 bindkey -e >/dev/null 2>&1
28
29 bindkey $terminfo[khome] beginning-of-line >/dev/null 2>&1
30 bindkey $terminfo[kend] end-of-line >/dev/null 2>&1
31 bindkey $terminfo[kich1] quoted-insert >/dev/null 2>&1
32 bindkey $terminfo[kdch1] delete-char >/dev/null 2>&1
33 bindkey $terminfo[kpp] up-history >/dev/null 2>&1
34 bindkey $terminfo[knp] end-of-history >/dev/null 2>&1
35 bindkey $terminfo[kcuu1] history-beginning-search-backward >/dev/null 2>&1
36 bindkey $terminfo[kcud1] history-beginning-search-forward >/dev/null 2>&1
37
38 PS1='[%n@%m %~]%(!.#.%\$) '
39
40 case "$TERM" in
41         xterm*|nxterm|gnome*|rxvt*|konsole*)
42                 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                 ;;
48 esac
49 if [ "$TERM" = 'screen' ]; then
50                 screen_title () { print -Pn "\ek%n@%m: %~\e\\" }
51                 precmd_functions=(screen_title)
52 fi
This page took 0.061456 seconds and 3 git commands to generate.