justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go
GNU General Public License v3.0
2.73k stars 268 forks source link

Add support for DOCKER_CONTEXT environment variable #351

Closed scottslowe closed 2 years ago

scottslowe commented 2 years ago

This PR adds support for the DOCKER_CONTEXT environment variable, which will override the context specified by the docker context use command when setting the Docker context. Accordingly, segment-docker_context.go is changed by this PR to use DOCKER_CONTEXT if specified, and use the context specified in the Docker configuration file if the environment variable is not set (the same order Docker itself uses to determine context).

Fixes #350.

justjanne commented 2 years ago

Is there a reason you removed the :whale: emoji?

scottslowe commented 2 years ago

@justjanne Sorry, that's an error on my part! I'll push another commit that restores the emoji. Apologies!

scottslowe commented 2 years ago

@justjanne I've committed your suggestion. Apologies again for the error with the emoji. Thanks for creating powerline-go, it's a huge help to me in my day-to-day workflows.