# Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=5000 SAVEHIST=5000 setopt appendhistory autocd beep extendedglob unsetopt notify bindkey -e # End of lines configured by zsh-newuser-install # The following lines were added by compinstall zstyle :compinstall filename '/home/paulgorman/.zshrc' autoload -Uz compinit compinit # End of lines added by compinstall export GOPATH=$HOME/repo/go # Set path export PATH=$HOME/bin:$HOME/bin/firefox:/usr/local/go/bin:$PATH # Let me page when I want to, systemd! export SYSTEMD_PAGER=cat # Bash-style comments: setopt interactivecomments # Treat "/" as a word boundry (for Ctrl-w, etc.): autoload -U select-word-style select-word-style bash # Don't remove the trailing slash from directory names: setopt no_auto_remove_slash # Don't eat the space after completion: ZLE_REMOVE_SUFFIX_CHARS="" # Don't nag me about orphaning processes by exiting a shell: setopt NO_HUP NO_CHECK_JOBS autoload -U colors && colors # Set a fancy prompt: PROMPT="%S--- %m %2~ %# %s " # Don't put duplicate lines in the history. setopt HIST_IGNORE_DUPS setopt HIST_EXPIRE_DUPS_FIRST # Don't add commands starting with a space to history: setopt HIST_IGNORE_SPACE setopt INC_APPEND_HISTORY setopt EXTENDED_HISTORY HISTORY_IGNORE="(?|??|pwd|exit|cd ..)" # Up/down arrow search autoload up-line-or-beginning-search autoload down-line-or-beginning-search zle -N up-line-or-beginning-search zle -N down-line-or-beginning-search bindkey "\e[A" up-line-or-beginning-search bindkey "\e[B" down-line-or-beginning-search # Let me run X apps with sudo, God damn it! export XAUTHORITY=$HOME/.Xauthority # Colorize man pages man() { env LESS_TERMCAP_mb=$'\E[01;31m' \ LESS_TERMCAP_md=$'\E[01;38;5;74m' \ LESS_TERMCAP_me=$'\E[0m' \ LESS_TERMCAP_se=$'\E[0m' \ LESS_TERMCAP_so=$'\E[30;47m' \ LESS_TERMCAP_ue=$'\E[0m' \ LESS_TERMCAP_us=$'\E[04;38;5;146m' \ man "$@" } # Set editor: export GIT_EDITOR=vim export EDITOR=vim # Enable fc editing with Ctrl-x-e autoload edit-command-line zle -N edit-command-line bindkey '^Xe' edit-command-line # Alias definitions: alias l="ls --color -F --group-directories-first" alias ll="ls --color -lhF" alias la="ls --color -aF" alias rm="rm -I" alias mv="mv -i" alias g="gvim --remote-silent" alias h='history -60 | sort -k2 | uniq -f1 | sort -bn' alias d='date +%Y%m%d' alias wi='timeout 2s whois' alias rdp="rdesktop -5KPz -r clipboard:CLIPBOARD -a16 -x 0x81 -g 95%" # Suffix aliases alias -s log="gview" alias -s txt="gvim" alias -s pdf="xpdf" # Use Perl-compatible regular expressions zmodload zsh/regex # Set LS_COLORS eval $(dircolors -b $HOME/.dir_colors) # Relies on cron job: # 30 * * * * curl -s http://weather.noaa.gov/pub/data/observations/metar/decoded/KVLL.TXT > ~/.weathercurl # KVLL is Troy, MI. cat ~/.weathercurl | sed -n '/Temperature/p;/Sky/p;/Humidity/p' | cowsay -n # Check mail: echo "q" | mail | sed -n "2p" | awk '{ s = ""; for (i = 2; i <= NF; i++) s = s $i " "; print s }' # Set xterm title: case $TERM in xterm*) precmd () {print -Pn "\e]0;%m %~\a"} ;; esac