[ux-icons] allow multi-set search from the CLI
Since I can search from the UI for an icon without specifying a set, I'd like to do the same from the CLI.
Description:
Search icons and icon sets from ux.symfony.com
Usage:
ux:icons:search <prefix> [<name>]
Arguments:
prefix Prefix or name of the icon set (ex: bootstrap, fa, tabler)
name Name of the icon (leave empty to search for sets)
That is
bin/console ux:icons:search * map
Would do the search across all icon sets.
In a future version, the icon set could be the second argument or an option.
I don't think bin/console ux:icons:search * map will works due to the wildcard character.
What about only bin/console ux:icons:search map?
or
bin/console ux:icons:search map --set=tabler
I’m sorry how would the last one differ from the current behaviour ?
More generally, not that I am against, but what would be the use case ?
On the website, you chose by looking at the icons, here how would you decide to use one of the various icons ?
I don't think
bin/console ux:icons:search * mapwill works due to the wildcard character.What about only
bin/console ux:icons:search map?
This is the command to search icons in the set
I don't know the set, I just know that I'm looking for a github icon, or a drink icon, whatever.
bin/console ux:icons:search github
Just like the UI
But (again, asking to understand here) what will you do with a list of icons as result?
foo:github bar:github baz:github
foobar:github another:github other:github
What would you do with this information ? (knowning that for this specific example, there would be multiple pages of result in the CLI)
Actually, it would more be like
tabler:brand-github ri:github-fill ri:github-link mdi:tabler
I have my preferred sets: tabler, then mdi, then bi, then whatever's available. In the case of github, I think on tabler it's brand-github, and on bi it's something else, so often I'm just trying to remember the exact icon name.
I love the aliases feature in ux_icons, so what I'd then do is assign github to tabler:brand-github and just use that. The command line is actually less clicking.
I recently had to look up a bunch of sports icons, and sometimes it's faster on the CLI to find them.
Thank you for this suggestion. There has not been a lot of activity here for a while. Would you still like to see this feature? Every feature is developed by the community. Perhaps someone would like to try? You can read how to contribute to get started.
I still like it. Maybe I'll be able to talk with @smnandre at the conference in Amsterdam.