Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tacman opened this issue May 8, 2025 · 8 comments
Open

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

tacman opened this issue May 8, 2025 · 8 comments
Labels

Comments

@tacman
Copy link
Contributor

tacman commented May 8, 2025

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 tacman added the RFC label May 8, 2025
@Kocal
Copy link
Member

Kocal commented May 9, 2025

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?

@tacman
Copy link
Contributor Author

tacman commented May 9, 2025

or

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

@smnandre
Copy link
Member

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

@smnandre
Copy link
Member

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
Copy link
Member

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

@tacman
Copy link
Contributor Author

tacman commented May 10, 2025

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

@smnandre
Copy link
Member

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)

@tacman
Copy link
Contributor Author

tacman commented May 10, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants