show

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package show implements the ctx pad show subcommand.

It outputs the raw text of a pad entry by index, designed for pipe composability with other pad commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the pad show subcommand.

Outputs the raw text of entry N (1-based) with no numbering prefix. Designed for pipe composability:

ctx pad edit 1 --append "$(ctx pad show 3)"

Returns:

  • *cobra.Command: Configured show subcommand

func Run

func Run(cmd *cobra.Command, n int, outPath string) error

Run prints the raw text of entry at 1-based position n.

Parameters:

  • cmd: Cobra command for output
  • n: 1-based entry index
  • outPath: File path for blob output (empty for stdout)

Returns:

  • error: Non-nil on invalid index, read failure, or write failure

Types

This section is empty.

Jump to

Keyboard shortcuts

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