Skip to content

Instantly share code, notes, and snippets.

@sigma
Created March 19, 2010 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sigma/338230 to your computer and use it in GitHub Desktop.
Save sigma/338230 to your computer and use it in GitHub Desktop.
workon completion
#compdef workon
_workon_envs () {
local expl devs
envs=( $(workon) )
_wanted envs expl 'available envs' \
compadd "$@" - "${(@)envs%%:*}"
}
_arguments \
':environment:_workon_envs'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment