cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

© Ben Garrett https://github.com/bengarrett/dupers

Index

Constants

This section is empty.

Variables

View Source
var ErrWindowsDir = errors.New("cannot parse the directory path")

Functions

func ChkWinDir

func ChkWinDir(s string) error

ChkWinDir checks the string for invalid, escaped quoted paths when using using Windows cmd.exe.

func Define

func Define(f *Flags)

Define options for the commands.

func DefineShort

func DefineShort(a *Aliases)

DefineShort options for the command aliases.

func Home

func Home() string

Home returns the user home directory. If that fails it returns the current working directory.

func SearchSummary

func SearchSummary(total int, term string, exact, filename bool) string

SearchSummary formats the results of the search command.

func Self

func Self() (string, error)

Self returns the path to the dupers executable file.

Types

type Aliases

type Aliases struct {
	Exact    *bool
	Filename *bool
	Help     *bool
	Lookup   *bool
	Mono     *bool
	Quiet    *bool
	Version  *bool
}

Aliases are single letter options for commands.

type Flags

type Flags struct {
	Debug    *bool
	Exact    *bool
	Filename *bool
	Help     *bool
	Lookup   *bool
	Mono     *bool
	Quiet    *bool
	Rm       *bool
	RmPlus   *bool
	Sensen   *bool
	Version  *bool
}

Flags are the options for commands.

Jump to

Keyboard shortcuts

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