nsshell::CurrentThreadHandler method _eval (public)

 <instance of nsshell::CurrentThreadHandler[i]> _eval arg kernel \
    channel

Defined in /usr/local/ns/tcl/nsshell/shell.tcl

Light weight "eval" method for querying the current content of the workspace/snapshot. This method does NOT update the snapshot, but is intended for e.g. autocompletion and the like.

Parameters:
arg
kernel
channel

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
:context require $kernel $channel
#
# Qualify cmd and reject certain commands (should be
# configurable).
#
set cmd ""
regexp {^\s*(\S+)\s?} $arg - cmd
set cmd [namespace which $cmd]

if {$cmd in {::return ::exit}} {
    set status error
    set result "command rejected: '$arg'"
} else {
    try {
        #
        # Execute command in temporary unique namespace
        # based on kernelId (nsshell::kernelId)
        #
        namespace eval $kernel $arg
    } on ok {result} {
        set status ok
    } on error {result} {
        set status error
    }
}
return [list status $status result $result]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: