aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2013-05-06 08:57:47 -0400
committerYann E. MORIN <yann.morin.1998@free.fr>2013-06-24 13:57:45 -0400
commit193b40aeb537b59eaa36e3dfaabedc2025332ebf (patch)
treef72ea744e1e9aeb53c5a546c1599d496412bd5c6 /Documentation
parenta5f6d795f5941e97e757b643a6482968a66c6150 (diff)
kconfig: sort found symbols by relevance
When searching for symbols, return the symbols sorted by relevance. Sorting is done as thus: - first, symbols that match exactly - then, alphabetical sort Since the search can be a regexp, it is possible that more than one symbol matches exactly. In this case, we can't decide which to sort first, so we fallback to alphabeticall sort. Explain this (new!) sorting heuristic in the documentation. Reported-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Jean Delvare <jdelvare@suse.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Roland Eggner <edvx1@systemanalysen.net> Cc: Wang YanQing <udknight@gmail.com> -- Changes v1->v2: - drop the previous, complex heuristic in favour of a simpler heuristic that is both easier to understand, *and* to maintain (Jean) - explain sorting heuristic in the doc (Jean)
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kbuild/kconfig.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 3f429ed8b3b8..e9f9e767f82a 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -174,6 +174,19 @@ Searching in menuconfig:
174 174
175 /^hotplug 175 /^hotplug
176 176
177 When searching, symbols are sorted thus:
178 - exact match first: an exact match is when the search matches
179 the complete symbol name;
180 - alphabetical order: when two symbols do not match exactly,
181 they are sorted in alphabetical order (in the user's current
182 locale).
183 For example: ^ATH.K matches:
184 ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
185 [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
186 of which only ATH5K and ATH9K match exactly and so are sorted
187 first (and in alphabetical order), then come all other symbols,
188 sorted in alphabetical order.
189
177______________________________________________________________________ 190______________________________________________________________________
178User interface options for 'menuconfig' 191User interface options for 'menuconfig'
179 192