]>
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' | |
78101b75 TP |
16 | alias shutdown=' shutdown' |
17 | alias telinit=' telinit' | |
18 | ||
7d939b92 | 19 | # SYSTEM WIDE ALIASES ETC. |
020d4f77 | 20 | for i in /etc/shrc.d/**/*.sh(N); do |
7d939b92 | 21 | . $i |
22 | done | |
23 | unset i | |
24 | ||
ce11a4fe | 25 | setopt hist_ignore_space hist_ignore_all_dups list_packed transient_rprompt hist_verify |
adef8d5b | 26 | |
3cad6678 TP |
27 | bindkey -e >/dev/null 2>&1 |
28 | ||
a3a239c3 AM |
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 | |
3cad6678 | 37 | |
4f928441 | 38 | PS1='[%n@%m %~]%(!.#.%\$) ' |
4f928441 | 39 | |
3cad6678 | 40 | case "$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 | ;; |
48 | esac | |
949fb358 TP |
49 | if [ "$TERM" = 'screen' ]; then |
50 | screen_title () { print -Pn "\ek%n@%m: %~\e\\" } | |
51 | precmd_functions=(screen_title) | |
52 | fi |