File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010
1111 "github.com/cheggaaa/pb/v3/termutil"
1212 "github.com/lima-vm/lima/pkg/store"
13+ "github.com/lithammer/dedent"
1314 "github.com/mattn/go-isatty"
1415 "github.com/sirupsen/logrus"
1516 "github.com/spf13/cobra"
@@ -37,18 +38,17 @@ func newListCommand() *cobra.Command {
3738 Use : "list [flags] [INSTANCE]..." ,
3839 Aliases : []string {"ls" },
3940 Short : "List instances of Lima." ,
40- Long : ` List instances of Lima.
41+ Long : " List instances of Lima.\n " + dedent . Dedent ( `
4142 The output can be presented in one of several formats, using the --format <format> flag.
4243
4344 --format json - output in json format
4445 --format yaml - output in yaml format
4546 --format table - output in table format
4647 --format '{{ <go template> }}' - if the format begins and ends with '{{ }}', then it is used as a go template.
47- ` + store .FormatHelp +
48- `
48+ ` ) + store .FormatHelp + dedent .Dedent (`
4949 The following legacy flags continue to function:
5050 --json - equal to '--format json'
51- ` ,
51+ ` ) ,
5252 Args : cobra .ArbitraryArgs ,
5353 RunE : listAction ,
5454 ValidArgsFunction : listBashComplete ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ require (
2222 github.com/gorilla/mux v1.8.0
2323 github.com/hashicorp/go-multierror v1.1.1
2424 github.com/lima-vm/sshocker v0.3.1
25+ github.com/lithammer/dedent v1.1.0
2526 github.com/mattn/go-isatty v0.0.17
2627 github.com/mattn/go-shellwords v1.0.12
2728 github.com/miekg/dns v1.1.50
Original file line number Diff line number Diff line change @@ -380,6 +380,8 @@ github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgx
380380github.com/lima-vm/sshocker v0.3.1 h1:MxqWJVsNZ2AKw/mWJ3n2DBNxFABZpaR79olLIjAQK8o =
381381github.com/lima-vm/sshocker v0.3.1 /go.mod h1:Pv7KiykFCequiWTPMytCbAC92ZT2TSFPgmMqGgh3vm0 =
382382github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2 /go.mod h1:SWzULI85WerrFt3u+nIm5F9l7EvxZTKQvd0InF3nmgM =
383+ github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY =
384+ github.com/lithammer/dedent v1.1.0 /go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc =
383385github.com/magiconair/properties v1.8.0 /go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ =
384386github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a /go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc =
385387github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a /go.mod h1:M1qoD/MqPgTZIk0EWKB38wE28ACRfVcn+cU08jyArI0 =
Original file line number Diff line number Diff line change @@ -213,10 +213,10 @@ type FormatData struct {
213213 IdentityFile string
214214}
215215
216- var FormatHelp = "\n " + textutil . PrefixString ( " \t \t " ,
217- "These functions are available to go templates:\n \n " +
218- textutil .IndentString (2 ,
219- strings .Join (textutil .FuncHelp , "\n " )+ "\n " ) )
216+ var FormatHelp = "\n " +
217+ "These functions are available to go templates:\n \n " +
218+ textutil .IndentString (2 ,
219+ strings .Join (textutil .FuncHelp , "\n " )+ "\n " )
220220
221221func AddGlobalFields (inst * Instance ) (FormatData , error ) {
222222 var data FormatData
You can’t perform that action at this time.
0 commit comments