Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glow: updated styles #2430

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
}