Skip to content

Commit

Permalink
Merge pull request #2273 from rsteube/marp-theme
Browse files Browse the repository at this point in the history
marp: added theme names
  • Loading branch information
rsteube authored Feb 26, 2024
2 parents 5b77259 + 3c06563 commit a845235
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions completers/marp_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,31 @@ func init() {
"config": carapace.ActionFiles(),
"config-file": carapace.ActionFiles(),
"engine": carapace.Batch(
carapace.ActionValues("@marp-team/marpit"), // TODO marpit engine module names
carapace.ActionValues("@marp-team/marpit"),
carapace.ActionFiles(),
).ToA(),
"image": carapace.ActionValues("png", "jpeg").StyleF(style.ForPathExt),
"image": carapace.ActionValues("png", "jpeg").StyleF(style.ForExtension),
"image-scale": carapace.ActionValuesDescribed(
"1", "default",
"2", "for PPTX conversion",
),
"images": carapace.ActionValues("png", "jpeg").StyleF(style.ForPathExt),
"images": carapace.ActionValues("png", "jpeg").StyleF(style.ForExtension),
"input-dir": carapace.ActionDirectories(),
"output": carapace.ActionFiles(),
"template": carapace.ActionValues("bare", "bespoke"),
"theme": carapace.Batch(
carapace.ActionValues("gaia"), // TODO theme names
carapace.ActionValues("default", "gaia", "uncover"),
carapace.ActionFiles(),
).ToA(),
"theme-set": carapace.ActionFiles(),
})

carapace.Gen(rootCmd).PositionalAnyCompletion(
carapace.ActionFiles(),
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
if rootCmd.Flag("input-dir").Changed {
return carapace.ActionValues()
}
return carapace.ActionFiles()
}),
)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/pelletier/go-toml v1.9.5
github.com/rsteube/carapace v0.50.1
github.com/rsteube/carapace v0.50.2
github.com/rsteube/carapace-bridge v0.2.15
github.com/rsteube/carapace-shlex v0.1.2
github.com/rsteube/carapace-spec v0.15.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rsteube/carapace v0.50.1 h1:UShTOwM08wSvFuniKtqZvmBQ3pSDuoS6QrCu2w7TLU4=
github.com/rsteube/carapace v0.50.1/go.mod h1:syVOvI8e2rEEK/9aMZxfWuHvcnQK/EcnTV4roClEnLE=
github.com/rsteube/carapace v0.50.2 h1:9nPOBmIKPySFQvtBRGghFafRCR09Cf9K4/BEo1M+VFE=
github.com/rsteube/carapace v0.50.2/go.mod h1:syVOvI8e2rEEK/9aMZxfWuHvcnQK/EcnTV4roClEnLE=
github.com/rsteube/carapace-bridge v0.2.15 h1:B90M1g28iXOfuER89P2zhwRKEafV7uxyF3BepvWoubA=
github.com/rsteube/carapace-bridge v0.2.15/go.mod h1:CrqtRDd1D8uT9woDXnEuer7tq8IfvR9MFAr3PuFKV7E=
github.com/rsteube/carapace-pflag v0.2.0 h1:EYqFO9Haib3NDCPqKu0VxOGi9YQBkXk1IzlHdT0M0vw=
Expand Down

0 comments on commit a845235

Please sign in to comment.