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

vrepl: fix os.input() (fix #5678) #21811

Merged
merged 1 commit into from
Jul 6, 2024
Merged

Conversation

yuyi98
Copy link
Member

@yuyi98 yuyi98 commented Jul 6, 2024

This PR fix os.input() in vrepl tools (fix #5678).

  • Fix os.input() in vrepl tool.
  • Add test.
PS D:\Vlang\v> v
 ____    ____
 \   \  /   /  |  Welcome to the V REPL (for help with V itself, type  exit , then run  v help ).
  \   \/   /   |  Note: the REPL is highly experimental. For best V experience, use a text editor,
   \      /    |  save your code in a  main.v  file and execute:  v run main.v
    \    /     |  V 0.4.6 4475759 . Use  list  to see the accumulated program so far.
     \__/      |  Use Ctrl-C or  exit  to exit, or  help  to see other available commands.

>>> mut s := os.input('aaa> ')
aaa> hello
>>> s
hello
>>> s = os.input('bbb> ')
bbb> world
>>> s
world
>>>

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman spytheman merged commit 1571645 into vlang:master Jul 6, 2024
63 checks passed
@yuyi98 yuyi98 deleted the fix_vrepl_input branch July 7, 2024 00:53
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

Successfully merging this pull request may close these issues.

REPL : Incomprehensible behavior with os.input ()
2 participants