]> gitweb @ CieloNegro.org - sugar.git/blob - dot-files/_zshrc
Auto commit by The Sugar System.
[sugar.git] / dot-files / _zshrc
1 #!/bin/zsh
2 bindkey -e
3
4 stty -ixon ixany
5 stty erase '^H'
6
7 zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} r:|[/]=* r:|=*'
8 zstyle ':completion:*' use-cache true
9
10 if [ -d "$HOME/.zfunc" ]; then
11     fpath=($HOME/.zfunc $fpath)
12     autoload -U ~/.zfunc/*(:t)
13     function r() {
14         local f
15         f=(~/.zfunc/*(.))
16         unfunction $f:t 2> /dev/null
17         autoload -U $f:t
18     }
19 fi
20
21 if [ -f "$HOME/.ssh/known_hosts" ]; then
22     _cache_hosts=(`perl -ne  'if (/^([a-zA-Z0-9.-]+)/) { print "$1\n";}' ~/.ssh/known_hosts`)
23 fi
24
25 setopt no_beep
26 setopt auto_cd
27 setopt auto_list
28 setopt auto_menu
29 setopt auto_name_dirs
30 setopt auto_param_keys
31 setopt auto_param_slash
32 setopt auto_remove_slash
33 setopt c_bases
34 setopt chase_links
35 setopt complete_aliases
36 setopt correct
37 setopt equals
38 setopt glob_complete
39 setopt prompt_bang
40 setopt prompt_percent
41 setopt prompt_subst
42 setopt pushd_ignore_dups
43 setopt pushd_to_home
44 setopt sh_file_expansion
45 setopt always_last_prompt
46 setopt extended_glob
47 setopt hist_ignore_all_dups
48 setopt hist_ignore_space
49 setopt inc_append_history
50 setopt share_history
51
52 PROMPT=$'%{\ek\e\\%}%B[%n@%m] %#%b '
53 RPROMPT='%U%?%u %U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
54 HISTFILE="$HOME/.zhistory"
55 HISTSIZE=6000000
56 SAVEHIST=6000000
57
58 alias -g L="| $PAGER"
59 alias -g G="| grep"
60 alias -g H="| head"
61 alias -g T="| tail"
62
63 alias ..='cd ..'
64 alias cd..='cd ..'
65 alias ls='ls -wF'
66 alias la='ls -wa'
67 alias l='ls -wl'
68 alias lls='ls -wla'
69 alias p='pushd'
70 alias o='popd'
71 alias d='dirs'
72 alias df='df -h'
73 alias ed='ed -p "ed> "'
74 alias du='du -k'
75 alias nc='nc -vv'
76 alias mwget="wget --user-agent='Mozilla/1.4b'"
77 alias pstow="pushd /usr/local/stow"
78 alias w3m="w3m -O UTF-8"
79 alias w3mb="w3m -O UTF-8 -B"
80
81 if [ $(hostname) = "aria.cielonegro.org" ]; then
82     alias safari="open -a Safari"
83     alias unstuff='open -a StuffIt\ Expander.app'
84     alias pa='open -a NiseRingo.app'
85     alias heboris='open /Applications/HeborisUEMac/exe/Heboris\ OpenGL.app'
86     alias hengband='open ~/Applications/hengband*/Hengband*'
87 fi
88
89 if [ $(uname) = "Darwin" ]; then
90     alias ldd="otool -L"
91 fi
92
93 # The following lines were added by compinstall
94
95 zstyle :compinstall filename "$HOME/.zshrc"
96
97 autoload -U compinit
98 compinit
99 # End of lines added by compinstall
100
101 if [ "x$WINDOW" = "x" ]; then
102     if which fortune 2>&1 >/dev/null; then
103         fortune
104     fi
105 fi
106
107 if [ -e ".motd" ]; then
108     cat .motd
109 fi
110
111 if which ssh-agent-manager 2>&1 >/dev/null; then
112     eval `ssh-agent-manager -s`
113 fi