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

Shell commands not running in the foreground #6615

Closed
dlip opened this issue Apr 6, 2023 · 5 comments
Closed

Shell commands not running in the foreground #6615

dlip opened this issue Apr 6, 2023 · 5 comments
Labels
C-bug Category: This is a bug R-wontfix Not planned: Won't fix

Comments

@dlip
Copy link

dlip commented Apr 6, 2023

Summary

When running a shell command on 23.03, helix stays in foreground and 'fights' with the command for input priority. 22.11 is fine. It happens in alacritty and kitty. eg. :sh lazygit

image

Reproduction Steps

I tried this:

  1. :sh lazygit

I expected this to happen:

To use lazygit, then return to helix after quitting

Instead, this happened:

Helix and lazygit were active simultaneously

Helix log

Nothing of interest here

Platform

Linux

Terminal Emulator

alacritty/kitty

Helix Version

23.03

@dlip dlip added the C-bug Category: This is a bug label Apr 6, 2023
@dlip
Copy link
Author

dlip commented Apr 6, 2023

I have tracked down the issue to pr #6373 @pascalkuthe suggests:

There is no reason for :sh to block the editor as it doesn't insert any text into the buffer.

But i think here is a valid use case, do you agree?

@David-Else
Copy link
Contributor

If you are using Kitty, I recommend using LazyGit in another window, here is my solution: https://github.com/David-Else/kitty-terminal-project-launcher

@pascalkuthe
Copy link
Member

I have tracked down the issue to pr #6373 @pascalkuthe suggests:

There is no reason for :sh to block the editor as it doesn't insert any text into the buffer.

But i think here is a valid use case, do you agree?

I don't think that's what :sh was ever really intended for. :sh is intended to quickly run a command and have the output popup in a window. Helix has not built-in terminal emulation so usually tuis don't work at all with :sh. I am not sure why lazygit worked previously but I suspect it did some trickery with suspend signals.

You can either do c-zlazygit or use something like kitty/zellij/termux as @David-Else mentioned.

@the-mikedavis
Copy link
Member

Yeah, :sh is meant for non-interactive commands. Interactive commands and especially ones that take over the full terminal should be executed in a separate terminal or in the same terminal but suspending Helix first (C-z). This could be supported in-editor in the future with #1976

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
@the-mikedavis the-mikedavis added the R-wontfix Not planned: Won't fix label Apr 6, 2023
@dlip
Copy link
Author

dlip commented Apr 7, 2023

Fair enough, I set up a layout tabs in zellij, its almost as good but I can't automatically reload-all upon returning
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug R-wontfix Not planned: Won't fix
Projects
None yet
Development

No branches or pull requests

4 participants