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

Parse command flags with optparser #809

Draft
wants to merge 3 commits into
base: fix-#803
Choose a base branch
from
Draft

Parse command flags with optparser #809

wants to merge 3 commits into from

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Dec 9, 2023

No description provided.

@st0012 st0012 added the enhancement New feature or request label Dec 9, 2023
Currently, we simply split the input on whitespace and use the first
word as the command name to check if it's a command. But this means that
assigning a local variable which's name is the same as a command will
also be recognized as a command.

For example, in the following case, `info` is recognized as a command:

```
irb(main):001> info = 123
`debug` command is only available when IRB is started with binding.irb
=> nil
```

This commit improves the command input recognition by using more sophis-
ticated regular expressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

None yet

1 participant