_arch-hs-sync()
{
    local CMDLINE
    local IFS=$'\n'
    CMDLINE=(--bash-completion-index $COMP_CWORD)

    for arg in ${COMP_WORDS[@]}; do
        CMDLINE=(${CMDLINE[@]} --bash-completion-word $arg)
    done

    COMPREPLY=( $(/usr/bin/arch-hs-sync "${CMDLINE[@]}") )
}

complete -o filenames -F _arch-hs-sync arch-hs-sync
