Repository navigation
(Is this correct?) The rename DDS event fires even if the file name did not change
#4499
Unanswered
drewlwhitney
asked this question in
1. Q&A
Replies: 1 comment
|
Yes, this is currently the expected behavior. Why this happensWhen you trigger
Because the input submission is treated as an explicit command execution, Yazi does not filter out Handling in Lua plugins / DDS subscribersIf you are writing or configuring a Lua plugin or DDS subscriber that reacts to ps.sub("rename", function(body)
if body.from == body.to then
return -- Skip no-op renames where the filename was unchanged
end
-- Your rename logic here
end) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
wezterm 20260820-095106-770d8e1a
ya envoutputYazi Version: 26.9.1 (d5e4beb 2026-11-12) Debug : false Triple : x86_64-unknown-linux-gnu (linux-x86_64) Rustc : 1.99.1 (58cf8f9c 2026-10-13) Backtrace: None Ya Version: 26.9.1 (d5e4beb 2026-11-12) Debug : false Triple : x86_64-unknown-linux-gnu (linux-x86_64) Rustc : 1.99.1 (58cf8f9c 2026-10-13) Config Init : /home/drewl/.config/yazi/init.lua (1161 chars) Yazi : /home/drewl/.config/yazi/yazi.toml (795 chars) Keymap : /home/drewl/.config/yazi/keymap.toml (10651 chars) Theme : /home/drewl/.config/yazi/theme.toml (137 chars) VFS : /home/drewl/.config/yazi/vfs.toml (No such file or directory (os error 2)) Package : /home/drewl/.config/yazi/package.toml (1489 chars) Dark/light flavor: ArcSwapAny("nord") / ArcSwapAny("catppuccin-latte") Emulator TERM : Some("xterm-256color") TERM_PROGRAM : Some("WezTerm") TERM_PROGRAM_VERSION: Some("20260820-095106-770d8e1a") Brand.from_env : Some(WezTerm) Emulator.probe : Emulator { brand: WezTerm, version: ArcSwapAny("WezTerm 20260820-095106-770d8e1a"), csi_u: None, kgp: true, kgp_shm: true, sixel: true, background: Some([11051, 10537, 11565]), color_scheme: None, csi_16t: (10, 22), force_16t: false, osc_5522: false, cursor_blink: false, cursor_shape: None, mux: None, probe: Probe { id: Id(0), deadline: None }, started: false } Adapter Drivers.matches: Iip TERM.dimension : Dimension { cols: 92, rows: 45, width: 920, height: 990 } Desktop XDG_SESSION_TYPE : Some("wayland") WAYLAND_DISPLAY : Some("wayland-1") DISPLAY : Some(":0") NIRI_SOCKET : Some("/run/user/1000/niri.wayland-1.1209.sock") SWAYSOCK : None HYPRLAND_INSTANCE_SIGNATURE: None WAYFIRE_SOCKET : None SSH shared.in_ssh_connection: false WSL WSL: false Variables PATH : Some("/home/drewl/.config/kanata/:/home/drewl/.cargo/bin/:/usr/bin:/home/drewl/.cargo/bin:/home/drewl/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin") SHELL : Some("/bin/bash") EDITOR : Some("nvim") VISUAL : None YAZI_FILE_ONE : None YAZI_CONFIG_HOME : None YAZI_ZOXIDE_OPTS : None SSH_AUTH_SOCK : Some("/run/user/1000/wezterm/agent.66033") FZF_DEFAULT_OPTS : None FZF_DEFAULT_COMMAND: None Text Opener default : Some(OpenerRuleArc(OpenerRule { id: Id(24), run: "nvim %s", block: true, orphan: false, desc: "", for: Unix, spread: true })) block-create: Some(OpenerRuleArc(OpenerRule { id: Id(24), run: "nvim %s", block: true, orphan: false, desc: "", for: Unix, spread: true })) block-rename: Some(OpenerRuleArc(OpenerRule { id: Id(24), run: "nvim %s", block: true, orphan: false, desc: "", for: Unix, spread: true })) Multiplexers tmux version : No such file or directory (os error 2) tmux build flags : enable-sixel=Unknown ZELLIJ_SESSION_NAME: None Zellij version : No such file or directory (os error 2) Dependencies file : 5.48 ueberzugpp : 2.9.10 ffmpeg/ffprobe: 9.0.2 / 9.0.2 pdftoppm : 26.10.0 magick : 7.1.2-35 fzf : 0.75.0 fd/fdfind : 10.5.0 / No such file or directory (os error 2) rg : 15.2.0 chafa : 1.18.3 zoxide : No such file or directory (os error 2) 7zz/7z : No such file or directory (os error 2) / 26.06 resvg : 0.49.0 jq : No such file or directory (os error 2) Clipboard wl-copy/paste: 2.3.0 / 2.3.0 xclip : No such file or directory (os error 2) xsel : No such file or directory (os error 2) Routine `file -bL --mime-type`: text/plainDescribe the question
The
renameDDS event fires even if the file name did not change. You can check this by hittingrand thenEnter.Is this intentional behavior? All good if it is; I was just surprised and want to make sure it's not a bug.
Thanks!
Anything else?
No response
Checklist
All reactions