"history.tcl, 306 invoked "return" outside of a proc." (again)

This commit is contained in:
James Cherry 2020-03-09 14:20:51 -07:00
parent 6f088660ba
commit 056c802650
1 changed files with 9 additions and 1 deletions

View File

@ -433,7 +433,15 @@ proc sta_unknown { args } {
"ambiguous command name \"$name\": [lsort $cmds]"
}
} else {
return [uplevel 1 [concat builtin_unknown $args]]
# I cannot figure out why the first call to ::history add
# that presumably loads history.tcl causes the following error:
# Error: history.tcl, 306 invoked "return" outside of a proc.
# But this squashes the error.
if { [lindex $args 0] == "::history" } {
return ""
} else {
return [uplevel 1 builtin_unknown $args]
}
}
}
}