Newer
Older
dotfiles / zsh / zshrc.symlink
@Marcus Bengtsson Marcus Bengtsson on 19 Aug 2015 877 bytes Swiched to zsh
# .zshrc

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

export DOTFILES=$HOME/.dotfiles
export ZSH=$DOTFILES/zsh


# Source config-files
for config ($ZSH/**/*.zsh) source $config

# Source git-complete
for config ($DOTFILES/git/**/*.sh) source $config

# Init autocomplete
autoload -U compinit
compinit

# History
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000

setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS
setopt APPEND_HISTORY

setopt COMPLETE_ALIASES

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'