lscolors

package
v0.0.0-...-91dc524 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package lscolors provides styling of filenames based on file features.

This is a reverse-engineered implementation of the parsing and interpretation of the LS_COLORS environmental variable used by GNU coreutils.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetTestLsColors

func SetTestLsColors(c testutil.Cleanuper)

SetTestLsColors sets LS_COLORS to a value where directories are blue and .png files are red for the duration of a test.

Types

type Colorist

type Colorist interface {
	// GetStyle returns the style for the named file.
	GetStyle(fname string) string
}

Colorist styles filenames based on the features of the file.

func GetColorist

func GetColorist() Colorist

Jump to

Keyboard shortcuts

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