{"record":{"id":"3b4dad3e8cd32137","repo":"go-delve/delve","slug":"wrong-number-of-arguments-source-filename","errorCode":null,"errorMessage":"wrong number of arguments: source <filename>","messagePattern":"wrong number of arguments: source <filename>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/terminal/command.go","lineNumber":2592,"sourceCode":"\t\tloc := locs[0]\n\t\tif showContext {\n\t\t\tfmt.Fprintf(t.stdout, \"Showing %s:%d (PC: %#x)\\n\", loc.File, loc.Line, loc.PC)\n\t\t}\n\t\treturn loc.File, loc.Line, false, nil\n\t}\n}\n\nfunc listCommand(t *Term, ctx callContext, args string) error {\n\tfile, lineno, showarrow, err := getLocation(t, ctx, args, true)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn printfile(t, file, lineno, showarrow)\n}\n\nfunc (c *Commands) sourceCommand(t *Term, ctx callContext, args string) error {\n\tif len(args) == 0 {\n\t\treturn errors.New(\"wrong number of arguments: source <filename>\")\n\t}\n\n\tif args == \"-\" {\n\t\treturn t.starlarkEnv.REPL()\n\t}\n\n\tif runtime.GOOS != \"windows\" && strings.HasPrefix(args, \"~\") {\n\t\thome, err := os.UserHomeDir()\n\t\tif err == nil {\n\t\t\tif args == \"~\" {\n\t\t\t\targs = home\n\t\t\t} else if strings.HasPrefix(args, \"~/\") {\n\t\t\t\targs = filepath.Join(home, args[2:])\n\t\t\t}\n\t\t}\n\t}\n\n\tif filepath.Ext(args) == \".star\" {","sourceCodeStart":2574,"sourceCodeEnd":2610,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/terminal/command.go#L2574-L2610","documentation":"Error \"wrong number of arguments: source <filename>\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/terminal/command.go:2592 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}