]> _ Git - alire.git/commit
Alr.Commands.Search: change default behavior to include properties (#1575)
authorFabien Chouteau <Fabien-Chouteau@users.noreply.github.com>
Fri, 23 Feb 2024 10:39:46 +0000 (11:39 +0100)
committerGitHub <noreply@github.com>
Fri, 23 Feb 2024 10:39:46 +0000 (11:39 +0100)
commit13b832482d62b733206988367ce495dad54b4b33
tree51fce1dd2e58cbe7ad54ebb1d9f59e88d0ef961b
parent601567e9c66c95b429013fed010e6b5638733f39
Alr.Commands.Search: change default behavior to include properties (#1575)

* Alr.Commands.Search: change default behavior to include properties

This patch comes from a comment of a user looking for gnatpp in Alire.
gnatpp is part of the libabalang_tools crate and a 1.x `alr search gnatpp`
returns nothing. The reason that by default only the release name and
descriptions are searched. This is quite a bad user interaction.

Here we change the default behavior to search in all properties of a
release, including tags, executables, website, etc.

We also display the list of properties that match the pattern.

Searching in names and descriptions only is still possible with the
--crates switch.

* Alr.Commands.Search: use a set rather than a vector for matching props
src/alire/alire-releases.adb
src/alire/alire-releases.ads
src/alr/alr-commands-search.adb
src/alr/alr-commands-search.ads
testsuite/fixtures/basic_index/li/libhello/libhello-1.0.0.toml
testsuite/tests/search/basic/test.py