Documentation
¶
Index ¶
- func BoolPtr(v bool) *bool
- func GlobalConfigPath() string
- func IsWillowRepo(bareDir string) bool
- func ListRepos() ([]string, error)
- func LocalConfigPath(bareDir string) string
- func ReposDir() string
- func ResolveRepo(name string) (string, error)
- func ResolveRepoFromDir(dir string) (string, bool)
- func Save(cfg *Config, path string) error
- func TrashDir() string
- func WillowHome() string
- func WorktreesDir() string
- type Config
- type Defaults
- type TmuxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalConfigPath ¶
func GlobalConfigPath() string
func IsWillowRepo ¶ added in v0.1.2
IsWillowRepo checks if bareDir lives under ~/.willow/repos/. Both paths are resolved through EvalSymlinks to handle macOS /var → /private/var.
func ListRepos ¶ added in v0.1.2
ListRepos scans ~/.willow/repos/ for *.git dirs and returns repo names (without .git suffix).
func LocalConfigPath ¶
func ResolveRepo ¶ added in v0.1.2
ResolveRepo returns the bare dir path for a named repo under ~/.willow/repos/.
func ResolveRepoFromDir ¶ added in v0.2.0
ResolveRepoFromDir checks if dir is at or under ~/.willow/worktrees/<name>/ and returns the corresponding bare repo path (~/.willow/repos/<name>.git). This allows commands to work from the worktrees/<name>/ directory itself, not just from inside a specific worktree.
func WorktreesDir ¶
func WorktreesDir() string
Types ¶
type Config ¶
type Config struct {
BaseBranch string `json:"baseBranch,omitempty"`
BranchPrefix string `json:"branchPrefix,omitempty"`
PostCheckoutHook string `json:"postCheckoutHook,omitempty"`
Setup []string `json:"setup,omitempty"`
Teardown []string `json:"teardown,omitempty"`
Defaults Defaults `json:"defaults"`
Tmux TmuxConfig `json:"tmux,omitempty"`
Telemetry *bool `json:"telemetry,omitempty"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
type TmuxConfig ¶ added in v0.5.0
type TmuxConfig struct {
ReloadInterval int `json:"reloadInterval,omitempty"`
Notification *bool `json:"notification,omitempty"`
NotifyCommand string `json:"notifyCommand,omitempty"`
NotifyWaitCommand string `json:"notifyWaitCommand,omitempty"`
SwitcherPreview *bool `json:"switcherPreview,omitempty"`
Layout []string `json:"layout,omitempty"`
PostWorktreeCreate []string `json:"postWorktreeCreate,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.