From 7b87eaa2c90245205dbca3dc2fce12fd7413f5ca Mon Sep 17 00:00:00 2001 From: kevinbin Date: Sun, 21 Sep 2014 19:42:31 +0800 Subject: [PATCH 1/3] printExport support fish-shell --- cmds.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmds.go b/cmds.go index d0a4675..7e0f569 100644 --- a/cmds.go +++ b/cmds.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "os/exec" + "path/filepath" "runtime" "strings" "time" @@ -181,7 +182,11 @@ func cmdShellInit() error { } func printExport(socket, certPath string) { - fmt.Printf(" export DOCKER_HOST=%s\n", socket) + if filepath.Base(os.Getenv("SHELL")) == "fish" { + fmt.Printf(" set -x DOCKER_HOST %s\n", socket) + } else { + fmt.Printf(" export DOCKER_HOST=%s\n", socket) + } if certPath == "" { if os.Getenv("DOCKER_CERT_PATH") != "" { fmt.Println(" unset DOCKER_CERT_PATH") From 8aac41d7d2bfc8f81b61966c56852417d12ac291 Mon Sep 17 00:00:00 2001 From: kevinbin Date: Sat, 27 Sep 2014 20:37:34 +0800 Subject: [PATCH 2/3] fish-shell support DOCKER_CERT_PATH variable --- cmds.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmds.go b/cmds.go index 7e0f569..f2ef066 100644 --- a/cmds.go +++ b/cmds.go @@ -189,11 +189,19 @@ func printExport(socket, certPath string) { } if certPath == "" { if os.Getenv("DOCKER_CERT_PATH") != "" { - fmt.Println(" unset DOCKER_CERT_PATH") + if filepath.Base(os.Getenv("SHELL")) == "fish" { + fmt.Println(" set -e DOCKER_CERT_PATH") + } else { + fmt.Println(" unset DOCKER_CERT_PATH") + } } } else { // Assume Docker 1.2.0 with TLS on... - fmt.Printf(" export DOCKER_CERT_PATH=%s\n", certPath) + if filepath.Base(os.Getenv("SHELL")) == "fish" { + fmt.Printf(" set -x DOCKER_CERT_PATH %s\n", certPath) + } else { + fmt.Printf(" export DOCKER_CERT_PATH=%s\n", certPath) + } } } From ca412e0e79b47fc31fb383afcc190d8dd7687287 Mon Sep 17 00:00:00 2001 From: kevinbin Date: Sat, 27 Sep 2014 21:00:10 +0800 Subject: [PATCH 3/3] add travis ci status --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index dc15748..5882220 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # boot2docker command line management tool +[![Build Status](https://travis-ci.org/kevinbin/boot2docker-cli.svg?branch=master)](https://travis-ci.org/kevinbin/boot2docker-cli) This tool downloads the boot2docker ISO image, creates a VirtualBox virtual machine, sets up two networks for that virtual machine (one NAT to allow the VM