completion

package
v0.0.0-...-ec59030 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package completion generates shell tab-completion scripts for gitmap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllCommands

func AllCommands() []string

AllCommands returns every command name and alias offered by tab-completion.

The list is the union of generatedCommands (auto-extracted from the constants package by internal/gencommands) and manualExtras. Run `go generate ./completion/...` after adding new Cmd* constants to refresh the generated portion.

func DetectShell

func DetectShell() string

DetectShell returns the current shell type based on environment.

func Generate

func Generate(shell string) (string, error)

Generate returns the completion script for the given shell.

func Install

func Install(shell string) error

Install writes the completion script and adds a source line to the profile.

func InstallCDFunction

func InstallCDFunction(shell string) error

InstallCDFunction writes the gcd shell wrapper to the user's profile.

Types

This section is empty.

Directories

Path Synopsis
internal
gencommands command
Command gencommands generates allcommands_generated.go by extracting every Cmd* string constant from constants files in the sibling constants/ package that have explicitly opted into completion via marker comments.
Command gencommands generates allcommands_generated.go by extracting every Cmd* string constant from constants files in the sibling constants/ package that have explicitly opted into completion via marker comments.

Jump to

Keyboard shortcuts

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