Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
fix: better antibody list
Browse files Browse the repository at this point in the history
fixes #130
  • Loading branch information
caarlos0 committed Jun 26, 2018
1 parent 9dc8a1d commit 7a79a41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Expand Up @@ -10,11 +10,13 @@ import (
"runtime"
"strconv"
"strings"
"text/tabwriter"

"github.com/alecthomas/kingpin"
"github.com/getantibody/antibody/antibodylib"
"github.com/getantibody/antibody/project"
"github.com/getantibody/antibody/shell"
"github.com/getantibody/folder"
"golang.org/x/crypto/ssh/terminal"
)

Expand Down Expand Up @@ -95,7 +97,9 @@ func list() {
home := antibodylib.Home()
projects, err := project.List(home)
app.FatalIfError(err, "failed to list bundles")
w := tabwriter.NewWriter(os.Stdout, 0, 1, 4, ' ', tabwriter.TabIndent)
for _, b := range projects {
fmt.Println(filepath.Join(home, b))
fmt.Fprintf(w, "%s\t%s\n", folder.ToURL(b), filepath.Join(home, b))
}
w.Flush()
}

0 comments on commit 7a79a41

Please sign in to comment.