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

Support Ctrl-Z for job control. #297

Closed
Ferada opened this issue Apr 15, 2020 · 7 comments · Fixed by #447
Closed

Support Ctrl-Z for job control. #297

Ferada opened this issue Apr 15, 2020 · 7 comments · Fixed by #447
Labels
enhancement Add a new feature

Comments

@Ferada
Copy link

Ferada commented Apr 15, 2020

It looks to me like pressing Ctrl-Z does nothing, when in fact that should pause the process. Would it be possible to have that going to the shell instead of capturing all keypresses? The same issue is with Ctrl-L which should ideally refresh the screen (why's that a good idea to have? because sometimes you end up with a garbled terminal because some other process is still writing there; right now you'd have to restart to be back in a consistent and usable state).

@tonymet
Copy link

tonymet commented Jun 25, 2020

i can take this one

@tonymet
Copy link

tonymet commented Jun 25, 2020

in the meantime i suggest tmux. i had the same issue.

@yurenchen000
Copy link
Contributor

3 years later,
did anyone implement it?

@tonymet
Copy link

tonymet commented May 1, 2023

3 years later, did anyone implement it?

I remember attempting it for a couple days. There was an issue with resetting the tty that I couldn't get around. I tried sending reset control codes to the tty.

ctrl-Z / SIG-STOP worked, but SIG-RUN would restore the app to a broken state on the tty. no input could be received and screen was blank.

@yurenchen000
Copy link
Contributor

yurenchen000 commented May 1, 2023

ctrl-Z / SIG-STOP worked, but SIG-RUN would restore the app to a broken state on the tty. no input could be received and screen was blank.

still same reaction
seems dive didn't handle those signal rightly


Seems that blame to gocui (the lib which dive used for TUI)
https://github.com/wagoodman/dive/blob/master/runtime/ui/layout/manager.go#L4
https://github.com/awesome-gocui/gocui
lots of gocui based TUI tool (lazydocker, lazygit..) not support Ctrl+Z

@yurenchen000
Copy link
Contributor

yurenchen000 commented May 2, 2023

@tonymet @Ferada @wagoodman
I have send a PR for the feature #447

@yurenchen000
Copy link
Contributor

yurenchen000 commented Jun 1, 2023

people may also be interested in
gdu add ctrl+z support #249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Add a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants