Documentation
¶
Overview ¶
Package cmd provides the CLI commands for dotlink.
dotlink is a dotfile symlink manager. It scans a root directory for dotlink.yaml manifests and creates symbolic links as configured.
Environment Variables ¶
DOTLINK_ROOT Root directory to scan for dotlink.yaml files.
Defaults to $HOME/.custom
Examples ¶
dotlink sync dotlink list dotlink status dotlink config dotlink new ~/.dotfiles/nvim
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DryRun controls whether sync actually writes symlinks. DryRun bool )
Functions ¶
func DotlinkRoot ¶
func DotlinkRoot() string
DotlinkRoot returns the effective DOTLINK_ROOT directory.
func ExpandPath ¶
ExpandPath expands environment variables in a path
func GetConfigDir ¶
GetConfigDir returns the directory containing the config file
Types ¶
type DotlinkConfig ¶
type DotlinkConfig struct {
Link LinkConfig `yaml:"link"`
Files []FileLink `yaml:"files"`
}
DotlinkConfig represents the entire dotlink.yaml configuration
func LoadConfig ¶
func LoadConfig(filepath string) (*DotlinkConfig, error)
LoadConfig reads and parses a dotlink.yaml file
type LinkConfig ¶
type LinkConfig struct {
To string `yaml:"to"`
}
LinkConfig represents the link section of the config
type Linker ¶
type Linker struct {
// contains filtered or unexported fields
}
Linker handles the creation of symbolic links
func (*Linker) LinkDirectory ¶
LinkDirectory creates a symbolic link from the config directory to the target
func (*Linker) ProcessConfig ¶
ProcessConfig processes a dotlink configuration