| 1 | package Perinci::Sub::XCompletion::unix_user_or_uid; | ||
| 2 | |||
| 3 | 1 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | ||
| 8 | our $DATE = '2024-11-15'; # DATE | ||
| 9 | our $DIST = 'Sah-SchemaBundle-Unix'; # DIST | ||
| 10 | our $VERSION = '0.022'; # VERSION | ||
| 11 | |||
| 12 | 0 | ▶ | use Complete::Unix qw(complete_user complete_uid); |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 13 | use Complete::Util qw(combine_answers); | ||
| 14 | |||
| 15 | our %SPEC; | ||
| 16 | |||
| 17 | $SPEC{gen_completion} = { | ||
| 18 | v => 1.1, | ||
| 19 | }; | ||
| 20 | sub gen_completion { | ||
| 21 | my %fargs = @_; | ||
| 22 | sub { | ||
| 23 | my %cargs = @_; | ||
| 24 | combine_answers( | ||
| 25 | complete_user(%cargs, %fargs), | ||
| 26 | complete_uid (%cargs, %fargs), | ||
| 27 | ); | ||
| 28 | }; | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; | ||
| 32 | # ABSTRACT: Generate completion for Unix user/UID | ||
| 33 | |||
| 34 | __END__ | ||