Ignore:
Timestamp:
01/08/22 09:16:57 (2 years ago)
Author:
nanardon
Message:

add --insert to la-cli/create command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Utils.pm

    r2390 r2504  
    171171 
    172172sub dump_read_temp_file { 
    173     my ($writecb, $readcb) = @_; 
     173    my ($writecb, $readcb, %options) = @_; 
    174174 
    175175    my ($fh, $filename) = tempfile(CLEANUP => 0); 
     
    180180    my @stat = stat($filename); 
    181181    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"; 
    183185        warn "Running $cmd\n"; 
    184186        if (system($cmd) == -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.