Remote tcl scripting over ssh
Tcl
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
action
.cvsignore
.gitignore
README.md
git-ssh-proxy.tcl
hostsetup.tcl
pkgIndex.tcl
sshcomm.tcl
sshcomm.test
utils.tcl

README.md

sshcomm -- comm via ssh

This tcl package allows you to do comm based remote scripting via secure shell connection.

Basic usage is like:

package require sshcomm
set cid [sshcomm::comm $host]
comm::comm send $cid {script...}

# or simply. (But note, in this form, arguments are evaluated **locally**!)
$cid command args...

Or more configurable, multi-comm style:

set ssh [sshcomm::ssh $host]
# or set ssh [sshcomm::connection %AUTO% -host $host]
set c1 [$ssh comm new]
set c2 [$ssh comm new]
comm::comm send -async $c1 {script...}
comm::comm send -async $c2 {script...}

To send namespace/snit::type

namespace eval foo {proc x {} {list X}}
snit::type Dog {
  option -name "no name";
  method bark {} {return "$options(-name) barks."}
}

comm::comm send $cid [sshcomm::definition ::foo ::Dog]

# Then

$cid foo::x
# => X
$cid Dog d -name Hachi
# ::d
$cid d bark
# => Hachi barks.