completion

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package completion serves the static shell-completion scripts shipped with gist. The scripts are embedded at build time; this package just chooses which one(s) to print based on `gist completion <shell> [--alias=<name>]`.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(a *app.App, args []string) error

Install handles `gist completion install [--shell=<bash|zsh>] [--alias=git]`. File-drop lands at the user-level XDG completion dir (bash) or a $fpath candidate (zsh), so no shell-rcfile edit is needed for the base completion. `--alias=git` additionally appends a delimited block to the user's rcfile that registers the git-overlay completer.

func Run

func Run(a *app.App, args []string) error

Run handles `gist completion <shell> [--alias=<name>]`. The only supported alias today is `git`, which appends an overlay block that registers a completer for the `git` command.

func Uninstall

func Uninstall(a *app.App, args []string) error

Uninstall handles `gist completion uninstall [--shell=<bash|zsh>] [--alias=git]`. Removes the dropped completion file and, if present, the delimited rc block. The --alias=git flag is accepted for symmetry with `install` but is a no-op: uninstall always also strips the rc block when it finds one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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