#!/bin/bash
#
# copy this file or merge it into $HOME/.bash_comp.
# In your profile or bash_profile run:
# [ -f $HOME/.bash_comp ] && . $HOME/.bash_comp
#

shopt -s progcomp

_wiki() {
  local word=${COMP_WORDS[COMP_CWORD]}
  COMPREPLY=($(compgen -W "$(wiki -l)" -- "$word"))
  return
}
complete -F _wiki -o default wiki
