From 5aa3c064e85b7ac50cf7b8bc78dd642d7198415d Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Mon, 8 Dec 2014 22:31:59 +0100 Subject: Fixed tab in presentation --- scripts/mana | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/mana b/scripts/mana index f6e26ccf..329f3b25 100755 --- a/scripts/mana +++ b/scripts/mana @@ -62,11 +62,11 @@ my %modules = ( exec => '/usr/bin/rpmdragora', descr => "rpmdragora: rpm install manager", }, - update => { + update => { exec => '/usr/bin/dragoraUpdate', - descr => "dragoraUpdate rpm update manager", + descr => "dragoraUpdate: rpm update manager", }, -); +); my $cmdline = new yui::YCommandLine; @@ -109,10 +109,12 @@ sub usage { print "Usage mana --help | -h print this help\n"; print "Usage mana [args...]\n\n"; print "valid :\n"; -# TODO better presentation - while ( my ($key, $value) = each(%modules) ) { - print "<" . $key . ">\t\t". $value->{descr} . "\n"; + + foreach my $key (sort keys %modules) { + # lenght + 2 chars "<" and ">" + print "<" . $key . (length $key >= 6 ? ">\t" : ">\t\t") . $modules{$key}->{descr} . "\n"; } + print "\n"; exit(0); } -- cgit v1.2.1