public
Created

This is how I Z my shell, Z my shell, Z my shell

  • Download Gist
.zshrc
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
source ~/.path
# Skip all this for non-interactive shells
[[ -z "$PS1" ]] && return
 
source ~/.login
 
autoload -U zutil
autoload -U compinit
compinit
autoload -U promptinit
promptinit
prompt bart purple blue green cyan
 
# Renaming with globbing
autoload zmv
 
# Zsh settings for history
export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd.."
export HISTFILE=~/.zsh_history
export HISTSIZE=1000
export SAVEHIST=1000
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_REDUCE_BLANKS
setopt HIST_SAVE_NO_DUPS
 
# Background processes aren't killed on exit of shell
setopt AUTO_CONTINUE
 
setopt MENUCOMPLETE
 
setopt autocd
 
# Enable color support of ls
if [[ "$TERM" != "dumb" ]]; then
if [[ -x `which dircolors` ]]; then
eval `dircolors -b`
alias 'ls=ls --color=auto'
fi
fi
 
# Suggested tweaks from zsh-lovers
# http://grml.org/zsh/zsh-lovers.html
 
# Use completion cache
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
 
# Ignore SCM revision files
zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)(CVS|.svn|.git)'
zstyle ':completion:*:cd:*' ignored-patterns '(*/)#(CVS|.svn|.git)'
 
# Fuzzy completion
zstyle ':completion:*' completer _expand _complete _match _approximate
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
 
# Do not attempt to complete missing commands
#zstyle ':completion:*:functions' ignored-patterns '_*'
 
# Complete PIDS with menu
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:kill:*' force-list always
 
#http://ubuntuforums.org/showthread.php?t=1322512
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
#zstyle ':completion:*:*:kill:*:processes' command 'ps --forest -A -o pid,user,command'
zstyle ':completion:*:*:kill:*:processes' command 'pstree'
zstyle ':completion:*:processes-names' command 'ps axho command'
 
# Tweaks from
# http://recurser.com/articles/2007/07/25/os-x-zsh-shell-config/
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' menu select=1 _complete _ignored _approximate
 
# Do not add space after completion
#zstyle ':completion:*' add-space false
 
# Complete from ssh known_hosts
local _myhosts
_myhosts=( ${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*} )
zstyle ':completion:*' hosts $_myhosts
 
source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Don't spawn which dircolors. Use zsh command -v dircolors built-in instead. See zshbuiltins(1).

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.