ctrl+d to delete branches without confirmation is unexpected and destructive
chrislambe opened this issue · comments
ctrl+d is often used in REPLs (e.g. node
, deno
, irb
) as an exit command. Looks like this extension has ctrl+d bound to silently force(!!!) delete branches. I deleted two branches before I realized what was happening. Seems like it would be better to choose a different shortcut for deleting branches or at least add some confirmation before doing so.
Thanks for raising the issue. ctrl-d
was a poor choice. What would be a better key combination that is less likely to be entered by accident?
Fixed in 31137cd
My personal opinion is that something like the delete key (as opposed to backspace) would be a reasonably intuitive choice. On the other hand, I'd also want to know what the intended scope of the extension is. Is it meant to be a branch manager or simply a branch selector?
Regardless, this is a cool extension and I appreciate the rapid response!
@chrislambe it was at first meant as a branch selector, but then I started playing with fzf's keybinding features and went a little overboard. Personally, when I notice a lot of branches leftover from merged PRs, I get the urge to clean them, and multi-select functionality of fzf seems perfect for that. except, due to this being a terminal tool and implementing a lot of standard terminal keybindings, not many keybindings actually remain available.
Plus, I'm not sure if I can implement a confirmation step within fzf :/
Any hope of this feature coming back? I still think it would be nice to have with appropriate safety measures!
@Scotchester Sure, do you have any good shortcuts in mind? All that I could think of after this incident are also mostly taken!
Would Del work? Or something like Shift+Backspace or Ctrl+Backspace?
Agree that @waldyrious's suggestions would be ideal, if possible.