Changeset 2443


Ignore:
Timestamp:
10/01/20 13:53:40 (4 years ago)
Author:
nanardon
Message:

Add who commande

File:
1 edited

Legend:

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

    r2442 r2443  
    299299        } 
    300300    ); 
     301 
     302=head3 who 
     303 
     304    Give the login of connected user if any 
     305 
     306=cut 
     307 
     308    $self->add_func( 'who', 
     309        { 
     310            code => sub { 
     311                my ( $self, $setting, $value ) = @_; 
     312                $self->printf("%s\n",  $self->base->user || 'No connected user'); 
     313            }, 
     314            completion => sub { 
     315            }, 
     316        } 
     317    ); 
     318    $self->add_func('id',  { alias => [ qw'who' ] }); 
    301319 
    302320=head3 collection 
Note: See TracChangeset for help on using the changeset viewer.