You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
E.g. if I run command gh is --labels task new issue will be created, while I just mis-added "s" at the end of "labels" and correct command would be gh is --label task.
This is very annoying especially given the fact that GitHub doesn't allow to delete issues.
The text was updated successfully, but these errors were encountered:
I am sorry this is happening to you. This is by design / "as expected". How many times does it happen to you?
If you find it very disturbing and it happens a lot maybe it's a good idea for gh to calculate the word distance to '--missed-commands' or something to make auto-correction & avoid the default action from happening.
Funny thing is someone told me something very similar to this, but the effect was actually what he wanted (but just because he wanted the default command).
@henvic 3 times today. Now I have uncomfortable fear of using this command =)
Can you elaborate a little more? What this design actually brings compared to "if some unusual arguments has been provided – don't do anything but output error message"?
First, gh uses nopt to process the arguments called on the program execution.
Then we get an object with some interpreted data (for example, shortcuts are translated and so on).
We have two categories of arguments. One called options, the other commands. All commands are options. The subtle difference is that commands map to operations we do (i.e., open, create, new, delete), while non-commands only say something to be used inside the operations (i.e., issue number).
Some modules use default commands. For them, when we don't identify a command, we try to see if a pattern matches. Something like this:
no module arguments: invoke command x (as if --x had been passed)
1 module arguments: invoke command y (as if --y had been passed)
2+ module arguments: invoke command z (as if --z had been passed)
by module I mean any of the gh's modules such as issues, pull-requests, alias, notification, or repo.
E.g. if I run command
gh is --labels task
new issue will be created, while I just mis-added "s" at the end of "labels" and correct command would begh is --label task
.This is very annoying especially given the fact that GitHub doesn't allow to delete issues.
The text was updated successfully, but these errors were encountered: