Skip to content

Commit

Permalink
bluetoothctl: added styles (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube authored Mar 29, 2024
1 parent e35326c commit 7b50a8f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion completers/bluetoothctl_completer/cmd/advertise.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -15,6 +16,6 @@ func init() {
carapace.Gen(advertiseCmd).Standalone()
rootCmd.AddCommand(advertiseCmd)
carapace.Gen(advertiseCmd).PositionalCompletion(
carapace.ActionValues("on", "off", "broadcast", "peripheral"),
carapace.ActionValues("on", "off", "broadcast", "peripheral").StyleF(style.ForKeyword),
)
}
6 changes: 5 additions & 1 deletion completers/bluetoothctl_completer/cmd/discoverable.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -14,5 +15,8 @@ var discoverableCmd = &cobra.Command{
func init() {
carapace.Gen(discoverableCmd).Standalone()
rootCmd.AddCommand(discoverableCmd)
carapace.Gen(discoverableCmd).PositionalCompletion(carapace.ActionValues("on", "off"))

carapace.Gen(discoverableCmd).PositionalCompletion(
carapace.ActionValues("on", "off").StyleF(style.ForKeyword),
)
}
6 changes: 5 additions & 1 deletion completers/bluetoothctl_completer/cmd/pairable.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -14,5 +15,8 @@ var pairableCmd = &cobra.Command{
func init() {
carapace.Gen(pairableCmd).Standalone()
rootCmd.AddCommand(pairableCmd)
carapace.Gen(pairableCmd).PositionalCompletion(carapace.ActionValues("on", "off"))

carapace.Gen(pairableCmd).PositionalCompletion(
carapace.ActionValues("on", "off").StyleF(style.ForKeyword),
)
}
6 changes: 5 additions & 1 deletion completers/bluetoothctl_completer/cmd/power.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -14,5 +15,8 @@ var powerCmd = &cobra.Command{
func init() {
carapace.Gen(powerCmd).Standalone()
rootCmd.AddCommand(powerCmd)
carapace.Gen(powerCmd).PositionalCompletion(carapace.ActionValues("on", "off"))

carapace.Gen(powerCmd).PositionalCompletion(
carapace.ActionValues("on", "off").StyleF(style.ForKeyword),
)
}
6 changes: 5 additions & 1 deletion completers/bluetoothctl_completer/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace/pkg/style"
"github.com/spf13/cobra"
)

Expand All @@ -14,5 +15,8 @@ var scanCmd = &cobra.Command{
func init() {
carapace.Gen(scanCmd).Standalone()
rootCmd.AddCommand(scanCmd)
carapace.Gen(scanCmd).PositionalCompletion(carapace.ActionValues("on", "off", "bredr", "le"))

carapace.Gen(scanCmd).PositionalCompletion(
carapace.ActionValues("on", "off", "bredr", "le").StyleF(style.ForKeyword),
)
}

0 comments on commit 7b50a8f

Please sign in to comment.