Skip to content

Instantly share code, notes, and snippets.

@saksmt
Created September 1, 2014 07:57
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 saksmt/6e8225a1a4e2f8bb42f9 to your computer and use it in GitHub Desktop.
Save saksmt/6e8225a1a4e2f8bb42f9 to your computer and use it in GitHub Desktop.
Bash completion for composer
#!/bin/bash
_composer()
{
local curr=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$(composer list --raw | sed -r 's/\s+.*$//' | xargs)" -- "$curr") )
}
complete -F _composer composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment