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

Use terminal detach keys sequence specified in the config file #4651

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

marcov
Copy link
Collaborator

@marcov marcov commented Dec 5, 2019

Fixes: #4556

Signed-off-by: Marco Vedovati mv@sba.lat

@mheon
Copy link
Member

mheon commented Dec 5, 2019

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marcov, mheon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 5, 2019
@mheon
Copy link
Member

mheon commented Dec 5, 2019

Lint seems to be complaining about a bit of excess whitespace?

@marcov marcov force-pushed the detach-config branch 2 times, most recently from 03b540a to 02496bf Compare December 5, 2019 20:19
Copy link
Member

@mheon mheon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd ask for tests, but I don't know how you'd actually do them in a sane way. Hm.

@@ -367,6 +367,23 @@ func (r *LocalRuntime) CreateContainer(ctx context.Context, c *cliconfig.CreateV
return ctr.ID(), nil
}

// Select the detach keys to use from user input flag, config file, or default value
func (r *LocalRuntime) selectDetachKeys(flagValue string) (error, string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably flip this to (string, error)

@@ -36,6 +36,9 @@ func init() {
flags := execCommand.Flags()
flags.SetInterspersed(false)
flags.StringVar(&execCommand.DetachKeys, "detach-keys", define.DefaultDetachKeys, "Select the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _")
// Clear the default, the value specified in the config file should have the
//priority
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a space between // and priority

@TomSweeneyRedHat
Copy link
Member

Other than @mheon's comments, LGTM

Fixes: containers#4556

Signed-off-by: Marco Vedovati <mv@sba.lat>
@marcov
Copy link
Collaborator Author

marcov commented Dec 6, 2019

Updated, thank you!

@rhatdan
Copy link
Member

rhatdan commented Dec 6, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 6, 2019
@rhatdan
Copy link
Member

rhatdan commented Dec 6, 2019

Thanks @marcov

@openshift-merge-robot openshift-merge-robot merged commit e9c4820 into containers:master Dec 6, 2019
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman attach/exec do not respect "detach_keys" configuration while podman run does
6 participants