2010-06-27 01:12:01 +10:00
|
|
|
alias reload="source ~/.zshrc"
|
2010-06-27 23:36:25 +10:00
|
|
|
|
2010-06-30 21:20:27 +10:00
|
|
|
# Option-Left + Option-Right for moving word-by-word in OS X
|
|
|
|
bindkey "\e\e[C" vi-forward-word
|
|
|
|
bindkey "\e\e[D" vi-backward-word
|
2010-06-27 23:36:25 +10:00
|
|
|
|
2010-11-22 14:53:19 +11:00
|
|
|
# # forward/back directories with Option+Up/Down
|
|
|
|
# function back-dir {
|
|
|
|
# cd -1 >/dev/null
|
|
|
|
# echo
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# function fwd-dir {
|
|
|
|
# cd +1 >/dev/null
|
|
|
|
# echo
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# zle -N back-dir back-dir
|
|
|
|
# zle -N fwd-dir fwd-dir
|
|
|
|
#
|
|
|
|
# bindkey "\e\e[A" back-dir
|
|
|
|
# bindkey "\e\e[B" fwd-dir
|
|
|
|
|
2010-06-27 23:36:25 +10:00
|
|
|
# http://www.scannedinavian.com/~shae/shae.zshrc
|
2010-06-30 14:51:24 +10:00
|
|
|
# These are options I've copied but yet to totally investigate if it's what I want
|
2010-06-27 23:36:25 +10:00
|
|
|
setopt alwaystoend # when complete from middle, move cursor
|
|
|
|
setopt completeinword # not just at the end
|
|
|
|
setopt correct # spelling correction
|
|
|
|
setopt listpacked # compact completion lists
|
|
|
|
setopt noautomenu # don't cycle completions
|
|
|
|
setopt pushdignoredups # and don't duplicate them
|
|
|
|
setopt recexact # recognise exact, ambiguous matches
|
2010-06-30 14:51:24 +10:00
|
|
|
setopt nullglob
|
|
|
|
|
|
|
|
# These are options that I definitely want
|
|
|
|
setopt sharehistory
|
2011-02-18 12:47:15 +11:00
|
|
|
setopt histverify # when using ! cmds, confirm first
|
2010-06-30 14:51:24 +10:00
|
|
|
setopt correct # spelling correction
|
|
|
|
setopt rmstarwait # if `rm *` wait 10 seconds before performing it!
|
|
|
|
setopt notify # notify of BG job completion immediately
|
|
|
|
setopt printexitvalue # alert me if something's failed
|
|
|
|
setopt autocd # change to dirs without cd
|
|
|
|
setopt autopushd # automatically append dirs to the push/pop list
|
|
|
|
setopt cdablevars # avoid the need for an explicit $
|
|
|
|
setopt nobeep # i hate beeps
|
|
|
|
setopt nohup # and don't kill BG jobs when shell exits
|
|
|
|
setopt extendedglob # awesome pattern matching (ala Dir.glob() in Ruby)
|
|
|
|
setopt promptcr # ensure a new line before prompt is drawn
|
|
|
|
setopt listtypes # show types in completion
|
2010-06-30 20:25:13 +10:00
|
|
|
setopt nocompletealiases # Allows alias 'ga' to use 'git add' completions (for example)
|
2010-11-22 14:53:19 +11:00
|
|
|
setopt interactivecomments # escape commands so i can use them later
|
2010-11-24 17:43:54 +11:00
|
|
|
setopt sh_word_split # commands will be split on space (i.e. $VISUAL = "mate -wl1" will work)
|
2010-06-27 23:36:25 +10:00
|
|
|
|
2011-02-18 12:47:15 +11:00
|
|
|
# Allow kill word and moving forward/backword by word to behave like bash (e.g. stop at / chars)
|
|
|
|
autoload -U select-word-style
|
|
|
|
select-word-style bash
|
2010-06-27 23:36:25 +10:00
|
|
|
|