mirror of https://github.com/docker/docs.git
Merge pull request #560 from databus23/fish_env_export
support for fish shell in env command
This commit is contained in:
commit
70552f73bd
10
commands.go
10
commands.go
|
@ -398,8 +398,14 @@ func cmdEnv(c *cli.Context) {
|
|||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Printf("export DOCKER_TLS_VERIFY=yes\nexport DOCKER_CERT_PATH=%s\nexport DOCKER_HOST=%s\n",
|
||||
utils.GetMachineClientCertDir(), cfg.machineUrl)
|
||||
switch filepath.Base(os.Getenv("SHELL")) {
|
||||
case "fish":
|
||||
fmt.Printf("set -x DOCKER_TLS_VERIFY yes\nset -x DOCKER_CERT_PATH %s\nset -x DOCKER_HOST %s\n",
|
||||
utils.GetMachineClientCertDir(), cfg.machineUrl)
|
||||
default:
|
||||
fmt.Printf("export DOCKER_TLS_VERIFY=yes\nexport DOCKER_CERT_PATH=%s\nexport DOCKER_HOST=%s\n",
|
||||
utils.GetMachineClientCertDir(), cfg.machineUrl)
|
||||
}
|
||||
}
|
||||
|
||||
func cmdSsh(c *cli.Context) {
|
||||
|
|
Loading…
Reference in New Issue