mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
small fix, forgot to switch between numeric and alpha sorts for partitions
This commit is contained in:
parent
894c5fe925
commit
bf6ab60b2c
8
inxi
8
inxi
|
@ -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);
|
||||
@partitions = sort { $a->{$show{'partition-sort'}} cmp $b->{$show{'partition-sort'}} } @partitions;
|
||||
# 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;
|
||||
|
|
Loading…
Reference in a new issue