X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bin%2Fdx-shell;fp=bin%2Fdx-shell;h=2df61b5161520dd074558ef30e540032b457acac;hb=cc2be68b2ee6e1ad4274bd7094f8e9d4a1c487e9;hp=b5404532301a2669ae79b6f72ade928fbd8a778f;hpb=8773d7de52b850d2d59f9cf3225361e850410c2a;p=scpubgit%2FDKit.git diff --git a/bin/dx-shell b/bin/dx-shell index b540453..2df61b5 100644 --- a/bin/dx-shell +++ b/bin/dx-shell @@ -59,9 +59,10 @@ sub expand_def { } sub expand_body { - my (@body) = @_; + my ($body) = @_; + die "No body!" unless $body; local our @Body_Parts; - $tcl->Eval(@body); + $tcl->Eval($body); return @Body_Parts; } @@ -133,6 +134,12 @@ $tcl->CreateCommand(findall => sub { return; }); +$tcl->CreateCommand(not => sub { + my (undef, undef, undef, $body) = @_; + push our @Body_Parts, [ not => expand_body($body) ]; + return; +}); + $tcl->CreateCommand(n => \&show); #$tcl->Eval(q{query D {directory_at D 't'; mode D '0755'; }});