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
|
@ -398,9 +398,15 @@ func cmdEnv(c *cli.Context) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
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",
|
fmt.Printf("export DOCKER_TLS_VERIFY=yes\nexport DOCKER_CERT_PATH=%s\nexport DOCKER_HOST=%s\n",
|
||||||
utils.GetMachineClientCertDir(), cfg.machineUrl)
|
utils.GetMachineClientCertDir(), cfg.machineUrl)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func cmdSsh(c *cli.Context) {
|
func cmdSsh(c *cli.Context) {
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue