<commit_before>function __git_checkout -a var
    # is numeric
    if [ "$var" -eq "$var" ] 2>/dev/null
        # number
        set myarg $arr[$var]
        git checkout $myarg
    else
        # not a number
        git checkout $var
    end
end

function __gco
    # number
    set res (string split "-" -- (string trim $argv))
    set first $res[1]
    set length (count $res)
    set last ""

    # >
    if [ $length -gt 1 ]
        set last $res[2]
    else
        # just one
        #set myarg $arr[$res]
        #git checkout $myarg
        __git_checkout $res
        return
    end

    # last exists
    if [ $last != '' ]
        # first < last
        if [ $first -lt $last ]
          for i in (seq $first 1 $last)
              __git_checkout $i
          end
        else
          echo 'argument is not valid.'
        end
    else
        __git_checkout $first
    end
end

function gco
    # TODO: space like, `gco 1 2 3`<commit_msg>fix size<commit_after>function __git_checkout -a var
    # is numeric
    if [ "$var" -eq "$var" ] 2>/dev/null
        # number
        #set myarg $arr[$var]
        set length (count $arr)
        if [ $var -gt $length ]
            echo 'Number is large.'
            return
        end
        git checkout $myarg
    else
        # not a number
        git checkout $var
    end
end

function __gco
    # number
    set res (string split "-" -- (string trim $argv))
    set first $res[1]
    set length (count $res)
    set last ""

    # >
    if [ $length -gt 1 ]
        set last $res[2]
    else
        # just one
        #set myarg $arr[$res]
        #git checkout $myarg
        __git_checkout $res
        return
    end

    # last exists
    if [ $last != '' ]
        # first < last
        if [ $first -lt $last ]
          for i in (seq $first 1 $last)
              __git_checkout $i
          end
        else
          echo 'Argument is not valid.'
        end
    else
        __git_checkout $first
    end
end

function gco
    # TODO: space like, `gco 1 2 3`
{'fraction_non_alphanumeric': 0.09533169533169533, 'fraction_numerical': 0.007862407862407862, 'mean_word_length': 1.4123222748815165, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3903414', 'n_tokens_mistral': 667, 'n_tokens_neox': 642, 'n_words': 228}