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 (
10
10
11
11
"github.com/cheggaaa/pb/v3/termutil"
12
12
"github.com/lima-vm/lima/pkg/store"
13
+ "github.com/lithammer/dedent"
13
14
"github.com/mattn/go-isatty"
14
15
"github.com/sirupsen/logrus"
15
16
"github.com/spf13/cobra"
@@ -37,18 +38,17 @@ func newListCommand() *cobra.Command {
37
38
Use : "list [flags] [INSTANCE]..." ,
38
39
Aliases : []string {"ls" },
39
40
Short : "List instances of Lima." ,
40
- Long : ` List instances of Lima.
41
+ Long : " List instances of Lima.\n " + dedent . Dedent ( `
41
42
The output can be presented in one of several formats, using the --format <format> flag.
42
43
43
44
--format json - output in json format
44
45
--format yaml - output in yaml format
45
46
--format table - output in table format
46
47
--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 (`
49
49
The following legacy flags continue to function:
50
50
--json - equal to '--format json'
51
- ` ,
51
+ ` ) ,
52
52
Args : cobra .ArbitraryArgs ,
53
53
RunE : listAction ,
54
54
ValidArgsFunction : listBashComplete ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ require (
22
22
github.com/gorilla/mux v1.8.0
23
23
github.com/hashicorp/go-multierror v1.1.1
24
24
github.com/lima-vm/sshocker v0.3.1
25
+ github.com/lithammer/dedent v1.1.0
25
26
github.com/mattn/go-isatty v0.0.17
26
27
github.com/mattn/go-shellwords v1.0.12
27
28
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
380
380
github.com/lima-vm/sshocker v0.3.1 h1:MxqWJVsNZ2AKw/mWJ3n2DBNxFABZpaR79olLIjAQK8o =
381
381
github.com/lima-vm/sshocker v0.3.1 /go.mod h1:Pv7KiykFCequiWTPMytCbAC92ZT2TSFPgmMqGgh3vm0 =
382
382
github.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 =
383
385
github.com/magiconair/properties v1.8.0 /go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ =
384
386
github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a /go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc =
385
387
github.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 {
213
213
IdentityFile string
214
214
}
215
215
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 " )
220
220
221
221
func AddGlobalFields (inst * Instance ) (FormatData , error ) {
222
222
var data FormatData
You can’t perform that action at this time.
0 commit comments