Skip to content

Feature Request: find function available for plugins or more args for emit find #4116

Description

@MexerSam

ya env output

not available

Please describe the problem you're trying to solve

As of https://yazi-rs.github.io/docs/plugins/utils there is no current find function available to use for plugins beside using emit.

Also this emit find does always show up an empty input dialog overwriting the last entered find.

It is not supported as of now to enter letters directly to add these to the current find input.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

By adding a function callable within a plugin there will be ways to:

  • get the current find input
  • passing a string to find without having an interactive input

Alternatively additional args could be given to emit find
--query : echoes the current text used in find
--text= : directly uses this text to find without showing input dialog
--add_character= : adds the given character
--rem_character : removes the last entered character
--delay= : proper way to reduce performance impact by not triggering the find right away but with a given delay in seconds or milliseconds. This should have a default value when using add_character or rem_character or use a new configurable value as fallback.

By adding such functionality it will be achievable to directly use find by typing without having an input dialog.

Also might be a good suggestion to add this for search and filter accordingly.

Additional context

No response

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions