]>
Commit | Line | Data |
---|---|---|
3cad6678 TP |
1 | # for interactive shell |
2 | ||
3 | alias which=whence | |
4 | alias cd='builtin cd' | |
78101b75 TP |
5 | |
6 | # mc: don't clutter history | |
3cad6678 TP |
7 | alias 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*) | |
11 | alias kill=' kill' | |
12 | alias halt=' halt' | |
13 | alias init=' init' | |
14 | alias poweroff=' poweroff' | |
15 | alias reboot=' reboot' | |
16 | alias runlevel=' runlevel' | |
17 | alias shutdown=' shutdown' | |
18 | alias telinit=' telinit' | |
19 | ||
7d939b92 | 20 | # SYSTEM WIDE ALIASES ETC. |
020d4f77 | 21 | for i in /etc/shrc.d/**/*.sh(N); do |
7d939b92 | 22 | . $i |
23 | done | |
24 | unset i | |
25 | ||
0535ffe2 | 26 | setopt hist_ignore_space hist_ignore_all_dups list_packed transient_rprompt |
adef8d5b | 27 | |
3cad6678 TP |
28 | bindkey -e >/dev/null 2>&1 |
29 | ||
a3a239c3 AM |
30 | bindkey $terminfo[khome] beginning-of-line >/dev/null 2>&1 |
31 | bindkey $terminfo[kend] end-of-line >/dev/null 2>&1 | |
32 | bindkey $terminfo[kich1] quoted-insert >/dev/null 2>&1 | |
33 | bindkey $terminfo[kdch1] delete-char >/dev/null 2>&1 | |
34 | bindkey $terminfo[kpp] up-history >/dev/null 2>&1 | |
35 | bindkey $terminfo[knp] end-of-history >/dev/null 2>&1 | |
36 | bindkey $terminfo[kcuu1] history-beginning-search-backward >/dev/null 2>&1 | |
37 | bindkey $terminfo[kcud1] history-beginning-search-forward >/dev/null 2>&1 | |
3cad6678 | 38 | |
4f928441 | 39 | PS1='[%n@%m %~]%(!.#.%\$) ' |
4f928441 | 40 | |
3cad6678 | 41 | case "$TERM" in |
5088c8e7 | 42 | xterm*|nxterm|gnome*|rxvt*|konsole*) |
97724a83 | 43 | precmd () { print -Pn "\e]0;%n@%m: %~\a" } |
3cad6678 TP |
44 | bindkey '^[[H' beginning-of-line >/dev/null 2>&1 |
45 | bindkey '^[[F' end-of-line >/dev/null 2>&1 | |
65df4e3b TP |
46 | bindkey '^[[A' history-beginning-search-backward >/dev/null 2>&1 |
47 | bindkey '^[[B' history-beginning-search-forward >/dev/null 2>&1 | |
3cad6678 TP |
48 | ;; |
49 | esac |