Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PickerAction ¶
type PickerAction int
PickerAction represents what action the user wants to take
const ( ActionNone PickerAction = iota ActionSwitch ActionAdd ActionBack // Return from add mode to worktree list ActionDelete // Delete the selected worktree )
func InputBranch ¶
func InputBranch(placeholder, sourceRepo, sourceBranch string) (string, PickerAction, error)
InputBranch prompts for a branch name sourceRepo and sourceBranch are displayed to show where the worktree will be created from Returns the branch name and action (ActionBack if user wants to go back)
type PickerResult ¶
type PickerResult struct {
Action PickerAction
Worktree *db.Worktree
}
PickerResult contains the result of the picker
func PickWorktree ¶
func PickWorktree(worktrees []*db.Worktree) (*PickerResult, error)
PickWorktree shows an interactive picker for worktrees Returns the selected worktree and the action (switch or add)
Click to show internal directories.
Click to hide internal directories.