<commit_before>jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv")

FOUND_JENV=0
for jenvdir in $jenvdirs; do
    if [[ -d "${jenvdir}/bin" ]]; then
        FOUND_JENV=1
        break
    fi
done

if [[ $FOUND_JENV -eq 0 ]]; then
    if (( $+commands[brew] )) && jenvdir="$(brew --prefix jenv)"; then
        FOUND_JENV=1
    fi
fi

if [[ $FOUND_JENV -eq 1 ]]; then
    export PATH="${jenvdir}/bin:$PATH"
    eval "$(jenv init - zsh)"

    function jenv_prompt_info() { jenv version-name 2>/dev/null }

    if [[ -d "${jenvdir}/versions" ]]; then
        export JENV_ROOT=$jenvdir
    fi
else
    function jenv_prompt_info() { echo "system: $(java -version 2>&1 | cut -f 2 -d ' ')" }<commit_msg>jenv: fix brew directory search<commit_after>jenvdirs=("$HOME/.jenv" "/usr/local/jenv" "/opt/jenv")

FOUND_JENV=0
for jenvdir in $jenvdirs; do
    if [[ -d "${jenvdir}/bin" ]]; then
        FOUND_JENV=1
        break
    fi
done

if [[ $FOUND_JENV -eq 0 ]]; then
    if (( $+commands[brew] )) && jenvdir="$(brew --prefix jenv)"; then
        [[ -d "${jenvdir}/bin" ]] && FOUND_JENV=1
    fi
fi

if [[ $FOUND_JENV -eq 1 ]]; then
    export PATH="${jenvdir}/bin:$PATH"
    eval "$(jenv init - zsh)"

    function jenv_prompt_info() { jenv version-name 2>/dev/null }

    if [[ -d "${jenvdir}/versions" ]]; then
        export JENV_ROOT=$jenvdir
    fi
else
    function jenv_prompt_info() { echo "system: $(java -version 2>&1 | cut -f 2 -d ' ')" }
{'fraction_non_alphanumeric': 0.18295218295218296, 'fraction_numerical': 0.012474012474012475, 'mean_word_length': 2.8, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3369128', 'n_tokens_mistral': 586, 'n_tokens_neox': 557, 'n_words': 138}