help

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ManageExamples demonstrates the manage command.
	ManageExamples = []Example{
		{
			Description: "Install a single package",
			Command:     "dot manage vim",
		},
		{
			Description: "Install multiple packages",
			Command:     "dot manage vim tmux zsh",
		},
		{
			Description: "Preview installation without applying changes",
			Command:     "dot manage --dry-run vim",
		},
		{
			Description: "Install with absolute symlinks",
			Command:     "dot manage --absolute vim",
		},
		{
			Description: "Install from specific package directory",
			Command:     "dot manage --dir /path/to/packages vim",
		},
	}

	// UnmanageExamples demonstrates the unmanage command.
	UnmanageExamples = []Example{
		{
			Description: "Uninstall a single package",
			Command:     "dot unmanage vim",
		},
		{
			Description: "Uninstall multiple packages",
			Command:     "dot unmanage vim tmux",
		},
		{
			Description: "Preview uninstallation without applying",
			Command:     "dot unmanage --dry-run vim",
		},
	}

	// RemanageExamples demonstrates the remanage command.
	RemanageExamples = []Example{
		{
			Description: "Reinstall a package after configuration changes",
			Command:     "dot remanage vim",
		},
		{
			Description: "Reinstall with absolute symlinks",
			Command:     "dot remanage --absolute vim",
		},
		{
			Description: "Reinstall all managed packages",
			Command:     "dot remanage --all",
		},
	}

	// AdoptExamples demonstrates the adopt command.
	AdoptExamples = []Example{
		{
			Description: "Adopt existing dotfile into package",
			Command:     "dot adopt vim ~/.vimrc",
		},
		{
			Description: "Adopt with custom filename in package",
			Command:     "dot adopt vim ~/.vimrc --as vimrc.backup",
		},
	}

	// StatusExamples demonstrates the status command.
	StatusExamples = []Example{
		{
			Description: "Show status of all packages",
			Command:     "dot status",
		},
		{
			Description: "Show status of specific packages",
			Command:     "dot status vim tmux",
		},
		{
			Description: "Show status in JSON format",
			Command:     "dot status --format json",
		},
		{
			Description: "Show detailed status",
			Command:     "dot status --verbose",
		},
	}

	// DoctorExamples demonstrates the doctor command.
	DoctorExamples = []Example{
		{
			Description: "Check system health",
			Command:     "dot doctor",
		},
		{
			Description: "Check specific packages",
			Command:     "dot doctor vim tmux",
		},
		{
			Description: "Output diagnosis in JSON format",
			Command:     "dot doctor --format json",
		},
	}

	// ListExamples demonstrates the list command.
	ListExamples = []Example{
		{
			Description: "List all available packages",
			Command:     "dot list",
		},
		{
			Description: "List with detailed information",
			Command:     "dot list --verbose",
		},
		{
			Description: "List in JSON format",
			Command:     "dot list --format json",
		},
		{
			Description: "Sort packages by name",
			Command:     "dot list --sort name",
		},
	}
)

Command examples organized by command name.

Functions

func FormatExamples

func FormatExamples(examples []Example) string

FormatExamples formats examples for display.

Types

type CompletionGenerator

type CompletionGenerator struct {
	// contains filtered or unexported fields
}

CompletionGenerator creates shell completion scripts.

func NewCompletionGenerator

func NewCompletionGenerator(rootCmd *cobra.Command) *CompletionGenerator

NewCompletionGenerator creates a new completion generator.

func (*CompletionGenerator) GenerateBash

func (g *CompletionGenerator) GenerateBash() (string, error)

GenerateBash creates bash completion.

func (*CompletionGenerator) GenerateFish

func (g *CompletionGenerator) GenerateFish() (string, error)

GenerateFish creates fish completion.

func (*CompletionGenerator) GeneratePowerShell

func (g *CompletionGenerator) GeneratePowerShell() (string, error)

GeneratePowerShell creates PowerShell completion.

func (*CompletionGenerator) GenerateZsh

func (g *CompletionGenerator) GenerateZsh() (string, error)

GenerateZsh creates zsh completion.

type Example

type Example struct {
	Description string
	Command     string
	Output      string // Optional expected output
}

Example represents a command usage example.

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator creates help text for commands.

func NewGenerator

func NewGenerator() *Generator

NewGenerator creates a new help generator.

func (*Generator) Generate

func (g *Generator) Generate(cmd *cobra.Command) string

Generate creates complete help text.

func (*Generator) GenerateExamples

func (g *Generator) GenerateExamples(cmd *cobra.Command) string

GenerateExamples creates examples section.

func (*Generator) GenerateSeeAlso

func (g *Generator) GenerateSeeAlso(cmd *cobra.Command) string

GenerateSeeAlso creates see also section.

func (*Generator) GenerateUsage

func (g *Generator) GenerateUsage(cmd *cobra.Command) string

GenerateUsage creates usage string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL