<commit_before>package core

import (
    "strings"
    "os"
    "fmt"
)

type CmdError struct{
    ErrorMessage string
}

func (e *CmdError) Error() string {
    return e.ErrorMessage
}

var LastRet int

func RunInternalCommand(cmdline string) error{
    cmdline = cmdline[6:]
    cmd := strings.SplitN(cmdline," ",2)

    cmd[0] = strings.ToLower(strings.Trim(cmd[0],"\" "))
    if len(cmd) > 1 {
        cmd[1] = strings.Trim(cmd[1],"\" ")
        switch cmd[0]{
            case "cd" :
                fmt.Printf("Chdir( %s )\n",cmd[1])
                return os.Chdir(cmd[1])
            default :
                return &CmdError{"No command."} 
        }
    }else{
        switch cmd[0]{
            case "ret" :
                fmt.Printf("%d\n",LastRet)
            case "end" :
                return &CmdError{"command:end"}
            default :
                return &CmdError{"No command."} 
        }
    }

    return nil
}<commit_msg>fix internal command bug<commit_after>package core

import (
    "strings"
    "os"
    "fmt"
)

type CmdError struct{
    ErrorMessage string
}

func (e *CmdError) Error() string {
    return e.ErrorMessage
}

var LastRet int

func RunInternalCommand(cmdline string) error{
    cmdline = cmdline[5:]
    cmd := strings.SplitN(cmdline," ",2)

    cmd[0] = strings.ToLower(strings.Trim(cmd[0],"\" "))
    if len(cmd) > 1 {
        cmd[1] = strings.Trim(cmd[1],"\" ")
        switch cmd[0]{
            case "cd" :
                fmt.Printf("Chdir( %s )\n",cmd[1])
                return os.Chdir(cmd[1])
            default :
                return &CmdError{"No command."} 
        }
    }else{
        switch cmd[0]{
            case "ret" :
                fmt.Printf("%d\n",LastRet)
            case "end" :
                return &CmdError{"command:end"}
            default :
                return &CmdError{"No command."} 
        }
    }

    return nil
}
{'fraction_non_alphanumeric': 0.14188836724047993, 'fraction_numerical': 0.011476264997391758, 'mean_word_length': 1.6938202247191012, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2296734', 'n_tokens_mistral': 640, 'n_tokens_neox': 612, 'n_words': 135}