Skip to content

feat(smart-filter): add auto_enter and confirm_keys options#189

Open
robertoash wants to merge 1 commit intoyazi-rs:mainfrom
robertoash:feat/smart-filter-configurable-auto-enter
Open

feat(smart-filter): add auto_enter and confirm_keys options#189
robertoash wants to merge 1 commit intoyazi-rs:mainfrom
robertoash:feat/smart-filter-configurable-auto-enter

Conversation

@robertoash
Copy link

Summary

  • Adds auto_enter option (default true) to disable automatic directory entry when only one match remains. Useful when you type fast and the plugin enters a directory mid-streak.
  • Adds confirm_keys option (default {}) to define extra characters that confirm the current match — entering a directory or opening a file — in addition to <Enter>. For example, { " " } makes Space act as a confirm key.

Both options default to the original behavior, so this is fully backward-compatible.

Example

-- ~/.config/yazi/init.lua
require("smart-filter"):setup {
  auto_enter   = false,   -- don't enter dirs mid-typing
  confirm_keys = { " " }, -- Space also confirms
}

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.

1 participant