Fix @$ subprocess operator#3156
Conversation
|
The implementation is currently wrong. It breaks the |
|
Thanks for pushing on this |
916c05c to
a6e30f1
Compare
|
OK, the Edit: I don't really understand the failing test case. |
|
The @$ operator does not require the leading white space character any more. Now I can do There is, however still an extra space between the literal argument and the output of the subprocess. @scopatz, do you have a clue about where this extra space comes from? |
|
Maybe it is coming from https://github.com/xonsh/xonsh/blob/master/xonsh/built_ins.py#L975? |
|
@scopatz, thanks for the suggestion, but no, the |
|
There is something that's ensuring the |
3e5d062 to
cca3d4d
Compare
|
Yeah, I wonder if the lexer itself is adding this token (WS)? |
|
Yeah, maybe it is this line: https://github.com/xonsh/xonsh/blob/master/xonsh/lexer.py#L349 |
c61d138 to
05fd575
Compare
|
So, I'm back to this PR after several months. |
|
Never mind. I know what the problem is - it's that I'm parsing the |
05fd575 to
58c0982
Compare
|
This is now ready to land. |
c7ba3b0 to
bb98643
Compare
|
@laloch Any idea some test fail. Are they related to this? |
Yeah, I would like to know too, but I don't think they might be related. |
|
Please do not merge. This is wrong once again. It breaks |
e3f7f5e to
dc1a63e
Compare
|
Now the , which is not desirable, since I aim for consistency with Edit: maybe it is more important to be consistent internally. Maybe I should forget about Bash and keep this consistent with our |
|
Thanks so much for this @laloch! Can you add a couple of cases to |
|
I'm pretty sure this is now ready to land - this time for real. |
|
Windows on Python 3.8 keeps failing. Can you look into it please? |
|
The failures seem all to be of similar nature - either Edit: I mean Well, really? |
198bd53 to
a5ee1d0
Compare
@$() operator now removes trailing newline characters from multiline command output.
|
Hey @laloch - maybe we can get these tests to pass by merging from master. Not sure if you did that just now? |
|
Yeah, I just did a rebase on master, that was supposed to trigger the GitHub CI. It didn't. |
|
Yeah. Weird. Maybe push an empty commit to try to trigger it? |
a5ee1d0 to
ed64cdc
Compare
ed64cdc to
18d199b
Compare
|
I did some interactive rebasing, rewording and squashing - still the same. Let's try a dummy commit now... |
|
Nope. Still the same :( |
|
OK, I am going to try to close and reopen |
|
Yeah, didn't work. I'll just merge once this passes |
|
I can try to open a new PR for the same branch... |
|
Yeah, if you want that would be nice |
|
No problem. Let's try it. |
@$(cmd)operator now returns a list of tokens created by splitting the command's output at the newline character.Closes #2328