Skip to content
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

feat(icons): add get_element_icon option #686

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

akinsho
Copy link
Owner

@akinsho akinsho commented Feb 19, 2023

Since there have been many requests to have icons fetch in some way that a user might prefer e.g. with defaults without defaults, by filetype, by filename, maybe eventually by different package than devicons, this PR adds a get_icon_element option which a user can use to decide what is return for each element which is essentially a filename, filetype, directory and path.

cc @camiloaromero23 @utilyre @CleoMenezesJr

I've closed #669 in favour of this change since that continues us down the path of option after option of load_by_x_criteria. This way a user can just explicitly do whatever they want.

Can you please test this PR to see if
a) It solves the original issue
b) It correctly allows you to return whatever icon you want

TODO

  • Add a test case

@akinsho akinsho changed the title feat(icons): include load_icons_from_filetype option feat(icons): add get_element_icon option Feb 19, 2023
@akinsho akinsho force-pushed the feature/add-icon-fetcher-option branch from 7887dd2 to 4fde817 Compare February 20, 2023 09:32
@akinsho akinsho force-pushed the feature/add-icon-fetcher-option branch from 4fde817 to 5f577a1 Compare February 20, 2023 10:09
@akinsho akinsho merged commit 9d95a6d into dev Feb 20, 2023
@akinsho akinsho deleted the feature/add-icon-fetcher-option branch February 20, 2023 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants