Re: [PATCH] menuconfig: Allow sorting the entries alphabetically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ivan,

On 2024-08-16 16:18, Ivan Orlov wrote:
Implement the functionality which allows to sort the Kconfig entries
alphabetically if user decides to. It may help finding the desired entry
faster, so the user will spend less time looking through the list.

Awesome, I love this new feature!  Thank you for the patch.

The sorting is done on the dialog_list elements in the 'dialog_menu'
function, so on the option "representation" layer. The sorting could be
enabled/disabled by pressing the '>' key. The labels are sorted in the
following way:

1. Put all entries into the array (from the linked list)
2. Sort them alphabetically using qsort and custom comparator
3. Restore the items linked list structure

I know that this modification includes the ugly heruistics for
extracting the actual label text from "    [ ] Some-option"-like
expressions (to be able to alphabetically compare the labels), and I
would be happy to discuss alternative solutions.




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux