jQuery did this for JS, we're doing it for zsh. Simplest zsh configuration framework ever. Based on the "Explicit is better than implicit" paradigm (is it one?) from the Zen of Python, so (almost) nothing gets loaded when you source the file.
What's wrong with Oh My Zsh?
It's a big ass thing which loads a lot of files → pretty slow on HDDs (don't worry, I have an SSD now!). I've got tired of it and made my own framework. You're looking at it now :)
- Checks: functions
is_mac,is_linux,is_freebsd,has_brew,has_apt,has_yumfor your if statements (variables likeIS_MACare deprecated) - Some common defaults (eg. ^W removes until a
/like in vim, bash and tcsh) - Plug&play support for Ubuntu's command-not-found, hub, RubyGems on Debian/Ubuntu, rvm, rbenv, jump
- Prompt setting aliases (for better readability) and "prompts" command which just sets both left and right prompts
- Neat stuff for your prompt: virtualenv info, smart prompt character (by Steve Losh. ± when you're in a Git repo, ☿ in a Mercurial repo, $ otherwise), rvm/rbenv ruby version
- Aliases, including LOLSPEAK ones (loaded separately)
- Completion for a lot of stuff
- Correction
- Current directory in title support: add
update_terminal_cwdto your chpwd(). In OS X Lion Terminal.app, this'll be draggable!
last_modifiedpretty self-explanatoryexextract archivesmcdmkdir + cd..,....cd-ing .. and ../..beeppjpretty-print JSONcjcurl and pretty-print JSONmd5,sha1,sha256,sha512,rot13,rot47,urldecode,urlencodeof a stringpinstinstall python package from current dir and remove build, dist and egg-info folderss_httpserve current folder via https_smtplaunch an SMTP test server for development, on port 1025lstls tree-styleupfind a file in parent dirspathpretty-print $PATH (with colors! yay!)
volget/set sound volumelocatemdsearch with Spotlightqlopen something in Quick Lookooopen current dir in Findercdfcd to the current path of the frontmost Finder windowpmanopen man pages in Previewmailappcreates a message in Mail.app from the first arg as a string or stdin if there are no args (eg. you can pipe stuff into it)sparrowsame for Sparrow.appevernotesame with a note in Evernote.appquit,relaunchOS X GUI appsselectedFinder items
source $yourdotfiles/zshuery/zshuery.sh
load_defaults
load_aliases
load_lol_aliases
load_completion $yourdotfiles/zshuery/completion
load_correction
prompts '%{$fg_bold[green]%}$(COLLAPSED_DIR)%{$reset_color%}$(virtualenv_info) %{$fg[yellow]%}$(prompt_char)%{$reset_color%} ' '%{$fg[red]%}$(ruby_version)%{$reset_color%}'
if is_mac; then
export EDITOR='mvim'
else
export EDITOR='vim'
fi
chpwd() {
update_terminal_cwd
}