Skip to content
Markus Færevaag edited this page Nov 16, 2013 · 119 revisions

Enable the plugins you want by editing your ~/.zshrc file. Example:

plugins=(rails3 git ruby)

Completion plugins will let zsh know which arguments the package has so it can autocomplete. For instance, if you have the Homebrew plugin installed and type:

brew in

.. and then hit tab, the brew-plugin will enable autocompletion to brew install. Completion plugins are not documented further on this page as they only provide better introspection for zsh into the original command. man is your friend.

You should always read the source for the plugin before using it to avoid surprises. Plugins are located in ~/.oh-my-zsh/plugins.

The following plugins are bundled:

apache2-macports

Maintainer: robbyrussell

Enables aliases to control a local Apache2 installed via Macports.

Start Apache:

apache2start

Stop Apache:

apache2stop

Restart Apache:

apache2restart

archlinux

Maintainer: Benjamin Boudreau

Enabled aliases for pacman (replace pac by ya for yaourt)

Install specific package(s) from the repositories

pacin='sudo pacman -S'

Install specific package not from the repositories but from a file

pacins='sudo pacman -U'

Remove the specified package(s), retaining its configuration(s) and required dependencies

pacre='sudo pacman -R'

Remove the specified package(s), its configuration(s) and unneeded dependencies

pacrem='sudo pacman -Rns'

Display information about a given package in the repositories

pacrep='pacman -Si'

Search for package(s) in the repositories

pacreps='pacman -Ss'

Display information about a given package in the local database

pacloc='pacman -Qi'

Search for package(s) in the local database

paclocs='pacman -Qs'

Update and refresh the local package and ABS databases against repositories

pacupd='sudo pacman -Sy && sudo abs'

Install given package(s) as dependencies of another package

pacinsd='sudo pacman -S --asdeps'

Force refresh of all package lists after updating /etc/pacman.d/mirrorlist

pacmir='sudo pacman -Syy'

Extra functions for package management in Archlinux

List all installed packages with a short description - Source

paclist

List all orphaned packages

paclsorphans

Delete all orphaned packages

pacrmorphans

List all disowned files in your system

pacdisowned | less +F

autojump

Enables autojump if installed with homebrew, macports or debian/ubuntu package.

This does not add any commands on its own.

bower

Maintainer: miklos-martin

Bower is a package manager for the web. This plugin provides some aliases and completions for this great tool.

Aliases

  • bi: installs a package (bower install)
  • bl: lists installed packages (bower list)
  • bs: searches for packages (bower search)

Completion

It completes the basic commands for bower. It uses the bower help command to achieve this, not a burned-in list of commands. It also provides completion for bower install, uses the output of bower search. It takes a few seconds for the first time (in the session), but then the output of bower search is cached, so things then speed up a lot.

Example

# to install jquery for example
bi jq<TAB>

brew

Maintainer: robbyrussell

Homebrew is an OS X package manager

This plugin :

  • creates a brews alias to list installed brews (= brew list -1)
  • adds completion for the brew command

bundler

Maintainer: robbyrussell

Enables aliases to Bundler.

Bundle exec, execute a command in the context of the bundle

be [command]

Bundle install

bi

Bundle update

bu

Also creates shell aliases so you don't have to type "bundle exec" before most common ruby commands when you are in a directory with a Gemfile. Here is a list of commands it does this for: annotate cap capify cucumber ey foreman guard heroku middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails

cabal

Maintainer: telser

  • cabal -- auto-completion for Cabal a build tool for Haskell.

cake

Maintainer: serby

Commands for Cake, the coffee-script build tool.

  • cake -- auto complete for cake tasks

cap

Maintainer: robbyrussell

Commands for Capistrano, a deployment tool built in Ruby.

  • cap -- a few commands for Capistrano, a deployment tool built in Ruby

celery

Maintainer: dongweiming

Commands for celery, a distributed task queue.

Completion

# View worker have those parameter options
celery worker<TAB>

command-not-found

Maintainer: robbyrussell

Only for Ubuntu: If a command is not recognized in the $PATH, this will use Ubuntu's command-not-found package to find it or suggest spelling mistakes:

~$ gedit
The program 'gedit' is currently not installed. You can install it by typing:
sudo apt-get install gedit
bash: gedit: command not found

The plugin uses the command-not-found package zsh support.

Composer

Maintainer: danielcsgomes

Composer autocomplete plugin with useful aliases:

  • c = 'composer'
  • csu = 'composer self-update'
  • cu = 'composer update'
  • ci = 'composer install'
  • ccp = 'composer create-project'
  • cget = installs composer on the current path

cloudapp

Maintainer: matthewmccullough

Uploads files and piped contents to the Cloudapp service. Outputs and copies the resultant URL to the clipboard. Uses the cloudapp ruby gem from @holman.

coffee

Maintainer: jdavis

Completion plugin for CoffeeScript.

For available options, look at the usage or run the command coffee --help.

compleat

Maintainer: robbyrussell

Completion for human beings. Further documentation needed

See this blog post about compleat

cpanm

Maintainer: robbyrussell

Completion plugin for cpanminus

debian

Maintainer: robbyrussell

A set of aliases to work with the Debian Advanced Packaging Tool, apt.

Search for packages

as [search term]

Update packages

ad

Upgrade packages

ag

Install packages

ai [packages to install]

Remove package

ar [package to remove]

Apt policy

app

Search packages

acs [search term]

Clean apt cache

ac

dircycle

This is a small zle trick that lets you cycle your directory stack left or right using Ctrl+Shift+Left/Right. This is useful when moving back and forth between directories in development environments, and can be thought of as kind of a nondestructive pushd/popd.

dirpersist

Maintainer: robbyrussell

  • dirpersist

docker

Maintainer: Azaan

  • Auto complete arguments and options for all docker commands.
  • Show containerIDs and Images for tab completion where applicable (screenshots)

encode64

Maintainer: fuksito

This is a plugin that helps to encode/decode strings with base64 from the console quickly:

$ encode64 some_string
=> c29tZV9zdHJpbmc=

$ decode64 c29tZV9zdHJpbmc=
=> some_string

fabric

Maintainer: santiycr

  • fabric - completion plugin for fabric

fbterm

  • fbterm - automatically start fbterm when running in /dev/tty*

Forklift

Maintainer: bitboxer

fl [<folder>] - Opens specified directory or current working directory in ForkLift.app

fasd

  • fasd - command-line productivity booster, offers quick access to files and directories, inspired by autojump, z and v

gas

  • gas - completion plugin for the gas gem

gem

Maintainer: robbyrussell

  • gem - completion plugin for the gem command

gpg-agent

Maintainer: robbyrussell

  • gpg-agent - starts gpg-agent (with ssh support) if not running and includes its environment variables

git

Maintainer: robbyrussell

  • git - adds a lot of git aliases ( gx e.g. gd - git diff) and functions for pulling for dealing with the current branch

You can find a list of some of the aliases introduced here.

gitfast

Maintainer: felipec

Enables the zsh completion from git.git folks, which is much faster than the official one from zsh. A lot of zsh-specific features are not supported, like descriptions for every argument, but everything the bash completion has, this one does two (as it is using it behind the scenes). Not only is it faster, it should be more robust, and updated regularly to the latest git upstream version.

git-extras

Maintainer: agrimaldi

git-extras - Support for git-extras completion

Pressing tab after the various commands should autofill authors, branches and tags depending on context

  • git changelog [-l/--list] - populate changelog file with commits since the previous tag
  • git contrib - display author contributions
  • git count [--all] - count commits
  • git delete-branch - delete local and remote branch
  • git delete-submodule - delete submodule
  • git delete-tag - delete local and remote tag
  • git extras [-v/--version] - git-extras
  • git graft:'merge commits from source branch to destination branch
  • git squash - merge commits from source branch into the current one as a single commit
  • git feature [finish] - create a feature branch
  • git refactor [finish] - create a refactor branch
  • git bug [finish] - create a bug branch
  • git summary - repository summary
  • git effort [--above] - display effort statistics
  • git repl - read-eval-print-loop
  • git commits-since - list commits since a given date
  • git release - release commit with the given tag
  • git alias - define, search and show aliases
  • git ignore - add patterns to .gitignore
  • git info - show info about the repository
  • git create-branch - create local and remote branch
  • git fresh-branch - create empty local branch
  • git undo - remove the latest commit
  • git setup - setup a git repository
  • git touch - one step creation of new files
  • git obliterate - Completely remove a file from the repository, including past commits and tags
  • git local-commits - list unpushed commits on the local branch

git-flow

Maintainer: robbyrussell

  • git-flow - Support for git-flow completion

git-flow-avh

Maintainer: statschner

git-hubflow

Maintainer: wweaver

git_remote_branch

Maintainer: webmat

  • git_remote_branch - Support for grb completion

  • grb create branch_name [origin_server]

  • grb publish branch_name [origin_server]

  • grb delete branch_name [origin_server]

  • grb track branch_name [origin_server]

  • grb rename new_branch_name [origin_server]

  • grb explain create

github

Maintainer: robbyrussell

  • github - adds autocomplete to the github gem, which is installable via gem install github

gradle

Maintainer: matthewmccullough

Adds autocompletion of task names and option switches to command line use of gradle by actually executing gradle tasks in the background and collecting the result.

Caches the result of the task names in a .gradletasknamecache file that is regenerated if the timestamp of the build.gradle file changes.

grails

Maintainer: zachriggle

Adds tab-completion of Grails script names to the command line use of grails. Looks for scripts in the following paths:

  • $GRAILS_HOME/scripts
  • ~/.grails/scripts
  • ./scripts
  • ./plugins/*/scripts

jira

Maintainer: tresni

  • Open Jira issues using the command open_jira_issue
jira # Open new issue form in browser
jira ABC-123 # Open issue in browser

If you use Rapid Board make sure to add the following to your .zshrc:

JIRA_RAPID_BOARD="true"

knife

Maintainer: franklouwers

  • knife - adds autocompletion to knife

last-working-dir

Maintainer: op

Keeps track of the last used directory and automatically jumps to it for new shells. Similar to how many terminal emulators does it.

  • lwd - jump to last working directory (automatically called for new shells)

lein

Maintainer: robbyrussell

lighthouse

Maintainer: robbyrussell

lol

Maintainer: robbyrussell

  • lol - brings lulz to your zsh (based on lolbash)

macports

Maintainer: robbyrussell

  • macports - adds "port" command completion and aliases for running macports commands

mercurial

Maintainer: ptrv

  • hgc - hg commit
  • hgb - hg branch
  • hgba - hg branches
  • hgco - hg checkout
  • hgd - hg diff
  • hged - hg diffmerge
  • hgl - hg pull -u
  • hgp - hg push
  • hgs - hg status
  • hgca - hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip, this is the 'git commit --amend' equivalent

mvn

Maintainer: fred-o

  • mvn - adds command line completion for apache maven

mysql-macports

Maintainer: robbyrussell

  • mysql - aliases for starting stopping and getting mysql status ( mysqlstart, mysqlstop, mysqlstatus)

nanoc

Maintainer: josh-

Enhances the Nanoc static site generator with aliases and ZSH autocompletion. Discussed in further detail in this blog post.

Aliases

  • n is an alias to nanoc, other commands may be appended to this or on its own it will compile a site.
  • na starts the autocompiler.
  • nco compiles a site.
  • nci <item> creates an item .
  • ncl <layout> creates a layout .
  • ncs <site> creates a site .
  • nd deploys a site.
  • nv starts the adsf server for the current site.
  • nw starts the watcher.

node

  • node-api [SECTION]: open the node api, for your current version, in your browser. Note: This uses open which comes with OS X. This needs to be re-factored to work on other platforms.

npm

Maintainer: robbyrussell

  • npm - adds autocompletion to npm

nyan

Maintainer: robbyrussell

  • nyan - nyan cat goodness in your shell

osx

Maintainer: robbyrussell

  • tab - open the current directory in a new tab
  • pfd - return the path of the frontmost Finder window
  • pfs - return the current Finder selection
  • cdf - cd to the current Finder directory
  • pushdf - pushd to the current Finder directory
  • quick-look - Quick Look a specified file
  • man-preview - open a specified man page in Preview
  • trash - move a specified file to the Trash

per-directory-history

Maintainer: jimhester

per-directory-history - tracks previous command history both per current directory and globally, with the ability to switch between them on the fly, bound to ctrl-g.

perl

Maintainer: robbyrussell

  • perl - useful shortcuts for perlbrew, perldoc, and perl one-liners

phing

Maintainer: robbyrussell

  • phing - auto complete for phing targets.

pip

Maintainer: robbyrussell

  • pip - completion plugin for the pip command

pod

Maintainer: mekanics

  • Completion plugin for CocoaPods
  • You can find the official documentation here

pow

  • kapow: helper function to touch tmp/restart.txt, restarting an application in pow.

powify

A simple powify autocomplete plugin. It includes all commands, subcomands, and rack app name autocompletion where needed.

rails

Maintainer: robbyrussell

  • rails - rails 2.3 commands (mostly) for running scripts

rails3

Maintainer: robbyrussell

  • rc - rails console
  • rd - rails destroy
  • rdb - rails dbconsole
  • rdbm - rake db:migrate db:test:clone
  • rg - rails generate
  • rgm - rails generate migration
  • rdm - rake db:migrate
  • rdr - rake db:rollback
  • rp - rails plugin
  • rs - rails server
  • rsd - rails server --debugger

rand-quote

Maintainer: posva

Creates a function quote to display a colored random quote picked from this site

redis-cli

Maintainer: robbyrussell

Completion plugin for redis-cli

repo

Maintainer: Gaetan Semet

Completion plugin for git-repo

ruby

Maintainer: robbyrussell

  • ruby - alias for sudo gem ( sgem ) and a find ruby files in directory alias ( rfind )

rvm

  • rb18 [GEMSET]: shortcut for rvm use ruby-1.8.7-p334@GEMSET (with gemset completion)
  • rb19 [GEMSET]: shortcut for rvm use ruby-1.9.2-p180@GEMSET (with gemset completion)
  • rubies: list installed rubies
  • gemsets: list gemsets for currently active ruby
  • gems: list gems available in currently active gemset Note: This has opinions about colors. It should be re-factored to be customizable in themes.

After rvm-update (alias for rvm get head; rvm reload), run rvm-link-completion to make a symlink to the official zsh completion file that comes with rvm into your oh-my-zsh rvm plugin directory.

sbt

Maintainer: mcaserta

  • sbt - completion plugin for SBT

Useful aliases:

  • sbc - sbt compile
  • sbco - sbt console
  • sbcq - sbt console-quick
  • sbcl - sbt clean
  • sbcp - sbt console-project
  • sbd - sbt doc
  • sbdc - sbt dist:clean
  • sbdi - sbt dist
  • sbgi - sbt gen-idea
  • sbp - sbt publish
  • sbpl - sbt publish-local
  • sbr - sbt run
  • sbrm - sbt run-main
  • sbu - sbt update
  • sbx - sbt test

scala

Maintainer: mcaserta

  • scala - completion plugin for scala and scalac

screen

Maintainer: fred-o

  • screen - automatic setting of window titles and status for GNU Screen

sprunge

Maintainer: ilikenwf

  • sprunge - a basic cli interface to pastebin, which accepts it's input through web requests. Designed for Linux users, sprunge is an easy way to pastebin text without having to actually use a web browser. The oh-my-zsh plugin is based on http://www.shellperson.net/sprunge-pastebin-script/, author unknown.

You can use sprunge in the following ways:

  • Pipes: echo "hello there...testing sprunge"|sprunge
  • Files: sprunge test.txt
  • Strings: sprunge "hello"

Note that if a filename is misspelled or doesn't have the necessary path description, it will NOT generate an error, but will instead treat it as a text string and upload it.

ssh-agent

Maintainer: robbyrussell

sublime

Maintainer: dylnhdsn

  • st - open a specified file in Sublime Text
  • stt - open the current directory in Sublime Text

supervisor

Maintainer: everbird

suse

Maintainer: r-darwish

  • zi - sudo zypper install
  • zrf - sudo zypper refresh
  • zs - zipper search
  • zup - sudo zypper dist-upgrade
  • zrm - sudo zypper remove
  • zp - sudo zypper patch
  • zps - sudo zypper ps

svn

Maintainer: robbyrussell

  • svn - adds several functions for dealing with the status of the current directory's svn repo.

symfony2

Maintainer: andrewtch

Symfony2 autocomplete plugin; binds to app/console, and not ./console command!

New aliases:

  • sf2 = 'php app/console'
  • sf2clear = 'php app/console cache:clear'

systemd

Maintainer: aelesbao

systemd aliases plugin; Add sc-[command] aliases to all systemctl commands, using sudo when needed.

taskwarrior

Maintainer: lepht

  • taskwarrior - adds smart tab completion for TaskWarrior. For example, task[tabtab] will give you a list of current tasks, task 66[tabtab] gives a list of available modifications for that task, etc.

terminalapp

Maintainer: OutPunk

  • terminalapp - automatically sets the Terminal.app resume directory, so when restoring windows with OS X Lion's "Resume" feature it will restore the directory too.

terminitor

Maintainer: philippbosch

terminitor is a tool that "automates your development workflow setup".

  • terminitor – auto complete for terminitor commands and scripts

textmate

Maintainer: robbyrussell

  • et aliases mate .
  • ett aliases mate Gemfile app config features lib db public spec test Rakefile Capfile Todo
  • etp aliases mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo
  • etts aliases mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo
  • mr aliases mate CHANGELOG app config db lib public script spec test
  • tm [directory] changes to specified directory and executes mate .

thor

Completions for thor

tmux

Maintainer: jmatth

Adds several options for effecting the startup behavior of tmux. Each of the options are set by changing the environment variables below:

  1. ZSH_TMUX_AUTOSTART: Automatically start a tmux session upon logging in. Set to false by default.

  2. ZSH_TMUX_AUTOSTART_ONCE: Only attempt to autostart tmux once. If this is disabled when the previous option is enabled, then tmux will be autostarted every time you source your zsh config files. Set to true by default.

  3. ZSH_TMUX_AUTOCONNECT: When running tmux automatically connect to the currently running tmux session if it exits, otherwise start a new session. Set to true by default.

  4. ZSH_TMUX_AUTOQUIT: Close the terminal session when tmux exits. Set to the value of ZSH_TMUX_AUTOSTART by default.

  5. ZSH_TMUX_FIXTERM: When running tmux, the variable $TERM is supposed to be set to screen or one of its derivatives. This option will set the default-terminal option of tmux to screen-256color if 256 color terminal support is detected, and screen otherwise. The term values it uses can be overridden by changing the ZSH_TMUX_FIXTERM_WITH_256COLOR and ZSH_TMUX_FIXTERM_WITHOUT_256COLOR variables respectively. Set to true by default.

If the user specifies any arguments for tmux then the command is just executed as it was typed it without any modification.

tmuxinator

Completions for tmuxinator. To enable completions for mux, a shortcut for tmuxinator, add following alias in your zshrc to overwrite the executable:

alias mux=tmuxinator

urltools

Adds command line utilities for URL manipulation.

  • urlencode encodes a string so it compiles with the URL character rules laid out in RFC 1738

  • urldecode decode a string encoded according to the URL character rules in RFC 1738

vagrant

Maintainer: robbyrussell

  • vagrant - autocompletion for Vagrant commands, task names, box names and built-in handy documentation. All in one place.

vi-mode

Maintainer: robbyrussell

  • vi-mode

virtualenvwrapper

Maintainer: mispy

  • virtualenvwrapper - Loads Python's virtualenvwrapper shell tools, and automatically activates virtualenv on cd into git repository with matching name.

web-search

Maintainer: xuhdev

Adds several commands to do web search. Available commands are:

  • bing
  • google
  • yahoo

Examples:

  • Search for oh-my-zsh on Google: google oh-my-zsh
  • Search for "What is GitHub" on Bing: bing what is github

yum

Maintainer: robbyrussell

Enables aliases for Yum, the popular front-end to the RPM Package Manager.

Search package

ys - "yum search"

Show package info

yp - "yum info"

List packages

yl - "yum list"

List package groups

ygl - "yum grouplist"

Print all installed packages

yli - "yum list installed"

Rebuilds the yum package list

ymc - "yum makecache"

Upgrade packages

yu - "sudo yum update"

Install package

yi - "sudo yum install"

Install package group

ygi - "sudo yum groupinstall"

Remove package

yr - "sudo yum remove"

Remove pagage group

ygr - "sudo yum groupremove"

Remove package and leaves

yrl - "sudo yum remove --remove-leaves"

Clean cache

yc - "sudo yum clean all"

zeus

Homepage: Zeus project

Aliases

Maintainer: Bamboo

  • zi aliases zeus init

  • zinit aliases zeus init

  • zs aliases zeus start

  • ztart aliases zeus start

  • zc aliases zeus console

  • zonsole aliases zeus console

  • zsr aliases zeus server

  • zerver aliases zeus server

  • zr aliases zeus rake

  • zake aliases zeus rake

  • zg aliases zeus generate

  • zenerate aliases zeus generate

  • zrn aliases zeus runner

  • zunner aliases zeus runner

  • zcu aliases zeus cucumber

  • zucumber aliases zeus cucumber

  • zt aliases zeus test

  • zest aliases zeus test

  • zu aliases zeus test test/unit/*

  • zunits aliases zeus test test/unit/*

  • zf aliases zeus test test/functional/*

  • zunctional aliases zeus test test/functional/*

  • za aliases zeus test test/unit/*; zeus test test/functional/; zeus cucumber

  • zall aliases zeus test test/unit/*; zeus test test/functional/; zeus cucumber

  • zsw aliases rm .zeus.sock

  • zweep aliases rm .zeus.sock

Completion

Maintainer: johnjohndoe

Completion plugin for zeus. The describing texts are inspired by the texts given in the documenation of Rails command line tools.

Pass

Maintainer: sanbor

Completion plugin for pass. Source

wd

Maintainer: mfaerevaag

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

Usage

  • Add warp point to current working directory:

     wd add test
    

    If a warp point with the same name exists, use add! to overwrite it.

  • From an other directory, warp to test with:

     wd test
    
  • You can warp back to previous directory, and so on, with the puncticulation syntax:

     wd ..
     wd ...
    

    This is a wrapper for the zsh dirs function.

  • Remove warp point test point:

     wd rm test
    
  • List warp points to current directory (stored in ~/.warprc):

     wd show
    
  • List all warp points (stored in ~/.warprc):

     wd ls
    
  • Print usage with no opts or the help argument.