+{
+ my $self = shift;
+ my $cmdline = shift;
+
+ my @ans = run_cmd($self, $cmdline);
+ $self->send(@ans) if @ans > 0;
+
+ # send a prompt only if we are in a prompt state
+ $self->prompt() if $self->{state} =~ /^prompt/o;
+}
+
+#
+# this is the thing that runs the command, it is done like this for the
+# benefit of remote command execution
+#
+
+sub run_cmd