Skip to content

Commit

Permalink
bash completion script for bee added
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Ruester committed Jan 26, 2012
1 parent 2cbdbb5 commit 78e77b7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions contrib/bee-completion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

_bee_completion()
{
COMPREPLY=()

cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"

options="init install remove check query list"
ls=$(ls $pwd)

if [ "${prev}" = "bee" ]; then
COMPREPLY=($(compgen -W "${options} ${ls}" -- ${cur}) )
return 0
fi

packages=$(bee list -a)
COMPREPLY=($(compgen -W "${packages} ${ls}" -- ${cur}) )

return 0
}

complete -F _bee_completion bee

0 comments on commit 78e77b7

Please sign in to comment.