Merge branch 'master' of git+ssh://github.com/adefaria/clearscm
[clearscm.git] / bin / rexec.pl
index b76d4b1..4cc0eff 100755 (executable)
@@ -36,7 +36,7 @@ $Date: 2008/02/29 15:09:15 $
                  [-use|rname <username>] [-p|assword <password>]
                  [-log]
                  -m|achines <host1>,<host2>,...
-                 
+
               <command>
 
  Where:
@@ -74,6 +74,7 @@ use POSIX ":sys_wait_h";
 
 use lib "$FindBin::Bin/../lib", "$FindBin::Bin/../clearadm/lib";
 
+use CmdLine;
 use Display;
 use Logger;
 use Rexec;
@@ -228,10 +229,13 @@ for my $machine (@{$opts{machines}}) {
     connectHost $machine;
 
     if ($currentHost) {
-      while () {
-        display_nolf BOLD . YELLOW . "$machine:" . RESET . WHITE;
+      my $cmdline = CmdLine->new ();
 
-        $cmd = <STDIN>; 
+      $cmdline->set_prompt (BOLD . YELLOW . "$machine:" . RESET . WHITE);
+
+      while () {
+        #$cmd = <STDIN>;
+        $cmd = $cmdline->get(); 
 
         unless ($cmd) {
           display '';
@@ -251,4 +255,4 @@ for my $machine (@{$opts{machines}}) {
       } # while
     } # if
   } # if
-} # for
\ No newline at end of file
+} # for