command

package module
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Nl

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

Nl numbers lines from stdin.

Flags:

  • NlBodyAll, NlBodyNonEmpty, NlBodyNone (-b): which lines to number (default: all)
  • NlSep(s) (-s): separator between number and line (default: "\t")
  • NlStart(n) (-v): starting line number (default: 1)
  • NlIncrement(n) (-i): line number increment (default: 1)
  • NlWidth(n) (-w): field width for line numbers (default: 6)
  • NlFormat(f) / NlFormatLN / NlFormatRN / NlFormatRZ (-n): number format (default: rn)

Types

type NlBody

type NlBody string

NlBody selects which lines are numbered. Maps to the -b flag: "a" (all, default), "t" (non-empty only), "n" (none).

const (
	NlBodyAll      NlBody = "a"
	NlBodyNonEmpty NlBody = "t"
	NlBodyNone     NlBody = "n"
)

type NlFormat

type NlFormat string

NlFormat sets the line-number format (-n flag). Valid values: "ln" (left justified), "rn" (right justified, default), "rz" (right justified zero-padded).

const (
	NlFormatLN NlFormat = "ln"
	NlFormatRN NlFormat = "rn"
	NlFormatRZ NlFormat = "rz"
)

type NlIncrement

type NlIncrement int

NlIncrement sets the line-number increment (-i flag, default 1).

type NlSep

type NlSep string

NlSep sets the separator between the line number and the line text. Maps to the -s flag. Default is "\t".

type NlStart

type NlStart int

NlStart sets the starting line number (-v flag, default 1).

type NlWidth

type NlWidth int

NlWidth sets the field width for line numbers (-w flag, default 6).

Directories

Path Synopsis
Package alias provides unprefixed names for nl command flags.
Package alias provides unprefixed names for nl command flags.

Jump to

Keyboard shortcuts

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