Changeset 2400


Ignore:
Timestamp:
06/15/20 19:10:36 (4 years ago)
Author:
nanardon
Message:

Few fixes in la-cli

Location:
trunk/LATMOS-Accounts/lib/LATMOS/Accounts
Files:
2 edited

Legend:

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

    r2397 r2400  
    7171    } 
    7272} 
     73 
     74=head1 CLI FUNCTIONS 
     75 
     76=head2 GLOBAL FUNCTIONS 
     77 
     78=cut 
    7379 
    7480sub BUILD { 
     
    206212            }, 
    207213        }); 
     214 
     215=head3 create 
     216 
     217Create object 
     218 
     219=over 4 
     220 
     221=item -i 
     222 
     223    interactive: will prompt for attribute 
     224 
     225=item -f FILE 
     226 
     227    Read file for attribute value 
     228 
     229=item -e 
     230 
     231    open an epty file instead instead attribute list 
     232 
     233=item --ro 
     234 
     235    Open an empty with attribute even read-only one 
     236 
     237=back 
     238=cut 
     239 
    208240    $self->add_func('create', { 
    209241            code => sub { 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Cli/Base.pm

    r2399 r2400  
    9494                    foreach(sort $labase->list_canonical_fields($args[0], 'a')) { 
    9595                        my $attr = $labase->attribute($args[0], $_); 
    96                         $self->printf("%s   %s\n", ($attr ? ($attr->ro ? 'r ' : 'rw') : '  '), $_); 
     96                        $self->printf( 
     97                            "%s   %s%s\n", 
     98                            ($attr ? ($attr->ro ? 'r ' : 'rw') : '  '), 
     99                            $_, 
     100                            $attr->reference ? ' (=> ' . $attr->reference . ')' : '', 
     101                        ); 
    97102                    } 
    98103                } else { 
     
    500505    my ($op, $shellLine, $internalLine); 
    501506 
    502     if ($cmdLine =~ /^(.*?)(?<![\\|])([\|\>])\s*([^\|].*)?$/) { 
     507    if ($cmdLine =~ /^(.*?)(?<![\S\\|])([\|\>])\s*([^\|].*)?$/) { 
    503508        $internalLine = $1; 
    504509        $op = $2; 
Note: See TracChangeset for help on using the changeset viewer.