display version
This commit is contained in:
parent
90297e1b42
commit
6a27ba4895
1 changed files with 5 additions and 3 deletions
|
|
@ -13,10 +13,12 @@ import (
|
||||||
|
|
||||||
"oss.terrastruct.com/d2/d2plugin"
|
"oss.terrastruct.com/d2/d2plugin"
|
||||||
"oss.terrastruct.com/d2/d2themes/d2themescatalog"
|
"oss.terrastruct.com/d2/d2themes/d2themescatalog"
|
||||||
|
"oss.terrastruct.com/d2/lib/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func help(ms *xmain.State) {
|
func help(ms *xmain.State) {
|
||||||
fmt.Fprintf(ms.Stdout, `Usage:
|
fmt.Fprintf(ms.Stdout, `%[1]s %[2]s
|
||||||
|
Usage:
|
||||||
%[1]s [--watch=false] [--theme=0] file.d2 [file.svg | file.png]
|
%[1]s [--watch=false] [--theme=0] file.d2 [file.svg | file.png]
|
||||||
%[1]s layout [name]
|
%[1]s layout [name]
|
||||||
%[1]s fmt file.d2 ...
|
%[1]s fmt file.d2 ...
|
||||||
|
|
@ -29,7 +31,7 @@ Use - to have d2 read from stdin or write to stdout.
|
||||||
See man d2 for more detailed docs.
|
See man d2 for more detailed docs.
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
%s
|
%[3]s
|
||||||
|
|
||||||
Subcommands:
|
Subcommands:
|
||||||
%[1]s layout - Lists available layout engine options with short help
|
%[1]s layout - Lists available layout engine options with short help
|
||||||
|
|
@ -40,7 +42,7 @@ Subcommands:
|
||||||
See more docs and the source code at https://oss.terrastruct.com/d2.
|
See more docs and the source code at https://oss.terrastruct.com/d2.
|
||||||
Hosted icons at https://icons.terrastruct.com.
|
Hosted icons at https://icons.terrastruct.com.
|
||||||
Playground runner at https://play.d2lang.com.
|
Playground runner at https://play.d2lang.com.
|
||||||
`, filepath.Base(ms.Name), ms.Opts.Defaults())
|
`, filepath.Base(ms.Name), version.Version, ms.Opts.Defaults())
|
||||||
}
|
}
|
||||||
|
|
||||||
func layoutCmd(ctx context.Context, ms *xmain.State, ps []d2plugin.Plugin) error {
|
func layoutCmd(ctx context.Context, ms *xmain.State, ps []d2plugin.Plugin) error {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue