-
-
Notifications
You must be signed in to change notification settings - Fork 634
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
Don't capture so much #2460
Don't capture so much #2460
Conversation
…ts don't get captured.
Codecov Report
@@ Coverage Diff @@
## master #2460 +/- ##
==========================================
- Coverage 30.86% 30.59% -0.27%
==========================================
Files 97 97
Lines 16338 16340 +2
Branches 3046 3047 +1
==========================================
- Hits 5042 5000 -42
- Misses 10745 10785 +40
- Partials 551 555 +4
Continue to review full report at Codecov.
|
Hey @nathan-hoad -- sorry for the long delay in getting to this. The changes sound reasonable to me, and yes, the uncaptured commands should probably be uncaptured. Do you want to go ahead and update the code to reflect that? |
Hello All, Thanks for the PR @nathan-hoad! So I think that there might be some confusion over terminology here. un/capturing only refers to whether the output is piped to stdout and stderr. The distinction between
For example on master, we see what I think is the correct behaviour: scopatz@artemis ~ $ $[echo hello] is None
hello
True
scopatz@artemis ~ $ ![echo hello].out
hello
'hello\n' On this branch, we no longer have access to the full output after the command is run: scopatz@artemis ~ $ $[echo hello] is None
hello
True
scopatz@artemis ~ $ ![echo hello].out
hello
'' Right now, all subprocess commands are automatically wrapped in PS super sorry about taking so long to get to this. |
I'm going to close this out in light of @scopatz' comments, but please ping here if anyone wants to continue this discussion and/or change the direction of this PR. |
This fixes #2404, covering another situation I also discovered.
My additional discovery was that stdout and stderr of hiddenobjects are also being captured, which the documentation states shouldn't be happening - http://xon.sh/tutorial.html#uncaptured-subprocess-with-and. I'm slightly less sure about this change, because the code quite explicitly refers to them as captured:
and
But I think it might a copy-paste thing from nearby code. Either way the capture is definitely causing issues, e.g. here's two invocations of
fzf
that select the same file:Given that the documentation states it shouldn't be captured, and with this PR it really isn't captured anymore, I should probably also update the code to state that it's uncaptured. If you find the change agreeable let me know and I'll make those changes.