---
source: lib/src/complete/bash.rs
expression: "complete_bash(&CompleteOptions\n{\n    usage_bin: \"usage\".to_string(), shell: \"bash\".to_string(), bin:\n    \"mycli\".to_string(), cache_key: Some(\"1.2.3\".to_string()), spec: None,\n    usage_cmd: Some(\"mycli complete --usage\".to_string()),\n    include_bash_completion_lib: false, source_file: None,\n})"
---
# @generated by usage-cli from usage spec
_mycli() {
    if ! type -p usage &> /dev/null; then
        echo >&2
        echo "Error: usage CLI not found. This is required for completions to work in mycli." >&2
        echo "See https://usage.jdx.dev for more information." >&2
        return 1
    fi

	local cur prev words cword was_split comp_args
    _comp_initialize -n : -- "$@" || return
    local spec_file="${TMPDIR:-/tmp}/usage__usage_spec_mycli_1_2_3.spec"
    if [[ ! -f "$spec_file" ]]; then
        mycli complete --usage >| "$spec_file"
    fi
    # shellcheck disable=SC2207
	_comp_compgen -- -W "$(command usage complete-word --shell bash -f "$spec_file" --cword="$cword" -- "${words[@]}")"
	_comp_ltrim_colon_completions "$cur"
    # shellcheck disable=SC2181
    if [[ $? -ne 0 ]]; then
        unset COMPREPLY
    fi
    return 0
}

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
    shopt -u hostcomplete && complete -o nospace -o bashdefault -o nosort -F _mycli mycli
else
    shopt -u hostcomplete && complete -o nospace -o bashdefault -F _mycli mycli
fi
# vim: noet ci pi sts=0 sw=4 ts=4 ft=sh
