-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Generate fish compatible docker-env hint #6744
Conversation
`fish`'s eval handling does not properly process multiple lines. Instead the recommendation is to pipe the output to `source`. This PR updates the usage hint of the `docker-env` command when running on `fish`: ``` eval (minikube -p fish docker-env) => (minikube -p fish docker-env) | source ``` Ref: fish-shell/fish-shell#3993 Signed-off-by: Kevin Pullin <[email protected]>
Welcome @kppullin! |
Hi @kppullin. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kppullin The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@kppullin thank you for this PR, have you tested this yourself ? |
Can one of the admins verify this patch? |
Codecov Report
@@ Coverage Diff @@
## master #6744 +/- ##
=======================================
Coverage 38.48% 38.48%
=======================================
Files 142 142
Lines 8684 8684
=======================================
Hits 3342 3342
Misses 4923 4923
Partials 419 419 |
Related to 5d59e83 and #6595 ? Probably needed upstream (libmachine) as well, if https://github.com/docker/machine/blob/v0.16.1/commands/env.go#L132_L135 @medyagh : Should be enough to spawn a new fish shell it now looks totally broken though. |
Note that minikube cleverly adds the comment at the end of the env output. So it doesn't have the same issue, but still broken after semicolon was removed |
@afbjorklund I think you're correct that the semicolon removal in 5d59e83 is the "breaking" change. With the semicolons
Without the semicolons it just ends up being one long value:
Reading a bit more documentation, and I'm by far not an expert here, it appears that
Whereas
So, considering the options, is it better to:
|
@medyagh yes sorry for not including that yet. Here's the output:
|
@kppullin I installed fish on mac and for me both of them works minikube -p minikube docker-env | source however !!! I realized in my fish on mac we fail to detect that it is fish and we show the hint for bash
|
@kppullin do you mind sharing the output of docker-env from your fish ? |
@kppullin : I was mostly basing that on that nobody else complained over the (five) years. But then again nobody is using fish, and not much has happened in machine since then... @medyagh : please double-check that SHELL is pointing to Unless changing your login shell ( |
fish
's eval handling does not handle multiple lines (fish-shell/fish-shell#3993).Instead the recommendation is to pipe the output to
source
.This PR updates the usage hint of the
docker-env
commandwhen running on
fish
:eval (minikube -p fish docker-env)
=>minikube -p fish docker-env | source
fixes #6155
Signed-off-by: Kevin Pullin [email protected]