-
-
Notifications
You must be signed in to change notification settings - Fork 769
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
Add option to rm -rf
irrespective of trash
#1811
Conversation
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.
I think this is a fine addition. It always seemed redundant to me that there were two keybinds for the exact same thing bound to the exact same key.
Though it is a bit dangerous for the people who've grown accustomed to using ^X
for deleting files with trash enabled. The last change (there have been additions since, but those wouldn't affect existing workflows) in keybinds was in April 2022 and that was much less impactful than this would be.
1074ceb
to
f3fe145
Compare
You can accomplish the same thing with a simple plugin. Bind it to |
ef73cfc
to
8200401
Compare
On the other hand, I think this is a useful bultin. It's a bit odd that you can't specify to permanently delete a file if you configure trash. Maybe even going as far as to say that most file managers have such a feature. So, delegating it to a one-liner plugin seems a bit off. I do agree about the keybind tough. I don't expect it to affect anybody realistically, but who knows. This would have been perfect back before keybinds were stabilized, but apparently no one thought of that at the time. |
...unless we do something like with batch rename where we call a plugin if it's found and otherwise do the builtin thing. It's a bit convoluted, but would at the same time keep the existing behavior for most users while allowing something extra for those willing to opt in. Also, there was some talk recently about supporting more trash managers. I didn't follow that through, but I imagine giving them a script they can edit would allow them better compatibility than just building all those options directly in. What do you think? |
That might be a good idea. Would allow people to use other trash utilities or add special logic to skip trash and rm directly and what not. |
@62832 the plugin in question is |
@KlzXS there is one problem. For users who use the type-to-nav mode, So I am inclined to agree with @N-R-K on this aspect. However, I think we can have the best of both the worlds. We can add a program option What do you think? @62832 hold on till we conclude this discussion. |
@62832 I am fine with a new keybind Also, please squash all the commits into one for easy maintenance. |
Should be done now, having addressed @N-R-K's concerns and switched to using SHIFT+X as the bind for |
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.
Small documentation nit. Code seems ok to me.
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.
If we are happy with the new names of the actions and the description in the help this should be good to go.
Also a reminder that we should update the wiki after this is merged.
We are good! I'll take care of the Wiki update. Thanks guys! |
Is that failing |
./patches/check-patches.sh fails in CI. @62832 please have a look.
|
@jarun Should be sorted now, conflicts have been resolved with the Colemak patch. |
Re-ran CI. |
Thank you! |
Heya. I was slightly annoyed by the fact that using
NNN_TRASH
completely disabled the ability torm -rf
within nnn, so I wanted to add a separate option for^X
that would just userm -rf
regardless of the trash backend being used.Hope this is alright.