]> 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 function _we_are_in_gnu_screen () {
53     [ "$WINDOW" != "" ]
54 }
55
56 PROMPT=$'%{\ek\e\\%}%B[%n@%m] %#%b '
57 RPROMPT='%U%?%u %U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
58 HISTFILE="$HOME/.zhistory"
59 HISTSIZE=6000000
60 SAVEHIST=6000000
61
62 alias -g L="| $PAGER"
63 alias -g G="| grep"
64 alias -g H="| head"
65 alias -g T="| tail"
66
67 alias ..='cd ..'
68 alias cd..='cd ..'
69 alias ls='ls -wF'
70 alias la='ls -wa'
71 alias l='ls -wl'
72 alias lls='ls -wla'
73 alias p='pushd'
74 alias o='popd'
75 alias d='dirs'
76 alias df='df -h'
77 alias ed='ed -p "ed> "'
78 alias du='du -k'
79 alias nc='nc -vv'
80 alias mwget="wget --user-agent='Mozilla/1.4b'"
81 alias pstow="pushd /usr/local/stow"
82 alias w3m="w3m -O UTF-8"
83 alias w3mb="w3m -O UTF-8 -B"
84
85 if [ $(hostname) = "aria.cielonegro.org" ]; then
86     alias safari="open -a Safari"
87     alias unstuff='open -a StuffIt\ Expander.app'
88     alias pa='open -a NiseRingo.app'
89     alias heboris='open /Applications/HeborisUEMac/exe/Heboris\ OpenGL.app'
90     alias hengband='open ~/Applications/hengband*/Hengband*'
91 fi
92
93 if [ $(uname) = "Darwin" ]; then
94     alias ldd="otool -L"
95 fi
96
97 # The following lines were added by compinstall
98
99 zstyle :compinstall filename "$HOME/.zshrc"
100
101 autoload -U compinit
102 compinit
103 # End of lines added by compinstall
104
105 if [ "x$WINDOW" = "x" ]; then
106     if which fortune 2>&1 >/dev/null; then
107         fortune
108     fi
109 fi
110
111 if [ -e ".motd" ]; then
112     cat .motd
113 fi
114
115 if which ssh-agent-manager 2>&1 >/dev/null; then
116     eval `ssh-agent-manager -s`
117 fi