HISTFILE=~/.zsh_history HISTSIZE=1000 SAVEHIST=1000 bindkey -e bindkey "^[[A" history-search-backward bindkey "^[[B" history-search-forward # key bindings bindkey "\e[1~" beginning-of-line # Home bindkey "\e[4~" end-of-line # End bindkey "\e[5~" beginning-of-history # PageUp bindkey "\e[6~" end-of-history # PageDown bindkey "\e[2~" quoted-insert # Ins bindkey "\e[3~" delete-char # Del bindkey "\e[5C" forward-word bindkey "\eOc" emacs-forward-word bindkey "\e[5D" backward-word bindkey "\eOd" emacs-backward-word bindkey "\e\e[C" forward-word bindkey "\e\e[D" backward-word bindkey "\e[Z" reverse-menu-complete # Shift+Tab # for rxvt bindkey "\e[7~" beginning-of-line # Home bindkey "\e[8~" end-of-line # End # for non RH/Debian xterm, can't hurt for RH/Debian xterm bindkey "\eOH" beginning-of-line bindkey "\eOF" end-of-line # for freebsd console bindkey "\e[H" beginning-of-line bindkey "\e[F" end-of-line # completion in the middle of a line bindkey '^i' expand-or-complete-prefix export EDITOR='emacsclient' alias ls='ls --color=auto' alias grep='grep --color=auto' alias mkdir='mkdir -p' alias rm='rm -I' alias reboot='sudo reboot' alias halt='sudo halt' alias pacman='sudo pacman' alias visudo='sudo EDITOR="emacs -nw" visudo' alias wiki='java -jar ~/bin/stiki.jar' alias sedit='sudo /usr/bin/emacs -nw' alias edit='/usr/bin/emacsclient -nw' alias 'rc.d'='sudo rc.d' alias dir="ls -lAhF" alias hs="runhaskell" alias xlinks="xlinks -g" alias unmount=umount zstyle :compinstall filename '/home/erkin/.zshrc' autoload -Uz compinit compinit setopt completealiases export PS1="$(print '%{\e[1;36m%}%n%{\e[0m%} %{\e[1;36m%}%1~%{\e[0m%} %{\e[1;32m%}$%{\e[0m%}') " #mine(){ # bash /home/erkin/bin/wom/wom.sh & > /dev/null # (cd ~/bin/wom/ && bash wom.sh > /dev/null ; cd - > /dev/null) & #} paket(){ #cd ~/pkg && makepkg -si ; cd - > /dev/null cd ~/tmp/pkg wget "$*" tar xvf *.tar.gz mv */* ~/pkg /bin/rm -rf * cd ~/pkg makepkg -si cd ~ } man() { env \ LESS_TERMCAP_mb=$(printf "\e[1;37m") \ LESS_TERMCAP_md=$(printf "\e[1;37m") \ LESS_TERMCAP_me=$(printf "\e[0m") \ LESS_TERMCAP_se=$(printf "\e[0m") \ LESS_TERMCAP_so=$(printf "\e[1;47;30m") \ LESS_TERMCAP_ue=$(printf "\e[0m") \ LESS_TERMCAP_us=$(printf "\e[0;36m") \ man "$@" } update(){ sudo pacman -Syu --noconfirm } run(){ ./"$*" } ed(){ touch ed.hup;while :;do read x;echo ?;done } #clean(){ # rm *~ \#*# *.old .*~ .*.old *.bak .*.bak #} hreddit(){ cd ~/bin/hreddit/ ; ./Main ; cd - > /dev/null } #desura(){ # cd ~/var/games/desura/bin/ ; run desura & #} logse(){most /home/erkin/.xchat2/xchatlogs/esperchat-\#$*.log} logsf(){most /home/erkin/.xchat2/xchatlogs/FreeNode-\#$*.log} logsearch(){grep -ri $* /home/erkin/.xchat2/xchatlogs/} womlogs(){grep -i $* /home/erkin/bin/wom/*.log} # gismu(){grep -i " $* " /home/erkin/lib/gismu.txt} # cmavo(){grep -i " $* " /home/erkin/lib/cmavo.txt} # lujvo(){grep -i " $* " /home/erkin/lib/lujvo.txt} ponytime(){bash /home/erkin/pony/ponytime/ponytime} # Easier archive extraction extr(){ if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.tar.xz) tar xvJf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xvf $1 ;; *.tbz2) tar xvjf $1 ;; *.tgz) tar xvzf $1 ;; *.txz) tar xvJf $1 ;; *.rar) unrar $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z e $1 ;; *) echo "'$1' cannot be extracted via extr()" ;; esac else echo "'$1' is not a valid file" fi } export PAGER='less -X -M' export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" export LESS=' -R '