This is a relatively straightforward fix with only two real changes:
Don't even bother checking for exit name matches when you already have command name matches (line 106 in the updated file, changing the MatchError trap to a NotFoundError trap).
Within exit name parsing, handle AmbiguityErrors separately from NotFoundErrors. The current version passes both through to be handled by the following block, which is why we get the error message complained about in #132. Updated version only passes through NotFoundErrors. AmbiguityErrors are either handled separately, or (in the very specific case there was a nospace command already found) ignored.
Having fixed this I now want to refactor this whole block; it's gotten very complex through the addition of several features, and doesn't need to be. That's a PR for another day.
This is a relatively straightforward fix with only two real changes:
Having fixed this I now want to refactor this whole block; it's gotten very complex through the addition of several features, and doesn't need to be. That's a PR for another day.