Describe the bug
The Docker context segment does not appear to recognize the DOCKER_CONTEXT environment variable, which is another way to specify the context that the Docker CLI should use.
To Reproduce
Steps to reproduce the behavior:
Create a new Docker context (I used an SSH-based context to a Linux system with the Docker daemon installed).
Run docker context use <new-context>. You should see a new segment show up in the prompt.
Run docker context use default. The new segment will disappear.
Run export DOCKER_CONTEXT=<new-context>. Note that no new segment appears in the prompt, even though the Docker CLI is correctly using the context (and docker context ls will show the specified context as the active one).
Expected behavior
I expected the Docker context segment to appear in the prompt when the DOCKER_CONTEXT environment variable is defined. This behavior is similar to the behavior of the segment that displays the name of the AWS CLI profile when the AWS_PROFILE environment variable is defined.
Environment (please complete the following information):
Describe the bug The Docker context segment does not appear to recognize the DOCKER_CONTEXT environment variable, which is another way to specify the context that the Docker CLI should use.
To Reproduce Steps to reproduce the behavior:
docker context use <new-context>
. You should see a new segment show up in the prompt.docker context use default
. The new segment will disappear.export DOCKER_CONTEXT=<new-context>
. Note that no new segment appears in the prompt, even though the Docker CLI is correctly using the context (anddocker context ls
will show the specified context as the active one).Expected behavior I expected the Docker context segment to appear in the prompt when the DOCKER_CONTEXT environment variable is defined. This behavior is similar to the behavior of the segment that displays the name of the AWS CLI profile when the AWS_PROFILE environment variable is defined.
Environment (please complete the following information):
Additional context None