#!/bin/bash

#TEMPLATE FILE FOR BASH COMPLETION#

_balena_complete()
{
  local cur prev

  # Valid top-level completions
  $main_commands$
  # Sub-completions
$sub_cmds$


  COMPREPLY=()
  cur=${COMP_WORDS[COMP_CWORD]}
  prev=${COMP_WORDS[COMP_CWORD-1]}

  if [ $COMP_CWORD -eq 1 ]
  then
    COMPREPLY=( $(compgen -W "${main_commands}" -- $cur) )
  elif [ $COMP_CWORD -eq 2 ]
  then
    case "$prev" in
$sub_cmds_prev$
      "*")
        ;;
    esac
  fi

}
complete -F _balena_complete balena
