Skip to content
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

auto-correct suggestion apps:delete is too dangerous #2003

Open
cben opened this issue May 29, 2022 · 0 comments
Open

auto-correct suggestion apps:delete is too dangerous #2003

cben opened this issue May 29, 2022 · 0 comments

Comments

@cben
Copy link

cben commented May 29, 2022

Do you want to request a feature or report a bug?

usability bug.

What is the current behavior?

heroku certs:delete --app mathdown
 ›   Warning: certs:delete is not a heroku command.
Did you mean apps:delete? [y/n]: y
^C

Pressing "y" there was silly on my part (and good thing I aborted in time 😓) but IMHO apps:delete action is to dangerous to be suggested for ANY other command, and certainly for commands that deal with another noun (such as certs: here). 🛑

What is the expected behavior?

The suggestion I really needed was certs:remove.
One approach is give all "remove" commands a "delete" alias consistently, a-la commit 6b41d18.

But I feel discoverability is secondary goal here, it's more important to add some defense from undesired destructive action. Please consider:

  • excluding destructive actions from suggestions? This may be too strong, e.g. for app:destry the intent is clearly apps:destroy.
    • listing destructive actions as textual suggestions, but not offering direct [y/n] activation?
    • offering but with default [y/N]?
      (I'm not sure if that's already the default, lowercase y/n give no hint; capital N could give subtle hint you may want to stop and think — but OTOH it's well known that users get trained confirm such prompts without thinking...)
  • avoid suggesting same verb for different noun? In general these are not likely to match user's intent... Well maybe if the noun is light mispelling e.g. appps:destroy, but not for existing different noun certs:.

heroku/7.60.2 linux-x64 node-v16.14.0 on Fedora 36 linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant