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

cmd/run: Unset detach keys when executing commands #518

Merged
merged 1 commit into from
Sep 2, 2020

Conversation

HarryMichal
Copy link
Member

Podman sets keys 'ctrl-p' and 'ctrl-q' as the default detach keys. This behaviour is not desirable in Toolbox. Since Podman v1.8.2[0] it is possible to have set no detach keys by passing an empty string to the --detach-keys option.

Thanks to this the 'Ctrl+p' and 'Ctrl-q' combinations are doing what they should do normally in a terminal.

Fixes: #394

This PR is a reincarnation of #396 that I mistakenly closed by badly updating the author's branch.

@HarryMichal HarryMichal added 6. Minor Change Should not cause breakage 3. Bugfix Fixes a bug labels Jul 28, 2020
@HarryMichal HarryMichal added this to the Release 0.1.0 milestone Jul 28, 2020
@HarryMichal HarryMichal requested a review from debarshiray July 28, 2020 20:42
@softwarefactory-project-zuul
Copy link

Build failed.

src/cmd/run.go Outdated Show resolved Hide resolved
toolbox Outdated Show resolved Hide resolved
Podman sets 'ctrl-p ctrl-q' as the default key sequence for detaching
a container. This breaks the ctrl-p shortcut that's equivalent to the
up arrow key in GNU Readline environments like Bash and Emacs.
Moreoever, toolbox containers aren't meant to be detached in the first
place.

Since Podman 1.8.1, it is now possible to unset the key sequence for
detaching [2, 3].

[0] https://tiswww.cwru.edu/php/chet/readline/readline.html#SEC15

[1] https://www.gnu.org/software/emacs/tour/

[2] Podman commit 7c623bd41ff3d534
    containers/podman#4208

[3] Podman commit ebfd253fc658ffc9
    containers/podman#5166

containers#394
@softwarefactory-project-zuul
Copy link

Build failed.

@debarshiray debarshiray merged commit 0c08a42 into containers:master Sep 2, 2020
@debarshiray
Copy link
Member

Thanks for working on this, @EnigmaCurry !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. Bugfix Fixes a bug 6. Minor Change Should not cause breakage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Being in a toolbox breaks Ctrl-p for readline
4 participants