Rarg_Run › Ok › AutoCompleteScript - bash
Ok
AutoCompleteScript
<cyan>To append to your shell config run:</cyan>
<white>fruits --rarg-suggestions-script >> ~/.bash_profile</white>
<cyan>Afterwards restart your terminal</cyan>
###-begin-fruits-completions-###
# Autogenerated, do not edit manually
########################################
_rarg_fruits_completions()
{
    local cur_word args type_list

    cur_word=\"${COMP_WORDS[COMP_CWORD]}\"
    args=(\"${COMP_WORDS[@]}\")

    # ask rarg to generate completions.
    type_list=$(fruits \"${args[@]:1}\" --rarg-suggestions-request bash)

    COMPREPLY=( $(compgen -W \"${type_list}\" -- ${cur_word}) )

    # if no match was found, fall back to filename completion
    if [ ${#COMPREPLY[@]} -eq 0 ]; then
      COMPREPLY=()
    fi

    return 0
}
complete -o default -F _rarg_fruits_completions fruits
###-end-fruits-completions-###
