# hostsctl.sh: bash completions
# (https://github.com/pigmonkey/hostsctl)

__hostsctl() {
  local cur prev opts
  _init_completion || return

  case $prev in
    enable|disable)
      _known_hosts_real "$cur"
      return
      ;;
  esac

  if [[ ${cur} == * ]] ; then
    COMPREPLY=( $(compgen -W "fetch-updates enable disable export list-enabled list-disabled merge --help" -- ${cur}) )
    return 0;
  fi

} &&
complete -F __hostsctl hostsctl
