<commit_before>if [[ -n ${ZSH_VERSION-} ]]; then
    autoload -U +X bashcompinit && bashcompinit
fi

_complete_sf2_app_console() {
    local cur

    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"

    # Assume first word is the actual app/console command
    generator="${COMP_WORDS[0]}"

    if [[ ${COMP_CWORD} == 1 ]] ; then
        # No command found, return the list of available commands
        cmds=` ${generator}  --no-ansi | sed -n -e '/^Available commands/,//p' | grep -n '^ ' | sed -e 's/^ \+//' | awk '{ print $2 }'`
    else
        # Commands found, parse options
        cmds=` ${generator} ${COMP_WORDS[1]} --no-ansi --help | sed -n -e '/^Options/,/^$/p' | grep -n '^ ' | sed -e 's/^ \+//' | awk '{ print $2 }'`
    fi

    COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
    return 0
}

export COMP_WORDBREAKS="\ \"\\'><=;|&("
complete -F _complete_sf2_app_console generator<commit_msg>small fixes<commit_after>if [[ -n ${ZSH_VERSION-} ]]; then
    autoload -U +X bashcompinit && bashcompinit
fi

_complete_sf2_app_console() {
    local cur

    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"

    # Assume first word is the actual app/console command
    generator="${COMP_WORDS[0]}"

    if [[ ${COMP_CWORD} == 1 ]] ; then
        # No command found, return the list of available commands
        cmds=` ${generator}  --no-ansi | sed -n -e '/^Available commands/,//p' | grep -n '^ ' | sed -e 's/^ \+//' | awk '{ print $2 }'`
    else
        # Commands found, parse options
        cmds=` ${generator} ${COMP_WORDS[1]} --no-ansi --help | sed -n -e '/^Options/,/^$/p' | grep -n '^ ' | sed -e 's/^ \+//' | awk '{ print $2 }'`
    fi

    COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
    return 0
}

export COMP_WORDBREAKS="\ \"\\'><=;|&("
complete -F _complete_sf2_app_console module-generator
{'fraction_non_alphanumeric': 0.19956019791094007, 'fraction_numerical': 0.008796041781198461, 'mean_word_length': 2.647294589178357, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2602662', 'n_tokens_mistral': 695, 'n_tokens_neox': 659, 'n_words': 178}