Skip to content

Commit 792a529

Browse files
authored
Merge pull request #3247 from carapace-sh/but-updates-0.19.1
but: updates from 0.19.1
2 parents 243e029 + ba9fd84 commit 792a529

File tree

18 files changed

+111
-11
lines changed

18 files changed

+111
-11
lines changed

completers/common/but_completer/cmd/alias_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ var alias_listCmd = &cobra.Command{
1414
func init() {
1515
carapace.Gen(alias_listCmd).Standalone()
1616

17-
alias_listCmd.Flags().BoolP("help", "h", false, "Print help")
17+
alias_listCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
1818
aliasCmd.AddCommand(alias_listCmd)
1919
}

completers/common/but_completer/cmd/branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
var branchCmd = &cobra.Command{
99
Use: "branch",
10-
Short: "Commands for managing branches",
10+
Short: "Commands for managing branches.",
1111
Run: func(cmd *cobra.Command, args []string) {},
1212
GroupID: "branching and committing",
1313
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var config_uiCmd = &cobra.Command{
9+
Use: "ui",
10+
Short: "View and configure UI preferences",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_uiCmd).Standalone()
16+
17+
config_uiCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
configCmd.AddCommand(config_uiCmd)
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/but"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var config_ui_setCmd = &cobra.Command{
10+
Use: "set",
11+
Short: "Set a UI configuration value",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(config_ui_setCmd).Standalone()
17+
18+
config_ui_setCmd.Flags().BoolP("global", "g", false, "Set the configuration globally instead of locally")
19+
config_ui_setCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20+
config_uiCmd.AddCommand(config_ui_setCmd)
21+
22+
carapace.Gen(config_ui_setCmd).PositionalCompletion(
23+
but.ActionUIConfigNames(),
24+
carapace.ActionCallback(func(c carapace.Context) carapace.Action {
25+
return but.ActionUIConfigValues(c.Args[0])
26+
}),
27+
)
28+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/but"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var config_ui_unsetCmd = &cobra.Command{
10+
Use: "unset",
11+
Short: "Unset (remove) a UI configuration value",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(config_ui_unsetCmd).Standalone()
17+
18+
config_ui_unsetCmd.Flags().BoolP("global", "g", false, "Unset the global configuration instead of local")
19+
config_ui_unsetCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20+
config_uiCmd.AddCommand(config_ui_unsetCmd)
21+
22+
carapace.Gen(config_ui_unsetCmd).PositionalCompletion(
23+
but.ActionUIConfigNames(),
24+
)
25+
}

completers/common/but_completer/cmd/diff.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ func init() {
1717
carapace.Gen(diffCmd).Standalone()
1818

1919
diffCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20+
diffCmd.Flags().Bool("no-tui", false, "Disable the interactive TUI diff viewer (overrides but.ui.tui config)")
21+
diffCmd.Flags().Bool("tui", false, "Open an interactive TUI diff viewer")
2022
rootCmd.AddCommand(diffCmd)
2123

2224
carapace.Gen(diffCmd).PositionalCompletion(

completers/common/but_completer/cmd/pr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
var prCmd = &cobra.Command{
99
Use: "pr",
1010
Short: "Commands for creating and managing pull requests on a forge",
11-
Aliases: []string{"review"},
11+
Aliases: []string{"review", "mr"},
1212
Run: func(cmd *cobra.Command, args []string) {},
1313
}
1414

completers/common/but_completer/cmd/pr_new.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func init() {
1717

1818
pr_newCmd.Flags().BoolP("default", "t", false, "Use the default content for the PR title and description, skipping any prompts. If the branch contains only a single commit, the commit message will be used")
1919
pr_newCmd.Flags().StringP("file", "F", "", "Read PR title and description from file. The first line is the title, the rest is the description")
20-
pr_newCmd.Flags().BoolP("help", "h", false, "Print help")
20+
pr_newCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
2121
pr_newCmd.Flags().StringP("message", "m", "", "PR title and description. The first line is the title, the rest is the description")
2222
pr_newCmd.Flags().BoolP("run-hooks", "r", false, "Run pre-push hooks (defaults to true)")
2323
pr_newCmd.Flags().BoolP("skip-force-push-protection", "s", false, "Skip force push protection checks")

completers/common/but_completer/cmd/pr_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var pr_templateCmd = &cobra.Command{
1515
func init() {
1616
carapace.Gen(pr_templateCmd).Standalone()
1717

18-
pr_templateCmd.Flags().BoolP("help", "h", false, "Print help")
18+
pr_templateCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
1919
prCmd.AddCommand(pr_templateCmd)
2020

2121
carapace.Gen(pr_templateCmd).PositionalCompletion(

completers/common/but_completer/cmd/push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
var pushCmd = &cobra.Command{
1010
Use: "push",
11-
Short: "Push changes in a branch to remote",
11+
Short: "Push changes in a branch to remote.",
1212
Run: func(cmd *cobra.Command, args []string) {},
1313
GroupID: "server interactions",
1414
}

0 commit comments

Comments
 (0)