Skip to content

Commit 8d78c95

Browse files
committed
Generate fish compatible docker-env hint
`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]>
1 parent 80c4f81 commit 8d78c95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/minikube/cmd/docker-env_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ set -gx DOCKER_CERT_PATH "/certs"
9595
set -gx MINIKUBE_ACTIVE_DOCKERD "fish"
9696
9797
# To point your shell to minikube's docker-daemon, run:
98-
# eval (minikube -p fish docker-env)
98+
# minikube -p fish docker-env | source
9999
`,
100100
`set -e DOCKER_TLS_VERIFY
101101
set -e DOCKER_HOST

pkg/minikube/shell/shell.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func generateUsageHint(sh, usgPlz, usgCmd string) string {
9797
`, usgPlz, usgCmd),
9898
"fish": fmt.Sprintf(`
9999
# %s
100-
# eval (%s)
100+
# %s | source
101101
`, usgPlz, usgCmd),
102102
"powershell": fmt.Sprintf(`# %s
103103
# & %s | Invoke-Expression

0 commit comments

Comments
 (0)