anki-code/xonsh-operators-proposal

Unexpected new line in CP.out on xonsh2 fork

Open

#7 opened on Feb 24, 2021

 (7 comments) (0 reactions) (0 assignees)Python (1 fork)github user discovery
XEP-2help wanted

Repository metrics

Stars
 (3 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

hi, first of all, thanks a lot for these changes to xonsh. I'm currently trying out xonsh and was very disappointed in the default $() behavior, which needs a lot of stripping.

currently I'm trying out some scripts, but a weird thing is happening which I don't really understand. Not sure if its even related to the changes in this fork.

t1 = $(curl -Ss https://p.krebsco.de/029cwqk).out
t2 = $(curl -Ss https://p.krebsco.de/029cwqk)
t3 = t2.out

t1[32760:32790]
output: ': "http:/\n/rss.r/?action=displ'
t3[32760:32800]
output: ' "http://rss.r/?action=display'

why is there an erronous newline in t1? this sadly breaks the json and makes json.loads error with

json.decoder.JSONDecodeError: Invalid control character at: line 922 column 28 (char 32769)

hopefully you can help me figure this out

EDIT: this problem does not appear in normal xonsh with !()

Contributor guide