Skip to content

Commit

Permalink
glow: updated styles (#2430)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube authored Jul 19, 2024
1 parent f67a59c commit 7238174
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion completers/glow_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/git"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/glow"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -34,7 +35,7 @@ func init() {
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"config": carapace.ActionFiles(".yml", ".yaml"),
"style": carapace.Batch(
carapace.ActionValues("dark", "light", "auto"),
glow.ActionStyles(),
carapace.ActionFiles(".json"),
).ToA(),
})
Expand Down
16 changes: 16 additions & 0 deletions pkg/actions/tools/glow/style.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package glow

import "github.com/carapace-sh/carapace"

// ActionStyles completes styles
func ActionStyles() carapace.Action {
return carapace.ActionValues(
"ascii",
"auto",
"dark",
"dracula",
"light",
"notty",
"pink",
).Tag("styles")
}

0 comments on commit 7238174

Please sign in to comment.