├── plugins ├── autopep8 │ └── autopep8.plugin.zsh ├── go │ └── go.plugin.zsh ├── npm │ └── npm.plugin.zsh ├── tmux │ ├── tmux.only.conf │ └── tmux.extra.conf ├── osx │ └── _man-preview ├── per-directory-history │ └── per-directory-history.plugin.zsh ├── copydir │ └── copydir.plugin.zsh ├── themes │ ├── _theme │ └── themes.plugin.zsh ├── z │ ├── Makefile │ └── z.plugin.zsh ├── catimg │ ├── colors.png │ └── catimg.plugin.zsh ├── mosh │ └── mosh.plugin.zsh ├── cloudapp │ ├── cloudapp.plugin.zsh │ └── cloudapp.rb ├── thor │ └── _thor ├── laravel │ ├── laravel.plugin.zsh │ └── _artisan ├── brew │ └── brew.plugin.zsh ├── powder │ └── _powder ├── nvm │ ├── nvm.plugin.zsh │ └── _nvm ├── nyan │ └── nyan.plugin.zsh ├── wakeonlan │ ├── _wake │ ├── wakeonlan.plugin.zsh │ └── README ├── history │ └── history.plugin.zsh ├── copyfile │ └── copyfile.plugin.zsh ├── colemak │ ├── colemak-less │ └── colemak.plugin.zsh ├── encode64 │ └── encode64.plugin.zsh ├── kate │ └── kate.plugin.zsh ├── fabric │ └── fabric.plugin.zsh ├── fbterm │ └── fbterm.plugin.zsh ├── jruby │ └── jruby.plugin.zsh ├── pylint │ └── pylint.plugin.zsh ├── supervisor │ └── supervisor.plugin.zsh ├── gem │ └── gem.plugin.zsh ├── git │ └── README.md ├── wd │ ├── wd.plugin.zsh │ ├── LICENSE │ ├── README.md │ └── _wd.sh ├── adb │ ├── README.md │ └── _adb ├── ruby │ └── ruby.plugin.zsh ├── glassfish │ └── glassfish.plugin.zsh ├── repo │ ├── README.md │ └── repo.plugin.zsh ├── extract │ └── _extract ├── rsync │ └── rsync.plugin.zsh ├── macports │ └── macports.plugin.zsh ├── virtualenv │ └── virtualenv.plugin.zsh ├── history-substring-search │ ├── README │ └── history-substring-search.plugin.zsh ├── nanoc │ ├── nanoc.plugin.zsh │ └── _nanoc ├── gitfast │ └── gitfast.plugin.zsh ├── iwhois │ └── iwhois.plugin.zsh ├── marked2 │ ├── marked2.plugin.zsh │ └── README.md ├── rails3 │ └── rails3.plugin.zsh ├── rails4 │ └── rails4.plugin.zsh ├── zsh_reload │ └── zsh_reload.plugin.zsh ├── gitignore │ └── gitignore.plugin.zsh ├── atom │ └── atom.plugin.zsh ├── capistrano │ └── _capistrano ├── fasd │ └── fasd.plugin.zsh ├── yii │ └── yii.plugin.zsh ├── symfony │ └── symfony.plugin.zsh ├── colored-man │ └── colored-man.plugin.zsh ├── node │ └── node.plugin.zsh ├── textastic │ ├── README.md │ └── textastic.plugin.zsh ├── mysql-macports │ └── mysql-macports.plugin.zsh ├── torrent │ └── torrent.plugin.zsh ├── bwana │ └── bwana.plugin.zsh ├── apache2-macports │ └── apache2-macports.plugin.zsh ├── ant │ └── ant.plugin.zsh ├── dircycle │ └── dircycle.plugin.zsh ├── emacs │ └── emacsclient.sh ├── phing │ └── phing.plugin.zsh ├── postgres │ └── postgres.plugin.zsh ├── rake │ └── rake.plugin.zsh ├── profiles │ └── profiles.plugin.zsh ├── python │ └── python.plugin.zsh ├── systemd │ └── systemd.plugin.zsh ├── bbedit │ ├── bbedit.plugin.zsh │ └── README.md ├── command-not-found │ └── command-not-found.plugin.zsh ├── knife_ssh │ └── knife_ssh.plugin.zsh ├── laravel4 │ └── laravel4.plugin.zsh ├── jake-node │ └── jake-node.plugin.zsh ├── cp │ └── cp.plugin.zsh ├── lighthouse │ └── lighthouse.plugin.zsh ├── docker │ └── README.md ├── scd │ └── scd.plugin.zsh ├── xcode │ └── xcode.plugin.zsh ├── git-remote-branch │ └── git-remote-branch.plugin.zsh ├── autoenv │ └── autoenv.plugin.zsh ├── sudo │ └── sudo.plugin.zsh ├── dirpersist │ └── dirpersist.plugin.zsh ├── sfffe │ └── sfffe.plugin.zsh ├── compleat │ └── compleat.plugin.zsh ├── aws │ └── aws.plugin.zsh ├── vundle │ └── vundle.plugin.zsh ├── symfony2 │ └── symfony2.plugin.zsh ├── textmate │ └── textmate.plugin.zsh ├── sbt │ └── sbt.plugin.zsh ├── cake │ └── cake.plugin.zsh ├── colorize │ └── colorize.plugin.zsh ├── rake-fast │ ├── README.md │ └── rake-fast.plugin.zsh ├── yum │ └── yum.plugin.zsh ├── last-working-dir │ └── last-working-dir.plugin.zsh ├── taskwarrior │ └── taskwarrior.plugin.zsh ├── pyenv │ └── pyenv.plugin.zsh ├── autojump │ └── autojump.plugin.zsh ├── rand-quote │ └── rand-quote.plugin.zsh ├── lol │ └── lol.plugin.zsh ├── jsontools │ └── README.md ├── pj │ └── pj.plugin.zsh ├── terminitor │ └── _terminitor ├── zeus │ ├── _zeus │ └── README.md ├── vi-mode │ └── vi-mode.plugin.zsh ├── gas │ └── _gas ├── tmuxinator │ └── _tmuxinator ├── gpg-agent │ └── gpg-agent.plugin.zsh ├── emoji-clock │ └── emoji-clock.plugin.zsh ├── github │ └── _github ├── web-search │ └── web-search.plugin.zsh ├── terminalapp │ └── terminalapp.plugin.zsh ├── sublime │ └── sublime.plugin.zsh ├── bundler │ └── README.md ├── rbfu │ └── rbfu.plugin.zsh ├── jump │ └── jump.plugin.zsh ├── meteor │ └── _meteor ├── composer │ └── composer.plugin.zsh ├── grails │ └── grails.plugin.zsh └── git-prompt │ └── git-prompt.plugin.zsh ├── themes ├── evan.zsh-theme ├── imajes.zsh-theme ├── example.zsh-theme ├── jispwoso.zsh-theme ├── sammy.zsh-theme ├── lambda.zsh-theme ├── simple.zsh-theme ├── norm.zsh-theme ├── cypher.zsh-theme ├── mgutz.zsh-theme ├── geoffgarside.zsh-theme ├── nanotech.zsh-theme ├── rgm.zsh-theme ├── gentoo.zsh-theme ├── kardan.zsh-theme ├── risto.zsh-theme ├── daveverwer.zsh-theme ├── maran.zsh-theme ├── garyblessington.zsh-theme ├── skaro.zsh-theme ├── wuffers.zsh-theme ├── 3den.zsh-theme ├── aussiegeek.zsh-theme ├── fwalch.zsh-theme ├── gianu.zsh-theme ├── edvardm.zsh-theme ├── gallifrey.zsh-theme ├── jbergantine.zsh-theme ├── wezm.zsh-theme ├── miloshadzic.zsh-theme ├── terminalparty.zsh-theme ├── candy.zsh-theme ├── crcandy.zsh-theme ├── mrtazz.zsh-theme ├── afowler.zsh-theme ├── kafeitu.zsh-theme ├── robbyrussell.zsh-theme ├── wezm+.zsh-theme ├── cloud.zsh-theme ├── kennethreitz.zsh-theme ├── frontcube.zsh-theme ├── duellj.zsh-theme ├── frisk.zsh-theme ├── kiwi.zsh-theme ├── jtriley.zsh-theme ├── arrow.zsh-theme ├── fox.zsh-theme ├── xiong-chiamiov.zsh-theme ├── obraun.zsh-theme ├── tjkirch_mod.zsh-theme ├── dst.zsh-theme ├── rkj.zsh-theme ├── tjkirch.zsh-theme ├── xiong-chiamiov-plus.zsh-theme ├── dpoggi.zsh-theme ├── theunraveler.zsh-theme ├── amuse.zsh-theme ├── funky.zsh-theme ├── jreese.zsh-theme ├── sporty_256.zsh-theme ├── darkblood.zsh-theme ├── gozilla.zsh-theme ├── itchy.zsh-theme ├── murilasso.zsh-theme ├── minimal.zsh-theme ├── macovsky.zsh-theme ├── macovsky-ruby.zsh-theme ├── flazz.zsh-theme ├── jaischeema.zsh-theme ├── dstufft.zsh-theme ├── re5et.zsh-theme ├── awesomepanda.zsh-theme ├── kolo.zsh-theme ├── zhann.zsh-theme ├── bira.zsh-theme ├── rixius.zsh-theme ├── sunaku.zsh-theme ├── takashiyoshida.zsh-theme ├── apple.zsh-theme ├── mikeh.zsh-theme ├── eastwood.zsh-theme ├── lukerandall.zsh-theme ├── superjarin.zsh-theme ├── nebirhos.zsh-theme ├── blinks.zsh-theme ├── humza.zsh-theme ├── intheloop.zsh-theme ├── af-magic.zsh-theme ├── alanpeabody.zsh-theme ├── fishy.zsh-theme ├── muse.zsh-theme ├── jnrowe.zsh-theme ├── tonotdo.zsh-theme ├── fletcherm.zsh-theme ├── gallois.zsh-theme ├── peepcode.zsh-theme ├── junkfood.zsh-theme ├── pygmalion.zsh-theme ├── pmcgee.zsh-theme ├── suvash.zsh-theme ├── clean.zsh-theme ├── josh.zsh-theme ├── essembeh.zsh-theme ├── candy-kingdom.zsh-theme ├── philips.zsh-theme ├── fino-time.zsh-theme ├── sonicradish.zsh-theme ├── juanghurtado.zsh-theme ├── fino.zsh-theme ├── michelebologna.zsh-theme ├── kphoen.zsh-theme ├── mh.zsh-theme ├── sorin.zsh-theme └── ys.zsh-theme ├── .gitignore ├── custom ├── example.zsh └── plugins │ └── example │ └── example.plugin.zsh ├── cache └── .easter-egg ├── log └── .easter-egg ├── lib ├── misc.zsh ├── nvm.zsh ├── correction.zsh ├── history.zsh ├── bzr.zsh ├── grep.zsh ├── aliases.zsh ├── directories.zsh ├── spectrum.zsh ├── prompt_info_functions.zsh ├── termsupport.zsh └── theme-and-appearance.zsh ├── tools ├── uninstall.sh ├── upgrade.sh └── check_for_upgrade.sh └── MIT-LICENSE.txt /plugins/autopep8/autopep8.plugin.zsh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/go/go.plugin.zsh: -------------------------------------------------------------------------------- 1 | ../golang/golang.plugin.zsh -------------------------------------------------------------------------------- /plugins/npm/npm.plugin.zsh: -------------------------------------------------------------------------------- 1 | eval "$(npm completion 2>/dev/null)" 2 | -------------------------------------------------------------------------------- /plugins/tmux/tmux.only.conf: -------------------------------------------------------------------------------- 1 | set -g default-terminal $ZSH_TMUX_TERM 2 | -------------------------------------------------------------------------------- /plugins/osx/_man-preview: -------------------------------------------------------------------------------- 1 | #compdef man-preview 2 | #autoload 3 | 4 | _man 5 | 6 | -------------------------------------------------------------------------------- /plugins/per-directory-history/per-directory-history.plugin.zsh: -------------------------------------------------------------------------------- 1 | per-directory-history.zsh -------------------------------------------------------------------------------- /plugins/copydir/copydir.plugin.zsh: -------------------------------------------------------------------------------- 1 | function copydir { 2 | pwd | tr -d "\r\n" | pbcopy 3 | } -------------------------------------------------------------------------------- /plugins/themes/_theme: -------------------------------------------------------------------------------- 1 | #compdef theme 2 | 3 | _arguments "1: :($(lstheme | tr "\n" " "))" 4 | -------------------------------------------------------------------------------- /plugins/z/Makefile: -------------------------------------------------------------------------------- 1 | readme: 2 | @groff -man -Tascii z.1 | col -bx 3 | 4 | .PHONY: readme 5 | -------------------------------------------------------------------------------- /plugins/catimg/colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/oh-my-zsh/master/plugins/catimg/colors.png -------------------------------------------------------------------------------- /plugins/mosh/mosh.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Allow SSH tab completion for mosh hostnames 2 | compdef mosh=ssh 3 | -------------------------------------------------------------------------------- /plugins/tmux/tmux.extra.conf: -------------------------------------------------------------------------------- 1 | set -g default-terminal $ZSH_TMUX_TERM 2 | source $HOME/.tmux.conf 3 | -------------------------------------------------------------------------------- /plugins/cloudapp/cloudapp.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | alias cloudapp=$ZSH/plugins/cloudapp/cloudapp.rb 3 | -------------------------------------------------------------------------------- /plugins/thor/_thor: -------------------------------------------------------------------------------- 1 | #compdef thor 2 | #autoload 3 | 4 | compadd `thor list | grep thor | cut -d " " -f 2` 5 | -------------------------------------------------------------------------------- /plugins/laravel/laravel.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!zsh 2 | alias artisan='php artisan' 3 | alias bob='php artisan bob::build' 4 | -------------------------------------------------------------------------------- /themes/evan.zsh-theme: -------------------------------------------------------------------------------- 1 | # Evan describes this sexy prompt as: "a skinny, topless prompt" 2 | PROMPT='%m :: %2~ %B»%b ' -------------------------------------------------------------------------------- /plugins/brew/brew.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias brews='brew list -1' 2 | alias bubu="brew update && brew upgrade && brew cleanup" 3 | -------------------------------------------------------------------------------- /plugins/powder/_powder: -------------------------------------------------------------------------------- 1 | #compdef powder 2 | #autoload 3 | 4 | compadd `powder help | grep powder | cut -d " " -f 4` 5 | -------------------------------------------------------------------------------- /plugins/nvm/nvm.plugin.zsh: -------------------------------------------------------------------------------- 1 | # The addition 'nvm install' attempts in ~/.profile 2 | 3 | [[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh 4 | -------------------------------------------------------------------------------- /plugins/nyan/nyan.plugin.zsh: -------------------------------------------------------------------------------- 1 | if [[ -x `which nc` ]]; then 2 | alias nyan='nc -v nyancat.dakko.us 23' # nyan cat 3 | fi 4 | 5 | 6 | -------------------------------------------------------------------------------- /plugins/wakeonlan/_wake: -------------------------------------------------------------------------------- 1 | #compdef wake 2 | #autoload 3 | 4 | _arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0 5 | -------------------------------------------------------------------------------- /plugins/history/history.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias h='history' 2 | 3 | function hs 4 | { 5 | history | grep $* 6 | } 7 | 8 | alias hsi='hs -i' 9 | -------------------------------------------------------------------------------- /themes/imajes.zsh-theme: -------------------------------------------------------------------------------- 1 | # Found on the ZshWiki 2 | # http://zshwiki.org/home/config/prompt 3 | # 4 | 5 | PROMPT="%{$fg[red]%}%%%{$reset_color%} " -------------------------------------------------------------------------------- /plugins/copyfile/copyfile.plugin.zsh: -------------------------------------------------------------------------------- 1 | function copyfile { 2 | [[ "$#" != 1 ]] && return 1 3 | local file_to_copy=$1 4 | cat $file_to_copy | pbcopy 5 | } 6 | -------------------------------------------------------------------------------- /plugins/colemak/colemak-less: -------------------------------------------------------------------------------- 1 | n forw-line 2 | e back-line 3 | k repeat-search 4 | \ek repeat-search-all 5 | K reverse-search 6 | \eK reverse-search-all 7 | -------------------------------------------------------------------------------- /plugins/encode64/encode64.plugin.zsh: -------------------------------------------------------------------------------- 1 | encode64(){ echo -n $1 | base64 } 2 | decode64(){ echo -n $1 | base64 --decode } 3 | alias e64=encode64 4 | alias d64=decode64 5 | -------------------------------------------------------------------------------- /plugins/kate/kate.plugin.zsh: -------------------------------------------------------------------------------- 1 | 2 | # Kate 3 | # Start kate always silent 4 | alias kate='kate >/dev/null 2>&1' 5 | 6 | function kt () { 7 | cd $1 8 | kate $1 9 | } -------------------------------------------------------------------------------- /plugins/fabric/fabric.plugin.zsh: -------------------------------------------------------------------------------- 1 | # DECLARION: This plugin was created by vhbit. What I did is just making a portal from https://github.com/vhbit/fabric-zsh-autocomplete. 2 | -------------------------------------------------------------------------------- /plugins/fbterm/fbterm.plugin.zsh: -------------------------------------------------------------------------------- 1 | # start fbterm automatically in /dev/tty* 2 | 3 | if [[ $(tty|grep -o '/dev/tty') = /dev/tty ]] ; then 4 | fbterm 5 | exit 6 | fi 7 | -------------------------------------------------------------------------------- /plugins/jruby/jruby.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Aliases 2 | alias jrspec='jruby --debug -S rspec --debug' 3 | alias jprofile='jruby --profile.api -S rspec' 4 | alias jexec='jruby -S' 5 | -------------------------------------------------------------------------------- /plugins/pylint/pylint.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Aliases 2 | alias pylint-quick='pylint --reports=n --include-ids=y' 3 | compdef _pylint-quick pylint-quick='pylint --reports=n --include-ids=y' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | locals.zsh 2 | log/.zsh_history 3 | projects.zsh 4 | custom 5 | !custom/plugins/example 6 | !custom/example.zsh 7 | *.swp 8 | !custom/example.zshcache 9 | cache/ 10 | -------------------------------------------------------------------------------- /custom/example.zsh: -------------------------------------------------------------------------------- 1 | # Add yourself some shortcuts to projects you often work on 2 | # Example: 3 | # 4 | # brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr 5 | # -------------------------------------------------------------------------------- /plugins/supervisor/supervisor.plugin.zsh: -------------------------------------------------------------------------------- 1 | # DECLARION: This plugin was created by hhatto. What I did is just making a portal from https://bitbucket.org/hhatto/zshcompfunc4supervisor. 2 | -------------------------------------------------------------------------------- /plugins/gem/gem.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias gemb="gem build *.gemspec" 2 | alias gemp="gem push *.gem" 3 | 4 | # gemy GEM 0.0.0 = gem yank GEM -v 0.0.0 5 | function gemy { 6 | gem yank $1 -v $2 7 | } -------------------------------------------------------------------------------- /plugins/git/README.md: -------------------------------------------------------------------------------- 1 | ## git 2 | **Maintainer:** [Stibbons](https://github.com/Stibbons) 3 | 4 | This plugin adds several git aliases and increase the completion function provided by zsh 5 | -------------------------------------------------------------------------------- /cache/.easter-egg: -------------------------------------------------------------------------------- 1 | This file is only here so that Git will keep a cache directory as .gitignore is ignoring all the files within it. 2 | 3 | Feel free to add love notes for people here. 4 | 5 | -------------------------------------------------------------------------------- /log/.easter-egg: -------------------------------------------------------------------------------- 1 | This file is only here so that Git will keep a log directory as .gitignore is ignoring all the log files within it. 2 | 3 | feel free to add love notes for people here. 4 | 5 | -------------------------------------------------------------------------------- /custom/plugins/example/example.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Add your own custom plugins in the custom/plugins directory. Plugins placed 2 | # here will override ones with the same name in the main plugins directory. 3 | -------------------------------------------------------------------------------- /themes/example.zsh-theme: -------------------------------------------------------------------------------- 1 | # Found on the ZshWiki 2 | # http://zshwiki.org/home/config/prompt 3 | # 4 | 5 | PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% " -------------------------------------------------------------------------------- /themes/jispwoso.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/%{$reset_color%} 2 | %{$fg_bold[red]%}➜ %{$reset_color%} ' 3 | 4 | PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}" 5 | -------------------------------------------------------------------------------- /plugins/wd/wd.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # WARP DIRECTORY 4 | # ============== 5 | # oh-my-zsh plugin 6 | # 7 | # @github.com/mfaerevaag/wd 8 | 9 | wd() { 10 | . $ZSH/plugins/wd/wd.sh 11 | } 12 | -------------------------------------------------------------------------------- /plugins/z/z.plugin.zsh: -------------------------------------------------------------------------------- 1 | _load_z() { 2 | source $1/z.sh 3 | } 4 | 5 | [[ -f $ZSH_CUSTOM/plugins/z/z.plugin.zsh ]] && _load_z $ZSH_CUSTOM/plugins/z 6 | [[ -f $ZSH/plugins/z/z.plugin.zsh ]] && _load_z $ZSH/plugins/z 7 | -------------------------------------------------------------------------------- /themes/sammy.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg[white]%}%c$(git_prompt_info)$ % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="*)" 6 | ZSH_THEME_GIT_PROMPT_CLEAN=")" 7 | -------------------------------------------------------------------------------- /plugins/adb/README.md: -------------------------------------------------------------------------------- 1 | # adb autocomplete plugin 2 | 3 | * Adds autocomplete options for all adb commands. 4 | 5 | 6 | ## Requirements 7 | 8 | In order to make this work, you will need to have the Android adb tools set up in your path. 9 | -------------------------------------------------------------------------------- /plugins/ruby/ruby.plugin.zsh: -------------------------------------------------------------------------------- 1 | # TODO: Make this compatible with rvm. 2 | # Run sudo gem on the system ruby, not the active ruby. 3 | alias sgem='sudo gem' 4 | 5 | # Find ruby file 6 | alias rfind='find . -name "*.rb" | xargs grep -n' 7 | -------------------------------------------------------------------------------- /plugins/glassfish/glassfish.plugin.zsh: -------------------------------------------------------------------------------- 1 | # if there is a user named 'glassfish' on the system, we'll assume 2 | # that is the user asadmin should be run as 3 | # grep -e '^glassfish' /etc/passwd > /dev/null && alias asadmin='sudo -u glassfish asadmin' -------------------------------------------------------------------------------- /themes/lambda.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S 2 | 3 | PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 7 | -------------------------------------------------------------------------------- /plugins/repo/README.md: -------------------------------------------------------------------------------- 1 | ## repo 2 | **Maintainer:** [Stibbons](https://github.com/Stibbons) 3 | 4 | This plugin mainly add support automatic completion for the repo command line tool: 5 | http://code.google.com/p/git-repo/ 6 | 7 | * `r` aliases `repo` 8 | -------------------------------------------------------------------------------- /themes/simple.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg[green]%}%~%{$fg_bold[blue]%}$(git_prompt_info)%{$reset_color%} ' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" 5 | ZSH_THEME_GIT_PROMPT_DIRTY=" ✗" 6 | ZSH_THEME_GIT_PROMPT_CLEAN=" ✔" 7 | -------------------------------------------------------------------------------- /themes/norm.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)%{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" 5 | -------------------------------------------------------------------------------- /plugins/extract/_extract: -------------------------------------------------------------------------------- 1 | #compdef extract 2 | #autoload 3 | 4 | _arguments \ 5 | '(-r --remove)'{-r,--remove}'[Remove archive.]' \ 6 | "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugins/rsync/rsync.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias rsync-copy="rsync -avz --progress -h" 2 | alias rsync-move="rsync -avz --progress -h --remove-source-files" 3 | alias rsync-update="rsync -avzu --progress -h" 4 | alias rsync-synchronize="rsync -avzu --delete --progress -h" 5 | -------------------------------------------------------------------------------- /plugins/macports/macports.plugin.zsh: -------------------------------------------------------------------------------- 1 | #Aliases 2 | alias pc="sudo port clean --all installed" 3 | alias pi="sudo port install $1" 4 | alias psu="sudo port selfupdate" 5 | alias puni="sudo port uninstall inactive" 6 | alias puo="sudo port upgrade outdated" 7 | alias pup="psu && puo" 8 | 9 | -------------------------------------------------------------------------------- /themes/cypher.zsh-theme: -------------------------------------------------------------------------------- 1 | # Based on evan's prompt 2 | # Shows the exit status of the last command if non-zero 3 | # Uses "#" instead of "»" when running with elevated privileges 4 | PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} " 5 | -------------------------------------------------------------------------------- /plugins/virtualenv/virtualenv.plugin.zsh: -------------------------------------------------------------------------------- 1 | function virtualenv_prompt_info(){ 2 | if [[ -n $VIRTUAL_ENV ]]; then 3 | printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t} 4 | fi 5 | } 6 | 7 | # disables prompt mangling in virtual_env/bin/activate 8 | export VIRTUAL_ENV_DISABLE_PROMPT=1 9 | -------------------------------------------------------------------------------- /themes/mgutz.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[magenta]%}%1~$(git_prompt_info) %{$fg_bold[magenta]%}%# %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}[" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="*]" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="]" 7 | -------------------------------------------------------------------------------- /plugins/history-substring-search/README: -------------------------------------------------------------------------------- 1 | To activate this script, load it into an interactive ZSH session: 2 | 3 | % source history-substring-search.zsh 4 | 5 | See the "history-substring-search.zsh" file for more information: 6 | 7 | % sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more 8 | -------------------------------------------------------------------------------- /plugins/nanoc/nanoc.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias n='nanoc' 2 | alias na='nanoc autocompile' 3 | alias nco='nanoc compile' 4 | alias nci='nanoc create_item' 5 | alias ncl='nanoc create_layout' 6 | alias ncs='nanoc create_site' 7 | alias nd='nanoc deploy' 8 | alias nv='nanoc view' 9 | alias nw='nanoc watch' 10 | -------------------------------------------------------------------------------- /themes/geoffgarside.zsh-theme: -------------------------------------------------------------------------------- 1 | # PROMPT="[%*] %n:%c $(git_prompt_info)%(!.#.$) " 2 | PROMPT='[%*] %{$fg[cyan]%}%n%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}git:(" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" 6 | -------------------------------------------------------------------------------- /plugins/gitfast/gitfast.plugin.zsh: -------------------------------------------------------------------------------- 1 | dir=$(dirname $0) 2 | source $dir/../git/git.plugin.zsh 3 | source $dir/git-prompt.sh 4 | 5 | function git_prompt_info() { 6 | dirty="$(parse_git_dirty)" 7 | __git_ps1 "${ZSH_THEME_GIT_PROMPT_PREFIX//\%/%%}%s${dirty//\%/%%}${ZSH_THEME_GIT_PROMPT_SUFFIX//\%/%%}" 8 | } 9 | -------------------------------------------------------------------------------- /themes/nanotech.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%F{green}%2c%F{blue} [%f ' 2 | RPROMPT='$(git_prompt_info) %F{blue}] %F{green}%D{%L:%M} %F{yellow}%D{%p}%f' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%f" 6 | ZSH_THEME_GIT_PROMPT_DIRTY=" %F{red}*%f" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="" 8 | -------------------------------------------------------------------------------- /plugins/iwhois/iwhois.plugin.zsh: -------------------------------------------------------------------------------- 1 | # provide a whois command with a more accurate and up to date list of whois 2 | # servers using CNAMES via whois.geek.nz 3 | 4 | function iwhois() { 5 | resolver="whois.geek.nz" 6 | tld=`echo ${@: -1} | awk -F "." '{print $NF}'` 7 | whois -h ${tld}.${resolver} "$@" ; 8 | } 9 | -------------------------------------------------------------------------------- /themes/rgm.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=' 2 | %n@%m %{$fg[cyan]%}%~ 3 | %? $(git_prompt_info)%{$fg_bold[blue]%}%% %{$reset_color%}' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 7 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}" 8 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}" 9 | -------------------------------------------------------------------------------- /lib/misc.zsh: -------------------------------------------------------------------------------- 1 | ## smart urls 2 | autoload -U url-quote-magic 3 | zle -N self-insert url-quote-magic 4 | 5 | ## file rename magick 6 | bindkey "^[m" copy-prev-shell-word 7 | 8 | ## jobs 9 | setopt long_list_jobs 10 | 11 | ## pager 12 | export PAGER="less" 13 | export LESS="-R" 14 | 15 | export LC_CTYPE=$LANG 16 | -------------------------------------------------------------------------------- /plugins/marked2/marked2.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # If marked is called without an argument, open Marked 3 | # If marked is passed a file, open it in Marked 4 | # 5 | function marked() { 6 | if [ "$1" ] 7 | then 8 | open -a "marked 2.app" "$1" 9 | else 10 | open -a "marked 2.app" 11 | fi 12 | } 13 | -------------------------------------------------------------------------------- /themes/gentoo.zsh-theme: -------------------------------------------------------------------------------- 1 | function prompt_char { 2 | if [ $UID -eq 0 ]; then echo "#"; else echo $; fi 3 | } 4 | 5 | PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} ' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX=") " 9 | -------------------------------------------------------------------------------- /plugins/rails3/rails3.plugin.zsh: -------------------------------------------------------------------------------- 1 | echo "It looks like you have been using the 'rails3' plugin," 2 | echo "which has been deprecated in favor of a newly consolidated 'rails' plugin." 3 | echo "You will want to modify your ~/.zshrc configuration to begin using it." 4 | echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240" 5 | -------------------------------------------------------------------------------- /plugins/rails4/rails4.plugin.zsh: -------------------------------------------------------------------------------- 1 | echo "It looks like you have been using the 'rails4' plugin," 2 | echo "which has been deprecated in favor of a newly consolidated 'rails' plugin." 3 | echo "You will want to modify your ~/.zshrc configuration to begin using it." 4 | echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240" 5 | -------------------------------------------------------------------------------- /plugins/marked2/README.md: -------------------------------------------------------------------------------- 1 | ## marked2 2 | 3 | Plugin for Marked 2, a previewer for Markdown files on Mac OS X 4 | 5 | ### Requirements 6 | 7 | * [Marked 2](http://marked2app.com) 8 | 9 | ### Usage 10 | 11 | * If `marked` is called without an argument, open Marked 12 | 13 | * If `marked` is passed a file, open it in Marked 14 | -------------------------------------------------------------------------------- /themes/kardan.zsh-theme: -------------------------------------------------------------------------------- 1 | # Simple theme based on my old zsh settings. 2 | 3 | function get_host { 4 | echo '@'`hostname`'' 5 | } 6 | 7 | PROMPT='> ' 8 | RPROMPT='%~$(git_prompt_info)$(get_host)' 9 | 10 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}" 11 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 12 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" -------------------------------------------------------------------------------- /themes/risto.zsh-theme: -------------------------------------------------------------------------------- 1 | # -*- sh -*- vim:set ft=sh ai et sw=4 sts=4: 2 | # It might be bash like, but I can't have my co-workers knowing I use zsh 3 | PROMPT='%{$fg[green]%}%n@%m:%{$fg_bold[blue]%}%2~ $(git_prompt_info)%{$reset_color%}%(!.#.$) ' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$reset_color%}" 7 | -------------------------------------------------------------------------------- /plugins/zsh_reload/zsh_reload.plugin.zsh: -------------------------------------------------------------------------------- 1 | # reload zshrc 2 | function src() 3 | { 4 | local cache="$ZSH/cache" 5 | autoload -U compinit zrecompile 6 | compinit -d "$cache/zcomp-$HOST" 7 | 8 | for f in ~/.zshrc "$cache/zcomp-$HOST"; do 9 | zrecompile -p $f && command rm -f $f.zwc.old 10 | done 11 | 12 | source ~/.zshrc 13 | } 14 | -------------------------------------------------------------------------------- /lib/nvm.zsh: -------------------------------------------------------------------------------- 1 | # get the node.js version 2 | function nvm_prompt_info() { 3 | [ -f $HOME/.nvm/nvm.sh ] || return 4 | local nvm_prompt 5 | nvm_prompt=$(node -v 2>/dev/null) 6 | [[ "${nvm_prompt}x" == "x" ]] && return 7 | nvm_prompt=${nvm_prompt:1} 8 | echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt}${ZSH_THEME_NVM_PROMPT_SUFFIX}" 9 | } 10 | -------------------------------------------------------------------------------- /plugins/gitignore/gitignore.plugin.zsh: -------------------------------------------------------------------------------- 1 | function gi() { curl http://www.gitignore.io/api/$@ ;} 2 | 3 | _gitignireio_get_command_list() { 4 | curl -s http://www.gitignore.io/api/list | tr "," "\n" 5 | } 6 | 7 | _gitignireio () { 8 | compset -P '*,' 9 | compadd -S '' `_gitignireio_get_command_list` 10 | } 11 | 12 | compdef _gitignireio gi 13 | -------------------------------------------------------------------------------- /themes/daveverwer.zsh-theme: -------------------------------------------------------------------------------- 1 | # Copied and modified from the oh-my-zsh theme from geoffgarside 2 | # Red server name, green cwd, blue git status 3 | 4 | PROMPT='%{$fg[red]%}%m%{$reset_color%}:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) ' 5 | 6 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}(" 7 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" 8 | -------------------------------------------------------------------------------- /themes/maran.zsh-theme: -------------------------------------------------------------------------------- 1 | # Theme with full path names and hostname 2 | # Handy if you work on different servers all the time; 3 | PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) ' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:(" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" 7 | -------------------------------------------------------------------------------- /plugins/atom/atom.plugin.zsh: -------------------------------------------------------------------------------- 1 | local _atom_paths > /dev/null 2>&1 2 | _atom_paths=( 3 | "$HOME/Applications/Atom.app" 4 | "/Applications/Atom.app" 5 | ) 6 | 7 | for _atom_path in $_atom_paths; do 8 | if [[ -a $_atom_path ]]; then 9 | alias at="open -a '$_atom_path'" 10 | break 11 | fi 12 | done 13 | 14 | alias att='at .' 15 | -------------------------------------------------------------------------------- /themes/garyblessington.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}: ' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[blue]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 7 | -------------------------------------------------------------------------------- /themes/skaro.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[green]%}%h %{$fg[cyan]%}%2~ %{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}» ' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 7 | 8 | -------------------------------------------------------------------------------- /plugins/capistrano/_capistrano: -------------------------------------------------------------------------------- 1 | #compdef cap 2 | #autoload 3 | 4 | if [[ -f config/deploy.rb || -f Capfile ]]; then 5 | if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then 6 | echo "\nGenerating .cap_tasks~..." > /dev/stderr 7 | cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~ 8 | fi 9 | compadd `cat .cap_tasks~` 10 | fi 11 | -------------------------------------------------------------------------------- /themes/wuffers.zsh-theme: -------------------------------------------------------------------------------- 1 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[" 2 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} " 3 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} x%{$fg_bold[blue]%}" 4 | 5 | PROMPT='%{$(git_prompt_info)%}%{$fg_bold[green]%}{%{$(rvm current 2>/dev/null || rbenv version-name 2>/dev/null)%}}%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} ' 6 | -------------------------------------------------------------------------------- /themes/3den.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=$'%{$fg[white]%}$(~/.rvm/bin/rvm-prompt) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\ 2 | %{$fg_bold[green]%}%n$%{$reset_color%} ' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}(" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_DIRTY="*" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="" 8 | -------------------------------------------------------------------------------- /themes/aussiegeek.zsh-theme: -------------------------------------------------------------------------------- 1 | 2 | PROMPT='$fg_bold[blue][ $fg[red]%t $fg_bold[blue]] $fg_bold[blue] [ $fg[red]%n@%m:%~$(git_prompt_info)$fg[yellow]$(rvm_prompt_info)$fg_bold[blue] ]$reset_color 3 | $ ' 4 | # git theming 5 | ZSH_THEME_GIT_PROMPT_PREFIX="$fg_bold[green](" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="✔" 8 | ZSH_THEME_GIT_PROMPT_DIRTY="✗" 9 | -------------------------------------------------------------------------------- /themes/fwalch.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 7 | -------------------------------------------------------------------------------- /plugins/fasd/fasd.plugin.zsh: -------------------------------------------------------------------------------- 1 | if [ $commands[fasd] ]; then # check if fasd is installed 2 | fasd_cache="$HOME/.fasd-init-cache" 3 | if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then 4 | fasd --init auto >| "$fasd_cache" 5 | fi 6 | source "$fasd_cache" 7 | unset fasd_cache 8 | alias v='f -e vim' 9 | alias o='a -e open' 10 | fi 11 | 12 | -------------------------------------------------------------------------------- /plugins/yii/yii.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Yii basic command completion 2 | 3 | _yii_get_command_list () { 4 | protected/yiic | awk '/^ - [a-z]+/ { print $2 }' 5 | } 6 | 7 | _yii () { 8 | if [ -f protected/yiic ]; then 9 | compadd `_yii_get_command_list` 10 | fi 11 | } 12 | 13 | compdef _yii protected/yiic 14 | compdef _yii yiic 15 | 16 | # Aliases 17 | alias yiic='protected/yiic' 18 | -------------------------------------------------------------------------------- /themes/gianu.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='[%{$fg_bold[white]%}%n%{$reset_color%}@%{$fg_bold[red]%}%m%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)%{$reset_color%}]$ ' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg_bold[green]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%}" 7 | -------------------------------------------------------------------------------- /themes/edvardm.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg_bold[white]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 7 | -------------------------------------------------------------------------------- /themes/gallifrey.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://img.skitch.com/20091113-qqtd3j8xinysujg5ugrsbr7x1y.jpg 2 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | PROMPT='%{$fg[green]%}%m%{$reset_color%} %2~ $(git_prompt_info)%{$reset_color%}%B»%b ' 5 | RPS1="${return_code}" 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 9 | -------------------------------------------------------------------------------- /themes/jbergantine.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[white]%}$(git_prompt_info)%{$fg_bold[white]%} % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%})" 7 | -------------------------------------------------------------------------------- /themes/wezm.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='$(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' 2 | RPROMPT='%{$fg[green]%}%~%{$reset_color%}' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}⚡%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 8 | -------------------------------------------------------------------------------- /plugins/symfony/symfony.plugin.zsh: -------------------------------------------------------------------------------- 1 | # symfony basic command completion 2 | 3 | _symfony_get_command_list () { 4 | php symfony | sed "1,/Available tasks/d" | awk 'BEGIN { cat=null; } /^[A-Za-z]+$/ { cat = $1; } /^ :[a-z]+/ { print cat $1; }' 5 | } 6 | 7 | _symfony () { 8 | if [ -f symfony ]; then 9 | compadd `_symfony_get_command_list` 10 | fi 11 | } 12 | 13 | compdef _symfony symfony 14 | -------------------------------------------------------------------------------- /themes/miloshadzic.zsh-theme: -------------------------------------------------------------------------------- 1 | # Yay! High voltage and arrows! 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="" 7 | 8 | PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}$(git_prompt_info)%{$fg[cyan]%}⇒%{$reset_color%} ' 9 | -------------------------------------------------------------------------------- /themes/terminalparty.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%(?,%{$fg[green]%},%{$fg[red]%}) %% ' 2 | # RPS1='%{$fg[blue]%}%~%{$reset_color%} ' 3 | RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}(" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="" 8 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}" 9 | -------------------------------------------------------------------------------- /themes/candy.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ 2 | %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="" 8 | -------------------------------------------------------------------------------- /themes/crcandy.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=$' 2 | %{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%I:%M:%S]} %{$reset_color%}%{$fg[white]%}[%~]%{$reset_color%} $(git_prompt_info)\ 3 | %{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} ' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" 8 | ZSH_THEME_GIT_PROMPT_CLEAN="" 9 | -------------------------------------------------------------------------------- /themes/mrtazz.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[red]%}%m%{$reset_color%}:%{$fg[cyan]%}%c%{$reset_color%}:%# ' 2 | RPROMPT='%{$fg_bold[green]%}$(git_prompt_info)%{$reset_color%}% ' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="<%{$fg[red]%}" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%} %{$fg[yellow]%}✗%{$fg[green]%}>%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}>" 8 | -------------------------------------------------------------------------------- /plugins/colored-man/colored-man.plugin.zsh: -------------------------------------------------------------------------------- 1 | man() { 2 | env \ 3 | LESS_TERMCAP_mb=$(printf "\e[1;31m") \ 4 | LESS_TERMCAP_md=$(printf "\e[1;31m") \ 5 | LESS_TERMCAP_me=$(printf "\e[0m") \ 6 | LESS_TERMCAP_se=$(printf "\e[0m") \ 7 | LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ 8 | LESS_TERMCAP_ue=$(printf "\e[0m") \ 9 | LESS_TERMCAP_us=$(printf "\e[1;32m") \ 10 | man "$@" 11 | } 12 | -------------------------------------------------------------------------------- /lib/correction.zsh: -------------------------------------------------------------------------------- 1 | if [[ "$ENABLE_CORRECTION" == "true" ]]; then 2 | alias ebuild='nocorrect ebuild' 3 | alias gist='nocorrect gist' 4 | alias heroku='nocorrect heroku' 5 | alias hpodder='nocorrect hpodder' 6 | alias man='nocorrect man' 7 | alias mkdir='nocorrect mkdir' 8 | alias mv='nocorrect mv' 9 | alias mysql='nocorrect mysql' 10 | alias sudo='nocorrect sudo' 11 | 12 | setopt correct_all 13 | fi 14 | -------------------------------------------------------------------------------- /plugins/node/node.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Open the node api for your current version to the optional section. 2 | # TODO: Make the section part easier to use. 3 | function node-docs { 4 | # get the open command 5 | local open_cmd 6 | if [[ "$OSTYPE" = darwin* ]]; then 7 | open_cmd='open' 8 | else 9 | open_cmd='xdg-open' 10 | fi 11 | 12 | $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1" 13 | } 14 | -------------------------------------------------------------------------------- /plugins/textastic/README.md: -------------------------------------------------------------------------------- 1 | ## textastic 2 | 3 | Plugin for Textastic, a text and code editor for Mac OS X 4 | 5 | ### Requirements 6 | 7 | * [Textastic](http://www.textasticapp.com/mac.html) 8 | 9 | ### Usage 10 | 11 | * If `tt` command is called without an argument, launch Textastic 12 | 13 | * If `tt` is passed a directory, cd to it and open it in Textastic 14 | 15 | * If `tt` is passed a file, open it in Textastic 16 | -------------------------------------------------------------------------------- /lib/history.zsh: -------------------------------------------------------------------------------- 1 | ## Command history configuration 2 | if [ -z $HISTFILE ]; then 3 | HISTFILE=$HOME/.zsh_history 4 | fi 5 | HISTSIZE=10000 6 | SAVEHIST=10000 7 | 8 | setopt extended_history 9 | setopt hist_expire_dups_first 10 | setopt hist_ignore_dups # ignore duplication command history list 11 | setopt hist_ignore_space 12 | setopt hist_verify 13 | setopt inc_append_history 14 | setopt share_history # share command history data 15 | -------------------------------------------------------------------------------- /plugins/mysql-macports/mysql-macports.plugin.zsh: -------------------------------------------------------------------------------- 1 | # commands to control local mysql-server installation 2 | # paths are for osx installation via macports 3 | 4 | alias mysqlstart='sudo /opt/local/share/mysql5/mysql/mysql.server start' 5 | alias mysqlstop='sudo /opt/local/share/mysql5/mysql/mysql.server stop' 6 | alias mysqlrestart='sudo /opt/local/share/mysql5/mysql/mysql.server restart' 7 | 8 | alias mysqlstatus='mysqladmin5 -u root -p ping' 9 | -------------------------------------------------------------------------------- /plugins/torrent/torrent.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Algorithm borrowed from http://wiki.rtorrent.org/MagnetUri and adapted to work with zsh. 3 | # 4 | 5 | function magnet_to_torrent() { 6 | [[ "$1" =~ xt=urn:btih:([^\&/]+) ]] || return 1 7 | 8 | hashh=${match[1]} 9 | 10 | if [[ "$1" =~ dn=([^\&/]+) ]];then 11 | filename=${match[1]} 12 | else 13 | filename=$hashh 14 | fi 15 | 16 | echo "d10:magnet-uri${#1}:${1}e" > "$filename.torrent" 17 | } -------------------------------------------------------------------------------- /plugins/wakeonlan/wakeonlan.plugin.zsh: -------------------------------------------------------------------------------- 1 | function wake() { 2 | local config_file="$HOME/.wakeonlan/$1" 3 | if [[ ! -f "$config_file" ]]; then 4 | echo "ERROR: There is no configuration file at \"$config_file\"." 5 | return 1 6 | fi 7 | 8 | if (( ! $+commands[wakeonlan] )); then 9 | echo "ERROR: Can't find \"wakeonlan\". Are you sure it's installed?" 10 | return 1 11 | fi 12 | 13 | wakeonlan -f "$config_file" 14 | } 15 | -------------------------------------------------------------------------------- /themes/afowler.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi 2 | 3 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 4 | 5 | PROMPT='%m %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' 6 | 7 | RPS1="${return_code}" 8 | 9 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" 10 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 11 | -------------------------------------------------------------------------------- /themes/kafeitu.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%n%{$fg[cyan]%}@%{$fg_bold[green]%}%m %{$fg_bold[green]%}%p %{$fg[cyan]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 7 | -------------------------------------------------------------------------------- /plugins/bwana/bwana.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Requires http://www.bruji.com/bwana/ 3 | # 4 | if [[ -e /Applications/Bwana.app ]] || 5 | ( system_profiler -detailLevel mini SPApplicationsDataType | grep -q Bwana ) 6 | then 7 | function man() { 8 | open "man:$1" 9 | } 10 | else 11 | echo "Bwana lets you read man files in Safari through a man: URI scheme" 12 | echo "To use it within Zsh, install it from http://www.bruji.com/bwana/" 13 | fi 14 | -------------------------------------------------------------------------------- /plugins/apache2-macports/apache2-macports.plugin.zsh: -------------------------------------------------------------------------------- 1 | # commands to control local apache2 server installation 2 | # paths are for osx installation via macports 3 | 4 | alias apache2start='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start' 5 | alias apache2stop='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop' 6 | alias apache2restart='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart' 7 | -------------------------------------------------------------------------------- /themes/robbyrussell.zsh-theme: -------------------------------------------------------------------------------- 1 | local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" 2 | PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 8 | -------------------------------------------------------------------------------- /plugins/ant/ant.plugin.zsh: -------------------------------------------------------------------------------- 1 | _ant_does_target_list_need_generating () { 2 | [ ! -f .ant_targets ] && return 0; 3 | [ .ant_targets -nt build.xml ] && return 0; 4 | return 1; 5 | } 6 | 7 | _ant () { 8 | if [ -f build.xml ]; then 9 | if _ant_does_target_list_need_generating; then 10 | sed -n '/ .ant_targets 11 | fi 12 | compadd `cat .ant_targets` 13 | fi 14 | } 15 | 16 | compdef _ant ant 17 | -------------------------------------------------------------------------------- /plugins/dircycle/dircycle.plugin.zsh: -------------------------------------------------------------------------------- 1 | ## 2 | # dircycle plugin: enables cycling through the directory 3 | # stack using Ctrl+Shift+Left/Right 4 | 5 | eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" 6 | zle -N insert-cycledleft 7 | bindkey "\e[1;6D" insert-cycledleft 8 | eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q -0'; zle accept-line }" 9 | zle -N insert-cycledright 10 | bindkey "\e[1;6C" insert-cycledright 11 | -------------------------------------------------------------------------------- /plugins/emacs/emacsclient.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # get list of available X windows. 4 | x=`emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null` 5 | 6 | if [ -z "$x" ] || [ "$x" = "nil" ] ;then 7 | # Create one if there is no X window yet. 8 | emacsclient --alternate-editor "" --create-frame "$@" 9 | else 10 | # prevent creating another X frame if there is at least one present. 11 | emacsclient --alternate-editor "" "$@" 12 | fi 13 | -------------------------------------------------------------------------------- /plugins/phing/phing.plugin.zsh: -------------------------------------------------------------------------------- 1 | _phing_does_target_list_need_generating () { 2 | [ ! -f .phing_targets ] && return 0; 3 | [ .phing_targets -nt build.xml ] && return 0; 4 | return 1; 5 | } 6 | 7 | _phing () { 8 | if [ -f build.xml ]; then 9 | if _phing_does_target_list_need_generating; then 10 | phing -l |grep -v ":$" |grep -v "^-*$" > .phing_targets 11 | fi 12 | compadd `cat .phing_targets` 13 | fi 14 | } 15 | 16 | compdef _phing phing 17 | -------------------------------------------------------------------------------- /lib/bzr.zsh: -------------------------------------------------------------------------------- 1 | ## Bazaar integration 2 | ## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT 3 | function bzr_prompt_info() { 4 | BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'` 5 | if [ -n "$BZR_CB" ]; then 6 | BZR_DIRTY="" 7 | [[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red]%} * %{$fg[green]%}" 8 | echo "$ZSH_THEME_SCM_PROMPT_PREFIX$BZR_CB$BZR_DIRTY$ZSH_THEME_GIT_PROMPT_SUFFIX" 9 | fi 10 | } -------------------------------------------------------------------------------- /themes/wezm+.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{${fg_bold[yellow]}%}%n%{$reset_color%}%{${fg[yellow]}%}@%m%{$reset_color%} $(git_prompt_info)%(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )%{$fg[yellow]%}%#%{$reset_color%} ' 2 | RPROMPT='%{$fg[green]%}%~%{$reset_color%}' 3 | 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}(" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[red]%}✗%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 8 | -------------------------------------------------------------------------------- /plugins/postgres/postgres.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Aliases to control Postgres 2 | # Paths noted below are for Postgres installed via Homebrew on OSX 3 | 4 | alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' 5 | alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' 6 | alias restartpost='stoppost && sleep 1 && startpost' 7 | alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' 8 | alias statuspost='pg_ctl status -D /usr/local/var/postgres -s' -------------------------------------------------------------------------------- /plugins/rake/rake.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Thank you Jim for everything you contributed to the Ruby and open source community 2 | # over the years. We will miss you dearly. 3 | alias jimweirich="rake" 4 | 5 | alias rake="noglob rake" # allows square brackts for rake task invocation 6 | alias brake='noglob bundle exec rake' # execute the bundled rake gem 7 | alias srake='noglob sudo rake' # noglob must come before sudo 8 | alias sbrake='noglob sudo bundle exec rake' # altogether now ... 9 | 10 | 11 | -------------------------------------------------------------------------------- /plugins/profiles/profiles.plugin.zsh: -------------------------------------------------------------------------------- 1 | # You will probably want to list this plugin as the first in your .zshrc. 2 | 3 | # This will look for a custom profile for the local machine and each domain or 4 | # subdomain it belongs to. (e.g. com, example.com and foo.example.com) 5 | parts=(${(s:.:)$(hostname)}) 6 | for i in {${#parts}..1}; do 7 | profile=${(j:.:)${parts[$i,${#parts}]}} 8 | file=$ZSH_CUSTOM/profiles/$profile 9 | if [ -f $file ]; then 10 | source $file 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /plugins/python/python.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Find python file 2 | alias pyfind='find . -name "*.py"' 3 | 4 | # Remove python compiled byte-code in either current directory or in a 5 | # list of specified directories 6 | function pyclean() { 7 | ZSH_PYCLEAN_PLACES=${*:-'.'} 8 | find ${ZSH_PYCLEAN_PLACES} -type f -name "*.py[co]" -delete 9 | find ${ZSH_PYCLEAN_PLACES} -type d -name "__pycache__" -delete 10 | } 11 | 12 | # Grep among .py files 13 | alias pygrep='grep --include="*.py"' 14 | 15 | -------------------------------------------------------------------------------- /plugins/textastic/textastic.plugin.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # If the tt command is called without an argument, launch Textastic 3 | # If tt is passed a directory, cd to it and open it in Textastic 4 | # If tt is passed a file, open it in Textastic 5 | # 6 | function tt() { 7 | if [[ -z "$1" ]] 8 | then 9 | open -a "textastic.app" 10 | else 11 | open -a "textastic.app" "$1" 12 | if [[ -d "$1" ]] 13 | then 14 | cd "$1" 15 | fi 16 | fi 17 | } 18 | -------------------------------------------------------------------------------- /plugins/history-substring-search/history-substring-search.plugin.zsh: -------------------------------------------------------------------------------- 1 | # This file integrates the history-substring-search script into oh-my-zsh. 2 | 3 | source "$ZSH/plugins/history-substring-search/history-substring-search.zsh" 4 | 5 | if test "$CASE_SENSITIVE" = true; then 6 | unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS 7 | fi 8 | 9 | if test "$DISABLE_COLOR" = true; then 10 | unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND 11 | unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND 12 | fi 13 | -------------------------------------------------------------------------------- /plugins/systemd/systemd.plugin.zsh: -------------------------------------------------------------------------------- 1 | user_commands=( 2 | list-units is-active status show help list-unit-files 3 | is-enabled list-jobs show-environment) 4 | 5 | sudo_commands=( 6 | start stop reload restart try-restart isolate kill 7 | reset-failed enable disable reenable preset mask unmask 8 | link load cancel set-environment unset-environment) 9 | 10 | for c in $user_commands; do; alias sc-$c="systemctl $c"; done 11 | for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done 12 | -------------------------------------------------------------------------------- /plugins/repo/repo.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Aliases 2 | alias r='repo' 3 | compdef _repo r=repo 4 | 5 | alias rra='repo rebase --auto-stash' 6 | compdef _repo rra='repo rebase --auto-stash' 7 | 8 | alias rs='repo sync' 9 | compdef _repo rs='repo sync' 10 | 11 | alias rsrra='repo sync ; repo rebase --auto-stash' 12 | compdef _repo rsrra='repo sync ; repo rebase --auto-stash' 13 | 14 | alias ru='repo upload' 15 | compdef _repo ru='repo upload' 16 | 17 | alias rst='repo status' 18 | compdef _repo rst='repo status' 19 | -------------------------------------------------------------------------------- /themes/cloud.zsh-theme: -------------------------------------------------------------------------------- 1 | if [[ -z $ZSH_THEME_CLOUD_PREFIX ]]; then 2 | ZSH_THEME_CLOUD_PREFIX='☁' 3 | fi 4 | 5 | PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[green]%}%c %{$fg_bold[cyan]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 9 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" 10 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" -------------------------------------------------------------------------------- /themes/kennethreitz.zsh-theme: -------------------------------------------------------------------------------- 1 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 2 | 3 | PROMPT='%{$fg[green]%}%c \ 4 | $(git_prompt_info)\ 5 | %{$fg[red]%}%(!.#.»)%{$reset_color%} ' 6 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 7 | RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} ' 8 | 9 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}(" 10 | ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} " 11 | ZSH_THEME_GIT_PROMPT_CLEAN="" 12 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}" 13 | 14 | -------------------------------------------------------------------------------- /plugins/bbedit/bbedit.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias bbpb='pbpaste | bbedit --clean --view-top' 2 | 3 | alias bbd=bbdiff 4 | 5 | # 6 | # If the bb command is called without an argument, launch BBEdit 7 | # If bb is passed a directory, cd to it and open it in BBEdit 8 | # If bb is passed a file, open it in BBEdit 9 | # 10 | function bb() { 11 | if [[ -z "$1" ]] 12 | then 13 | bbedit --launch 14 | else 15 | bbedit "$1" 16 | if [[ -d "$1" ]] 17 | then 18 | cd "$1" 19 | fi 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /themes/frontcube.zsh-theme: -------------------------------------------------------------------------------- 1 | local rvm="%{$fg[green]%}[$(rvm-prompt i v g)]%{$reset_color%}" 2 | 3 | PROMPT=' 4 | %{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%} 5 | %{$fg[green]%}➞ %{$reset_color%' 6 | 7 | RPROMPT='$(git_prompt_info) $(rvm)' 8 | 9 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:" 10 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 11 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[red]%}✖ %{$reset_color%}" 12 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] %{$fg[green]%}✔%{$reset_color%}" 13 | -------------------------------------------------------------------------------- /plugins/command-not-found/command-not-found.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Uses the command-not-found package zsh support 2 | # as seen in http://www.porcheron.info/command-not-found-for-zsh/ 3 | # this is installed in Ubuntu 4 | 5 | [[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found 6 | 7 | # Arch Linux command-not-found support, you must have package pkgfile installed 8 | # https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook 9 | [[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh 10 | -------------------------------------------------------------------------------- /plugins/knife_ssh/knife_ssh.plugin.zsh: -------------------------------------------------------------------------------- 1 | function knife_ssh() { 2 | grep -q $1 ~/.knife_comp~ 2> /dev/null || rm -f ~/.knife_comp~; 3 | ssh $(knife node show $1 | awk '/IP:/{print $2}') 4 | } 5 | 6 | _knife_ssh() { 7 | if hash knife 2>/dev/null; then 8 | if [[ ! -f ~/.knife_comp~ ]]; then 9 | echo "\nGenerating ~/.knife_comp~..." >/dev/stderr 10 | knife node list > ~/.knife_comp~ 11 | fi 12 | compadd $(<~/.knife_comp~) 13 | else 14 | echo "Could not find knife" > /dev/stderr; 15 | fi 16 | } 17 | 18 | compdef _knife_ssh knife_ssh 19 | -------------------------------------------------------------------------------- /plugins/laravel4/laravel4.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Laravel4 basic command completion 2 | _laravel4_get_command_list () { 3 | php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' 4 | } 5 | 6 | _laravel4 () { 7 | if [ -f artisan ]; then 8 | compadd `_laravel4_get_command_list` 9 | fi 10 | } 11 | 12 | compdef _laravel4 artisan 13 | compdef _laravel4 la4 14 | 15 | #Alias 16 | alias la4='php artisan' 17 | 18 | alias la4dump='php artisan dump-autoload' 19 | alias la4cache='php artisan cache:clear' 20 | alias la4routes='php artisan routes' 21 | -------------------------------------------------------------------------------- /themes/duellj.zsh-theme: -------------------------------------------------------------------------------- 1 | # user, host, full path, and time/date 2 | # on two lines for easier vgrepping 3 | # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 4 | PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%} 5 | %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b ' 6 | RPROMPT='[%*]' 7 | PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' 8 | -------------------------------------------------------------------------------- /themes/frisk.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT=$' 2 | %{$fg[blue]%}%/%{$reset_color%} $(git_prompt_info)$(bzr_prompt_info)%{$fg[white]%}[%n@%m]%{$reset_color%} %{$fg[white]%}[%T]%{$reset_color%} 3 | %{$fg_bold[black]%}>%{$reset_color%} ' 4 | 5 | PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}" 6 | 7 | GIT_CB="git::" 8 | ZSH_THEME_SCM_PROMPT_PREFIX="%{$fg[green]%}[" 9 | ZSH_THEME_GIT_PROMPT_PREFIX=$ZSH_THEME_SCM_PROMPT_PREFIX$GIT_CB 10 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} " 11 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}" 12 | ZSH_THEME_GIT_PROMPT_CLEAN="" 13 | -------------------------------------------------------------------------------- /themes/kiwi.zsh-theme: -------------------------------------------------------------------------------- 1 | # 2 | # Kiwi ZSH Theme 3 | # 4 | 5 | PROMPT='%{$fg_bold[green]%}┌[%{$fg_bold[cyan]%}kiwish-4.2%{$fg_bold[green]%}]-(%{$fg_bold[white]%}%2~%{$fg_bold[green]%})-$(git_prompt_info)$(svn_prompt_info)$(battery_pct_prompt) 6 | └> % %{$reset_color%}' 7 | 8 | ZSH_THEME_GIT_PROMPT_PREFIX="[%{$reset_color%}%{$fg[white]%}git:%{$fg_bold[white]%}" 9 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg_bold[green]%}]-" 10 | 11 | ZSH_THEME_SVN_PROMPT_PREFIX="[%{$reset_color%}%{$fg[white]%}svn:%{$fg_bold[white]%}/" 12 | ZSH_THEME_SVN_PROMPT_SUFFIX="%{$fg_bold[green]%}]-" 13 | -------------------------------------------------------------------------------- /themes/jtriley.zsh-theme: -------------------------------------------------------------------------------- 1 | #PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 2 | PROMPT="%{$fg_bold[cyan]%}%T%{$fg_bold[green]%} %{$fg_bold[white]%}%n%{$fg[magenta]%}@%{$fg_bold[white]%}%m %{$fg_bold[green]%}%d 3 | %{$fg_bold[yellow]%}%% %{$reset_color%}" 4 | 5 | #ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 6 | #ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 7 | #ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 8 | #ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 9 | -------------------------------------------------------------------------------- /themes/arrow.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="yellow"; fi 2 | 3 | PROMPT='%{$fg[$NCOLOR]%}%c ➤ %{$reset_color%}' 4 | RPROMPT='%{$fg[$NCOLOR]%}%p $(git_prompt_info)%{$reset_color%}' 5 | 6 | ZSH_THEME_GIT_PROMPT_PREFIX="git:" 7 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 8 | ZSH_THEME_GIT_PROMPT_DIRTY="*" 9 | ZSH_THEME_GIT_PROMPT_CLEAN="" 10 | 11 | # See http://geoff.greer.fm/lscolors/ 12 | export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx" 13 | export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:" 14 | 15 | -------------------------------------------------------------------------------- /themes/fox.zsh-theme: -------------------------------------------------------------------------------- 1 | # fox.zsh-theme 2 | 3 | PROMPT='%{$fg[cyan]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[cyan]%}☮%{$fg_bold[white]%}%M%{$reset_color%}%{$fg[cyan]%}]%{$fg[white]%}-%{$fg[cyan]%}(%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[cyan]%})$(git_prompt_info) 4 | └> % %{$reset_color%}' 5 | 6 | ZSH_THEME_GIT_PROMPT_PREFIX="-[%{$reset_color%}%{$fg[white]%}git://%{$fg_bold[white]%}" 7 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[cyan]%}]-" 8 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" 9 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" 10 | -------------------------------------------------------------------------------- /themes/xiong-chiamiov.zsh-theme: -------------------------------------------------------------------------------- 1 | # user, host, full path, and time/date 2 | # on two lines for easier vgrepping 3 | # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 4 | PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} 5 | %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b ' 6 | PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' 7 | -------------------------------------------------------------------------------- /themes/obraun.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi 2 | 3 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 4 | 5 | PROMPT='%{$fg[green]%}[%*]%{$reset_color%} %{$fg_no_bold[cyan]%}%n %{${fg_bold[blue]}%}::%{$reset_color%} %{$fg[yellow]%}%m%{$reset_color%} %{$fg_no_bold[magenta]%} ➜ %{$reset_color%} %{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} ' 6 | 7 | RPS1="${return_code}" 8 | 9 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}‹" 10 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 11 | 12 | -------------------------------------------------------------------------------- /themes/tjkirch_mod.zsh-theme: -------------------------------------------------------------------------------- 1 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}" 2 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 3 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡" 4 | ZSH_THEME_GIT_PROMPT_CLEAN="" 5 | 6 | function prompt_char { 7 | if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi 8 | } 9 | 10 | PROMPT='%(?,,%{$fg[red]%}FAIL: $?%{$reset_color%} 11 | )%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) %_$(prompt_char) ' 12 | 13 | RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' 14 | -------------------------------------------------------------------------------- /themes/dst.zsh-theme: -------------------------------------------------------------------------------- 1 | 2 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}" 3 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 4 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" 5 | ZSH_THEME_GIT_PROMPT_CLEAN="" 6 | 7 | function prompt_char { 8 | if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi 9 | } 10 | 11 | PROMPT='%(?, ,%{$fg[red]%}FAIL%{$reset_color%} 12 | ) 13 | %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) 14 | %_ $(prompt_char) ' 15 | 16 | RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' 17 | -------------------------------------------------------------------------------- /themes/rkj.zsh-theme: -------------------------------------------------------------------------------- 1 | # user, host, full path, and time/date 2 | # on two lines for easier vgrepping 3 | # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 4 | 5 | function retcode() {} 6 | 7 | PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} 8 | %{\e[0;34m%}%B└─%B[%{\e[1;35m%}%?$(retcode)%{\e[0;34m%}%B]%{\e[0m%}%b ' 9 | 10 | -------------------------------------------------------------------------------- /themes/tjkirch.zsh-theme: -------------------------------------------------------------------------------- 1 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}" 2 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 3 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡" 4 | ZSH_THEME_GIT_PROMPT_CLEAN="" 5 | 6 | function prompt_char { 7 | if [ $UID -eq 0 ]; then echo "%{$fg[red]%}#%{$reset_color%}"; else echo $; fi 8 | } 9 | 10 | PROMPT='%(?, ,%{$fg[red]%}FAIL: $?%{$reset_color%} 11 | ) 12 | %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}%m%{$reset_color%}: %{$fg_bold[blue]%}%~%{$reset_color%}$(git_prompt_info) 13 | %_$(prompt_char) ' 14 | 15 | RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}' 16 | -------------------------------------------------------------------------------- /themes/xiong-chiamiov-plus.zsh-theme: -------------------------------------------------------------------------------- 1 | # user, host, full path, and time/date 2 | # on two lines for easier vgrepping 3 | # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 4 | PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} 5 | %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b ' 6 | PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' 7 | -------------------------------------------------------------------------------- /plugins/jake-node/jake-node.plugin.zsh: -------------------------------------------------------------------------------- 1 | #---oh-my-zsh plugin : task Autocomplete for Jake tool--- 2 | # Jake : https://github.com/mde/jake 3 | # Warning : Jakefile should have the right case : Jakefile or jakefile 4 | # Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10 5 | # Author : Alexandre Lacheze (@al3xstrat) 6 | # Inspiration : http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh 7 | 8 | function _jake () { 9 | if [ -f Jakefile ]||[ -f jakefile ]; then 10 | compadd `jake -T | cut -d " " -f 2 | sed -E "s/.\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"` 11 | fi 12 | } 13 | 14 | compdef _jake jake -------------------------------------------------------------------------------- /plugins/themes/themes.plugin.zsh: -------------------------------------------------------------------------------- 1 | function theme 2 | { 3 | if [ -z "$1" ] || [ "$1" = "random" ]; then 4 | themes=($ZSH/themes/*zsh-theme) 5 | N=${#themes[@]} 6 | ((N=(RANDOM%N)+1)) 7 | RANDOM_THEME=${themes[$N]} 8 | source "$RANDOM_THEME" 9 | echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..." 10 | else 11 | if [ -f "$ZSH_CUSTOM/$1.zsh-theme" ] 12 | then 13 | source "$ZSH_CUSTOM/$1.zsh-theme" 14 | else 15 | source "$ZSH/themes/$1.zsh-theme" 16 | fi 17 | fi 18 | } 19 | 20 | function lstheme 21 | { 22 | cd $ZSH/themes 23 | ls *zsh-theme | sed 's,\.zsh-theme$,,' 24 | } 25 | -------------------------------------------------------------------------------- /plugins/cp/cp.plugin.zsh: -------------------------------------------------------------------------------- 1 | #Show progress while file is copying 2 | 3 | # Rsync options are: 4 | # -p - preserve permissions 5 | # -o - preserve owner 6 | # -g - preserve group 7 | # -h - output in human-readable format 8 | # --progress - display progress 9 | # -b - instead of just overwriting an existing file, save the original 10 | # --backup-dir=/tmp/rsync - move backup copies to "/tmp/rsync" 11 | # -e /dev/null - only work on local files 12 | # -- - everything after this is an argument, even if it looks like an option 13 | 14 | alias cpv="rsync -poghb --backup-dir=/tmp/rsync -e /dev/null --progress --" 15 | -------------------------------------------------------------------------------- /plugins/lighthouse/lighthouse.plugin.zsh: -------------------------------------------------------------------------------- 1 | # To use: add a .lighthouse file into your directory with the URL to the 2 | # individual project. For example: 3 | # https://rails.lighthouseapp.com/projects/8994 4 | # Example usage: http://screencast.com/t/ZDgwNDUwNT 5 | open_lighthouse_ticket () { 6 | if [ ! -f .lighthouse-url ]; then 7 | echo "There is no .lighthouse-url file in the current directory..." 8 | return 0; 9 | else 10 | lighthouse_url=$(cat .lighthouse-url); 11 | echo "Opening ticket #$1"; 12 | `open $lighthouse_url/tickets/$1`; 13 | fi 14 | } 15 | 16 | alias lho='open_lighthouse_ticket' 17 | -------------------------------------------------------------------------------- /plugins/docker/README.md: -------------------------------------------------------------------------------- 1 | ## Docker autocomplete plugin 2 | 3 | - Adds autocomplete options for all docker commands. 4 | - Will also show containerIDs and Image names where applicable 5 | 6 | ####Shows help for all commands 7 | ![General Help](http://i.imgur.com/tUBO9jh.png "Help for all commands") 8 | 9 | 10 | ####Shows your downloaded images where applicable 11 | ![Images](http://i.imgur.com/R8ZsWO1.png "Images") 12 | 13 | 14 | ####Shows your running containers where applicable 15 | ![Containers](http://i.imgur.com/WQtbheg.png "Containers") 16 | 17 | 18 | 19 | Maintainer : Ahmed Azaan ([@aeonazaan](https://twitter.com/aeonazaan)) 20 | -------------------------------------------------------------------------------- /themes/dpoggi.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi 2 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\ 5 | %{$reset_color%}:%{$fg[magenta]%}%~\ 6 | $(git_prompt_info) \ 7 | %{$fg[red]%}%(!.#.»)%{$reset_color%} ' 8 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 9 | RPS1='${return_code}' 10 | 11 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" 12 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}" 13 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}" 14 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}" 15 | -------------------------------------------------------------------------------- /plugins/bbedit/README.md: -------------------------------------------------------------------------------- 1 | ## bbedit 2 | 3 | Plugin for BBEdit, an HTML and text editor for Mac OS X 4 | 5 | ### Requirements 6 | 7 | * [BBEdit](http://www.barebones.com/products/bbedit/) 8 | * [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html) 9 | 10 | ### Usage 11 | 12 | * If the `bb` command is called without an argument, launch BBEdit 13 | 14 | * If `bb` is passed a directory, cd to it and open it in BBEdit 15 | 16 | * If `bb` is passed a file, open it in BBEdit 17 | 18 | * If `bbpb` create a new BBEdit document with the contents of the clipboard 19 | 20 | * If `bbd` alias for BBEdit diff tool 21 | -------------------------------------------------------------------------------- /plugins/colemak/colemak.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ctrl-j newline 2 | bindkey '^n' accept-line 3 | bindkey -a '^n' accept-line 4 | 5 | # another rotation to match qwerty 6 | bindkey -a 'n' down-line-or-history 7 | bindkey -a 'e' up-line-or-history 8 | bindkey -a 'i' vi-forward-char 9 | 10 | # make qwerty 11 | bindkey -a 'k' vi-repeat-search 12 | bindkey -a 'K' vi-rev-repeat-search 13 | bindkey -a 'u' vi-insert 14 | bindkey -a 'U' vi-insert-bol 15 | bindkey -a 'l' vi-undo-change 16 | bindkey -a 'N' vi-join 17 | 18 | # spare 19 | bindkey -a 'j' vi-forward-word-end 20 | bindkey -a 'J' vi-forward-blank-word-end 21 | 22 | lesskey $ZSH/plugins/colemak/colemak-less 23 | -------------------------------------------------------------------------------- /themes/theunraveler.zsh-theme: -------------------------------------------------------------------------------- 1 | # Comment 2 | 3 | PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}' 4 | 5 | RPROMPT='%{$fg[magenta]%}$(git_prompt_info)%{$reset_color%} $(git_prompt_status)%{$reset_color%}' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 9 | ZSH_THEME_GIT_PROMPT_DIRTY="" 10 | ZSH_THEME_GIT_PROMPT_CLEAN="" 11 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" 12 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" 13 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" 14 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" 15 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" 16 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" -------------------------------------------------------------------------------- /plugins/scd/scd.plugin.zsh: -------------------------------------------------------------------------------- 1 | ## The scd script should autoload as a shell function. 2 | autoload scd 3 | 4 | 5 | ## If the scd function exists, define a change-directory-hook function 6 | ## to record visited directories in the scd index. 7 | if [[ ${+functions[scd]} == 1 ]]; then 8 | scd_chpwd_hook() { scd --add $PWD } 9 | autoload add-zsh-hook 10 | add-zsh-hook chpwd scd_chpwd_hook 11 | fi 12 | 13 | 14 | ## Allow scd usage with unquoted wildcard characters such as "*" or "?". 15 | alias scd='noglob scd' 16 | 17 | 18 | ## Load the directory aliases created by scd if any. 19 | if [[ -s ~/.scdalias.zsh ]]; then source ~/.scdalias.zsh; fi 20 | -------------------------------------------------------------------------------- /themes/amuse.zsh-theme: -------------------------------------------------------------------------------- 1 | # vim:ft=zsh ts=2 sw=2 sts=2 2 | 3 | rvm_current() { 4 | rvm current 2>/dev/null 5 | } 6 | 7 | rbenv_version() { 8 | rbenv version 2>/dev/null | awk '{print $1}' 9 | } 10 | 11 | PROMPT=' 12 | %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%} 13 | $ ' 14 | 15 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}⭠ " 16 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 17 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" 18 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" 19 | ZSH_THEME_GIT_PROMPT_CLEAN="" 20 | 21 | RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}' 22 | -------------------------------------------------------------------------------- /themes/funky.zsh-theme: -------------------------------------------------------------------------------- 1 | # Taken from Tassilo's Blog 2 | # http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/ 3 | 4 | local blue_op="%{$fg[blue]%}[%{$reset_color%}" 5 | local blue_cp="%{$fg[blue]%}]%{$reset_color%}" 6 | local path_p="${blue_op}%~${blue_cp}" 7 | local user_host="${blue_op}%n@%m${blue_cp}" 8 | local ret_status="${blue_op}%?${blue_cp}" 9 | local hist_no="${blue_op}%h${blue_cp}" 10 | local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})" 11 | PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no} 12 | ╰─${blue_op}${smiley}${blue_cp} %# " 13 | local cur_cmd="${blue_op}%_${blue_cp}" 14 | PROMPT2="${cur_cmd}> " -------------------------------------------------------------------------------- /themes/jreese.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png 2 | 3 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi 4 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 5 | 6 | PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \ 7 | $(git_prompt_info)\ 8 | %{$fg[red]%}%(!.#.»)%{$reset_color%} ' 9 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 10 | RPS1='${return_code}' 11 | 12 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}" 13 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 14 | ZSH_THEME_GIT_PROMPT_CLEAN="" 15 | ZSH_THEME_GIT_PROMPT_DIRTY="⚡" 16 | 17 | -------------------------------------------------------------------------------- /themes/sporty_256.zsh-theme: -------------------------------------------------------------------------------- 1 | # zsh theme requires 256 color enabled terminal 2 | # i.e TERM=xterm-256color 3 | # Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ 4 | # based on robbyrussell's shell but louder! 5 | 6 | PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f 7 | %{$fg_bold[white]%}%# %{$reset_color%}' 8 | RPROMPT='%B%F{208}%n%f%{$fg_bold[white]%}@%F{039}%m%f%{$reset_color%}' 9 | 10 | ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}±|%f%F{124}" 11 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 12 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}%B✘%b%F{154}|%f%{$reset_color%}" 13 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%F{154}|" 14 | -------------------------------------------------------------------------------- /plugins/xcode/xcode.plugin.zsh: -------------------------------------------------------------------------------- 1 | #xc function courtesy of http://gist.github.com/subdigital/5420709 2 | function xc { 3 | xcode_proj=`ls | grep "\.xc" | sort -r | head -1` 4 | if [[ `echo -n $xcode_proj | wc -m` == 0 ]] 5 | then 6 | echo "No xcworkspace/xcodeproj file found in the current directory." 7 | else 8 | echo "Found $xcode_proj" 9 | open "$xcode_proj" 10 | fi 11 | } 12 | 13 | function xcsel { 14 | sudo xcode-select --switch "$*" 15 | } 16 | 17 | alias xcb='xcodebuild' 18 | alias xcp='xcode-select --print-path' 19 | alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' 20 | -------------------------------------------------------------------------------- /themes/darkblood.zsh-theme: -------------------------------------------------------------------------------- 1 | # meh. Dark Blood Rewind, a new beginning. 2 | 3 | PROMPT=$'%{$fg[red]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[red]%}@%{$fg_bold[white]%}%m%{$reset_color%}%{$fg[red]%}] [%{$fg_bold[white]%}/dev/%y%{$reset_color%}%{$fg[red]%}] %{$(git_prompt_info)%}%(?,,%{$fg[red]%}[%{$fg_bold[white]%}%?%{$reset_color%}%{$fg[red]%}]) 4 | %{$fg[red]%}└[%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[red]%}]>%{$reset_color%} ' 5 | PS2=$' %{$fg[red]%}|>%{$reset_color%} ' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}[%{$fg_bold[white]%}" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[red]%}] " 9 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}⚡%{$reset_color%}" 10 | -------------------------------------------------------------------------------- /themes/gozilla.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="" 7 | 8 | RPROMPT='$(git_prompt_status)%{$reset_color%}' 9 | 10 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈" 11 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%} ✭" 12 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✗" 13 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%} ➦" 14 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ✂" 15 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%} ✱" 16 | -------------------------------------------------------------------------------- /plugins/git-remote-branch/git-remote-branch.plugin.zsh: -------------------------------------------------------------------------------- 1 | _git_remote_branch() { 2 | ref=$(git symbolic-ref HEAD 2> /dev/null) 3 | if [[ -n $ref ]]; then 4 | if (( CURRENT == 2 )); then 5 | # first arg: operation 6 | compadd create publish rename delete track 7 | elif (( CURRENT == 3 )); then 8 | # second arg: remote branch name 9 | remotes=`git remote | tr '\n' '|' | sed "s/\|$//g"` 10 | compadd `git branch -r | grep -v HEAD | sed "s/$remotes\///" | sed "s/ //g"` 11 | elif (( CURRENT == 4 )); then 12 | # third arg: remote name 13 | compadd `git remote` 14 | fi 15 | else; 16 | _files 17 | fi 18 | } 19 | compdef _git_remote_branch grb 20 | -------------------------------------------------------------------------------- /themes/itchy.zsh-theme: -------------------------------------------------------------------------------- 1 | # Inspired by http://peepcode.com/blog/2012/my-command-line-prompt 2 | 3 | local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" 4 | 5 | local user="%{$fg[cyan]%}%n%{$reset_color%}" 6 | local host="%{$fg[cyan]%}@%m%{$reset_color%}" 7 | local pwd="%{$fg[yellow]%}%~%{$reset_color%}" 8 | 9 | PROMPT='${user}${host} ${pwd} 10 | ${smiley} ' 11 | 12 | RPROMPT='$(rvm-prompt || rbenv version) %{$fg[white]%}$(git_prompt_info)%{$reset_color%}' 13 | 14 | ZSH_THEME_GIT_PROMPT_PREFIX="" 15 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 16 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ✗%{$reset_color%}" 17 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔%{$reset_color%}" 18 | 19 | -------------------------------------------------------------------------------- /themes/murilasso.zsh-theme: -------------------------------------------------------------------------------- 1 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 2 | local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' 3 | local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}' 4 | local rvm_ruby='%{$fg[red]%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%}' 5 | local git_branch='%{$fg[blue]%}$(git_prompt_info)%{$reset_color%}' 6 | 7 | PROMPT="${user_host}:${current_dir} ${rvm_ruby} 8 | ${git_branch} %B$%b " 9 | RPS1="${return_code}" 10 | 11 | ZSH_THEME_GIT_PROMPT_PREFIX="" 12 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 13 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}" 14 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}" 15 | -------------------------------------------------------------------------------- /themes/minimal.zsh-theme: -------------------------------------------------------------------------------- 1 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}[" 2 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 3 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} " 4 | ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} " 5 | ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX 6 | ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX 7 | ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY 8 | ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN 9 | 10 | vcs_status() { 11 | if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then 12 | svn_prompt_info 13 | else 14 | git_prompt_info 15 | fi 16 | } 17 | 18 | PROMPT='%2~ $(vcs_status)»%b ' -------------------------------------------------------------------------------- /lib/grep.zsh: -------------------------------------------------------------------------------- 1 | # 2 | # Color grep results 3 | # Examples: http://rubyurl.com/ZXv 4 | # 5 | 6 | GREP_OPTIONS="--color=auto" 7 | 8 | # avoid VCS folders (if the necessary grep flags are available) 9 | grep-flag-available() { 10 | echo | grep $1 "" >/dev/null 2>&1 11 | } 12 | if grep-flag-available --exclude-dir=.cvs; then 13 | for PATTERN in .cvs .git .hg .svn; do 14 | GREP_OPTIONS+=" --exclude-dir=$PATTERN" 15 | done 16 | elif grep-flag-available --exclude=.cvs; then 17 | for PATTERN in .cvs .git .hg .svn; do 18 | GREP_OPTIONS+=" --exclude=$PATTERN" 19 | done 20 | fi 21 | unfunction grep-flag-available 22 | 23 | export GREP_OPTIONS="$GREP_OPTIONS" 24 | export GREP_COLOR='1;32' 25 | -------------------------------------------------------------------------------- /plugins/autoenv/autoenv.plugin.zsh: -------------------------------------------------------------------------------- 1 | # The use_env call below is a reusable command to activate/create a new Python 2 | # virtualenv, requiring only a single declarative line of code in your .env files. 3 | # It only performs an action if the requested virtualenv is not the current one. 4 | use_env() { 5 | typeset venv 6 | venv="$1" 7 | if [[ "${VIRTUAL_ENV:t}" != "$venv" ]]; then 8 | if workon | grep -q "$venv"; then 9 | workon "$venv" 10 | else 11 | echo -n "Create virtualenv $venv now? (Yn) " 12 | read answer 13 | if [[ "$answer" == "Y" ]]; then 14 | mkvirtualenv "$venv" 15 | fi 16 | fi 17 | fi 18 | } 19 | -------------------------------------------------------------------------------- /plugins/sudo/sudo.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Description 3 | # ----------- 4 | # 5 | # sudo will be inserted before the command 6 | # 7 | # ------------------------------------------------------------------------------ 8 | # Authors 9 | # ------- 10 | # 11 | # * Dongweiming 12 | # 13 | # ------------------------------------------------------------------------------ 14 | 15 | sudo-command-line() { 16 | [[ -z $BUFFER ]] && zle up-history 17 | [[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER" 18 | zle end-of-line 19 | } 20 | zle -N sudo-command-line 21 | # Defined shortcut keys: [Esc] [Esc] 22 | bindkey "\e\e" sudo-command-line 23 | -------------------------------------------------------------------------------- /themes/macovsky.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png 2 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | if [ -e ~/.rvm/bin/rvm-prompt ]; then 5 | PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' 6 | else 7 | if which rbenv &> /dev/null; then 8 | PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' 9 | fi 10 | fi 11 | RPS1="${return_code}" 12 | 13 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" 14 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 15 | -------------------------------------------------------------------------------- /themes/macovsky-ruby.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png 2 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | if [ -e ~/.rvm/bin/rvm-prompt ]; then 5 | PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' 6 | else 7 | if which rbenv &> /dev/null; then 8 | PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b ' 9 | fi 10 | fi 11 | 12 | RPS1="${return_code}" 13 | 14 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" 15 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 16 | -------------------------------------------------------------------------------- /plugins/dirpersist/dirpersist.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Save dirstack history to .zdirs 2 | # adapted from: 3 | # github.com/grml/grml-etc-core/blob/master/etc/zsh/zshrc#L1547 4 | 5 | DIRSTACKSIZE=${DIRSTACKSIZE:-20} 6 | dirstack_file=${dirstack_file:-${HOME}/.zdirs} 7 | 8 | if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then 9 | dirstack=( ${(f)"$(< $dirstack_file)"} ) 10 | # "cd -" won't work after login by just setting $OLDPWD, so 11 | [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD 12 | fi 13 | 14 | chpwd() { 15 | if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi 16 | local -ax my_stack 17 | my_stack=( ${PWD} ${dirstack} ) 18 | builtin print -l ${(u)my_stack} >! ${dirstack_file} 19 | } 20 | -------------------------------------------------------------------------------- /plugins/sfffe/sfffe.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # FILE: sfffe.plugin.zsh 3 | # DESCRIPTION: search file for FE 4 | # AUTHOR: yleo77 (ylep77@gmail.com) 5 | # VERSION: 0.1 6 | # REQUIRE: ack 7 | # ------------------------------------------------------------------------------ 8 | 9 | if [ ! -x $(which ack) ]; then 10 | echo \'ack\' is not installed! 11 | exit -1 12 | fi 13 | 14 | ajs() { 15 | ack "$@" --type js 16 | } 17 | 18 | acss() { 19 | ack "$@" --type css 20 | } 21 | 22 | fjs() { 23 | find ./ -name "$@*" -type f | grep '\.js' 24 | } 25 | 26 | fcss() { 27 | find ./ -name "$@*" -type f | grep '\.css' 28 | } 29 | -------------------------------------------------------------------------------- /plugins/compleat/compleat.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # FILE: compleat.plugin.zsh 3 | # DESCRIPTION: oh-my-zsh plugin file. 4 | # AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com) 5 | # VERSION: 1.0.0 6 | # ------------------------------------------------------------------------------ 7 | 8 | if (( ${+commands[compleat]} )); then 9 | local prefix="${commands[compleat]:h:h}" 10 | local setup="${prefix}/share/compleat-1.0/compleat_setup" 11 | 12 | if [[ -f "$setup" ]]; then 13 | if ! bashcompinit >/dev/null 2>&1; then 14 | autoload -U bashcompinit 15 | bashcompinit -i 16 | fi 17 | 18 | source "$setup" 19 | fi 20 | fi 21 | -------------------------------------------------------------------------------- /themes/flazz.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ "$(whoami)" = "root" ] 2 | then CARETCOLOR="red" 3 | else CARETCOLOR="blue" 4 | fi 5 | 6 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 7 | 8 | PROMPT='%m%{${fg_bold[magenta]}%} :: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}%#%{${reset_color}%} ' 9 | 10 | RPS1='$(vi_mode_prompt_info) ${return_code}' 11 | 12 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}‹" 13 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 14 | 15 | MODE_INDICATOR="%{$fg_bold[magenta]%}<%{$reset_color%}%{$fg[magenta]%}<<%{$reset_color%}" 16 | 17 | # TODO use 265 colors 18 | #MODE_INDICATOR="$FX[bold]$FG[020]<$FX[no_bold]%{$fg[blue]%}<<%{$reset_color%}" 19 | # TODO use two lines if git 20 | -------------------------------------------------------------------------------- /themes/jaischeema.zsh-theme: -------------------------------------------------------------------------------- 1 | # jaischeema.zsh-theme 2 | 3 | PROMPT='%{$fg_bold[magenta]%}%m%{$reset_color%} at %{$fg_bold[green]%}%~%{$reset_color%} %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}%{$fg[red]%}❯%{$reset_color%} ' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="±(%{$fg[red]%}" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%} " 8 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) " 9 | 10 | if which rbenv &> /dev/null; then 11 | RPROMPT='%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%}' 12 | else 13 | if which rvm-prompt &> /dev/null; then 14 | RPROMPT='%{$fg[red]%}$(rvm-prompt)%{$reset_color%}' 15 | fi 16 | fi 17 | -------------------------------------------------------------------------------- /themes/dstufft.zsh-theme: -------------------------------------------------------------------------------- 1 | function prompt_char { 2 | git branch >/dev/null 2>/dev/null && echo '±' && return 3 | hg root >/dev/null 2>/dev/null && echo 'Hg' && return 4 | echo '○' 5 | } 6 | 7 | function virtualenv_info { 8 | [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' 9 | } 10 | 11 | PROMPT=' 12 | %{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) 13 | $(virtualenv_info)$(prompt_char) ' 14 | 15 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" 16 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 17 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" 18 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" 19 | ZSH_THEME_GIT_PROMPT_CLEAN="" 20 | -------------------------------------------------------------------------------- /themes/re5et.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi 2 | 3 | local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})" 4 | 5 | PROMPT=' 6 | %{$fg_bold[cyan]%}%n%{$reset_color%}%{$fg[yellow]%}@%{$reset_color%}%{$fg_bold[blue]%}%m%{$reset_color%}:%{${fg_bold[green]}%}%~%{$reset_color%}$(git_prompt_info) 7 | %{${fg[$CARETCOLOR]}%}%# %{${reset_color}%}' 8 | 9 | RPS1='${return_code} %D - %*' 10 | 11 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[magenta]%}^%{$reset_color%}%{$fg_bold[yellow]%}" 12 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 13 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} ±" 14 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ?" 15 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[red]%} ♥" 16 | -------------------------------------------------------------------------------- /plugins/aws/aws.plugin.zsh: -------------------------------------------------------------------------------- 1 | _homebrew-installed() { 2 | type brew &> /dev/null 3 | } 4 | 5 | _awscli-homebrew-installed() { 6 | brew --prefix awscli &> /dev/null 7 | } 8 | 9 | export AWS_HOME=~/.aws 10 | 11 | function agp { 12 | echo $AWS_DEFAULT_PROFILE 13 | 14 | } 15 | function asp { 16 | export AWS_DEFAULT_PROFILE=$1 17 | export RPROMPT="" 18 | 19 | } 20 | function aws_profiles { 21 | reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/')) 22 | } 23 | 24 | compctl -K aws_profiles asp 25 | 26 | if _homebrew-installed && _awscli-homebrew-installed ; then 27 | source $(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh 28 | else 29 | source `which aws_zsh_completer.sh` 30 | fi 31 | -------------------------------------------------------------------------------- /plugins/vundle/vundle.plugin.zsh: -------------------------------------------------------------------------------- 1 | function vundle-init () { 2 | if [ ! -d ~/.vim/bundle/vundle/ ] 3 | then 4 | mkdir -p ~/.vim/bundle/vundle/ 5 | fi 6 | 7 | if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ] 8 | then 9 | git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle 10 | echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n" 11 | fi 12 | } 13 | 14 | function vundle () { 15 | vundle-init 16 | vim -c "execute \"BundleInstall\" | q | q" 17 | } 18 | 19 | function vundle-update () { 20 | vundle-init 21 | vim -c "execute \"BundleInstall!\" | q | q" 22 | } 23 | 24 | function vundle-clean () { 25 | vundle-init 26 | vim -c "execute \"BundleClean!\" | q | q" 27 | } 28 | -------------------------------------------------------------------------------- /themes/awesomepanda.zsh-theme: -------------------------------------------------------------------------------- 1 | # the svn plugin has to be activated for this to work. 2 | 3 | PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' 4 | 5 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}" 8 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) " 9 | 10 | 11 | 12 | ZSH_PROMPT_BASE_COLOR="%{$fg_bold[blue]%}" 13 | ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}" 14 | 15 | ZSH_THEME_SVN_PROMPT_PREFIX="svn:(" 16 | ZSH_THEME_SVN_PROMPT_SUFFIX=")" 17 | ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}" 18 | ZSH_THEME_SVN_PROMPT_CLEAN=" " -------------------------------------------------------------------------------- /lib/aliases.zsh: -------------------------------------------------------------------------------- 1 | # Push and pop directories on directory stack 2 | alias pu='pushd' 3 | alias po='popd' 4 | 5 | # Basic directory operations 6 | alias ...='cd ../..' 7 | alias -- -='cd -' 8 | 9 | # Super user 10 | alias _='sudo' 11 | alias please='sudo' 12 | 13 | #alias g='grep -in' 14 | 15 | # Show history 16 | if [ "$HIST_STAMPS" = "mm/dd/yyyy" ] 17 | then 18 | alias history='fc -fl 1' 19 | elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ] 20 | then 21 | alias history='fc -El 1' 22 | elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ] 23 | then 24 | alias history='fc -il 1' 25 | else 26 | alias history='fc -l 1' 27 | fi 28 | # List direcory contents 29 | alias lsa='ls -lah' 30 | alias l='ls -lah' 31 | alias ll='ls -lh' 32 | alias la='ls -lAh' 33 | 34 | alias afind='ack-grep -il' 35 | 36 | -------------------------------------------------------------------------------- /plugins/symfony2/symfony2.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Symfony2 basic command completion 2 | 3 | _symfony_console () { 4 | echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" 5 | } 6 | 7 | _symfony2_get_command_list () { 8 | `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' 9 | } 10 | 11 | _symfony2 () { 12 | compadd `_symfony2_get_command_list` 13 | } 14 | 15 | compdef _symfony2 '`_symfony_console`' 16 | compdef _symfony2 'app/console' 17 | compdef _symfony2 'bin/console' 18 | compdef _symfony2 sf 19 | 20 | #Alias 21 | alias sf='`_symfony_console`' 22 | alias sfcl='sf cache:clear' 23 | alias sfcw='sf cache:warmup' 24 | alias sfroute='sf router:debug' 25 | alias sfcontainer='sf container:debug' 26 | alias sfgb='sf generate:bundle' -------------------------------------------------------------------------------- /tools/uninstall.sh: -------------------------------------------------------------------------------- 1 | echo "Removing ~/.oh-my-zsh" 2 | if [[ -d ~/.oh-my-zsh ]] 3 | then 4 | rm -rf ~/.oh-my-zsh 5 | fi 6 | 7 | echo "Looking for original zsh config..." 8 | if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ] 9 | then 10 | echo "Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc"; 11 | 12 | if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] 13 | then 14 | ZSHRC_SAVE=".zshrc.omz-uninstalled-`date +%Y%m%d%H%M%S`"; 15 | echo "Found ~/.zshrc -- Renaming to ~/${ZSHRC_SAVE}"; 16 | mv ~/.zshrc ~/${ZSHRC_SAVE}; 17 | fi 18 | 19 | mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc; 20 | 21 | source ~/.zshrc; 22 | else 23 | echo "Switching back to bash" 24 | chsh -s /bin/bash 25 | source /etc/profile 26 | fi 27 | 28 | echo "Thanks for trying out Oh My Zsh. It's been uninstalled." 29 | -------------------------------------------------------------------------------- /themes/kolo.zsh-theme: -------------------------------------------------------------------------------- 1 | autoload -U colors && colors 2 | 3 | autoload -Uz vcs_info 4 | 5 | zstyle ':vcs_info:*' stagedstr '%F{green}●' 6 | zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' 7 | zstyle ':vcs_info:*' check-for-changes true 8 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r' 9 | zstyle ':vcs_info:*' enable git svn 10 | theme_precmd () { 11 | if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { 12 | zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]' 13 | } else { 14 | zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]' 15 | } 16 | 17 | vcs_info 18 | } 19 | 20 | setopt prompt_subst 21 | PROMPT='%B%F{magenta}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}%% ' 22 | 23 | autoload -U add-zsh-hook 24 | add-zsh-hook precmd theme_precmd 25 | -------------------------------------------------------------------------------- /themes/zhann.zsh-theme: -------------------------------------------------------------------------------- 1 | autoload -U colors && colors 2 | 3 | autoload -Uz vcs_info 4 | 5 | zstyle ':vcs_info:*' stagedstr '%F{green}●' 6 | zstyle ':vcs_info:*' unstagedstr '%F{yellow}●' 7 | zstyle ':vcs_info:*' check-for-changes true 8 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r' 9 | zstyle ':vcs_info:*' enable git svn 10 | theme_precmd () { 11 | if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { 12 | zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{green}]' 13 | } else { 14 | zstyle ':vcs_info:*' formats ' [%b%c%u%B%F{red}●%F{green}]' 15 | } 16 | 17 | vcs_info 18 | } 19 | 20 | setopt prompt_subst 21 | PROMPT='%B%F{blue}%c%B%F{green}${vcs_info_msg_0_}%B%F{magenta} %{$reset_color%}% ' 22 | 23 | autoload -U add-zsh-hook 24 | add-zsh-hook precmd theme_precmd 25 | 26 | -------------------------------------------------------------------------------- /plugins/nvm/_nvm: -------------------------------------------------------------------------------- 1 | #compdef nvm 2 | #autoload 3 | 4 | [[ -s ~/.nvm/nvm.sh ]] || return 0 5 | 6 | local -a _1st_arguments 7 | _1st_arguments=( 8 | 'help:show help' 9 | 'install:download and install a version' 10 | 'uninstall:uninstall a version' 11 | 'use:modify PATH to use version' 12 | 'run:run version with given arguments' 13 | 'ls:list installed versions or versions matching a given description' 14 | 'ls-remote:list remote versions available for install' 15 | 'deactivate:undo effects of NVM on current shell' 16 | 'alias:show or set aliases' 17 | 'unalias:deletes an alias' 18 | 'copy-packages:install global NPM packages to current version' 19 | ) 20 | 21 | _arguments -C '*:: :->subcmds' && return 0 22 | 23 | if (( CURRENT == 1 )); then 24 | _describe -t commands "nvm subcommand" _1st_arguments 25 | return 26 | fi -------------------------------------------------------------------------------- /plugins/textmate/textmate.plugin.zsh: -------------------------------------------------------------------------------- 1 | alias et='mate .' 2 | alias ett='mate Gemfile app config features lib db public spec test Rakefile Capfile Todo' 3 | alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo' 4 | alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo' 5 | 6 | # Edit Ruby app in TextMate 7 | alias mr='mate CHANGELOG app config db lib public script spec test' 8 | 9 | # If the tm command is called without an argument, open TextMate in the current directory 10 | # If tm is passed a directory, cd to it and open it in TextMate 11 | # If tm is passed a file, open it in TextMate 12 | function tm() { 13 | if [[ -z $1 ]]; then 14 | mate . 15 | else 16 | mate $1 17 | if [[ -d $1 ]]; then 18 | cd $1 19 | fi 20 | fi 21 | } 22 | -------------------------------------------------------------------------------- /plugins/sbt/sbt.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # FILE: sbt.plugin.zsh 3 | # DESCRIPTION: oh-my-zsh plugin file. 4 | # AUTHOR: Mirko Caserta (mirko.caserta@gmail.com) 5 | # VERSION: 1.0.2 6 | # ------------------------------------------------------------------------------ 7 | 8 | # aliases - mnemonic: prefix is 'sb' 9 | alias sbc='sbt compile' 10 | alias sbco='sbt console' 11 | alias sbcq='sbt console-quick' 12 | alias sbcl='sbt clean' 13 | alias sbcp='sbt console-project' 14 | alias sbd='sbt doc' 15 | alias sbdc='sbt dist:clean' 16 | alias sbdi='sbt dist' 17 | alias sbgi='sbt gen-idea' 18 | alias sbp='sbt publish' 19 | alias sbpl='sbt publish-local' 20 | alias sbr='sbt run' 21 | alias sbrm='sbt run-main' 22 | alias sbu='sbt update' 23 | alias sbx='sbt test' 24 | -------------------------------------------------------------------------------- /plugins/cake/cake.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Set this to 1 if you want to cache the tasks 2 | _cake_cache_task_list=1 3 | 4 | # Cache filename 5 | _cake_task_cache_file='.cake_task_cache' 6 | 7 | _cake_get_target_list () { 8 | cake | grep '^cake ' | sed -e "s/cake \([^ ]*\) .*/\1/" | grep -v '^$' 9 | } 10 | 11 | _cake_does_target_list_need_generating () { 12 | 13 | if [ ${_cake_cache_task_list} -eq 0 ]; then 14 | return 1; 15 | fi 16 | 17 | [ ! -f ${_cake_task_cache_file} ] && return 0; 18 | [ ${_cake_task_cache_file} -nt Cakefile ] && return 0; 19 | return 1; 20 | } 21 | 22 | _cake () { 23 | if [ -f Cakefile ]; then 24 | if _cake_does_target_list_need_generating; then 25 | _cake_get_target_list > ${_cake_task_cache_file} 26 | compadd `cat ${_cake_task_cache_file}` 27 | else 28 | compadd `_cake_get_target_list` 29 | fi 30 | fi 31 | } 32 | 33 | compdef _cake cake 34 | -------------------------------------------------------------------------------- /themes/bira.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png 2 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' 5 | local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' 6 | local rvm_ruby='' 7 | if which rvm-prompt &> /dev/null; then 8 | rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' 9 | else 10 | if which rbenv &> /dev/null; then 11 | rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' 12 | fi 13 | fi 14 | local git_branch='$(git_prompt_info)%{$reset_color%}' 15 | 16 | PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} 17 | ╰─%B$%b " 18 | RPS1="${return_code}" 19 | 20 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" 21 | ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" 22 | -------------------------------------------------------------------------------- /themes/rixius.zsh-theme: -------------------------------------------------------------------------------- 1 | # name in folder (github) 2 | # ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right. 3 | function collapse_pwd { 4 | echo $(pwd | sed -e "s,^$HOME,~,") 5 | } 6 | function prompt_char { 7 | echo -n "%{$bg[white]%}%{$fg[red]%}" 8 | git branch >/dev/null 2>/dev/null && echo "±%{$reset_color%}" && return 9 | echo "≥%{$reset_color%}" 10 | } 11 | RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}" 12 | 13 | PROMPT=' 14 | %{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info) 15 | $(prompt_char) ' 16 | RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}' 17 | 18 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" 19 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 20 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}" 21 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}" 22 | -------------------------------------------------------------------------------- /plugins/colorize/colorize.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Plugin for highlighting file content 2 | # Plugin highlights file content based on the filename extension. 3 | # If no highlighting method supported for given extension then it tries 4 | # guess it by looking for file content. 5 | 6 | alias colorize='colorize_via_pygmentize' 7 | 8 | colorize_via_pygmentize() { 9 | if [ ! -x "$(which pygmentize)" ]; then 10 | echo "package \'pygmentize\' is not installed!" 11 | return -1 12 | fi 13 | 14 | if [ $# -eq 0 ]; then 15 | pygmentize -g $@ 16 | fi 17 | 18 | for FNAME in $@ 19 | do 20 | filename=$(basename "$FNAME") 21 | lexer=`pygmentize -N \"$filename\"` 22 | if [ "Z$lexer" != "Ztext" ]; then 23 | pygmentize -l $lexer "$FNAME" 24 | else 25 | pygmentize -g "$FNAME" 26 | fi 27 | done 28 | } 29 | -------------------------------------------------------------------------------- /plugins/catimg/catimg.plugin.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # catimg script by Eduardo San Martin Morote aka Posva # 3 | # http://posva.net # 4 | # # 5 | # Ouput the content of an image to the stdout using the 256 colors of the # 6 | # terminal. # 7 | # Github: https://github.com/posva/catimg # 8 | ################################################################################ 9 | 10 | 11 | function catimg() { 12 | if [[ -x `which convert` ]]; then 13 | zsh $ZSH/plugins/catimg/catimg.sh $@ 14 | else 15 | echo "catimg need convert (ImageMagick) to work)" 16 | fi 17 | } 18 | -------------------------------------------------------------------------------- /themes/sunaku.zsh-theme: -------------------------------------------------------------------------------- 1 | # Git-centric variation of the "fishy" theme. 2 | # See screenshot at http://ompldr.org/vOHcwZg 3 | 4 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+" 5 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!" 6 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}-" 7 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}>" 8 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}#" 9 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}?" 10 | 11 | ZSH_THEME_GIT_PROMPT_PREFIX="" 12 | ZSH_THEME_GIT_PROMPT_SUFFIX=" " 13 | ZSH_THEME_GIT_PROMPT_DIRTY="" 14 | ZSH_THEME_GIT_PROMPT_CLEAN="" 15 | 16 | local user_color='green' 17 | test $UID -eq 0 && user_color='red' 18 | 19 | PROMPT='%(?..%{$fg_bold[red]%}exit %? 20 | %{$reset_color%})'\ 21 | '%{$bold_color%}$(git_prompt_status)%{$reset_color%}'\ 22 | '$(git_prompt_info)'\ 23 | '%{$fg[$user_color]%}%~%{$reset_color%}'\ 24 | '%(!.#.>) ' 25 | 26 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 27 | -------------------------------------------------------------------------------- /themes/takashiyoshida.zsh-theme: -------------------------------------------------------------------------------- 1 | # 2 | # PROMPT 3 | # 4 | PROMPT_BRACKET_BEGIN='%{$fg_bold[white]%}[' 5 | PROMPT_HOST='%{$fg_bold[cyan]%}%m' 6 | PROMPT_SEPARATOR='%{$reset_color%}:' 7 | PROMPT_DIR='%{$fg_bold[yellow]%}%c' 8 | PROMPT_BRACKET_END='%{$fg_bold[white]%}]' 9 | 10 | PROMPT_USER='%{$fg_bold[white]%}%n' 11 | PROMPT_SIGN='%{$reset_color%}%#' 12 | 13 | GIT_PROMPT_INFO='$(git_prompt_info)' 14 | 15 | # My current prompt looks like: 16 | # [host:current_dir] (git_prompt_info) 17 | # [username]% 18 | PROMPT="${PROMPT_BRACKET_BEGIN}${PROMPT_HOST}${PROMPT_SEPARATOR}${PROMPT_DIR}${PROMPT_BRACKET_END}${GIT_PROMPT_INFO} 19 | ${PROMPT_BRACKET_BEGIN}${PROMPT_USER}${PROMPT_BRACKET_END}${PROMPT_SIGN} " 20 | 21 | # 22 | # Git repository 23 | # 24 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" 25 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 26 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" 27 | ZSH_THEME_GIT_PROMPT_CLEAN='' 28 | -------------------------------------------------------------------------------- /plugins/rake-fast/README.md: -------------------------------------------------------------------------------- 1 | # rake-fast 2 | 3 | Fast rake autocompletion plugin. 4 | 5 | This script caches the output for later usage and significantly speeds it up. It generates a .rake_tasks cache file in parallel to the Rakefile. It also checks the file modification dates to see if it needs to regenerate the cache file. 6 | 7 | This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/). 8 | 9 | Think about that. 2006. 10 | 11 | ## Installation 12 | 13 | Just add the plugin to your `.zshrc`: 14 | 15 | ```bash 16 | plugins=(foo bar rake-fast) 17 | ``` 18 | 19 | You might consider adding `.rake_tasks` to your [global .gitignore](https://help.github.com/articles/ignoring-files#global-gitignore) 20 | 21 | ## Usage 22 | 23 | `rake`, then press tab 24 | -------------------------------------------------------------------------------- /plugins/yum/yum.plugin.zsh: -------------------------------------------------------------------------------- 1 | ## Aliases 2 | 3 | alias ys="yum search" # search package 4 | alias yp="yum info" # show package info 5 | alias yl="yum list" # list packages 6 | alias ygl="yum grouplist" # list package groups 7 | alias yli="yum list installed" # print all installed packages 8 | alias ymc="yum makecache" # rebuilds the yum package list 9 | 10 | alias yu="sudo yum update" # upgrate packages 11 | alias yi="sudo yum install" # install package 12 | alias ygi="sudo yum groupinstall" # install package group 13 | alias yr="sudo yum remove" # remove package 14 | alias ygr="sudo yum groupremove" # remove pagage group 15 | alias yrl="sudo yum remove --remove-leaves" # remove package and leaves 16 | alias yc="sudo yum clean all" # clean cache -------------------------------------------------------------------------------- /plugins/last-working-dir/last-working-dir.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | # Keeps track of the last used working directory and automatically jumps 3 | # into it for new shells. 4 | 5 | # Flag indicating if we've previously jumped to last directory. 6 | typeset -g ZSH_LAST_WORKING_DIRECTORY 7 | mkdir -p "$ZSH/cache" 8 | local cache_file="$ZSH/cache/last-working-dir" 9 | 10 | # Updates the last directory once directory is changed. 11 | function chpwd() { 12 | # Use >| in case noclobber is set to avoid "file exists" error 13 | pwd >| "$cache_file" 14 | } 15 | 16 | # Changes directory to the last working directory. 17 | function lwd() { 18 | [[ ! -r "$cache_file" ]] || cd `cat "$cache_file"` 19 | } 20 | 21 | # Automatically jump to last working directory unless this isn't the first time 22 | # this plugin has been loaded. 23 | if [[ -z "$ZSH_LAST_WORKING_DIRECTORY" ]]; then 24 | lwd 2>/dev/null && ZSH_LAST_WORKING_DIRECTORY=1 || true 25 | fi 26 | -------------------------------------------------------------------------------- /plugins/taskwarrior/taskwarrior.plugin.zsh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # Author: Pete Clark 3 | # Email: pete[dot]clark[at]gmail[dot]com 4 | # Version: 0.1 (05/24/2011) 5 | # License: WTFPL 6 | # 7 | # This oh-my-zsh plugin adds smart tab completion for 8 | # TaskWarrior. It uses the zsh tab completion 9 | # script (_task) distributed with TaskWarrior for the completion definitions. 10 | # 11 | # Typing task[tabtab] will give you a list of current tasks, task 66[tabtab] 12 | # gives a list of available modifications for that task, etc. 13 | ################################################################################ 14 | 15 | zstyle ':completion:*:*:task:*' verbose yes 16 | zstyle ':completion:*:*:task:*:descriptions' format '%U%B%d%b%u' 17 | 18 | zstyle ':completion:*:*:task:*' group-name '' 19 | 20 | alias t=task 21 | compdef _task t=task 22 | -------------------------------------------------------------------------------- /plugins/pyenv/pyenv.plugin.zsh: -------------------------------------------------------------------------------- 1 | _homebrew-installed() { 2 | type brew &> /dev/null 3 | } 4 | 5 | _pyenv-from-homebrew-installed() { 6 | brew --prefix pyenv &> /dev/null 7 | } 8 | 9 | FOUND_PYENV=0 10 | pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv") 11 | if _homebrew-installed && _pyenv-from-homebrew-installed ; then 12 | pyenvdirs=($(brew --prefix pyenv) "${pyenvdirs[@]}") 13 | fi 14 | 15 | for pyenvdir in "${pyenvdirs[@]}" ; do 16 | if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then 17 | FOUND_PYENV=1 18 | export PYENV_ROOT=$pyenvdir 19 | export PATH=${pyenvdir}/bin:$PATH 20 | eval "$(pyenv init --no-rehash - zsh)" 21 | 22 | function pyenv_prompt_info() { 23 | echo "$(pyenv version-name)" 24 | } 25 | fi 26 | done 27 | unset pyenvdir 28 | 29 | if [ $FOUND_PYENV -eq 0 ] ; then 30 | function pyenv_prompt_info() { echo "system: $(python -V 2>&1 | cut -f 2 -d ' ')" } 31 | fi 32 | -------------------------------------------------------------------------------- /themes/apple.zsh-theme: -------------------------------------------------------------------------------- 1 | function toon { 2 | echo -n "" 3 | } 4 | 5 | get_git_dirty() { 6 | git diff --quiet || echo '*' 7 | } 8 | 9 | autoload -Uz vcs_info 10 | autoload -U colors && colors 11 | zstyle ':vcs_info:*' check-for-changes true 12 | zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes 13 | zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes 14 | zstyle ':vcs_info:*' actionformats \ 15 | '%F{5}%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f ' 16 | zstyle ':vcs_info:*' formats \ 17 | '%F{5}%F{5}[%F{2}%b%c%u%F{5}]%f ' 18 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' 19 | zstyle ':vcs_info:*' enable git cvs svn 20 | 21 | theme_precmd () { 22 | vcs_info 23 | } 24 | 25 | setopt prompt_subst 26 | PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}' 27 | 28 | autoload -U add-zsh-hook 29 | add-zsh-hook precmd theme_precmd -------------------------------------------------------------------------------- /themes/mikeh.zsh-theme: -------------------------------------------------------------------------------- 1 | setopt prompt_subst 2 | autoload colors 3 | colors 4 | 5 | autoload -U add-zsh-hook 6 | autoload -Uz vcs_info 7 | 8 | # check-for-changes can be really slow. 9 | # you should disable it, if you work with large repositories 10 | zstyle ':vcs_info:*:prompt:*' check-for-changes true 11 | 12 | add-zsh-hook precmd mikeh_precmd 13 | 14 | mikeh_precmd() { 15 | vcs_info 16 | } 17 | 18 | # user, host, full path, and time/date 19 | # on two lines for easier vgrepping 20 | # entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 21 | PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} 22 | %{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' 23 | PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' -------------------------------------------------------------------------------- /themes/eastwood.zsh-theme: -------------------------------------------------------------------------------- 1 | # RVM settings 2 | if [[ -s ~/.rvm/scripts/rvm ]] ; then 3 | RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" 4 | else 5 | if which rbenv &> /dev/null; then 6 | RPS1="%{$fg[yellow]%}rbenv:%{$reset_color%}%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$reset_color%} $EPS1" 7 | fi 8 | fi 9 | 10 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" 11 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" 12 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" 13 | ZSH_THEME_GIT_PROMPT_CLEAN="" 14 | 15 | # Customized git status, oh-my-zsh currently does not allow render dirty status before branch 16 | git_custom_status() { 17 | local cb=$(current_branch) 18 | if [ -n "$cb" ]; then 19 | echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" 20 | fi 21 | } 22 | 23 | PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b ' 24 | -------------------------------------------------------------------------------- /lib/directories.zsh: -------------------------------------------------------------------------------- 1 | # Changing/making/removing directory 2 | setopt auto_name_dirs 3 | setopt auto_pushd 4 | setopt pushd_ignore_dups 5 | setopt pushdminus 6 | 7 | alias ..='cd ..' 8 | alias cd..='cd ..' 9 | alias cd...='cd ../..' 10 | alias cd....='cd ../../..' 11 | alias cd.....='cd ../../../..' 12 | alias cd/='cd /' 13 | 14 | alias 1='cd -' 15 | alias 2='cd -2' 16 | alias 3='cd -3' 17 | alias 4='cd -4' 18 | alias 5='cd -5' 19 | alias 6='cd -6' 20 | alias 7='cd -7' 21 | alias 8='cd -8' 22 | alias 9='cd -9' 23 | 24 | cd () { 25 | if [[ "x$*" == "x..." ]]; then 26 | cd ../.. 27 | elif [[ "x$*" == "x...." ]]; then 28 | cd ../../.. 29 | elif [[ "x$*" == "x....." ]]; then 30 | cd ../../../.. 31 | elif [[ "x$*" == "x......" ]]; then 32 | cd ../../../../.. 33 | elif [ -d ~/.autoenv ]; then 34 | source ~/.autoenv/activate.sh 35 | autoenv_cd "$@" 36 | else 37 | builtin cd "$@" 38 | fi 39 | } 40 | 41 | alias md='mkdir -p' 42 | alias rd=rmdir 43 | alias d='dirs -v | head -10' 44 | -------------------------------------------------------------------------------- /plugins/autojump/autojump.plugin.zsh: -------------------------------------------------------------------------------- 1 | if [ $commands[autojump] ]; then # check if autojump is installed 2 | if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation 3 | . $HOME/.autojump/etc/profile.d/autojump.zsh 4 | elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package 5 | . /usr/share/autojump/autojump.zsh 6 | elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation 7 | . /etc/profile.d/autojump.zsh 8 | elif [ -f /etc/profile.d/autojump.sh ]; then # gentoo installation 9 | . /etc/profile.d/autojump.sh 10 | elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation 11 | . /usr/local/share/autojump/autojump.zsh 12 | elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports 13 | . /opt/local/etc/profile.d/autojump.zsh 14 | elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew 15 | . `brew --prefix`/etc/autojump.zsh 16 | fi 17 | fi 18 | -------------------------------------------------------------------------------- /themes/lukerandall.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc 2 | # Thanks to gallifrey, upon whose theme this is based 3 | 4 | local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" 5 | 6 | function my_git_prompt_info() { 7 | ref=$(git symbolic-ref HEAD 2> /dev/null) || return 8 | GIT_STATUS=$(git_prompt_status) 9 | [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS" 10 | echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX" 11 | } 12 | 13 | PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b ' 14 | RPS1="${return_code}" 15 | 16 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" 17 | ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" 18 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%%" 19 | ZSH_THEME_GIT_PROMPT_ADDED="+" 20 | ZSH_THEME_GIT_PROMPT_MODIFIED="*" 21 | ZSH_THEME_GIT_PROMPT_RENAMED="~" 22 | ZSH_THEME_GIT_PROMPT_DELETED="!" 23 | ZSH_THEME_GIT_PROMPT_UNMERGED="?" 24 | 25 | -------------------------------------------------------------------------------- /plugins/rake-fast/rake-fast.plugin.zsh: -------------------------------------------------------------------------------- 1 | _rake_refresh () { 2 | if [ -f .rake_tasks ]; then 3 | rm .rake_tasks 4 | fi 5 | echo "Generating .rake_tasks..." > /dev/stderr 6 | _rake_generate 7 | cat .rake_tasks 8 | } 9 | 10 | _rake_does_task_list_need_generating () { 11 | if [ ! -f .rake_tasks ]; then return 0; 12 | else 13 | if [[ "$OSTYPE" = darwin* ]]; then 14 | accurate=$(stat -f%m .rake_tasks) 15 | changed=$(stat -f%m Rakefile) 16 | else 17 | accurate=$(stat -c%Y .rake_tasks) 18 | changed=$(stat -c%Y Rakefile) 19 | fi 20 | return $(expr $accurate '>=' $changed) 21 | fi 22 | } 23 | 24 | _rake_generate () { 25 | rake --silent --tasks | cut -d " " -f 2 > .rake_tasks 26 | } 27 | 28 | _rake () { 29 | if [ -f Rakefile ]; then 30 | if _rake_does_task_list_need_generating; then 31 | echo "\nGenerating .rake_tasks..." > /dev/stderr 32 | _rake_generate 33 | fi 34 | compadd `cat .rake_tasks` 35 | fi 36 | } 37 | 38 | compdef _rake rake 39 | alias rake_refresh='_rake_refresh' 40 | -------------------------------------------------------------------------------- /themes/superjarin.zsh-theme: -------------------------------------------------------------------------------- 1 | # Grab the current version of ruby in use (via RVM): [ruby-1.8.7] 2 | if [ -e ~/.rvm/bin/rvm-prompt ]; then 3 | JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}" 4 | else 5 | if which rbenv &> /dev/null; then 6 | JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}" 7 | fi 8 | fi 9 | 10 | # Grab the current filepath, use shortcuts: ~/Desktop 11 | # Append the current git branch, if in a git repository 12 | JARIN_CURRENT_LOCA_="%{$fg_bold[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" 13 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%} <%{$fg[magenta]%}" 14 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[white]%}" 15 | 16 | # Do nothing if the branch is clean (no changes). 17 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[white]%}>" 18 | 19 | # Add a yellow ✗ if the branch is dirty 20 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[white]%}> %{$fg[yellow]%}✗" 21 | 22 | # Put it all together! 23 | PROMPT="$JARIN_CURRENT_RUBY_ $JARIN_CURRENT_LOCA_ " 24 | 25 | -------------------------------------------------------------------------------- /plugins/rand-quote/rand-quote.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Get a random quote fron the site http://www.quotationspage.com/random.php3 2 | # Created by Eduardo San Martin Morote aka Posva 3 | # http://posva.github.io 4 | # Sun Jun 09 10:59:36 CEST 2013 5 | # Don't remove this header, thank you 6 | # Usage: quote 7 | 8 | WHO_COLOR="\e[0;33m" 9 | TEXT_COLOR="\e[0;35m" 10 | COLON_COLOR="\e[0;35m" 11 | END_COLOR="\e[m" 12 | 13 | if [[ -x `which curl` ]]; then 14 | function quote() 15 | { 16 | Q=$(curl -s --connect-timeout 2 "http://www.quotationspage.com/random.php3" | iconv -c -f ISO-8859-1 -t UTF-8 | grep -m 1 "dt ") 17 | TXT=$(echo "$Q" | sed -e 's/<\/dt>.*//g' -e 's/.*html//g' -e 's/^[^a-zA-Z]*//' -e 's/<\/a..*$//g') 18 | W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g') 19 | if [ "$W" -a "$TXT" ]; then 20 | echo "${WHO_COLOR}${W}${COLON_COLOR}: ${TEXT_COLOR}“${TXT}”${END_COLOR}" 21 | else 22 | quote 23 | fi 24 | } 25 | #quote 26 | else 27 | echo "rand-quote plugin needs curl to work" >&2 28 | fi 29 | -------------------------------------------------------------------------------- /themes/nebirhos.zsh-theme: -------------------------------------------------------------------------------- 1 | # Based on robbyrussell's theme, with host and rvm indicators. Example: 2 | # @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname) 3 | 4 | # Get the current ruby version in use with RVM: 5 | if [ -e ~/.rvm/bin/rvm-prompt ]; then 6 | RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " 7 | else 8 | if which rbenv &> /dev/null; then 9 | RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " 10 | fi 11 | fi 12 | 13 | # Get the host name (first 4 chars) 14 | HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$fg_bold[cyan]%}%c " 15 | GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" 16 | PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT" 17 | 18 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" 19 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 20 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" 21 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 22 | -------------------------------------------------------------------------------- /themes/blinks.zsh-theme: -------------------------------------------------------------------------------- 1 | # https://github.com/blinks zsh theme 2 | 3 | function _prompt_char() { 4 | if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then 5 | echo "%{%F{blue}%}±%{%f%k%b%}" 6 | else 7 | echo ' ' 8 | fi 9 | } 10 | 11 | # This theme works with both the "dark" and "light" variants of the 12 | # Solarized color schema. Set the SOLARIZED_THEME variable to one of 13 | # these two values to choose. If you don't specify, we'll assume you're 14 | # using the "dark" variant. 15 | 16 | case ${SOLARIZED_THEME:-dark} in 17 | light) bkg=white;; 18 | *) bkg=black;; 19 | esac 20 | 21 | ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}" 22 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]" 23 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}" 24 | ZSH_THEME_GIT_PROMPT_CLEAN="" 25 | 26 | PROMPT='%{%f%k%b%} 27 | %{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%} 28 | %{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} ' 29 | 30 | RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}' 31 | -------------------------------------------------------------------------------- /themes/humza.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme 2 | 3 | let TotalBytes=0 4 | for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }') 5 | do 6 | let TotalBytes=$TotalBytes+$Bytes 7 | done 8 | # should it say b, kb, Mb, or Gb 9 | if [ $TotalBytes -lt 1024 ]; then 10 | TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc) 11 | suffix="b" 12 | elif [ $TotalBytes -lt 1048576 ]; then 13 | TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc) 14 | suffix="kb" 15 | elif [ $TotalBytes -lt 1073741824 ]; then 16 | TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc) 17 | suffix="Mb" 18 | else 19 | TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc) 20 | suffix="Gb" 21 | fi 22 | 23 | PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ ' 24 | 25 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±(" 26 | ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}" 27 | -------------------------------------------------------------------------------- /themes/intheloop.zsh-theme: -------------------------------------------------------------------------------- 1 | # A multiline prompt with username, hostname, full path, return status, git branch, git dirty status, git remote status 2 | 3 | local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" 4 | 5 | local host_color="green" 6 | if [ -n "$SSH_CLIENT" ]; then 7 | local host_color="red" 8 | fi 9 | 10 | PROMPT=' 11 | %{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status) 12 | %{$fg_bold[cyan]%}❯%{$reset_color%} ' 13 | 14 | 15 | RPROMPT='${return_status}%{$reset_color%}' 16 | 17 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}" 18 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 19 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[grey]%}) %{$fg[yellow]%}⚡%{$reset_color%}" 20 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[grey]%})" 21 | ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%{$fg_bold[magenta]%}↓%{$reset_color%}" 22 | ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE="%{$fg_bold[magenta]%}↑%{$reset_color%}" 23 | ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%{$fg_bold[magenta]%}↕%{$reset_color%}" 24 | -------------------------------------------------------------------------------- /plugins/wakeonlan/README: -------------------------------------------------------------------------------- 1 | This plugin provides a wrapper around the "wakeonlan" tool available from most 2 | distributions' package repositories, or from the following website: 3 | 4 | http://gsd.di.uminho.pt/jpo/software/wakeonlan/ 5 | 6 | In order to use this wrapper, create the ~/.wakeonlan directory, and place in 7 | that directory one file for each device you would like to be able to wake. Give 8 | the file a name that describes the device, such as its hostname. Each file 9 | should contain a line with the mac address of the target device and the network 10 | broadcast address. 11 | 12 | For instance, there might be a file ~/.wakeonlan/leto with the following 13 | contents: 14 | 15 | 00:11:22:33:44:55:66 192.168.0.255 16 | 17 | To wake that device, use the following command: 18 | 19 | # wake leto 20 | 21 | The available device names will be autocompleted, so: 22 | 23 | # wake 24 | 25 | ...will suggest "leto", along with any other configuration files that were 26 | placed in the ~/.wakeonlan directory. 27 | 28 | For more information regarding the configuration file format, check the 29 | wakeonlan man page. 30 | -------------------------------------------------------------------------------- /plugins/lol/lol.plugin.zsh: -------------------------------------------------------------------------------- 1 | # LOL!!1 2 | # Source: http://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh 3 | 4 | alias wtf='dmesg' 5 | alias onoz='cat /var/log/errors.log' 6 | alias rtfm='man' 7 | 8 | alias :3='echo' 9 | alias visible='echo' 10 | alias invisible='cat' 11 | alias moar='more' 12 | alias tldr='less' 13 | alias alwayz='tail -f' 14 | 15 | alias icanhas='mkdir' 16 | alias gimmeh='touch' 17 | alias donotwant='rm' 18 | alias dowant='cp' 19 | alias gtfo='mv' 20 | alias nowai='chmod' 21 | 22 | alias hai='cd' 23 | alias iz='ls' 24 | alias plz='pwd' 25 | alias ihasbucket='df -h' 26 | 27 | alias inur='locate' 28 | alias iminurbase='finger' 29 | 30 | alias btw='nice' 31 | alias obtw='nohup' 32 | 33 | alias nomz='ps aux' 34 | alias nomnom='killall' 35 | 36 | alias byes='exit' 37 | alias cya='reboot' 38 | alias kthxbai='halt' 39 | 40 | alias pwned='ssh' 41 | 42 | alias hackzor='git init' 43 | alias rulz='git push' 44 | alias bringz='git pull' 45 | alias chicken='git add' 46 | alias oanward='git commit -m' 47 | alias ooanward='git commit -am' 48 | alias letcat='git checkout' 49 | alias violenz='git rebase' 50 | 51 | -------------------------------------------------------------------------------- /plugins/jsontools/README.md: -------------------------------------------------------------------------------- 1 | # jsontools 2 | 3 | Handy command line tools for dealing with json data. 4 | 5 | ## Tools 6 | 7 | - **pp_json** - pretty prints json 8 | - **is_json** - returns true if valid json; false otherwise 9 | - **urlencode_json** - returns a url encoded string for the given json 10 | - **urldecode_json** - returns decoded json for the given url encoded string 11 | 12 | ## Usage 13 | Usage is simple...just take your json data and pipe it into the appropriate jsontool. 14 | ```sh 15 | | 16 | ``` 17 | ## Examples 18 | 19 | ##### pp_json 20 | 21 | ```sh 22 | # curl json data and pretty print the results 23 | curl https://coderwall.com/bobwilliams.json | pp_json 24 | ``` 25 | 26 | ##### is_json 27 | ```sh 28 | # pretty print the contents of an existing json file 29 | less data.json | is_json 30 | ``` 31 | 32 | ##### urlencode_json 33 | ```sh 34 | # json data directly from the command line 35 | echo '{"b":2, "a":1}' | urlencode_json 36 | ``` 37 | 38 | ##### urldecode_json 39 | ```sh 40 | # url encoded string to decode 41 | echo '%7B%22b%22:2,%20%22a%22:1%7D%0A' | urldecode_json 42 | ``` -------------------------------------------------------------------------------- /themes/af-magic.zsh-theme: -------------------------------------------------------------------------------- 1 | # af-magic.zsh-theme 2 | # Repo: https://github.com/andyfleming/oh-my-zsh 3 | # Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme 4 | 5 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi 6 | local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 7 | 8 | # primary prompt 9 | PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%} 10 | $FG[032]%~\ 11 | $(git_prompt_info) \ 12 | $FG[105]%(!.#.»)%{$reset_color%} ' 13 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 14 | RPS1='${return_code}' 15 | 16 | 17 | # color vars 18 | eval my_gray='$FG[237]' 19 | eval my_orange='$FG[214]' 20 | 21 | # right prompt 22 | if type "virtualenv_prompt_info" > /dev/null 23 | then 24 | RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' 25 | else 26 | RPROMPT='$my_gray%n@%m%{$reset_color%}%' 27 | fi 28 | 29 | # git settings 30 | ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:" 31 | ZSH_THEME_GIT_PROMPT_CLEAN="" 32 | ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}" 33 | ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" 34 | -------------------------------------------------------------------------------- /tools/upgrade.sh: -------------------------------------------------------------------------------- 1 | printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh" 2 | cd "$ZSH" 3 | if git pull --rebase --stat origin master 4 | then 5 | printf '\033[0;32m%s\033[0m\n' ' __ __ ' 6 | printf '\033[0;32m%s\033[0m\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' 7 | printf '\033[0;32m%s\033[0m\n' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' 8 | printf '\033[0;32m%s\033[0m\n' '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' 9 | printf '\033[0;32m%s\033[0m\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' 10 | printf '\033[0;32m%s\033[0m\n' ' /____/ ' 11 | printf '\033[0;34m%s\033[0m\n' 'Hooray! Oh My Zsh has been updated and/or is at the current version.' 12 | printf '\033[0;34m%s\033[1m%s\033[0m\n' 'To keep up on the latest news and updates, follow us on twitter: ' 'http://twitter.com/ohmyzsh' 13 | printf '\033[0;34m%s\033[1m%s\033[0m\n' 'Get your Oh My Zsh swag at: ' 'http://shop.planetargon.com/' 14 | else 15 | printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?' 16 | fi 17 | -------------------------------------------------------------------------------- /themes/alanpeabody.zsh-theme: -------------------------------------------------------------------------------- 1 | 2 | local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}' 3 | local pwd='%{$fg[blue]%}%~%{$reset_color%}' 4 | local rvm='' 5 | if which rvm-prompt &> /dev/null; then 6 | rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}' 7 | else 8 | if which rbenv &> /dev/null; then 9 | rvm='%{$fg[green]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' 10 | fi 11 | fi 12 | local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})' 13 | local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}' 14 | 15 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" 16 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 17 | ZSH_THEME_GIT_PROMPT_DIRTY="" 18 | ZSH_THEME_GIT_PROMPT_CLEAN="" 19 | 20 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" 21 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" 22 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" 23 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" 24 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" 25 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" 26 | 27 | PROMPT="${user} ${pwd}$ " 28 | RPROMPT="${return_code} ${git_branch} ${rvm}" 29 | -------------------------------------------------------------------------------- /themes/fishy.zsh-theme: -------------------------------------------------------------------------------- 1 | # ZSH Theme emulating the Fish shell's default prompt. 2 | 3 | _fishy_collapsed_wd() { 4 | echo $(pwd | perl -pe " 5 | BEGIN { 6 | binmode STDIN, ':encoding(UTF-8)'; 7 | binmode STDOUT, ':encoding(UTF-8)'; 8 | }; s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g 9 | ") 10 | } 11 | 12 | local user_color='green'; [ $UID -eq 0 ] && user_color='red' 13 | PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' 14 | PROMPT2='%{$fg[red]%}\ %{$reset_color%}' 15 | 16 | local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}" 17 | RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}' 18 | 19 | ZSH_THEME_GIT_PROMPT_PREFIX=" " 20 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 21 | ZSH_THEME_GIT_PROMPT_DIRTY="" 22 | ZSH_THEME_GIT_PROMPT_CLEAN="" 23 | 24 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+" 25 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!" 26 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-" 27 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>" 28 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#" 29 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?" 30 | -------------------------------------------------------------------------------- /plugins/wd/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Markus Færevaag 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /plugins/pj/pj.plugin.zsh: -------------------------------------------------------------------------------- 1 | #!/bin/zsh 2 | 3 | # 4 | # Original idea by DefV (Jan De Poorter) 5 | # Source: https://gist.github.com/pjaspers/368394#comment-1016 6 | # 7 | # Usage: 8 | # - Set `$PROJECT_PATHS` in your ~/.zshrc 9 | # e.g.: PROJECT_PATHS=(~/src ~/work) 10 | # - In ZSH you now can open a project directory with the command: `pj my-project` 11 | # the plugin will locate the `my-project` directory in one of the $PROJECT_PATHS 12 | # Also tab completion is supported. 13 | # - `pjo my-project` will open the directory in $EDITOR 14 | # 15 | 16 | function pj() { 17 | cmd="cd" 18 | file=$1 19 | 20 | if [[ "open" == "$file" ]] then 21 | file=$2 22 | cmd=(${(s: :)EDITOR}) 23 | fi 24 | 25 | for project in $PROJECT_PATHS; do 26 | if [[ -d $project/$file ]] then 27 | $cmd "$project/$file" 28 | unset project # Unset project var 29 | return 30 | fi 31 | done 32 | 33 | echo "No such project $1" 34 | } 35 | 36 | alias pjo="pj open" 37 | 38 | function _pj () { 39 | compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'` 40 | } 41 | 42 | compdef _pj pj 43 | -------------------------------------------------------------------------------- /plugins/terminitor/_terminitor: -------------------------------------------------------------------------------- 1 | #compdef terminitor 2 | #autoload 3 | 4 | # terminitor zsh completion 5 | 6 | _terminitor_available_scripts() { 7 | scripts=(`for SCRIPT in ~/.config/terminitor/*.term ; do basename $SCRIPT .term ; done`) 8 | } 9 | 10 | local -a _1st_arguments 11 | _1st_arguments=( 12 | 'create:create a Termfile in directory' 13 | 'delete:delete terminitor script' 14 | 'edit:open termitor script' 15 | 'fetch:clone the designated repo and run setup' 16 | 'help:Describe available tasks or one specific task' 17 | 'init:create initial root terminitor folder' 18 | 'list:lists all terminitor scripts' 19 | 'setup:execute setup in the terminitor script' 20 | 'start:runs the terminitor script' 21 | 'update:update Terminitor to new global path(.config/.terminitor)' 22 | ) 23 | 24 | local expl 25 | 26 | _arguments \ 27 | '*:: :->subcmds' && return 0 28 | 29 | if (( CURRENT == 1 )); then 30 | _describe -t commands "terminitor task" _1st_arguments 31 | return 32 | fi 33 | 34 | case "$words[1]" in 35 | start|edit|delete|setup) 36 | _terminitor_available_scripts 37 | _wanted scripts expl 'installed scripts' compadd -a scripts ;; 38 | esac 39 | -------------------------------------------------------------------------------- /plugins/zeus/_zeus: -------------------------------------------------------------------------------- 1 | #compdef zeus 2 | #autoload 3 | 4 | # in order to make this work, you will need to have the gem zeus installed 5 | 6 | # zeus zsh completion, based on adb completion 7 | 8 | local -a _1st_arguments 9 | _1st_arguments=( 10 | 'console:Lets you interact with your Rails application from the command line. (alias = c)' 11 | 'cucumber:Runs cucumber.' 12 | 'dbconsole:Figures out which database you are using and drops you into whichever command line interface.' 13 | 'destroy:Figures out what generate did, and undoes it. (alias = d)' 14 | 'generate:Uses templates to create a whole lot of things. (alias = g)' 15 | 'rake:Execute rake tasks.' 16 | 'runner:Runs Ruby code in the context of Rails non-interactively. (alias = r)' 17 | 'server:Launches a small web server named WEBrick which comes bundled with Ruby. (alias = s)' 18 | 'start:Preloads the zeus environment' 19 | 'test:Runs RSpec tests. (alias = rspec, testrb)' 20 | 'version:Shows the version number.' 21 | ) 22 | 23 | local expl 24 | local -a pkgs installed_pkgs 25 | 26 | _arguments \ 27 | '*:: :->subcmds' && return 0 28 | 29 | if (( CURRENT == 1 )); then 30 | _describe -t commands "zeus subcommand" _1st_arguments 31 | return 32 | fi 33 | 34 | _files 35 | -------------------------------------------------------------------------------- /themes/muse.zsh-theme: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | #local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | setopt promptsubst 5 | 6 | autoload -U add-zsh-hook 7 | 8 | PROMPT_SUCCESS_COLOR=$FG[117] 9 | PROMPT_FAILURE_COLOR=$FG[124] 10 | PROMPT_VCS_INFO_COLOR=$FG[242] 11 | PROMPT_PROMPT=$FG[077] 12 | GIT_DIRTY_COLOR=$FG[133] 13 | GIT_CLEAN_COLOR=$FG[118] 14 | GIT_PROMPT_INFO=$FG[012] 15 | 16 | PROMPT='%{$PROMPT_SUCCESS_COLOR%}%~%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ%{$reset_color%} ' 17 | 18 | #RPS1="${return_code}" 19 | 20 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 21 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%})" 22 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘" 23 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔" 24 | 25 | ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[082]%}✚%{$reset_color%}" 26 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[166]%}✹%{$reset_color%}" 27 | ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[160]%}✖%{$reset_color%}" 28 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[220]%}➜%{$reset_color%}" 29 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[082]%}═%{$reset_color%}" 30 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[190]%}✭%{$reset_color%}" 31 | -------------------------------------------------------------------------------- /lib/spectrum.zsh: -------------------------------------------------------------------------------- 1 | #! /bin/zsh 2 | # A script to make using 256 colors in zsh less painful. 3 | # P.C. Shyamshankar 4 | # Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ 5 | 6 | typeset -Ag FX FG BG 7 | 8 | FX=( 9 | reset "%{%}" 10 | bold "%{%}" no-bold "%{%}" 11 | italic "%{%}" no-italic "%{%}" 12 | underline "%{%}" no-underline "%{%}" 13 | blink "%{%}" no-blink "%{%}" 14 | reverse "%{%}" no-reverse "%{%}" 15 | ) 16 | 17 | for color in {000..255}; do 18 | FG[$color]="%{[38;5;${color}m%}" 19 | BG[$color]="%{[48;5;${color}m%}" 20 | done 21 | 22 | 23 | ZSH_SPECTRUM_TEXT=${ZSH_SPECTRUM_TEXT:-Arma virumque cano Troiae qui primus ab oris} 24 | 25 | # Show all 256 colors with color number 26 | function spectrum_ls() { 27 | for code in {000..255}; do 28 | print -P -- "$code: %F{$code}$ZSH_SPECTRUM_TEXT%f" 29 | done 30 | } 31 | 32 | # Show all 256 colors where the background is set to specific color 33 | function spectrum_bls() { 34 | for code in {000..255}; do 35 | print -P -- "$BG[$code]$code: $ZSH_SPECTRUM_TEXT %{$reset_color%}" 36 | done 37 | } 38 | -------------------------------------------------------------------------------- /MIT-LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2009-2014 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /themes/jnrowe.zsh-theme: -------------------------------------------------------------------------------- 1 | autoload -U add-zsh-hook 2 | autoload -Uz vcs_info 3 | 4 | zstyle ':vcs_info:*' actionformats \ 5 | '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f ' 6 | zstyle ':vcs_info:*' formats '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f ' 7 | zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r' 8 | zstyle ':vcs_info:*' enable git 9 | 10 | add-zsh-hook precmd prompt_vcs 11 | 12 | prompt_vcs () { 13 | vcs_info 14 | 15 | if [ "${vcs_info_msg_0_}" = "" ]; then 16 | dir_status="%F{2}→%f" 17 | elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then 18 | dir_status="%F{1}▶%f" 19 | elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then 20 | dir_status="%F{3}▶%f" 21 | else 22 | dir_status="%F{2}▶%f" 23 | fi 24 | } 25 | 26 | function { 27 | if [[ -n "$SSH_CLIENT" ]]; then 28 | PROMPT_HOST=" ($HOST)" 29 | else 30 | PROMPT_HOST='' 31 | fi 32 | } 33 | 34 | local ret_status="%(?:%{$fg_bold[green]%}Ξ:%{$fg_bold[red]%}%S↑%s%?)" 35 | 36 | PROMPT='${ret_status}%{$fg[blue]%}${PROMPT_HOST}%{$fg_bold[green]%}%p %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} ' 37 | 38 | # vim: set ft=zsh ts=4 sw=4 et: 39 | -------------------------------------------------------------------------------- /themes/tonotdo.zsh-theme: -------------------------------------------------------------------------------- 1 | PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}➜%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' 2 | RPROMPT='[%*]' 3 | 4 | # git theming 5 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" 6 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" 8 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})" 9 | 10 | # LS colors, made with http://geoff.greer.fm/lscolors/ 11 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 12 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' -------------------------------------------------------------------------------- /plugins/laravel/_artisan: -------------------------------------------------------------------------------- 1 | #compdef artisan 2 | 3 | # Laravel autocompletion 4 | # Author: John Hamelink 5 | # 6 | # This plugin does the following: 7 | # - Adds aliases and autocompletion for artisan 8 | # - Adds aliases and autocompletion for bob 9 | 10 | local curcontext="$curcontext" state line _opts _bundles ret=1 11 | _arguments -C \ 12 | '1: :->cmds' \ 13 | '*:: :->args' && ret=0 14 | 15 | case $state in 16 | cmds) 17 | 18 | _values "Artisan command" \ 19 | 'session\:install[Create a session table]' \ 20 | 'migrate[Manage Migrations]' \ 21 | 'test[Run a test]' \ 22 | 'route\:\:call[Call a route in the CLI]' \ 23 | 'key\:\:generate[Generate a key]' 24 | ret=0 25 | ;; 26 | args) 27 | case $line[1] in 28 | migrate) 29 | _values \ 30 | 'install[Create the Laravel migration table' \ 31 | 'make[Create a migration]' \ 32 | 'rollback[Roll back to the last migration operation]' \ 33 | 'reset[Roll back all migrations that have ever run]' 34 | ret=0 35 | ;; 36 | esac 37 | ;; 38 | esac 39 | 40 | return ret 41 | -------------------------------------------------------------------------------- /themes/fletcherm.zsh-theme: -------------------------------------------------------------------------------- 1 | # Copied from old version of tonotdo's theme. LSCOLORS modified. 2 | PROMPT='%{$fg_no_bold[cyan]%}%n%{$fg_no_bold[magenta]%}•%{$fg_no_bold[green]%}%3~$(git_prompt_info)%{$reset_color%}» ' 3 | RPROMPT='[%*]' 4 | 5 | # git theming 6 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}" 7 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 8 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" 9 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}⚡%{$fg_bold[blue]%})" 10 | 11 | export LSCOLORS="exfxcxdxbxegedabagacad" 12 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' 13 | -------------------------------------------------------------------------------- /themes/gallois.zsh-theme: -------------------------------------------------------------------------------- 1 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" 2 | ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" 3 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" 4 | ZSH_THEME_GIT_PROMPT_CLEAN="" 5 | 6 | #Customized git status, oh-my-zsh currently does not allow render dirty status before branch 7 | git_custom_status() { 8 | local cb=$(current_branch) 9 | if [ -n "$cb" ]; then 10 | echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" 11 | fi 12 | } 13 | 14 | #RVM and git settings 15 | if [[ -s ~/.rvm/scripts/rvm ]] ; then 16 | RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' 17 | else 18 | if which rbenv &> /dev/null; then 19 | RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' 20 | else 21 | if [[ -n `which chruby_prompt_info` && -n `chruby_prompt_info` ]]; then 22 | RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' 23 | else 24 | RPS1='$(git_custom_status) $EPS1' 25 | fi 26 | fi 27 | fi 28 | 29 | PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' 30 | -------------------------------------------------------------------------------- /plugins/vi-mode/vi-mode.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Ensures that $terminfo values are valid and updates editor information when 2 | # the keymap changes. 3 | function zle-keymap-select zle-line-init zle-line-finish { 4 | # The terminal must be in application mode when ZLE is active for $terminfo 5 | # values to be valid. 6 | if (( ${+terminfo[smkx]} )); then 7 | printf '%s' ${terminfo[smkx]} 8 | fi 9 | if (( ${+terminfo[rmkx]} )); then 10 | printf '%s' ${terminfo[rmkx]} 11 | fi 12 | 13 | zle reset-prompt 14 | zle -R 15 | } 16 | 17 | zle -N zle-line-init 18 | zle -N zle-line-finish 19 | zle -N zle-keymap-select 20 | zle -N edit-command-line 21 | 22 | 23 | bindkey -v 24 | 25 | # allow v to edit the command line (standard behaviour) 26 | autoload -Uz edit-command-line 27 | bindkey -M vicmd 'v' edit-command-line 28 | 29 | # if mode indicator wasn't setup by theme, define default 30 | if [[ "$MODE_INDICATOR" == "" ]]; then 31 | MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" 32 | fi 33 | 34 | function vi_mode_prompt_info() { 35 | echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" 36 | } 37 | 38 | # define right prompt, if it wasn't defined by a theme 39 | if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then 40 | RPS1='$(vi_mode_prompt_info)' 41 | fi 42 | -------------------------------------------------------------------------------- /themes/peepcode.zsh-theme: -------------------------------------------------------------------------------- 1 | # 2 | # Based on Geoffrey Grosenbach's peepcode zsh theme from 3 | # https://github.com/topfunky/zsh-simple 4 | # 5 | 6 | git_repo_path() { 7 | git rev-parse --git-dir 2>/dev/null 8 | } 9 | 10 | git_commit_id() { 11 | git rev-parse --short HEAD 2>/dev/null 12 | } 13 | 14 | git_mode() { 15 | if [[ -e "$repo_path/BISECT_LOG" ]]; then 16 | echo "+bisect" 17 | elif [[ -e "$repo_path/MERGE_HEAD" ]]; then 18 | echo "+merge" 19 | elif [[ -e "$repo_path/rebase" || -e "$repo_path/rebase-apply" || -e "$repo_path/rebase-merge" || -e "$repo_path/../.dotest" ]]; then 20 | echo "+rebase" 21 | fi 22 | } 23 | 24 | git_dirty() { 25 | if [[ "$repo_path" != '.' && `git ls-files -m` != "" ]]; then 26 | echo " %{$fg_bold[grey]%}✗%{$reset_color%}" 27 | fi 28 | } 29 | 30 | git_prompt() { 31 | local cb=$(current_branch) 32 | if [ -n "$cb" ]; then 33 | local repo_path=$(git_repo_path) 34 | echo " %{$fg_bold[grey]%}$cb %{$fg[white]%}$(git_commit_id)%{$reset_color%}$(git_mode)$(git_dirty)" 35 | fi 36 | } 37 | 38 | local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" 39 | 40 | PROMPT=' 41 | %~ 42 | ${smiley} %{$reset_color%}' 43 | 44 | RPROMPT='%{$fg[white]%} $(~/.rvm/bin/rvm-prompt)$(git_prompt)%{$reset_color%}' 45 | -------------------------------------------------------------------------------- /themes/junkfood.zsh-theme: -------------------------------------------------------------------------------- 1 | # Totally ripped off Dallas theme 2 | 3 | # Grab the current date (%W) and time (%t): 4 | JUNKFOOD_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}" 5 | 6 | # Grab the current machine name 7 | JUNKFOOD_MACHINE_="%{$fg_bold[blue]%}%m%{$fg[white]%} ):%{$reset_color%}" 8 | 9 | # Grab the current username 10 | JUNKFOOD_CURRENT_USER_="%{$fg_bold[green]%}%n%{$reset_color%}" 11 | 12 | # Grab the current filepath, use shortcuts: ~/Desktop 13 | # Append the current git branch, if in a git repository: ~aw@master 14 | JUNKFOOD_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}" 15 | 16 | # For the git prompt, use a white @ and blue text for the branch name 17 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg_bold[white]%}" 18 | 19 | # Close it all off by resetting the color and styles. 20 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 21 | 22 | # Do nothing if the branch is clean (no changes). 23 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✔" 24 | 25 | # Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch! 26 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗✗✗" 27 | 28 | # Put it all together! 29 | PROMPT="$JUNKFOOD_TIME_$JUNKFOOD_CURRENT_USER_@$JUNKFOOD_MACHINE_$JUNKFOOD_LOCA_ 30 | " 31 | -------------------------------------------------------------------------------- /themes/pygmalion.zsh-theme: -------------------------------------------------------------------------------- 1 | # Yay! High voltage and arrows! 2 | 3 | prompt_setup_pygmalion(){ 4 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" 5 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 6 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" 7 | ZSH_THEME_GIT_PROMPT_CLEAN="" 8 | 9 | base_prompt='%{$fg[magenta]%}%n%{$reset_color%}%{$fg[cyan]%}@%{$reset_color%}%{$fg[yellow]%}%m%{$reset_color%}%{$fg[red]%}:%{$reset_color%}%{$fg[cyan]%}%0~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}' 10 | post_prompt='%{$fg[cyan]%}⇒%{$reset_color%} ' 11 | 12 | base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g") 13 | post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g") 14 | 15 | precmd_functions+=(prompt_pygmalion_precmd) 16 | } 17 | 18 | prompt_pygmalion_precmd(){ 19 | local gitinfo=$(git_prompt_info) 20 | local gitinfo_nocolor=$(echo "$gitinfo" | perl -pe "s/%\{[^}]+\}//g") 21 | local exp_nocolor="$(print -P \"$base_prompt_nocolor$gitinfo_nocolor$post_prompt_nocolor\")" 22 | local prompt_length=${#exp_nocolor} 23 | 24 | local nl="" 25 | 26 | if [[ $prompt_length -gt 40 ]]; then 27 | nl=$'\n%{\r%}'; 28 | fi 29 | PROMPT="$base_prompt$gitinfo$nl$post_prompt" 30 | } 31 | 32 | prompt_setup_pygmalion 33 | 34 | 35 | -------------------------------------------------------------------------------- /themes/pmcgee.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi 2 | 3 | PROMPT=' 4 | %{$fg[$NCOLOR]%}%B%n@%m%b%{$reset_color%} %{$fg[white]%}%B${PWD/#$HOME/~}%b%{$reset_color%} 5 | $(git_prompt_info)%(!.#.$) ' 6 | RPROMPT='[%*]' 7 | 8 | # git theming 9 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}%B" 10 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 11 | ZSH_THEME_GIT_PROMPT_CLEAN="" 12 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*" 13 | 14 | # LS colors, made with http://geoff.greer.fm/lscolors/ 15 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 16 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' 17 | -------------------------------------------------------------------------------- /themes/suvash.zsh-theme: -------------------------------------------------------------------------------- 1 | function prompt_char { 2 | git branch >/dev/null 2>/dev/null && echo '±' && return 3 | hg root >/dev/null 2>/dev/null && echo 'Hg' && return 4 | echo '○' 5 | } 6 | 7 | function virtualenv_info { 8 | [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' 9 | } 10 | 11 | function collapse_pwd { 12 | echo $(pwd | sed -e "s,^$HOME,~,") 13 | } 14 | 15 | if which rvm-prompt &> /dev/null; then 16 | PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} 17 | $(virtualenv_info)$(prompt_char) ' 18 | else 19 | if which rbenv &> /dev/null; then 20 | PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) using %{$reset_color%}%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%} 21 | $(virtualenv_info)$(prompt_char) ' 22 | fi 23 | fi 24 | 25 | 26 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" 27 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 28 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" 29 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" 30 | ZSH_THEME_GIT_PROMPT_CLEAN="" 31 | -------------------------------------------------------------------------------- /plugins/adb/_adb: -------------------------------------------------------------------------------- 1 | #compdef adb 2 | #autoload 3 | 4 | # in order to make this work, you will need to have the android adb tools 5 | 6 | # adb zsh completion, based on homebrew completion 7 | 8 | local -a _1st_arguments 9 | _1st_arguments=( 10 | 'bugreport:return all information from the device that should be included in a bug report.' 11 | 'connect:connect to a device via TCP/IP Port 5555 is default.' 12 | 'devices:list all connected devices' 13 | 'disconnect:disconnect from a TCP/IP device. Port 5555 is default.' 14 | 'emu:run emulator console command' 15 | 'forward:forward socket connections' 16 | 'help:show the help message' 17 | 'install:push this package file to the device and install it' 18 | 'jdwp:list PIDs of processes hosting a JDWP transport' 19 | 'logcat:View device log' 20 | 'pull:copy file/dir from device' 21 | 'push:copy file/dir to device' 22 | 'shell:run remote shell interactively' 23 | 'sync:copy host->device only if changed (-l means list but dont copy)' 24 | 'uninstall:remove this app package from the device' 25 | 'version:show version num' 26 | ) 27 | 28 | local expl 29 | local -a pkgs installed_pkgs 30 | 31 | _arguments \ 32 | '*:: :->subcmds' && return 0 33 | 34 | if (( CURRENT == 1 )); then 35 | _describe -t commands "adb subcommand" _1st_arguments 36 | return 37 | fi 38 | 39 | _files 40 | -------------------------------------------------------------------------------- /plugins/wd/README.md: -------------------------------------------------------------------------------- 1 | ## wd 2 | 3 | **Maintainer:** [mfaerevaag](https://github.com/mfaerevaag) 4 | 5 | `wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`. Why? Because `cd` seems ineffecient when the folder is frequently visited or has a long path. [Source](https://github.com/mfaerevaag/wd) 6 | 7 | ### Usage 8 | 9 | * Add warp point to current working directory: 10 | 11 | $ wd add foo 12 | 13 | If a warp point with the same name exists, use `add!` to overwrite it. 14 | 15 | Note, a warp point cannot contain colons, or only consist of only spaces and dots. The first will conflict in how `wd` stores the warp points, and the second will conflict other features, as below. 16 | 17 | * From an other directory (not necessarily), warp to `foo` with: 18 | 19 | $ wd foo 20 | 21 | * You can warp back to previous directory, and so on, with this dot syntax: 22 | 23 | $ wd .. 24 | $ wd ... 25 | 26 | This is a wrapper for the zsh `dirs` function. 27 | 28 | * Remove warp point test point: 29 | 30 | $ wd rm foo 31 | 32 | * List all warp points (stored in `~/.warprc`): 33 | 34 | $ wd ls 35 | 36 | * List warp points to current directory 37 | 38 | $ wd show 39 | 40 | * Print usage with no opts or the `help` argument. 41 | -------------------------------------------------------------------------------- /themes/clean.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="white"; fi 2 | 3 | PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' 4 | RPROMPT='[%*]' 5 | 6 | # git theming 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[yellow]%}%B" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " 9 | ZSH_THEME_GIT_PROMPT_CLEAN="" 10 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗" 11 | 12 | # LS colors, made with http://geoff.greer.fm/lscolors/ 13 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 14 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' 15 | -------------------------------------------------------------------------------- /plugins/gas/_gas: -------------------------------------------------------------------------------- 1 | #compdef gas 2 | 3 | local curcontext="$curcontext" state line cmds ret=1 4 | 5 | _arguments -C \ 6 | '(- 1 *)'{-v,--version}'[display version information]' \ 7 | '(-h|--help)'{-h,--help}'[show help information]' \ 8 | '1: :->cmds' \ 9 | '*: :->args' && ret=0 10 | 11 | case $state in 12 | cmds) 13 | cmds=( 14 | "version:Prints Gas's version" 15 | "use:Uses author" 16 | "ssh:Creates a new ssh key for an existing gas author" 17 | "show:Shows your current user" 18 | "list:Lists your authors" 19 | "import:Imports current user to gasconfig" 20 | "help:Describe available tasks or one specific task" 21 | "delete:Deletes author" 22 | "add:Adds author to gasconfig" 23 | ) 24 | _describe -t commands 'gas command' cmds && ret=0 25 | ;; 26 | args) 27 | case $line[1] in 28 | (use|delete) 29 | VERSION=$(gas -v) 30 | if [[ $VERSION == <1->.*.* ]] || [[ $VERSION == 0.<2->.* ]] || [[ $VERSION == 0.1.<6-> ]] then 31 | _values -S , 'authors' $(cat ~/.gas/gas.authors | sed -n -e 's/^.*\[\(.*\)\]/\1/p') && ret=0 32 | else 33 | _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0 34 | fi 35 | esac 36 | ;; 37 | esac 38 | 39 | return ret 40 | -------------------------------------------------------------------------------- /themes/josh.zsh-theme: -------------------------------------------------------------------------------- 1 | grey='\e[0;90m' 2 | 3 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}(" 4 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 5 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" 6 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" 7 | 8 | function josh_prompt { 9 | (( spare_width = ${COLUMNS} )) 10 | prompt=" " 11 | 12 | branch=$(current_branch) 13 | ruby_version=$(rvm_prompt_info || rbenv_prompt_info) 14 | path_size=${#PWD} 15 | branch_size=${#branch} 16 | ruby_size=${#ruby_version} 17 | user_machine_size=${#${(%):-%n@%m-}} 18 | 19 | if [[ ${#branch} -eq 0 ]] 20 | then (( ruby_size = ruby_size + 1 )) 21 | else 22 | (( branch_size = branch_size + 4 )) 23 | if [[ -n $(git status -s 2> /dev/null) ]]; then 24 | (( branch_size = branch_size + 2 )) 25 | fi 26 | fi 27 | 28 | (( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) )) 29 | 30 | while [ ${#prompt} -lt $spare_width ]; do 31 | prompt=" $prompt" 32 | done 33 | 34 | prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(current_branch)" 35 | 36 | echo $prompt 37 | } 38 | 39 | setopt prompt_subst 40 | 41 | PROMPT=' 42 | %n@%m $(josh_prompt) 43 | %(?,%{%F{green}%},%{%F{red}%})⚡%{$reset_color%} ' 44 | -------------------------------------------------------------------------------- /themes/essembeh.zsh-theme: -------------------------------------------------------------------------------- 1 | # Theme with full path names and hostname 2 | # Handy if you work on different servers all the time; 3 | 4 | local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" 5 | 6 | function my_git_prompt_info() { 7 | ref=$(git symbolic-ref HEAD 2> /dev/null) || return 8 | GIT_STATUS=$(git_prompt_status) 9 | [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS" 10 | echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX" 11 | } 12 | 13 | # Colored prompt 14 | ZSH_THEME_COLOR_USER="green" 15 | ZSH_THEME_COLOR_HOST="green" 16 | ZSH_THEME_COLOR_PWD="yellow" 17 | test -n "$SSH_CONNECTION" && ZSH_THEME_COLOR_USER="red" && ZSH_THEME_COLOR_HOST="red" 18 | test `id -u` = 0 && ZSH_THEME_COLOR_USER="magenta" && ZSH_THEME_COLOR_HOST="magenta" 19 | PROMPT='%{$fg_bold[$ZSH_THEME_COLOR_USER]%}%n@%{$fg_bold[$ZSH_THEME_COLOR_HOST]%}%M%{$reset_color%}:%{$fg_bold[$ZSH_THEME_COLOR_PWD]%}%~%{$reset_color%} $(my_git_prompt_info)%(!.#.$) ' 20 | RPS1="${return_code}" 21 | 22 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}(" 23 | ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" 24 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%%" 25 | ZSH_THEME_GIT_PROMPT_ADDED="+" 26 | ZSH_THEME_GIT_PROMPT_MODIFIED="*" 27 | ZSH_THEME_GIT_PROMPT_RENAMED="~" 28 | ZSH_THEME_GIT_PROMPT_DELETED="!" 29 | ZSH_THEME_GIT_PROMPT_UNMERGED="?" 30 | 31 | -------------------------------------------------------------------------------- /themes/candy-kingdom.zsh-theme: -------------------------------------------------------------------------------- 1 | # neuralsanwich.zsh-theme 2 | 3 | if [ "x$OH_MY_ZSH_HG" = "x" ]; then 4 | OH_MY_ZSH_HG="hg" 5 | fi 6 | 7 | function hg_prompt_info { 8 | $OH_MY_ZSH_HG prompt --angle-brackets "\ 9 | < on %{$fg[magenta]%}%{$reset_color%}>\ 10 | < at %{$fg[yellow]%}%{$reset_color%}>\ 11 | %{$fg[green]%}%{$reset_color%}< 12 | patches: >" 2>/dev/null 13 | } 14 | 15 | function box_name { 16 | [ -f ~/.box-name ] && cat ~/.box-name || hostname -s 17 | } 18 | 19 | PROMPT=' 20 | %{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) 21 | %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ ' 22 | 23 | ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: " 24 | ZSH_THEME_GIT_PROMPT_CLEAN="" 25 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[red]%}?" 26 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[orange]%}!" 27 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" 28 | 29 | local return_status="%{$fg[red]%}%(?..✘)%{$reset_color%}" 30 | RPROMPT='${return_status}$(battery_time_remaining) $(battery_pct_prompt)%{$reset_color%}' 31 | -------------------------------------------------------------------------------- /themes/philips.zsh-theme: -------------------------------------------------------------------------------- 1 | if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi 2 | 3 | PROMPT='%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[blue]%}%B%c/%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' 4 | RPROMPT='[%*]' 5 | 6 | # git theming 7 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " 9 | ZSH_THEME_GIT_PROMPT_CLEAN="" 10 | ZSH_THEME_GIT_PROMPT_DIRTY="*" 11 | 12 | # LS colors, made with http://geoff.greer.fm/lscolors/ 13 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 14 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.patch=00;34:*.o=00;32:*.so=01;35:*.ko=01;31:*.la=00;33' 15 | -------------------------------------------------------------------------------- /plugins/tmuxinator/_tmuxinator: -------------------------------------------------------------------------------- 1 | #compdef tmuxinator mux 2 | #autoload 3 | 4 | local curcontext="$curcontext" state line ret=1 5 | local -a _configs 6 | 7 | _arguments -C \ 8 | '1: :->cmds' \ 9 | '2:: :->args' && ret=0 10 | 11 | case $state in 12 | cmds) 13 | _values "tmuxinator command" \ 14 | "new[create a new project file and open it in your editor]" \ 15 | "start[start a tmux session using project's tmuxinator config]" \ 16 | "open[create a new project file and open it in your editor]" \ 17 | "copy[copy source_project project file to a new project called new_project]" \ 18 | "delete[deletes the project called project_name]" \ 19 | "debug[output the shell commands generated by a projet]" \ 20 | "implode[deletes all existing projects!]" \ 21 | "list[list all existing projects]" \ 22 | "doctor[look for problems in your configuration]" \ 23 | "help[shows this help document]" \ 24 | "version[shows tmuxinator version number]" 25 | ret=0 26 | ;; 27 | args) 28 | case $line[1] in 29 | start|open|copy|delete|debug) 30 | _configs=(`find ~/.tmuxinator -name \*.yml | cut -d/ -f5 | sed s:.yml::g`) 31 | [[ -n "$_configs" ]] && _values 'configs' $_configs 32 | ret=0 33 | ;; 34 | esac 35 | ;; 36 | esac 37 | 38 | return ret 39 | -------------------------------------------------------------------------------- /tools/check_for_upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | function _current_epoch() { 4 | echo $(($(date +%s) / 60 / 60 / 24)) 5 | } 6 | 7 | function _update_zsh_update() { 8 | echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update 9 | } 10 | 11 | function _upgrade_zsh() { 12 | env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh 13 | # update the zsh file 14 | _update_zsh_update 15 | } 16 | 17 | epoch_target=$UPDATE_ZSH_DAYS 18 | if [[ -z "$epoch_target" ]]; then 19 | # Default to old behavior 20 | epoch_target=13 21 | fi 22 | 23 | [ -f ~/.profile ] && source ~/.profile 24 | 25 | # Cancel upgrade if the current user doesn't have write permissions for the 26 | # oh-my-zsh directory. 27 | [[ -w "$ZSH" ]] || return 0 28 | 29 | if [ -f ~/.zsh-update ] 30 | then 31 | . ~/.zsh-update 32 | 33 | if [[ -z "$LAST_EPOCH" ]]; then 34 | _update_zsh_update && return 0; 35 | fi 36 | 37 | epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) 38 | if [ $epoch_diff -gt $epoch_target ] 39 | then 40 | if [ "$DISABLE_UPDATE_PROMPT" = "true" ] 41 | then 42 | _upgrade_zsh 43 | else 44 | echo "[Oh My Zsh] Would you like to check for updates?" 45 | echo "Type Y to update oh-my-zsh: \c" 46 | read line 47 | if [ "$line" = Y ] || [ "$line" = y ]; then 48 | _upgrade_zsh 49 | else 50 | _update_zsh_update 51 | fi 52 | fi 53 | fi 54 | else 55 | # create the zsh file 56 | _update_zsh_update 57 | fi 58 | 59 | -------------------------------------------------------------------------------- /themes/fino-time.zsh-theme: -------------------------------------------------------------------------------- 1 | # fino-time.zsh-theme 2 | 3 | # Use with a dark background and 256-color terminal! 4 | # Meant for people with RVM and git. Tested only on OS X 10.7. 5 | 6 | # You can set your computer name in the ~/.box-name file if you want. 7 | 8 | # Borrowing shamelessly from these oh-my-zsh themes: 9 | # bira 10 | # robbyrussell 11 | # 12 | # Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ 13 | 14 | function virtualenv_info { 15 | [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' 16 | } 17 | 18 | function prompt_char { 19 | git branch >/dev/null 2>/dev/null && echo '⠠⠵' && return 20 | echo '○' 21 | } 22 | 23 | function box_name { 24 | [ -f ~/.box-name ] && cat ~/.box-name || hostname -s 25 | } 26 | 27 | 28 | local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}' 29 | local current_dir='${PWD/#$HOME/~}' 30 | local git_info='$(git_prompt_info)' 31 | 32 | 33 | PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%} ${rvm_ruby} %D - %* 34 | ╰─$(virtualenv_info)$(prompt_char) " 35 | 36 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" 37 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 38 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘" 39 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔" 40 | -------------------------------------------------------------------------------- /themes/sonicradish.zsh-theme: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | #local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 3 | 4 | setopt promptsubst 5 | 6 | autoload -U add-zsh-hook 7 | ROOT_ICON_COLOR=$FG[111] 8 | MACHINE_NAME_COLOR=$FG[208] 9 | PROMPT_SUCCESS_COLOR=$FG[103] 10 | PROMPT_FAILURE_COLOR=$FG[124] 11 | PROMPT_VCS_INFO_COLOR=$FG[242] 12 | PROMPT_PROMPT=$FG[208] 13 | GIT_DIRTY_COLOR=$FG[124] 14 | GIT_CLEAN_COLOR=$FG[148] 15 | GIT_PROMPT_INFO=$FG[148] 16 | 17 | # Hash 18 | ROOT_ICON="# " 19 | if [[ $EUID -ne 0 ]] ; then 20 | ROOT_ICON="" 21 | fi 22 | 23 | PROMPT='%{$ROOT_ICON_COLOR%}$ROOT_ICON%{$reset_color%}%{$MACHINE_NAME_COLOR%}%m➜ %{$reset_color%}%{$PROMPT_SUCCESS_COLOR%}%c%{$reset_color%} %{$GIT_PROMPT_INFO%}$(git_prompt_info)%{$GIT_DIRTY_COLOR%}$(git_prompt_status) %{$reset_color%}%{$PROMPT_PROMPT%}ᐅ %{$reset_color%} ' 24 | 25 | #RPS1="${return_code}" 26 | 27 | ZSH_THEME_GIT_PROMPT_PREFIX=": " 28 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$GIT_PROMPT_INFO%} :" 29 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$GIT_DIRTY_COLOR%}✘" 30 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$GIT_CLEAN_COLOR%}✔" 31 | 32 | ZSH_THEME_GIT_PROMPT_ADDED="%{$FG[103]%}✚%{$rset_color%}" 33 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$FG[103]%}✹%{$reset_color%}" 34 | ZSH_THEME_GIT_PROMPT_DELETED="%{$FG[103]%}✖%{$reset_color%}" 35 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$FG[103]%}➜%{$reset_color%}" 36 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$FG[103]%}═%{$reset_color%}" 37 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[103]%}✭%{$reset_color%}" 38 | -------------------------------------------------------------------------------- /plugins/gpg-agent/gpg-agent.plugin.zsh: -------------------------------------------------------------------------------- 1 | local GPG_ENV=$HOME/.gnupg/gpg-agent.env 2 | 3 | function start_agent_nossh { 4 | eval $(/usr/bin/env gpg-agent --quiet --daemon --write-env-file ${GPG_ENV} 2> /dev/null) 5 | chmod 600 ${GPG_ENV} 6 | export GPG_AGENT_INFO 7 | } 8 | 9 | function start_agent_withssh { 10 | eval $(/usr/bin/env gpg-agent --quiet --daemon --enable-ssh-support --write-env-file ${GPG_ENV} 2> /dev/null) 11 | chmod 600 ${GPG_ENV} 12 | export GPG_AGENT_INFO 13 | export SSH_AUTH_SOCK 14 | export SSH_AGENT_PID 15 | } 16 | 17 | # check if another agent is running 18 | if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then 19 | # source settings of old agent, if applicable 20 | if [ -f "${GPG_ENV}" ]; then 21 | . ${GPG_ENV} > /dev/null 22 | export GPG_AGENT_INFO 23 | export SSH_AUTH_SOCK 24 | export SSH_AGENT_PID 25 | fi 26 | 27 | # check again if another agent is running using the newly sourced settings 28 | if ! gpg-connect-agent --quiet /bye > /dev/null 2> /dev/null; then 29 | # check for existing ssh-agent 30 | if ssh-add -l > /dev/null 2> /dev/null; then 31 | # ssh-agent running, start gpg-agent without ssh support 32 | start_agent_nossh; 33 | else 34 | # otherwise start gpg-agent with ssh support 35 | start_agent_withssh; 36 | fi 37 | fi 38 | fi 39 | 40 | GPG_TTY=$(tty) 41 | export GPG_TTY 42 | -------------------------------------------------------------------------------- /plugins/emoji-clock/emoji-clock.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # FILE: emoji-clock.plugin.zsh 3 | # DESCRIPTION: The current time with half hour accuracy as an emoji symbol. 4 | # Inspired by Andre Torrez' "Put A Burger In Your Shell" 5 | # http://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html 6 | # AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) 7 | # VERSION: 1.0.0 8 | # ----------------------------------------------------------------------------- 9 | 10 | function emoji-clock() { 11 | hour=$(date -v '+15M' '+%I') 12 | minutes=$(date -v '+15M' '+%M') 13 | case $hour in 14 | 01) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; 15 | 02) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; 16 | 03) clock="🕒"; [ $minutes -ge 30 ] && clock="🕞";; 17 | 04) clock="🕓"; [ $minutes -ge 30 ] && clock="🕟";; 18 | 05) clock="🕔"; [ $minutes -ge 30 ] && clock="🕠";; 19 | 06) clock="🕕"; [ $minutes -ge 30 ] && clock="🕡";; 20 | 07) clock="🕖"; [ $minutes -ge 30 ] && clock="🕢";; 21 | 08) clock="🕗"; [ $minutes -ge 30 ] && clock="🕣";; 22 | 09) clock="🕘"; [ $minutes -ge 30 ] && clock="🕤";; 23 | 10) clock="🕙"; [ $minutes -ge 30 ] && clock="🕥";; 24 | 11) clock="🕚"; [ $minutes -ge 30 ] && clock="🕦";; 25 | 12) clock="🕛"; [ $minutes -ge 30 ] && clock="🕧";; 26 | *) clock="⌛";; 27 | esac 28 | echo $clock 29 | } 30 | -------------------------------------------------------------------------------- /lib/prompt_info_functions.zsh: -------------------------------------------------------------------------------- 1 | # *_prompt_info functions for usage in your prompt 2 | # 3 | # Plugin creators, please add your *_prompt_info function to the list 4 | # of dummy implementations to help theme creators not receiving errors 5 | # without the need of implementing conditional clauses. 6 | # 7 | # See also lib/bzr.zsh, lib/git.zsh and lib/nvm.zsh for 8 | # git_prompt_info, bzr_prompt_info and nvm_prompt_info 9 | 10 | # Dummy implementations that return false to prevent command_not_found 11 | # errors with themes, that implement these functions 12 | # Real implementations will be used when the respective plugins are loaded 13 | function chruby_prompt_info hg_prompt_info pyenv_prompt_info \ 14 | rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \ 15 | virtualenv_prompt_info { 16 | return 1 17 | } 18 | 19 | # oh-my-zsh supports an rvm prompt by default 20 | # get the name of the rvm ruby version 21 | function rvm_prompt_info() { 22 | [ -f $HOME/.rvm/bin/rvm-prompt ] || return 1 23 | local rvm_prompt 24 | rvm_prompt=$($HOME/.rvm/bin/rvm-prompt ${=ZSH_THEME_RVM_PROMPT_OPTIONS} 2>/dev/null) 25 | [[ "${rvm_prompt}x" == "x" ]] && return 1 26 | echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" 27 | } 28 | 29 | # use this to enable users to see their ruby version, no matter which 30 | # version management system they use 31 | function ruby_prompt_info() { 32 | echo $(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info) 33 | } 34 | -------------------------------------------------------------------------------- /plugins/github/_github: -------------------------------------------------------------------------------- 1 | #compdef github 2 | #autoload 3 | 4 | # in order to make this work, you will need to have the github gem installed 5 | # http://github.com/defunkt/github-gem 6 | 7 | # github zsh completion, based on homebrew completion 8 | 9 | local -a _1st_arguments 10 | _1st_arguments=( 11 | 'browse:Open this repo in a web browser' 12 | 'clone:Clone a repo' 13 | 'config:Automatically set configuration info, or pass args to specify' 14 | 'create-from-local:Create a new GitHub repository from the current local repository' 15 | 'create:Create a new empty GitHub repository' 16 | 'fetch:Fetch from a remote to a local branch' 17 | 'fetch_all:Fetch all refs from a user' 18 | 'fork:Forks a GitHub repository' 19 | 'home:Open this repos master branch in a web browser' 20 | 'ignore:Ignore a SHA from github network commits' 21 | 'info:Info about this project' 22 | 'issues:Project issues tools' 23 | 'network:Project network tools - sub-commands : web [user], list, fetch, commits' 24 | 'open:Open the given user/project in a web browser' 25 | 'pull-request:Generate the text for a pull request' 26 | 'pull:Pull from a remote' 27 | 'search:Search GitHub for the given repository name' 28 | 'track:Track another users repository' 29 | ) 30 | 31 | local expl 32 | local -a pkgs installed_pkgs 33 | 34 | _arguments \ 35 | '*:: :->subcmds' && return 0 36 | 37 | if (( CURRENT == 1 )); then 38 | _describe -t commands "github subcommand" _1st_arguments 39 | return 40 | fi 41 | -------------------------------------------------------------------------------- /plugins/web-search/web-search.plugin.zsh: -------------------------------------------------------------------------------- 1 | # web_search from terminal 2 | 3 | function web_search() { 4 | # get the open command 5 | local open_cmd 6 | if [[ "$OSTYPE" = darwin* ]]; then 7 | open_cmd='open' 8 | else 9 | open_cmd='xdg-open' 10 | fi 11 | 12 | # check whether the search engine is supported 13 | if [[ ! $1 =~ '(google|bing|yahoo|duckduckgo)' ]]; 14 | then 15 | echo "Search engine $1 not supported." 16 | return 1 17 | fi 18 | 19 | local url="http://www.$1.com" 20 | 21 | # no keyword provided, simply open the search engine homepage 22 | if [[ $# -le 1 ]]; then 23 | $open_cmd "$url" 24 | return 25 | fi 26 | if [[ $1 == 'duckduckgo' ]]; then 27 | #slightly different search syntax for DDG 28 | url="${url}/?q=" 29 | else 30 | url="${url}/search?q=" 31 | fi 32 | shift # shift out $1 33 | 34 | while [[ $# -gt 0 ]]; do 35 | url="${url}$1+" 36 | shift 37 | done 38 | 39 | url="${url%?}" # remove the last '+' 40 | nohup $open_cmd "$url" 41 | rm nohup.out 42 | } 43 | 44 | 45 | alias bing='web_search bing' 46 | alias google='web_search google' 47 | alias yahoo='web_search yahoo' 48 | alias ddg='web_search duckduckgo' 49 | #add your own !bang searches here 50 | alias wiki='web_search duckduckgo \!w' 51 | alias news='web_search duckduckgo \!n' 52 | alias youtube='web_search duckduckgo \!yt' 53 | alias map='web_search duckduckgo \!m' 54 | alias image='web_search duckduckgo \!i' 55 | alias ducky='web_search duckduckgo \!' 56 | -------------------------------------------------------------------------------- /plugins/terminalapp/terminalapp.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Set Apple Terminal.app resume directory 2 | # based on this answer: http://superuser.com/a/315029 3 | # 2012-10-26: (javageek) Changed code using the updated answer 4 | 5 | # Tell the terminal about the working directory whenever it changes. 6 | if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then 7 | update_terminal_cwd() { 8 | # Identify the directory using a "file:" scheme URL, including 9 | # the host name to disambiguate local vs. remote paths. 10 | 11 | # Percent-encode the pathname. 12 | local URL_PATH='' 13 | { 14 | # Use LANG=C to process text byte-by-byte. 15 | local i ch hexch LANG=C 16 | for ((i = 1; i <= ${#PWD}; ++i)); do 17 | ch="$PWD[i]" 18 | if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then 19 | URL_PATH+="$ch" 20 | else 21 | hexch=$(printf "%02X" "'$ch") 22 | URL_PATH+="%$hexch" 23 | fi 24 | done 25 | } 26 | 27 | local PWD_URL="file://$HOST$URL_PATH" 28 | #echo "$PWD_URL" # testing 29 | printf '\e]7;%s\a' "$PWD_URL" 30 | } 31 | 32 | # Register the function so it is called whenever the working 33 | # directory changes. 34 | autoload add-zsh-hook 35 | add-zsh-hook precmd update_terminal_cwd 36 | 37 | # Tell the terminal about the initial directory. 38 | update_terminal_cwd 39 | fi 40 | -------------------------------------------------------------------------------- /themes/juanghurtado.zsh-theme: -------------------------------------------------------------------------------- 1 | # Needs Git plugin for current_branch method 2 | 3 | # Color shortcuts 4 | RED=$fg[red] 5 | YELLOW=$fg[yellow] 6 | GREEN=$fg[green] 7 | WHITE=$fg[white] 8 | BLUE=$fg[blue] 9 | RED_BOLD=$fg_bold[red] 10 | YELLOW_BOLD=$fg_bold[yellow] 11 | GREEN_BOLD=$fg_bold[green] 12 | WHITE_BOLD=$fg_bold[white] 13 | BLUE_BOLD=$fg_bold[blue] 14 | RESET_COLOR=$reset_color 15 | 16 | # Format for git_prompt_info() 17 | ZSH_THEME_GIT_PROMPT_PREFIX="" 18 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 19 | 20 | # Format for parse_git_dirty() 21 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}(*)" 22 | ZSH_THEME_GIT_PROMPT_CLEAN="" 23 | 24 | # Format for git_prompt_status() 25 | ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}unmerged" 26 | ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}deleted" 27 | ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}renamed" 28 | ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$YELLOW%}modified" 29 | ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}added" 30 | ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$WHITE%}untracked" 31 | 32 | # Format for git_prompt_ahead() 33 | ZSH_THEME_GIT_PROMPT_AHEAD=" %{$RED%}(!)" 34 | 35 | # Format for git_prompt_long_sha() and git_prompt_short_sha() 36 | ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$WHITE%}[%{$YELLOW%}" 37 | ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]" 38 | 39 | # Prompt format 40 | PROMPT=' 41 | %{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%} 42 | %{$BLUE%}>%{$RESET_COLOR%} ' 43 | RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}' 44 | -------------------------------------------------------------------------------- /plugins/sublime/sublime.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Sublime Text 2 Aliases 2 | 3 | if [[ $('uname') == 'Linux' ]]; then 4 | local _sublime_linux_paths > /dev/null 2>&1 5 | _sublime_linux_paths=( 6 | "$HOME/bin/sublime_text" 7 | "/opt/sublime_text/sublime_text" 8 | "/usr/bin/sublime_text" 9 | "/usr/local/bin/sublime_text" 10 | "/usr/bin/subl" 11 | ) 12 | for _sublime_path in $_sublime_linux_paths; do 13 | if [[ -a $_sublime_path ]]; then 14 | st_run() { $_sublime_path $@ >/dev/null 2>&1 &| } 15 | alias st=st_run 16 | break 17 | fi 18 | done 19 | 20 | elif [[ "$OSTYPE" = darwin* ]]; then 21 | local _sublime_darwin_paths > /dev/null 2>&1 22 | _sublime_darwin_paths=( 23 | "/usr/local/bin/subl" 24 | "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" 25 | "/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl" 26 | "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" 27 | "$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" 28 | "$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl" 29 | "$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" 30 | ) 31 | 32 | for _sublime_path in $_sublime_darwin_paths; do 33 | if [[ -a $_sublime_path ]]; then 34 | alias subl="'$_sublime_path'" 35 | alias st=subl 36 | break 37 | fi 38 | done 39 | fi 40 | 41 | alias stt='st .' 42 | -------------------------------------------------------------------------------- /themes/fino.zsh-theme: -------------------------------------------------------------------------------- 1 | # fino.zsh-theme 2 | 3 | # Use with a dark background and 256-color terminal! 4 | # Meant for people with rbenv and git. Tested only on OS X 10.7. 5 | 6 | # You can set your computer name in the ~/.box-name file if you want. 7 | 8 | # Borrowing shamelessly from these oh-my-zsh themes: 9 | # bira 10 | # robbyrussell 11 | # 12 | # Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ 13 | 14 | function prompt_char { 15 | git branch >/dev/null 2>/dev/null && echo "±" && return 16 | echo '○' 17 | } 18 | 19 | function box_name { 20 | [ -f ~/.box-name ] && cat ~/.box-name || hostname -s 21 | } 22 | 23 | local ruby_env='' 24 | if which rvm-prompt &> /dev/null; then 25 | ruby_env=' ‹$(rvm-prompt i v g)›%{$reset_color%}' 26 | else 27 | if which rbenv &> /dev/null; then 28 | ruby_env=' ‹$(rbenv version-name)›%{$reset_color%}' 29 | fi 30 | fi 31 | 32 | local current_dir='${PWD/#$HOME/~}' 33 | local git_info='$(git_prompt_info)' 34 | local prompt_char='$(prompt_char)' 35 | 36 | 37 | PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env} 38 | ╰─${prompt_char}%{$reset_color%} " 39 | 40 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" 41 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 42 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘" 43 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔" 44 | -------------------------------------------------------------------------------- /themes/michelebologna.zsh-theme: -------------------------------------------------------------------------------- 1 | # reference colors 2 | GREEN="%{$fg_bold[green]%}" 3 | RED="%{$fg_bold[red]%}" 4 | CYAN="%{$fg_bold[cyan]%}" 5 | YELLOW="%{$fg_bold[yellow]%}" 6 | BLUE="%{$fg_bold[blue]%}" 7 | MAGENTA="%{$fg_bold[magenta]%}" 8 | WHITE="%{$fg_bold[white]%}" 9 | 10 | COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE) 11 | 12 | # color reset 13 | RESET_COLOR="%{$reset_color%}" 14 | 15 | # which color should be applied? 16 | USERNAME_NORMAL_COLOR=$WHITE 17 | USERNAME_ROOT_COLOR=$RED 18 | HOSTNAME_NORMAL_COLOR=$BLUE 19 | # uncomment next line if you want auto-generated hostname color 20 | #for i in `hostname`; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]] 21 | HOSTNAME_ROOT_COLOR=$RED 22 | HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR) 23 | CURRENT_DIR_COLOR=$CYAN 24 | 25 | # zsh commands 26 | USERNAME_COMMAND="%n" 27 | HOSTNAME_COMMAND="%m" 28 | CURRENT_DIR="%~" 29 | 30 | # output: colors + commands 31 | USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)" 32 | HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR" 33 | CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR" 34 | LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)" 35 | 36 | # git theming 37 | ZSH_THEME_GIT_PROMPT_PREFIX="(" 38 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 39 | ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*" 40 | ZSH_THEME_GIT_PROMPT_CLEAN=")" 41 | 42 | # wrap all together 43 | PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR ' 44 | RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]' 45 | -------------------------------------------------------------------------------- /plugins/bundler/README.md: -------------------------------------------------------------------------------- 1 | # Bundler 2 | 3 | - adds completion for basic bundler commands 4 | - adds short aliases for common bundler commands 5 | - `be` aliased to `bundle exec` 6 | - `bl` aliased to `bundle list` 7 | - `bp` aliased to `bundle package` 8 | - `bo` aliased to `bundle open` 9 | - `bu` aliased to `bundle update` 10 | - `bi` aliased to `bundle install --jobs=` (only for bundler `>= 1.4.0`) 11 | - adds a wrapper for common gems: 12 | - looks for a binstub under `./bin/` and executes it (if present) 13 | - calls `bundle exec ` otherwise 14 | 15 | For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file. 16 | 17 | ## Configuration 18 | 19 | Please use the exact name of the executable and not the gem name. 20 | 21 | ### Add additional gems to be wrapped 22 | 23 | Add this before the plugin-list in your `.zshrc`: 24 | ```sh 25 | BUNDLED_COMMANDS=(rubocop) 26 | plugins=(... bundler ...) 27 | ``` 28 | This will add the wrapper for the `rubocop` gem (i.e. the executable). 29 | 30 | 31 | ### Exclude gems from being wrapped 32 | 33 | Add this before the plugin-list in your `.zshrc`: 34 | ```sh 35 | UNBUNDLED_COMMANDS=(foreman spin) 36 | plugins=(... bundler ...) 37 | ``` 38 | This will exclude the `foreman` and `spin` gems (i.e. their executable) from being wrapped. 39 | 40 | ## Excluded gems 41 | 42 | These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification. 43 | 44 | `berks` 45 | `foreman` 46 | `mailcatcher` 47 | `rails` 48 | `ruby` 49 | `spin` 50 | -------------------------------------------------------------------------------- /plugins/nanoc/_nanoc: -------------------------------------------------------------------------------- 1 | #compdef nanoc 2 | #autoload 3 | 4 | # nanoc zsh completion - based on the homebrew zsh completion 5 | # requires the 'nanoc' gem to be installed 6 | 7 | local -a _1st_arguments 8 | _1st_arguments=( 9 | 'autocompile:start the autocompiler' 10 | 'compile:compile items of this site' 11 | 'create-item:create an item' 12 | 'create-layout:create a layout' 13 | 'create-site:create a site' 14 | 'deploy:deploy the compiled site' 15 | 'help:show help' 16 | 'prune:remove files not managed by nanoc from the output directory' 17 | 'show-data:show data in this site' 18 | 'show-plugins:show all available plugins' 19 | 'show-rules:describe the rules for each item' 20 | 'update:update the data stored by the data source to a newer version' 21 | 'validate-css:validate the site’s CSS' 22 | 'validate-html:validate the site’s HTML' 23 | 'validate-links:validate links in site' 24 | 'view:start the web server that serves static files' 25 | 'watch:start the watcher' 26 | ) 27 | 28 | local expl 29 | local -a pkgs installed_pkgs 30 | 31 | _arguments \ 32 | '(--color)--color[enable color]' \ 33 | '(--debug)--debug[enable debugging]' \ 34 | '(--help)--help[show the help message and quit]' \ 35 | '(--no-color)--no-color[disable color]' \ 36 | '(--verbose)--verbose[make nanoc output more detailed]' \ 37 | '(--version)--version[show version information and quit]' \ 38 | '(--warn)--warn[enable warnings]' \ 39 | '*:: :->subcmds' && return 0 40 | 41 | if (( CURRENT == 1 )); then 42 | _describe -t commands "nanoc subcommand" _1st_arguments 43 | return 44 | fi 45 | -------------------------------------------------------------------------------- /lib/termsupport.zsh: -------------------------------------------------------------------------------- 1 | #usage: title short_tab_title looooooooooooooooooooooggggggg_windows_title 2 | #http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 3 | #Fully support screen, iterm, and probably most modern xterm and rxvt 4 | #Limited support for Apple Terminal (Terminal can't set window or tab separately) 5 | function title { 6 | if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then 7 | return 8 | fi 9 | if [[ "$TERM" == screen* ]]; then 10 | print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars 11 | elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then 12 | print -Pn "\e]2;$2:q\a" #set window name 13 | print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) 14 | fi 15 | } 16 | 17 | ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD 18 | ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" 19 | 20 | #Appears when you have the prompt 21 | function omz_termsupport_precmd { 22 | title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE 23 | } 24 | 25 | #Appears at the beginning of (and during) of command execution 26 | function omz_termsupport_preexec { 27 | emulate -L zsh 28 | setopt extended_glob 29 | 30 | # cmd name only, or if this is sudo or ssh, the next cmd 31 | local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]:gs/%/%%} 32 | local LINE="${2:gs/%/%%}" 33 | 34 | title '$CMD' '%100>...>$LINE%<<' 35 | } 36 | 37 | precmd_functions+=(omz_termsupport_precmd) 38 | preexec_functions+=(omz_termsupport_preexec) 39 | -------------------------------------------------------------------------------- /plugins/cloudapp/cloudapp.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # 3 | # cloudapp 4 | # Zach Holman / @holman 5 | # 6 | # Uploads a file from the command line to CloudApp, drops it into your 7 | # clipboard (on a Mac, at least). 8 | # 9 | # Example: 10 | # 11 | # cloudapp drunk-blake.png 12 | # 13 | # This requires Aaron Russell's cloudapp_api gem: 14 | # 15 | # gem install cloudapp_api 16 | # 17 | # Requires you set your CloudApp credentials in ~/.cloudapp as a simple file of: 18 | # 19 | # email 20 | # password 21 | 22 | require 'rubygems' 23 | begin 24 | require 'cloudapp_api' 25 | rescue LoadError 26 | puts "You need to install cloudapp_api: gem install cloudapp_api" 27 | exit!(1) 28 | end 29 | 30 | config_file = "#{ENV['HOME']}/.cloudapp" 31 | unless File.exist?(config_file) 32 | puts "You need to type your email and password (one per line) into "+ 33 | "`~/.cloudapp`" 34 | exit!(1) 35 | end 36 | 37 | email,password = File.read(config_file).split("\n") 38 | 39 | class HTTParty::Response 40 | # Apparently HTTPOK.ok? IS NOT OKAY WTFFFFFFFFFFUUUUUUUUUUUUUU 41 | # LETS MONKEY PATCH IT I FEEL OKAY ABOUT IT 42 | def ok? ; true end 43 | end 44 | 45 | if ARGV[0].nil? 46 | puts "You need to specify a file to upload." 47 | exit!(1) 48 | end 49 | 50 | CloudApp.authenticate(email,password) 51 | url = CloudApp::Item.create(:upload, {:file => ARGV[0]}).url 52 | 53 | # Say it for good measure. 54 | puts "Uploaded to #{url}." 55 | 56 | # Get the embed link. 57 | url = "#{url}/#{ARGV[0].split('/').last}" 58 | 59 | # Copy it to your (Mac's) clipboard. 60 | `echo '#{url}' | tr -d "\n" | pbcopy` 61 | -------------------------------------------------------------------------------- /plugins/rbfu/rbfu.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Enables rbfu with --auto option, if available. 2 | # 3 | # Also provides a command to list all installed/available 4 | # rubies. To ensure compatibility with themes, creates the 5 | # rvm_prompt_info function to return the $RBFU_RUBY_VERSION 6 | # version. 7 | 8 | command -v rbfu &>/dev/null 9 | 10 | if [[ $? -eq 0 ]]; then 11 | eval "$(rbfu --init --auto)" 12 | 13 | # Internal: Print ruby version details, if it's currently 14 | # active etc. 15 | function _rbfu_rubies_print() { 16 | local rb rb_out 17 | rb=$(basename $1) 18 | rb_out="$rb" 19 | [[ -h $1 ]] && rb_out="$rb_out${fg[green]}@${reset_color}" 20 | [[ "x$rb" == "x$2" ]] && rb_out="${fg[red]}$rb_out ${fg[red]}*${reset_color}" 21 | echo $rb_out 22 | } 23 | 24 | # Public: Provide a list with all available rubies, this basically depends 25 | # on `ls -1` and .rfbu/rubies. Highlights the currently active ruby version 26 | # and aliases. 27 | function rbfu-rubies() { 28 | local rbfu_dir active_rb 29 | rbfu_dir=$RBFU_RUBIES 30 | active_rb=$RBFU_RUBY_VERSION 31 | [[ -z "$rbfu_dir" ]] && rbfu_dir="${HOME}/.rbfu/rubies" 32 | [[ -z "$active_rb" ]] && active_rb="system" 33 | _rbfu_rubies_print "${rbfu_dir}/system" $active_rb 34 | for rb in $(ls -1 $rbfu_dir); do 35 | _rbfu_rubies_print "${rbfu_dir}/${rb}" $active_rb 36 | done 37 | } 38 | 39 | # Public: Create rvm_prompt_info command for themes compatibility, unless 40 | # it has already been defined. 41 | [ ! -x rvm_prompt_info ] && function rvm_prompt_info() { echo "${RBFU_RUBY_VERSION:=system}" } 42 | fi 43 | -------------------------------------------------------------------------------- /themes/kphoen.zsh-theme: -------------------------------------------------------------------------------- 1 | # kphoen.zsh-theme 2 | 3 | if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then 4 | PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)] 5 | %# ' 6 | 7 | ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}" 8 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 9 | ZSH_THEME_GIT_PROMPT_DIRTY="" 10 | ZSH_THEME_GIT_PROMPT_CLEAN="" 11 | 12 | # display exitcode on the right when >0 13 | return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" 14 | 15 | RPROMPT='${return_code}$(git_prompt_status)%{$reset_color%}' 16 | 17 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" 18 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" 19 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" 20 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" 21 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" 22 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" 23 | else 24 | PROMPT='[%n@%m:%~$(git_prompt_info)] 25 | %# ' 26 | 27 | ZSH_THEME_GIT_PROMPT_PREFIX=" on" 28 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 29 | ZSH_THEME_GIT_PROMPT_DIRTY="" 30 | ZSH_THEME_GIT_PROMPT_CLEAN="" 31 | 32 | # display exitcode on the right when >0 33 | return_code="%(?..%? ↵)" 34 | 35 | RPROMPT='${return_code}$(git_prompt_status)' 36 | 37 | ZSH_THEME_GIT_PROMPT_ADDED=" ✚" 38 | ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹" 39 | ZSH_THEME_GIT_PROMPT_DELETED=" ✖" 40 | ZSH_THEME_GIT_PROMPT_RENAMED=" ➜" 41 | ZSH_THEME_GIT_PROMPT_UNMERGED=" ═" 42 | ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" 43 | fi 44 | -------------------------------------------------------------------------------- /plugins/jump/jump.plugin.zsh: -------------------------------------------------------------------------------- 1 | # Easily jump around the file system by manually adding marks 2 | # marks are stored as symbolic links in the directory $MARKPATH (default $HOME/.marks) 3 | # 4 | # jump FOO: jump to a mark named FOO 5 | # mark FOO: create a mark named FOO 6 | # unmark FOO: delete a mark 7 | # marks: lists all marks 8 | # 9 | export MARKPATH=$HOME/.marks 10 | 11 | jump() { 12 | cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" 13 | } 14 | 15 | mark() { 16 | if (( $# == 0 )); then 17 | MARK=$(basename "$(pwd)") 18 | else 19 | MARK="$1" 20 | fi 21 | if read -q \?"Mark $(pwd) as ${MARK}? (y/n) "; then 22 | mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$MARK" 23 | fi 24 | } 25 | 26 | unmark() { 27 | rm -i "$MARKPATH/$1" 28 | } 29 | 30 | autoload colors 31 | marks() { 32 | for link in $MARKPATH/*(@); do 33 | local markname="$fg[cyan]${link:t}$reset_color" 34 | local markpath="$fg[blue]$(readlink $link)$reset_color" 35 | printf "%s\t" $markname 36 | printf "-> %s \t\n" $markpath 37 | done 38 | } 39 | 40 | _completemarks() { 41 | if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then 42 | reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g')) 43 | else 44 | if readlink -e "${MARKPATH}"/* &>/dev/null; then 45 | reply=($(ls "${MARKPATH}")) 46 | fi 47 | fi 48 | } 49 | compctl -K _completemarks jump 50 | compctl -K _completemarks unmark 51 | 52 | _mark_expansion() { 53 | setopt extendedglob 54 | autoload -U modify-current-argument 55 | modify-current-argument '$(readlink "$MARKPATH/$ARG")' 56 | } 57 | zle -N _mark_expansion 58 | bindkey "^g" _mark_expansion 59 | -------------------------------------------------------------------------------- /themes/mh.zsh-theme: -------------------------------------------------------------------------------- 1 | # mh theme 2 | # preview: http://cl.ly/1y2x0W0E3t2C0F29043z 3 | 4 | # features: 5 | # path is autoshortened to ~30 characters 6 | # displays git status (if applicable in current folder) 7 | # turns username green if superuser, otherwise it is white 8 | 9 | # if superuser make the username green 10 | if [ $UID -eq 0 ]; then NCOLOR="green"; else NCOLOR="white"; fi 11 | 12 | # prompt 13 | PROMPT='[%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[red]%}%30<...<%~%<<%{$reset_color%}]%(!.#.$) ' 14 | RPROMPT='$(git_prompt_info)' 15 | 16 | # git theming 17 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[gray]%}(%{$fg_no_bold[yellow]%}%B" 18 | ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} " 19 | ZSH_THEME_GIT_PROMPT_CLEAN="" 20 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱" 21 | 22 | # LS colors, made with http://geoff.greer.fm/lscolors/ 23 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 24 | export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' 25 | -------------------------------------------------------------------------------- /plugins/zeus/README.md: -------------------------------------------------------------------------------- 1 | ## zeus 2 | **Maintainer:** [b4mboo](https://github.com/b4mboo) 3 | 4 | * `zi` aliases `zeus init` 5 | * `zinit` aliases `zeus init` 6 | 7 | * `zs` aliases `zeus start` 8 | * `ztart` aliases `zeus start` 9 | 10 | * `zc` aliases `zeus console` 11 | * `zonsole` aliases `zeus console` 12 | 13 | * `zsr` aliases `zeus server` 14 | * `zerver` aliases `zeus server` 15 | 16 | * `zr` aliases `zeus rake` 17 | * `zake` aliases `zeus rake` 18 | 19 | * `zg` aliases `zeus generate` 20 | * `zenerate` aliases `zeus generate` 21 | 22 | * `zrn` aliases `zeus runner` 23 | * `zunner` aliases `zeus runner` 24 | 25 | * `zcu` aliases `zeus cucumber` 26 | * `zucumber` aliases `zeus cucumber` 27 | 28 | * `zspec` aliases `zeus rspec` 29 | 30 | * `zt` aliases `zeus test` 31 | * `zest` aliases `zeus test` 32 | 33 | * `zu` aliases `zeus test test/unit/*` 34 | * `zunits` aliases `zeus test test/unit/*` 35 | 36 | * `zf` aliases `zeus test test/functional/*` 37 | * `zunctional` aliases `zeus test test/functional/*` 38 | 39 | * `za` aliases `zeus test test/unit/*; zeus test test/functional/; zeus cucumber` 40 | * `zall` aliases `zeus test test/unit/*; zeus test test/functional/; zeus cucumber` 41 | 42 | * `zsw` aliases `rm .zeus.sock` 43 | * `zweep` aliases `rm .zeus.sock` 44 | 45 | `zdbr` aliases `zeus rake db:reset db:test:prepare` 46 | `zdbreset` aliases `zeus rake db:reset db:test:prepare` 47 | 48 | `zdbm` aliases `zeus rake db:migrate db:test:prepare` 49 | `zdbmigrate` aliases `zeus rake db:migrate db:test:prepare` 50 | 51 | `zdbc` aliases `zeus rake db:create` 52 | 53 | `zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare` 54 | -------------------------------------------------------------------------------- /themes/sorin.zsh-theme: -------------------------------------------------------------------------------- 1 | # sorin.zsh-theme 2 | # screenshot: http://i.imgur.com/aipDQ.png 3 | 4 | if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then 5 | MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" 6 | local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" 7 | 8 | PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} ' 9 | 10 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}" 11 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 12 | ZSH_THEME_GIT_PROMPT_DIRTY="" 13 | ZSH_THEME_GIT_PROMPT_CLEAN="" 14 | 15 | RPROMPT='${return_status}$(git_prompt_status)%{$reset_color%}' 16 | 17 | ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" 18 | ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" 19 | ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" 20 | ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" 21 | ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" 22 | ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" 23 | else 24 | MODE_INDICATOR="❮❮❮" 25 | local return_status="%(?::⏎)" 26 | 27 | PROMPT='%c$(git_prompt_info) %(!.#.❯) ' 28 | 29 | ZSH_THEME_GIT_PROMPT_PREFIX=" git:" 30 | ZSH_THEME_GIT_PROMPT_SUFFIX="" 31 | ZSH_THEME_GIT_PROMPT_DIRTY="" 32 | ZSH_THEME_GIT_PROMPT_CLEAN="" 33 | 34 | RPROMPT='${return_status}$(git_prompt_status)' 35 | 36 | ZSH_THEME_GIT_PROMPT_ADDED=" ✚" 37 | ZSH_THEME_GIT_PROMPT_MODIFIED=" ✹" 38 | ZSH_THEME_GIT_PROMPT_DELETED=" ✖" 39 | ZSH_THEME_GIT_PROMPT_RENAMED=" ➜" 40 | ZSH_THEME_GIT_PROMPT_UNMERGED=" ═" 41 | ZSH_THEME_GIT_PROMPT_UNTRACKED=" ✭" 42 | fi 43 | -------------------------------------------------------------------------------- /plugins/meteor/_meteor: -------------------------------------------------------------------------------- 1 | #compdef meteor 2 | #autoload 3 | 4 | # Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion 5 | # Original author: Dimitri JORGE (https://github.com/jorge-d) 6 | 7 | _meteor_all_packages() { 8 | packages=(`meteor list | cut -d" " -f1`) 9 | } 10 | _meteor_installed_packages() { 11 | installed_packages=(`meteor list --using`) 12 | } 13 | 14 | local -a _1st_arguments 15 | _1st_arguments=( 16 | 'run:[Default] Run this project in local development mode' 17 | 'create:Create a new project' 18 | 'update:Upgrade this project to the latest version of Meteor' 19 | 'add:Add a package to this project' 20 | 'remove:Remove a package from this project' 21 | 'list:List available packages' 22 | 'help:Display Meteor help' 23 | 'bundle:Pack this project up into a tarball' 24 | 'mongo:Connect to the Mongo database for the specified site' 25 | 'deploy:Deploy this project to Meteor' 26 | 'logs:Show logs for specified site' 27 | 'reset:Reset the project state. Erases the local database.' 28 | 'test-packages:Test one or more packages' 29 | ) 30 | 31 | local expl 32 | local -a packages installed_packages 33 | 34 | if (( CURRENT == 2 )); then 35 | _describe -t commands "meteor subcommand" _1st_arguments 36 | return 37 | fi 38 | 39 | case "$words[2]" in 40 | help) 41 | _describe -t commands "meteor subcommand" _1st_arguments ;; 42 | remove) 43 | _meteor_installed_packages 44 | _wanted installed_packages expl 'installed packages' compadd -a installed_packages ;; 45 | add) 46 | _meteor_all_packages 47 | _wanted packages expl 'all packages' compadd -a packages ;; 48 | esac -------------------------------------------------------------------------------- /themes/ys.zsh-theme: -------------------------------------------------------------------------------- 1 | # Clean, simple, compatible and meaningful. 2 | # Tested on Linux, Unix and Windows under ANSI colors. 3 | # It is recommended to use with a dark background and the font Inconsolata. 4 | # Colors: black, red, green, yellow, *blue, magenta, cyan, and white. 5 | # 6 | # http://ysmood.org/wp/2013/03/my-ys-terminal-theme/ 7 | # Mar 2013 ys 8 | 9 | # Machine name. 10 | function box_name { 11 | [ -f ~/.box-name ] && cat ~/.box-name || hostname 12 | } 13 | 14 | # Directory info. 15 | local current_dir='${PWD/#$HOME/~}' 16 | 17 | # Git info. 18 | local git_info='$(git_prompt_info)' 19 | ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}" 20 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" 21 | ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x" 22 | ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o" 23 | 24 | # Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $ 25 | PROMPT=" 26 | %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ 27 | %{$fg[cyan]%}%n \ 28 | %{$fg[white]%}at \ 29 | %{$fg[green]%}$(box_name) \ 30 | %{$fg[white]%}in \ 31 | %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ 32 | ${git_info} \ 33 | %{$fg[white]%}[%*] 34 | %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" 35 | 36 | if [[ "$(whoami)" == "root" ]]; then 37 | PROMPT=" 38 | %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ 39 | %{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ 40 | %{$fg[white]%}at \ 41 | %{$fg[green]%}$(box_name) \ 42 | %{$fg[white]%}in \ 43 | %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ 44 | ${git_info} \ 45 | %{$fg[white]%}[%*] 46 | %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" 47 | fi 48 | -------------------------------------------------------------------------------- /plugins/composer/composer.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # FILE: composer.plugin.zsh 3 | # DESCRIPTION: oh-my-zsh composer plugin file. 4 | # AUTHOR: Daniel Gomes (me@danielcsgomes.com) 5 | # VERSION: 1.0.0 6 | # ------------------------------------------------------------------------------ 7 | 8 | # Composer basic command completion 9 | _composer_get_command_list () { 10 | composer --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' 11 | } 12 | 13 | _composer_get_required_list () { 14 | composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }' 15 | } 16 | 17 | _composer () { 18 | local curcontext="$curcontext" state line 19 | typeset -A opt_args 20 | _arguments \ 21 | '1: :->command'\ 22 | '*: :->args' 23 | if [ -f composer.json ]; then 24 | case $state in 25 | command) 26 | compadd `_composer_get_command_list` 27 | ;; 28 | *) 29 | compadd `_composer_get_required_list` 30 | ;; 31 | esac 32 | else 33 | compadd create-project init search selfupdate show 34 | fi 35 | } 36 | 37 | compdef _composer composer 38 | 39 | # Aliases 40 | alias c='composer' 41 | alias csu='composer self-update' 42 | alias cu='composer update' 43 | alias ci='composer install' 44 | alias ccp='composer create-project' 45 | alias cdu='composer dump-autoload' 46 | 47 | # install composer in the current directory 48 | alias cget='curl -s https://getcomposer.org/installer | php' 49 | 50 | # Add Composer's global binaries to PATH 51 | export PATH=$PATH:~/.composer/vendor/bin 52 | -------------------------------------------------------------------------------- /plugins/wd/_wd.sh: -------------------------------------------------------------------------------- 1 | #compdef wd 2 | 3 | zstyle ':completion:*:descriptions' format '%B%d%b' 4 | zstyle ':completion::complete:wd:*:commands' group-name commands 5 | zstyle ':completion::complete:wd:*:warp_points' group-name warp_points 6 | zstyle ':completion::complete:wd::' list-grouped 7 | 8 | zmodload zsh/mapfile 9 | 10 | function _wd() { 11 | local CONFIG=$HOME/.warprc 12 | local ret=1 13 | 14 | local -a commands 15 | local -a warp_points 16 | 17 | warp_points=( "${(f)mapfile[$CONFIG]//$HOME/~}" ) 18 | 19 | commands=( 20 | 'add:Adds the current working directory to your warp points' 21 | 'add!:Overwrites existing warp point' 22 | 'rm:Removes the given warp point' 23 | 'ls:Outputs all stored warp points' 24 | 'show:Outputs all warp points that point to the current directory' 25 | 'help:Show this extremely helpful text' 26 | '..:Go back to last directory' 27 | ) 28 | 29 | _arguments -C \ 30 | '1: :->first_arg' \ 31 | '2: :->second_arg' && ret=0 32 | 33 | case $state in 34 | first_arg) 35 | _describe -t warp_points "Warp points" warp_points && ret=0 36 | _describe -t commands "Commands" commands && ret=0 37 | ;; 38 | second_arg) 39 | case $words[2] in 40 | add\!|rm) 41 | _describe -t points "Warp points" warp_points && ret=0 42 | ;; 43 | add) 44 | _message 'Write the name of your warp point' && ret=0 45 | ;; 46 | esac 47 | ;; 48 | esac 49 | 50 | return $ret 51 | } 52 | 53 | _wd "$@" 54 | 55 | # Local Variables: 56 | # mode: Shell-Script 57 | # sh-indentation: 2 58 | # indent-tabs-mode: nil 59 | # sh-basic-offset: 2 60 | # End: 61 | # vim: ft=zsh sw=2 ts=2 et 62 | -------------------------------------------------------------------------------- /plugins/grails/grails.plugin.zsh: -------------------------------------------------------------------------------- 1 | _enumerateGrailsScripts() { 2 | # Default directoryies 3 | directories=($GRAILS_HOME/scripts ~/.grails/scripts ./scripts) 4 | 5 | # Check all of the plugins directories, if they exist 6 | if [ -d plugins ] 7 | then 8 | directories+=(plugins/*/scripts) 9 | fi 10 | 11 | # Enumerate all of the Groovy files 12 | files=() 13 | for dir in $directories; 14 | do 15 | if [ -d $dir ] 16 | then 17 | files+=($dir/[^_]*.groovy) 18 | fi 19 | done 20 | 21 | # Don't try to basename () 22 | if [ ${#files} -eq 0 ]; 23 | then 24 | return 25 | fi 26 | 27 | scripts=() 28 | for file in $files 29 | do 30 | # - Strip the path 31 | # - Remove all scripts with a leading '_' 32 | # - PackagePlugin_.groovy -> PackagePlugin 33 | # - PackagePlugin -> Package-Plugin 34 | # - Package-Plugin -> package-plugin 35 | command=$(basename $file \ 36 | | sed -E -e 's/^_?([^_]+)_?.groovy/\1/'\ 37 | -e 's/([a-z])([A-Z])/\1-\2/g' \ 38 | | tr "[:upper:]" "[:lower:]" \ 39 | | sort \ 40 | | uniq) 41 | scripts+=($command) 42 | done 43 | echo $scripts 44 | } 45 | 46 | _grails() { 47 | if (( CURRENT == 2 )); then 48 | scripts=( $(_enumerateGrailsScripts) ) 49 | 50 | if [ ${#scripts} -ne 0 ]; 51 | then 52 | _multi_parts / scripts 53 | return 54 | fi 55 | fi 56 | 57 | _files 58 | } 59 | 60 | compdef _grails grails 61 | -------------------------------------------------------------------------------- /lib/theme-and-appearance.zsh: -------------------------------------------------------------------------------- 1 | # ls colors 2 | autoload colors; colors; 3 | export LSCOLORS="Gxfxcxdxbxegedabagacad" 4 | #export LS_COLORS 5 | 6 | # Enable ls colors 7 | if [ "$DISABLE_LS_COLORS" != "true" ] 8 | then 9 | # Find the option for using colors in ls, depending on the version: Linux or BSD 10 | if [[ "$(uname -s)" == "NetBSD" ]]; then 11 | # On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors); 12 | # otherwise, leave ls as is, because NetBSD's ls doesn't support -G 13 | gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' 14 | elif [[ "$(uname -s)" == "OpenBSD" ]]; then 15 | # On OpenBSD, test if "colorls" is installed (this one supports colors); 16 | # otherwise, leave ls as is, because OpenBSD's ls doesn't support -G 17 | colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G' 18 | else 19 | ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G' 20 | fi 21 | fi 22 | 23 | #setopt no_beep 24 | setopt auto_cd 25 | setopt multios 26 | setopt cdablevarS 27 | 28 | if [[ x$WINDOW != x ]] 29 | then 30 | SCREEN_NO="%B$WINDOW%b " 31 | else 32 | SCREEN_NO="" 33 | fi 34 | 35 | # Apply theming defaults 36 | PS1="%n@%m:%~%# " 37 | 38 | # git theming default: Variables for theming the git info prompt 39 | ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name 40 | ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt 41 | ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty 42 | ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean 43 | 44 | # Setup the prompt with pretty colors 45 | setopt prompt_subst 46 | 47 | -------------------------------------------------------------------------------- /plugins/git-prompt/git-prompt.plugin.zsh: -------------------------------------------------------------------------------- 1 | # ZSH Git Prompt Plugin from: 2 | # http://github.com/olivierverdier/zsh-git-prompt 3 | # 4 | export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt 5 | # Initialize colors. 6 | autoload -U colors 7 | colors 8 | 9 | # Allow for functions in the prompt. 10 | setopt PROMPT_SUBST 11 | 12 | ## Enable auto-execution of functions. 13 | typeset -ga preexec_functions 14 | typeset -ga precmd_functions 15 | typeset -ga chpwd_functions 16 | 17 | # Append git functions needed for prompt. 18 | preexec_functions+='preexec_update_git_vars' 19 | precmd_functions+='precmd_update_git_vars' 20 | chpwd_functions+='chpwd_update_git_vars' 21 | 22 | ## Function definitions 23 | function preexec_update_git_vars() { 24 | case "$2" in 25 | git*) 26 | __EXECUTED_GIT_COMMAND=1 27 | ;; 28 | esac 29 | } 30 | 31 | function precmd_update_git_vars() { 32 | if [ -n "$__EXECUTED_GIT_COMMAND" ]; then 33 | update_current_git_vars 34 | unset __EXECUTED_GIT_COMMAND 35 | fi 36 | } 37 | 38 | function chpwd_update_git_vars() { 39 | update_current_git_vars 40 | } 41 | 42 | function update_current_git_vars() { 43 | unset __CURRENT_GIT_STATUS 44 | 45 | local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py" 46 | _GIT_STATUS=`python ${gitstatus}` 47 | __CURRENT_GIT_STATUS=("${(f)_GIT_STATUS}") 48 | } 49 | 50 | function prompt_git_info() { 51 | if [ -n "$__CURRENT_GIT_STATUS" ]; then 52 | echo "(%{${fg[red]}%}$__CURRENT_GIT_STATUS[1]%{${fg[default]}%}$__CURRENT_GIT_STATUS[2]%{${fg[magenta]}%}$__CURRENT_GIT_STATUS[3]%{${fg[default]}%})" 53 | fi 54 | } 55 | 56 | # Set the prompt. 57 | #PROMPT='%B%m%~%b$(prompt_git_info) %# ' 58 | # for a right prompt: 59 | #RPROMPT='%b$(prompt_git_info)' 60 | RPROMPT='$(prompt_git_info)' 61 | --------------------------------------------------------------------------------