Changeset 2504
- Timestamp:
- 01/08/22 09:16:57 (2 years ago)
- Location:
- trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Cli.pm
r2473 r2504 290 290 open an epty file instead instead attribute list 291 291 292 =item --insert 293 294 open vi in insert mode 295 292 296 =item --ro 293 297 … … 303 307 my ($otype, $objname) = $self->getoption( 304 308 { 305 'i' => \my $interactive, 306 'f=s' => \my $inputfile, 307 'ro' => \my $with_ro, 308 'e' => \my $empty_file, 309 'i' => \my $interactive, 310 'f=s' => \my $inputfile, 311 'ro' => \my $with_ro, 312 'e' => \my $empty_file, 313 'insert' => \my $insert, 309 314 }, @_ 310 315 ); … … 378 383 return; 379 384 } 380 } 385 }, 386 insert => $insert, 381 387 ); 382 388 } -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Utils.pm
r2390 r2504 171 171 172 172 sub dump_read_temp_file { 173 my ($writecb, $readcb ) = @_;173 my ($writecb, $readcb, %options) = @_; 174 174 175 175 my ($fh, $filename) = tempfile(CLEANUP => 0); … … 180 180 my @stat = stat($filename); 181 181 while (1) { 182 my $cmd = ($ENV{EDITOR} || 'vi') . " $filename"; 182 my $cmd = ($ENV{EDITOR} || 'vi'); 183 $cmd .= " -c startinsert " if( $options{insert} ); 184 $cmd .= " $filename"; 183 185 warn "Running $cmd\n"; 184 186 if (system($cmd) == -1 ) {
Note: See TracChangeset
for help on using the changeset viewer.