#!/usr/bin/bash

PY_FILE=/usr/share/raysession/src/completion

ray_complete() {
    IFS=$'\n'
    COMPREPLY=($(compgen -W "$(python3 "$PY_FILE" "${COMP_WORDS[@]}")" -- "${COMP_WORDS[COMP_CWORD]}"))
    unset IFS
}

complete -F ray_complete ray_control
