From 2976de393dc8f6b97eb792243302f10821145b23 Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Tue, 16 Apr 2024 21:39:03 +0300 Subject: [PATCH] fix: allow opening interactively with the --chosen-file flag This commit fixes a bug where the user was unable to open a file interactively using when the `--chosen-file` flag was used. This is provided by default in yazi for the `O` (capital o) keybinding. (keymap.toml) ```toml [manager] keymap = [ { on = [ "O", ], run = "open --interactive", desc = "Open the selected files interactively" }, ] ``` --- yazi-core/src/manager/commands/open.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yazi-core/src/manager/commands/open.rs b/yazi-core/src/manager/commands/open.rs index 79c31abb..4ab0bca5 100644 --- a/yazi-core/src/manager/commands/open.rs +++ b/yazi-core/src/manager/commands/open.rs @@ -36,7 +36,7 @@ impl Manager { let selected = if opt.hovered { vec![&hovered] } else { self.selected_or_hovered(true).collect() }; - if Self::quit_with_selected(&selected) { + if !opt.interactive && Self::quit_with_selected(&selected) { return; }