completions

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package completions implements `focus completions <shell>` and the hidden `focus _complete <kind>` candidate producer used by the embedded shell scripts.

The three shell scripts (bash.sh, zsh.zsh, fish.fish) are embedded at build time via go:embed and printed verbatim; users pipe the output into `eval` (bash/zsh) or redirect it to fish's completion dir.

Index

Constants

This section is empty.

Variables

View Source
var Priorities = []string{"p0", "p1", "p2", "p3"}

Priorities is the canonical priority list. p0 highest.

View Source
var PublicSubcommands = []string{
	"init", "new", "show", "edit", "board", "list",
	"activate", "park", "done", "kill", "revive",
	"reindex", "epic", "mcp", "tui", "completions",
	"version", "help",
}

PublicSubcommands is the list of subcommands the user can invoke. Hidden commands (like `_complete`) are deliberately omitted.

View Source
var Statuses = []string{"active", "backlog", "done", "archived"}

Statuses is the canonical status list.

View Source
var Types = []string{"card", "epic"}

Types is the canonical card type list.

Functions

func PrintIDs

func PrintIDs(w io.Writer, b *board.Board, f IDFilter) error

PrintIDs writes one bare card id per line, ordered by id, filtered by f. Bare ints (e.g. "1", not "0001") because that's what the shell user types: `focus done 1`.

func PrintPriorities

func PrintPriorities(w io.Writer)

PrintPriorities writes p0..p3 one per line.

func PrintStatuses

func PrintStatuses(w io.Writer)

PrintStatuses writes the four statuses one per line.

func PrintSubcommands

func PrintSubcommands(w io.Writer)

PrintSubcommands writes the public subcommand list one per line.

func PrintTypes

func PrintTypes(w io.Writer)

PrintTypes writes card/epic one per line.

func Script

func Script(shell string) (string, bool)

Script returns the embedded completion script for the given shell. Returns an empty string and false for unknown shells.

Types

type IDFilter

type IDFilter struct {
	Status card.Status
	Type   card.Type
}

IDFilter narrows which card ids the producer emits.

Jump to

Keyboard shortcuts

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