-
Notifications
You must be signed in to change notification settings - Fork 331
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
Avoid refreshing previews for shell pipe commands #1281
Conversation
I think this is a good idea and it seems safe. In fact, I was considering doing this in #1243. I'm not quite sure if there was some weird bug those two lines fixed, though. I was also considering adding some form of refresh when the command stops executing, in the two I'll keep thinking about it, but it's also possible that at this point you and @gokcehan might be better experts on subtleties of changing such behavior than I am. |
Looking back at the original code, I'm quite sure
I did notice that |
I think you are likely correct. I went spelunking through the blame, and the code seems to originate in 52fbe46. I think that, unless @gokcehan sees a reason not to, we can merge this and see if any bugs appear (which is, hopefully, unlikely).
I'd put a sentence about this in the PR description, perhaps with a link to #414 (comment).
👍 I also realized we already talked about this in #1164 (comment) |
BTW I did some quick testing, adding a This is also why the
If you can make the |
@ilyagr I don't remember anything specific about this behavior. Let's merge it and see how it goes. @joelim-work Thanks for the patch. |
Follow up of #1164
Like
shell-async
commands,shell-pipe
commands are run in the background and can take some time to complete, so there is no point refreshing the preview immediately. When theshell-pipe
command finishes, it internally sends aload
command, so that should be sufficient.For
shell
andshell-wait
commands, the loading is handled in therunCmdSync
function, see #1243 for details.I did notice that
%
triggers theload
command afterwards but&
doesn't, I'm not sure if there's a reason for this though, but I think it can be addressed separately outside of this PR.