dircolors

package
v0.0.0-...-63f5abb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package dircolors adds support for dircolors(5) codes and color init strings.

DEPENDENCIES: * glog

PLATFORMS: * Linux

MORE:

http://linux.die.net/man/5/dir_colors

% dircolors --print-database

Index

Constants

View Source
const (
	Reset         = "rs" // Normal
	Dir           = "di"
	Link          = "ln"
	MultiHardlink = "mh"
	NamedPipe     = "pi"
	Socket        = "so"
	BlockDevice   = "bd"
	CharDevice    = "cd"
	Orphan        = "or"
	Setuid        = "su"
	Setgid        = "sg"
	Executable    = "ex"
)

Variables

NotNormal are dircolors codes for non-regular files.

Functions

func Code

func Code(fpath string) (string, error)

Code returns the dircolor code for fpath based on its type. Eg. "di" for dir.

func ForTTY

func ForTTY(fpath string) string

ForTTY wraps fpath with a terminal color sequence based on its type. Eg. dirs are colored as blue.

Types

This section is empty.

Jump to

Keyboard shortcuts

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