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

If the action is run_script_stdin with the repl option, can simply en… #2555

Closed
wants to merge 0 commits into from

Conversation

a690700752
Copy link
Contributor

…ter the repl without reading it.

@Kodiologist
Copy link
Member

What's the motivation here? All the other if branches deal with the REPL case explicitly.

@a690700752
Copy link
Contributor Author

When I use the -i parameter to force the launch of the REPL and send code in subprocess (using nvim conjure), it directly enters the repl.runsource block for execution and never enters repl.run(). In this case, the current environment is not the REPL environment, lacking the PS1, PS2 prompts, and some other REPL-specific environment settings, which contradicts the meaning of the -i parameter. On the other hand, other branches execute code first, such as from a file, before entering repl.run().

@Kodiologist
Copy link
Member

I see. Can you write a test? See tests/test_bin.py.

@Kodiologist
Copy link
Member

Also, don't forget to add yourself to AUTHORS (in a separate commit) and keep the first line of your commit messages to 50 characters or less. See CONTRIBUTING.rst.

@a690700752
Copy link
Contributor Author

OKay, I will add tests and update it later.

@Kodiologist
Copy link
Member

@a690700752 What happened here?

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.

None yet

2 participants