Allow ctrl-p ctrl-q customization#6460
Conversation
|
nice |
|
can we please print out the detach key combo when a user gets attached to a container (run, start, attach, whatever)? otherwise we're not only relying on a memory game, but users won't know what was set - or worse, when it changes. perhaps its something that |
|
I like the docker info idea, @crosbymichael ? |
|
This ought to be fun in a multi-user scenario |
|
@cpuguy83 :) it's server side, so there is nothing we can do |
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
|
@SvenDowideit updated |
There was a problem hiding this comment.
Also s/Fprintf/Fprint/ since there are no variables to be interpolated.
There was a problem hiding this comment.
Actually, maybe we don't need the else part since it is redundant with the default value of the flDetachKeys flag in docker.go. By default, detachKeys will be non-empty and thus we would never enter the else codepath.
There was a problem hiding this comment.
I did that for compatibility with old version, but maybe you're right, we could remove it since we don't support new client with old server.
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
|
@tiborvass updated |
|
So you set this key combo on the daemon and it's translated server side? |
|
yes, to an array of byte |
|
isn't this more of a client side option? if you have a few users connected to a docker daemon they would want to specify their own key combos??? |
|
@crosbymichael we could, but it's a much bigger change regarding the api. Do you have an idea ? |
|
ya, im not sure what to do for this one right now |
|
@shykes do you think it's useful to add this in the daemon or should we wait for a way to do it per client ? |
|
I think adding this to the client makes sense. There could be a client configuration file that prevents having to specify the flag every time. |
|
I'll wait to have a config file client side for this. |
Closes #3519
@jamtur01 @SvenDowideit: documentation is coming, I want to make sure everyone agrees on the feature first.
This PR allows you to change the set of keys you have to type to detach in TTY mode, it can be less or more that two.
The basic ASCII table is supported, for example you can do:
docker -d --detach-keys="ctrl-@"and detach in one keystroke ordocker -d --detach-keys="DEL,+"if you don't like to have actrlkey 😄