alias

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package alias provides unprefixed names for nl command flags.

import nl "github.com/gloo-foo/cmd-nl/alias"
nl.Nl(nl.BodyNonEmpty, nl.Sep(": "))

Index

Constants

View Source
const (
	BodyAll      = command.NlBodyAll      // number all lines (default)
	BodyNonEmpty = command.NlBodyNonEmpty // number non-empty lines only
	BodyNone     = command.NlBodyNone     // number no lines
)

-b flag: which lines to number.

View Source
const (
	FormatLN = command.NlFormatLN // left justified, no leading zeros
	FormatRN = command.NlFormatRN // right justified, no leading zeros (default)
	FormatRZ = command.NlFormatRZ // right justified, leading zeros
)

-n flag: line-number format.

Variables

This section is empty.

Functions

func Nl

func Nl(opts ...any) gloo.Command[[]byte, []byte]

Nl numbers lines from stdin; see the command package for the flag set.

Types

type Format

type Format = command.NlFormat

Format is the -n number-format flag.

type Increment

type Increment = command.NlIncrement

Increment is the -i line-number-increment flag.

type Sep

type Sep = command.NlSep

Sep is the -s separator flag.

type Start

type Start = command.NlStart

Start is the -v starting-line-number flag.

type Width

type Width = command.NlWidth

Width is the -w field-width flag.

Jump to

Keyboard shortcuts

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