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

Commits on Dec 10, 2023

  1. Improve command input recognition

    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.
    st0012 committed Dec 10, 2023
    Configuration menu
    Copy the full SHA
    548e170 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    715526b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    84988e2 View commit details
    Browse the repository at this point in the history