Skip to content

Commit bdd95c3

Browse files
committed
but: updates from 0.18.4
1 parent 95e11f1 commit bdd95c3

File tree

97 files changed

+718
-1170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+718
-1170
lines changed
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 aliasCmd = &cobra.Command{
9+
Use: "alias",
10+
Short: "Manage command aliases",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(aliasCmd).Standalone()
16+
17+
aliasCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
rootCmd.AddCommand(aliasCmd)
19+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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/carapace-sh/carapace-bridge/pkg/actions/bridge"
7+
"github.com/spf13/cobra"
8+
)
9+
10+
var alias_addCmd = &cobra.Command{
11+
Use: "add",
12+
Short: "Add a new alias",
13+
Run: func(cmd *cobra.Command, args []string) {},
14+
}
15+
16+
func init() {
17+
carapace.Gen(alias_addCmd).Standalone()
18+
19+
alias_addCmd.Flags().BoolP("global", "g", false, "Store the alias globally (in ~/.gitconfig) instead of locally")
20+
alias_addCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
21+
aliasCmd.AddCommand(alias_addCmd)
22+
23+
carapace.Gen(alias_addCmd).PositionalCompletion(
24+
but.ActionAliases(but.AliasOpts{}.Default()),
25+
bridge.ActionCarapaceBin("but").Split(),
26+
)
27+
}
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 alias_listCmd = &cobra.Command{
9+
Use: "list",
10+
Short: "List all configured aliases (default)",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(alias_listCmd).Standalone()
16+
17+
alias_listCmd.Flags().BoolP("help", "h", false, "Print help")
18+
aliasCmd.AddCommand(alias_listCmd)
19+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 alias_removeCmd = &cobra.Command{
10+
Use: "remove",
11+
Short: "Remove an existing alias",
12+
Aliases: []string{"rm"},
13+
Run: func(cmd *cobra.Command, args []string) {},
14+
}
15+
16+
func init() {
17+
carapace.Gen(alias_removeCmd).Standalone()
18+
19+
alias_removeCmd.Flags().BoolP("global", "g", false, "Remove from global config (in ~/.gitconfig) instead of local")
20+
alias_removeCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
21+
aliasCmd.AddCommand(alias_removeCmd)
22+
23+
carapace.Gen(alias_removeCmd).PositionalCompletion(
24+
but.ActionAliases(but.AliasOpts{User: true}),
25+
)
26+
}
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 amendCmd = &cobra.Command{
9+
Use: "amend",
10+
Short: "Amend a file change into a specific commit and rebases any dependent commits",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(amendCmd).Standalone()
16+
17+
amendCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
rootCmd.AddCommand(amendCmd)
19+
}

completers/common/but_completer/cmd/base.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

completers/common/but_completer/cmd/base_check.go

Lines changed: 0 additions & 19 deletions
This file was deleted.

completers/common/but_completer/cmd/base_help.go

Lines changed: 0 additions & 18 deletions
This file was deleted.

completers/common/but_completer/cmd/base_help_check.go

Lines changed: 0 additions & 18 deletions
This file was deleted.

completers/common/but_completer/cmd/base_help_help.go

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)