Skip to content
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
184 changes: 0 additions & 184 deletions AGENTS.md

This file was deleted.

46 changes: 0 additions & 46 deletions PROMPT.md

This file was deleted.

2 changes: 2 additions & 0 deletions internal/gitwt/gitwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ func NewRootCommand() *cobra.Command {
SilenceErrors: true,
SilenceUsage: true,
}
rootCommand.CompletionOptions.HiddenDefaultCmd = true

rootCommand.AddCommand(NewCreateCommand())
rootCommand.AddCommand(NewListCommand())
rootCommand.AddCommand(NewMigrateCommand())
rootCommand.AddCommand(NewPruneCommand())
rootCommand.AddCommand(NewRemoveCommand())
rootCommand.AddCommand(NewShellCommand())

return rootCommand
}
27 changes: 27 additions & 0 deletions internal/gitwt/gitwt_shell.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package gitwt

import (
"github.com/spf13/cobra"
)

type shellCommandOptions struct{}

func NewShellCommand() *cobra.Command {
options := &shellCommandOptions{}

command := &cobra.Command{
Use: `shell`,
Short: `Generate shell integration for worktrees`,
Args: cobra.NoArgs,
RunE: options.Execute,
}
command.CompletionOptions.HiddenDefaultCmd = true

command.AddCommand(NewZshCommand())

return command
}

func (x *shellCommandOptions) Execute(command *cobra.Command, args []string) error {
return command.Help()
}
Loading