args

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "unknown"
	Commit  = "unknown"
	Date    = "unknown"
)

the following vars will be set by goreleaser on build time

Functions

This section is empty.

Types

type Args

type Args struct {
	Delete *DeleteCmd `arg:"subcommand:delete" help:"Delete commands from history"`
	Get    *GetCmd    `arg:"subcommand:get" help:"Get a command by it's index'"`
	Import *ImportCmd `arg:"subcommand:import" help:"Import commands from a legacy history file"`
	List   *ListCmd   `arg:"subcommand:list" help:"List commands"`
	Record *RecordCmd `arg:"subcommand:record" help:"Record a new command"`
	Search *SearchCmd `arg:"subcommand:search" help:"Start the interactive fuzzy selection mode"`
	Stats  *StatsCmd  `arg:"subcommand:stats" help:"Show some statistics"`
	Tidy   *TidyCmd   `arg:"subcommand:tidy" help:"Apply exclude patterns to clean up the hist database"`
	Config string     `arg:"--config" default:"~/.config/hist/config.yml"`
}

func (*Args) Version

func (a *Args) Version() string

type DeleteCmd

type DeleteCmd struct {
	Ids           []int64    `arg:"-i,--id"`
	UpdatedBefore *time.Time `arg:"-u,--updated-before"`
	Pattern       string     `arg:"-p,--pattern" help:"Delete all records matching the pattern"`
}

type GetCmd

type GetCmd struct {
	Index int64 `arg:"--index"`
}

type ImportCmd

type ImportCmd struct {
	Path string `arg:"positional"`
}

type ListCmd

type ListCmd struct {
	Pattern      string `arg:"--pattern"`
	ByCount      bool   `arg:"--by-count"`
	Reverse      bool   `arg:"--reverse"`
	NoCount      bool   `arg:"--no-count"`
	NoLastUpdate bool   `arg:"--no-last-update"`
	WithId       bool   `arg:"--with-id"`
	Limit        int    `arg:"-l,--limit" default:"-1"`
}

type RecordCmd

type RecordCmd struct {
	Command string `arg:"positional"`
}

type SearchCmd

type SearchCmd struct {
	Input   string `arg:"positional"`
	Verbose bool   `arg:"--verbose"`
}

type StatsCmd

type StatsCmd struct {
}

type TidyCmd

type TidyCmd struct {
}

Jump to

Keyboard shortcuts

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