small fix, forgot to switch between numeric and alpha sorts for partitions

This commit is contained in:
Harald Hope 2018-09-24 19:07:33 -07:00
parent 894c5fe925
commit bf6ab60b2c

6
inxi
View file

@ -11015,7 +11015,13 @@ sub create_output {
my $num = 0;
my $j = 0;
my (@data,@data2,%part,@rows,$dev,$dev_type,$fs,$percent,$raw_size,$size,$used);
# alpha sort for non numerics
if ($show{'partition-sort'} !~ /^(percent-used|size|used)$/){
@partitions = sort { $a->{$show{'partition-sort'}} cmp $b->{$show{'partition-sort'}} } @partitions;
}
else {
@partitions = sort { $a->{$show{'partition-sort'}} <=> $b->{$show{'partition-sort'}} } @partitions;
}
foreach my $ref (@partitions){
my %row = %$ref;
$num = 1;