Closed aghster closed 1 year ago
@aghster I'm open to it – curious what are some of those actions you had in mind that would always be part of the list?
In my use case I have only two or three static actions, but depending on the search string more actions are dynamically added. However, I want the static actions to be always quickly accessible, even if a search string was entered that does not match these actions.
I have a usecase where i have a few "action" like
but i also want to fallback to an action where i go "Search ${query}" where you launch a full faceted search with the current search term but ability to add a bunch of stuff
for that i need to be able to append a * query , and be able to use the search term in the perform & the action name
I agree with this idea; it would be nice to have some actions to fallback on instead of showing nothing or an empty component that can't perform any actions.
Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm interested in this... Please do not close 😁
Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I would like to be able to define actions that are always part of the results list, irrespecitve of the current search string. However, this is not possible, because actions for which
command-score
returns0
will not be included in the results list due to:https://github.com/timc1/kbar/blob/54b9fd8397f4bc1ad90833d1586f6f0bd0785e07/src/useMatches.tsx#L196-L198
My suggestion is that any action whose keywords include a special wildcard keyword will always be included in the results list. For example this special wildcard keyword could be
*
.As it seems, this could easily be implemented by ameding the above condition as follows:
@timc1, would you consider this generally useful and add this feature to kbar?