Skip to content

Commit 26a3e07

Browse files
committed
added worktrunk
1 parent 5679c8c commit 26a3e07

Some content is hidden

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

70 files changed

+1760
-1
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 configCmd = &cobra.Command{
9+
Use: "config",
10+
Short: "Manage user & project configs",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(configCmd).Standalone()
16+
17+
configCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
rootCmd.AddCommand(configCmd)
19+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var config_createCmd = &cobra.Command{
9+
Use: "create",
10+
Short: "Create configuration file",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_createCmd).Standalone()
16+
17+
config_createCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
config_createCmd.Flags().Bool("project", false, "Create project config (.config/wt.toml) instead of user config")
19+
configCmd.AddCommand(config_createCmd)
20+
}
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_shellCmd = &cobra.Command{
9+
Use: "shell",
10+
Short: "Shell integration setup",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_shellCmd).Standalone()
16+
17+
config_shellCmd.Flags().BoolP("help", "h", false, "Print help")
18+
configCmd.AddCommand(config_shellCmd)
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/spf13/cobra"
6+
)
7+
8+
var config_shell_initCmd = &cobra.Command{
9+
Use: "init",
10+
Short: "Generate shell integration code",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_shell_initCmd).Standalone()
16+
17+
config_shell_initCmd.Flags().String("cmd", "", "Command name for shell integration (defaults to binary name)")
18+
config_shell_initCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
19+
config_shellCmd.AddCommand(config_shell_initCmd)
20+
21+
carapace.Gen(config_shell_initCmd).FlagCompletion(carapace.ActionMap{
22+
"cmd": carapace.ActionExecutables(), // TODO what is expected here?
23+
})
24+
25+
carapace.Gen(config_shell_initCmd).PositionalCompletion(
26+
carapace.ActionValues("bash", "fish", "nu", "zsh", "powershell"),
27+
)
28+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var config_shell_installCmd = &cobra.Command{
9+
Use: "install",
10+
Short: "Write shell integration to config files",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_shell_installCmd).Standalone()
16+
17+
config_shell_installCmd.Flags().String("cmd", "", "Command name for shell integration (defaults to binary name)")
18+
config_shell_installCmd.Flags().Bool("dry-run", false, "Show what would be changed")
19+
config_shell_installCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20+
config_shell_installCmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompt")
21+
config_shellCmd.AddCommand(config_shell_installCmd)
22+
}
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_shell_showThemeCmd = &cobra.Command{
9+
Use: "show-theme",
10+
Short: "Show output theme samples",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_shell_showThemeCmd).Standalone()
16+
17+
config_shell_showThemeCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
config_shellCmd.AddCommand(config_shell_showThemeCmd)
19+
}
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/spf13/cobra"
6+
)
7+
8+
var config_shell_uninstallCmd = &cobra.Command{
9+
Use: "uninstall",
10+
Short: "Remove shell integration from config files",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_shell_uninstallCmd).Standalone()
16+
17+
config_shell_uninstallCmd.Flags().Bool("dry-run", false, "Show what would be changed")
18+
config_shell_uninstallCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
19+
config_shell_uninstallCmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompt")
20+
config_shellCmd.AddCommand(config_shell_uninstallCmd)
21+
22+
carapace.Gen(config_shell_uninstallCmd).PositionalCompletion(
23+
carapace.ActionValues("bash", "fish", "nu", "zsh", "powershell"),
24+
)
25+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var config_showCmd = &cobra.Command{
9+
Use: "show",
10+
Short: "Show configuration files & locations",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_showCmd).Standalone()
16+
17+
config_showCmd.Flags().Bool("full", false, "Run diagnostic checks (CI tools, commit generation, version)")
18+
config_showCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
19+
configCmd.AddCommand(config_showCmd)
20+
}
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_stateCmd = &cobra.Command{
9+
Use: "state",
10+
Short: "Manage internal data and cache",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_stateCmd).Standalone()
16+
17+
config_stateCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
configCmd.AddCommand(config_stateCmd)
19+
}
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_state_ciStatusCmd = &cobra.Command{
9+
Use: "ci-status",
10+
Short: "CI status cache",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(config_state_ciStatusCmd).Standalone()
16+
17+
config_state_ciStatusCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
18+
config_stateCmd.AddCommand(config_state_ciStatusCmd)
19+
}

0 commit comments

Comments
 (0)