cat

package
v0.0.0-...-d26976d Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None     number = 0
	NonBlank number = 1
	All      number = 2
)

Variables

View Source
var (
	ErrNothingToDo = pipe.NewErrorf(1, "cat: nothing to do")
)

Functions

This section is empty.

Types

type Cat

type Cat struct {
	// contains filtered or unexported fields
}

func New

func New() Cat

func (Cat) Files

func (c Cat) Files(f ...string) Cat

Files are input files, where - denotes stdin

func (Cat) FromArgs

func (c Cat) FromArgs(argv []string) (Cat, error)

FromArgs build a Cat from standard argv except the command name (os.Argv[1:])

func (Cat) Run

func (c Cat) Run(ctx context.Context, stdio unix.StandardIO) error

func (Cat) SetDebug

func (c Cat) SetDebug(debug bool) Cat

SetDebug additional debugging messages on stderr

func (Cat) ShowEnds

func (c Cat) ShowEnds(b bool) Cat

ShowEnds add $ to the end of each line

func (Cat) ShowNonPrinting

func (c Cat) ShowNonPrinting(b bool) Cat

ShowNonPrinting use ^ and M- notation, except for LFD and TAB

func (Cat) ShowNumber

func (c Cat) ShowNumber(n number) Cat

ShowNumber adds none all or non empty output lines

func (Cat) ShowTabs

func (c Cat) ShowTabs(b bool) Cat

ShowTabs display TAB as ^I

func (Cat) SqueezeBlanks

func (c Cat) SqueezeBlanks(b bool) Cat

SqueezeBlanks - supress repeated empty lines

Jump to

Keyboard shortcuts

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