3 # Load the super duper completion stuff
10 export EDITOR="emacsclient"
11 export BROWSER="swiftfox"
12 export MEDIA="gmplayer"
22 # Setting HOME and END keys
23 case $TERM in (xterm*|aterm|rxvt|screen)
24 bindkey '\e[H' beginning-of-line
25 bindkey '\e[F' end-of-line ;;
28 # Key bindings, useful.
29 if [ $TERM = linux ]; then
30 bindkey "\e[3~" delete-char
31 bindkey "\e[2~" yank #insert
32 bindkey "\e[1~" beginning-of-line
33 bindkey "\e[4~" end-of-line
34 bindkey "\e[5~" history-search-backward
35 bindkey "\e[6~" history-search-forward
37 bindkey "\e[3~" delete-char
38 bindkey "\e[2~" yank #insert
39 bindkey "\e[7~" beginning-of-line
40 bindkey "\e[8~" end-of-line
41 bindkey "\e[5~" history-search-backward
42 bindkey "\e[6~" history-search-forward
46 HISTFILE=$HOME/.zshistory
52 # I haven't actually used these yet, apart from for reference. You can use
53 # these when prompting. Capitalised stuff is bold.
55 local red="%{"$'\e[1;31m'"%}"
56 local RED="%{"$'\e[0;31m'"%}"
57 local cyan="%{"$'\e[1;36m'"%}"
58 local CYAN="%{"$'\e[0;36m'"%}"
59 local blue="%{"$'\e[1;34m'"%}"
60 local BLUE="%{"$'\e[0;34m'"%}"
61 local green="%{"$'\e[1;32m'"%}"
62 local GREEN="%{"$'\e[0;32m'"%}"
63 local magenta="%{"$'\e[1;35m'"%}"
64 local MAGENTA="%{"$'\e[0;35m'"%}"
65 local yellow="%{"$'\e[1;33m'"%}"
66 local YELLOW="%{"$'\e[0;33m'"%}"
67 local gray="%{"$'\e[1;30m'"%}"
68 local GRAY="%{"$'\e[0;37m'"%}"
69 local white="%{"$'\e[1;37m'"%}"
70 local NOCOLOR="%{"$'\e[0m'"%}"
71 local NEWLINE="%{"$'\e[80D'"%}"
75 #PROMPT=$'%{\e[0;36m%}%n@%m%{\e[0;36m%}%{\e[0;37m%}::%{\e[0;30m%} '
76 #PROMPT="${CYAN}%D{%H:%M:%S} ${GREEN}%#${GRAY}]$NOCOLOR "
77 #PROMPT="${CYAN}%D{`pwd`} ${GREEN}%#${GRAY}]$NOCOLOR "
78 #RPROMPT="${GRAY}[${red}%.${GRAY}]$NOCOLOR"
80 RPROMPT="${GRAY}[${red}%15<...<%~${GRAY}]$NOCOLOR"
83 # Set the titlebar for the window, and also the window title in screen :)
85 # I don't want to be cocky, but this is all my own stuff and I'm frikking
88 # This function sets the window tile to user@host:/workingdir before each
89 # prompt. If you're using screen, it sets the window title (works
90 # wonderfully for hardstatus lines :)
94 *xterm*|rxvt|urxvt|rxvt-unicode)
95 print -Pn "\e]2;%n@%m:%~\a"
97 screen*) print -Pn "\e\"%m:%~\e\134"
101 # This sets the window title to the last run command.
105 *xterm*|rxvt|urxvt|rxvt-unicode)
107 print -Pn "\e]2;$1\a"
112 print -Pn "\e\"$1\e\134"
118 # Some useful little functions
123 # mount $DRIVE && cd $DRIVE && echo "${DRIVE} mounted."
124 mount $DRIVE && echo "${DRIVE} mounted."
131 # umount $DRIVE && /usr/bin/eject $DRIVE && echo "${DRIVE} ejected."
148 setopt autopushd pushdminus pushdsilent pushdtohome
153 setopt interactivecomments
156 setopt Histreduceblanks
157 setopt Histignorespace
158 setopt Histignorealldups
162 setopt autopushd # automatically append dirs to the push/pop list
163 setopt pushdignoredups # and don't duplicate them
164 setopt cdablevars # avoid the need for an explicit $
165 setopt nohup # and don't kill them, either
166 #setopt listpacked # compact completion lists
167 #setopt nolisttypes # show types in completion
168 setopt dvorak # with spelling correction, assume dvorak kb
169 setopt extendedglob # weird & wacky pattern matching - yay zsh!
170 setopt completeinword # not just at the end
171 setopt alwaystoend # when complete from middle, move cursor
172 setopt correct # spelling correction
173 #setopt nopromptcr # don't add \n which overwrites cmds with no \n
174 setopt histverify # when using ! cmds, confirm first
175 setopt interactivecomments # escape commands so i can use them later
176 #setopt printexitvalue # alert me if something's failed
190 alias -s java="$EDITOR"
191 alias -s txt="$EDITOR"
192 alias -s PKGBUILD="$EDITOR"
194 alias -s html=$BROWSER
195 alias -s org=$BROWSER
196 alias -s php=$BROWSER
197 alias -s com=$BROWSER
198 alias -s net=$BROWSER
200 alias -s avi="$MEDIA -idx"
201 alias -s xvid="$MEDIA -idx"
202 alias -s wmv="$MEDIA"
203 alias -s mov="$MEDIA"
204 alias -s mp4="$MEDIA"
205 alias -s mpg="$MEDIA"
206 alias -s mp3="$MEDIA"
207 alias -s wma="$MEDIA"
208 alias -s wav="$MEDIA"
210 alias -s chm=kchmviewer
212 alias -s ttf=kfontview
214 setopt appendhistory autocd beep nomatch
216 # End of lines configured by zsh-newuser-install
217 # The following lines were added by compinstall
218 zstyle :compinstall filename '~/.zshrc'
220 #autoload -Uz compinit
222 # End of lines added by compinstall
224 #alias ls='ls -CF --color=auto'