<commit_before>#
#  Completion for yii2 console commands
#
#  To use these routines:
#
#    1) Copy this file to somewhere (e.g. ~/yii2-completion.bash).
#    2) Add the following line to your .bashrc:
#        source ~/yii2-completion.bash
#
#    or you can put this file in /etc/bash_completion.d/
#
#    or simply type `. yii2-completion.bash` for one time using
#
_yii2_completion()
{
    local cur prev opts curpath commands list options params last c=0 command="someRandomString"
    COMPREPLY=()
    curpath=$(pwd)
    commands=$( ./yii help/index | egrep "^    " | awk '{ print $1 }' )
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    list=($commands)

    while [ $c -lt $COMP_CWORD ]; do
        if [[ ${list[*]} =~ ${COMP_WORDS[$c]} ]]; then
            command=${COMP_WORDS[$c]}
            break
        fi
        ((c++))
    done

    if [[ ${list[*]} =~ "$command" ]]; then
        # params was sorted in alphabet order and do not understand what have to be the next
        #params=$( ./yii help/index $prev | egrep "^- " | awk '{print $2}' | awk -F ":" '{print $1}' )
        options=$( ./yii help/index $command | egrep "^--" | awk -F ":" '{print $1}' | awk '{print $1"="}' )
        COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
        return 0
    fi

    if [[ $prev == "./yii" ]]; then
        compopt +o nospace
        COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
        return 0
    fi

    return 0
}
<commit_msg>show options only when -- typed<commit_after>#
#  Completion for yii2 console commands
#
#  To use these routines:
#
#    1) Copy this file to somewhere (e.g. ~/yii2-completion.bash).
#    2) Add the following line to your .bashrc:
#        source ~/yii2-completion.bash
#
#    or you can put this file in /etc/bash_completion.d/
#
#    or simply type `. yii2-completion.bash` for one time using
#
_yii2_completion()
{
    local cur prev opts curpath commands list options params last c=0 command="someRandomString"
    COMPREPLY=()
    curpath=$(pwd)
    commands=$( ./yii help/index | egrep "^    " | awk '{ print $1 }' )
    cur="${COMP_WORDS[COMP_CWORD]}"
    prev="${COMP_WORDS[COMP_CWORD-1]}"
    list=($commands)

    while [ $c -lt $COMP_CWORD ]; do
        if [[ ${list[*]} =~ ${COMP_WORDS[$c]} ]]; then
            command=${COMP_WORDS[$c]}
            break
        fi
        ((c++))
    done

    if [[ ${list[*]} =~ "$command" ]]; then
        if [[ ${cur} == -* ]]; then
            options=$( ./yii help/index $command | egrep "^--" | awk -F ":" '{print $1}' | awk '{print $1"="}' )
            COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
        fi
        # params was sorted in alphabet order and do not understand what have to be the next
        #params=$( ./yii help/index $prev | egrep "^- " | awk '{print $2}' | awk -F ":" '{print $1}' )
        return 0
    fi

    if [[ $prev == "./yii" ]]; then
        compopt +o nospace
        COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
        return 0
    fi

    return 0
}

{'fraction_non_alphanumeric': 0.17625780993094378, 'fraction_numerical': 0.011180532719500164, 'mean_word_length': 2.3029315960912053, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, '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': '3584889', 'n_tokens_mistral': 1060, 'n_tokens_neox': 1015, 'n_words': 312}