diff --git a/commands.go b/commands.go index 92c0875134..72152f3d0e 100644 --- a/commands.go +++ b/commands.go @@ -325,8 +325,21 @@ func cmdCreate(c *cli.Context) { log.Fatalf("error setting active host: %v", err) } + info := "" + userShell := filepath.Base(os.Getenv("SHELL")) + + switch userShell { + case "fish": + info = fmt.Sprintf("%s env %s | source", c.App.Name, name) + default: + info = fmt.Sprintf("$(%s env %s)", c.App.Name, name) + } + log.Infof("%q has been created and is now the active machine.", name) - log.Infof("To point your Docker client at it, run this in your shell: $(%s env %s)", c.App.Name, name) + + if info != "" { + log.Infof("To point your Docker client at it, run this in your shell: %s", info) + } } func cmdConfig(c *cli.Context) {