-
Notifications
You must be signed in to change notification settings - Fork 699
feat: new bulk_rename command always renames files with the editor
#2984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1974740 to
ec8cad8
Compare
|
But here Instead, make { on = "R", run = "bulk_rename" } |
9f077f9 to
60a2382
Compare
|
Hey @andrewrabert, are you still working on this? |
ec8cad8 to
7cd287e
Compare
|
@sxyazi I've rebased to main with the actor model changes. Tested and confirmed it works when bound like |
bulk_rename command always renames files with the editor
sxyazi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new bulk_rename command that always uses the editor for renaming files, resolving issue #2983. The implementation adds the command to the executor system and refactors some existing rename-related logic.
- Added
bulk_renamecommand to the executor dispatch system - Simplified error handling in plugin command execution
- Fixed mutability issue in rename logic by changing from mutable to immutable tab access
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| yazi-fm/src/executor.rs | Adds bulk_rename command to the executor dispatch system |
| yazi-fm/src/app/commands/plugin.rs | Simplifies error handling by removing match statement and using ? operator |
| yazi-actor/src/mgr/rename.rs | Changes tab access from mutable to immutable when checking selected items |
| if opt.mode.auto_then(chunk.sync_entry) != PluginMode::Sync { | ||
| succ!(self.core.tasks.plugin_micro(opt)); | ||
| } | ||
|
|
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling change removes the warning log that was previously displayed when LUA runtime access failed. This could make debugging more difficult as errors will now propagate up instead of being logged and handled gracefully.
| if let Err(e) = runtime_mut!(LUA) { | |
| warn!("Failed to access LUA runtime: {e}"); | |
| return Err(e); | |
| } |
Which issue does this PR resolve?
Resolves #2983