summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/japi9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/japi b/src/japi
index 15bdc68..644ef42 100755
--- a/src/japi
+++ b/src/japi
@@ -87,14 +87,17 @@ package Japi::Japi {
sub say_synopsis {
my ($self, $ec) = @_;
my $opts = $self->opts;
- my %tstr = ( '=s' => 'STRING', '' => 'BOOL' );
+ my %tstr = ( '=s' => 'STRING', '' => '' );
$ec //= 0;
say "Synopsis: $0";
for (sort keys %$opts) {
my $tstr = $tstr{$opts->{$_}{type}} // '';
- my $value = $opts->{$_}{value} // '';
- say "\t[--$_ <$tstr:$value>]";
+ if ($tstr ne '') {
+ my $value = $opts->{$_}{value} // '';
+ $tstr = " <$tstr:$value>";
+ }
+ say "\t[--$_$tstr]";
}
say 'You may also read the manual page';
exit $ec;