[rt-users] $EDITOR and cli reply

Adam Hirsch adam at baz.org
Tue Feb 24 17:56:06 EST 2004


Fixed my own problem by having the rt cli tool accept a message on STDIN, with
a "-m -" flag.  Dunno if this'll be useful to anyone else, but hey, it made
doing my updates much, much easier, and doesn't seem to negatively impact any
of the rest of the cli functionality... 

Jesse, et al -- lemme know if you folks are going to roll this into the
release tree, so I won't have to keep maintaining the diffs as I upgrade.

*** rt.orig     Tue Feb 24 17:43:03 2004
--- rt  Tue Feb 24 17:51:39 2004
***************
*** 514,520 ****
                  my $a = $_ eq "-b" ? \@bcc : \@cc;
                  @$a = split /\s*,\s*/, shift @ARGV;
              }
!             elsif (/-m/) { $msg = shift @ARGV }
              elsif (/-w/) { $wtime = shift @ARGV }
          }
          elsif (!$id && m|^(?:ticket/)?($idlist)$|) {
--- 514,526 ----
                  my $a = $_ eq "-b" ? \@bcc : \@cc;
                  @$a = split /\s*,\s*/, shift @ARGV;
              }
!             elsif (/-m/) { 
!               $msg = shift @ARGV;
!               if ($msg =~ /^-$/) {
!                       undef $msg;
!                       while (<STDIN>) { $msg .= $_ }
!                 }
!               }
              elsif (/-w/) { $wtime = shift @ARGV }
          }
          elsif (!$id && m|^(?:ticket/)?($idlist)$|) {

Adam

-- 
 <adam at baz.org>                                 What I am I am, and say not.
  adam hirsch                                   Being is the great explainer.
 <http://web.baz.org/>                                       - Henry Thoreau



More information about the rt-users mailing list