ux icon indicating copy to clipboard operation
ux copied to clipboard

[ux-icons] allow multi-set search from the CLI

Open tacman opened this issue 7 months ago • 10 comments

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.

tacman avatar May 08 '25 14:05 tacman

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?

Kocal avatar May 09 '25 06:05 Kocal

or

bin/console ux:icons:search map --set=tabler

tacman avatar May 09 '25 09:05 tacman

I’m sorry how would the last one differ from the current behaviour ?

smnandre avatar May 10 '25 17:05 smnandre

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 ?

smnandre avatar May 10 '25 17:05 smnandre

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?

This is the command to search icons in the set

smnandre avatar May 10 '25 17:05 smnandre

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

Image

tacman avatar May 10 '25 17:05 tacman

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)

smnandre avatar May 10 '25 18:05 smnandre

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.

Image

tacman avatar May 10 '25 19:05 tacman

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.

carsonbot avatar Nov 11 '25 12:11 carsonbot

I still like it. Maybe I'll be able to talk with @smnandre at the conference in Amsterdam.

tacman avatar Nov 11 '25 12:11 tacman