Permalink
Browse files

ahh, it's a flag, so there's no args

  • Loading branch information...
1 parent 9febae3 commit f93c4bb7361c9e3557f835bc5af3d73d339c7cd8 @jettero committed Jul 19, 2014
Showing with 3 additions and 2 deletions.
  1. +1 −1 example/cmds/ping.pm
  2. +1 −1 lib/Term/ReadLine/CLISH/Command/Argument.pm
  3. +1 −0 t/15_parse_for_tab_completion.t
View
@@ -18,7 +18,7 @@ command(
optional_argument( size => 'validate_positive_nonzero',
help => "size of the packets in bytes" ),
- optional_argument( df => undef, help => "set the don't fragment bit" ),
+ optional_argument( df => undef, is_flag=>1, help => "set the don't fragment bit" ),
required_argument(
target => ['validate_ipv4', 'validate_ipv6', 'validate_hostname'],
@@ -118,7 +118,7 @@ sub validate {
} else {
# If there are no validators, then we can't accept arguments for this tag
- die "incomplete argument specification (no validators)" if @$validators == 0;
+ die "$this incomplete argument specification (no validators)" if @$validators == 0;
croak "precisely what are we validating here?" unless $that;
}
@@ -19,6 +19,7 @@ my %LINES = (
quit => [ "quit" ],
"ping " => [ qw(df count size target) ],
+ "ping df size" => [ qw(size) ],
);
plan tests => 0 + keys %LINES;

0 comments on commit f93c4bb

Please sign in to comment.