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

Edge case: Piping code into xonsh with forced interactive mode produces exceptions #5350

Open
anki-code opened this issue Apr 20, 2024 · 0 comments

Comments

@anki-code
Copy link
Member

anki-code commented Apr 20, 2024

It's very rare edge case but:

I expect here that code will be executed and I got just result i.e. 1, but I see prompt with commands and different behavior for ptk and readline:

bash
echo "echo 1" | xonsh --no-rc
# 1 # As expected, but:

echo "echo 1" | xonsh --no-rc -i
# Warning: Input is not a terminal (fd=0).
# ^[[38;1Ruser@local /private/tmp @ echo 1
# 1
# stty: 'standard input': Inappropriate ioctl for device
# ^[[38;1Ruser@local /private/tmp @
# user@local /tmp %

echo "echo 1" | xonsh --no-rc -i --shell-type readline
# user@local /private/tmp @
# ^C ^D
# exit
# user@local /private/tmp @
# No way to exit

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@anki-code anki-code changed the title Piping code into xonsh with interactive mode produces exceptions Piping code into xonsh with forced interactive mode produces exceptions May 15, 2024
@anki-code anki-code changed the title Piping code into xonsh with forced interactive mode produces exceptions Edge case: Piping code into xonsh with forced interactive mode produces exceptions May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant