Skip to content
/ dent Public

Indent the output of a command

License

Notifications You must be signed in to change notification settings

morgant/dent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dent

By Morgan Aldridge morgant@makkintosshu.com

dent on OpenHub Build Status Donate

OVERVIEW

dent is a small utility written in bash which indents the output of the command passed as a parameter.

USAGE

Prepend dent to any command:

dent echo "Hello world"

Output:

  Hello world

Because dent increments DENT_LEVEL prior to executing the command and decrements it upon completion, it inherently supports nested calls. So, if you have another command or function that itself calls dent, it's output will be further indented. For example:

dent dent echo "Hello world"

Output:

    Hello world

ENVIRONMENT VARIABLES

  • DENT_CHAR - The character(s) used to indent (default: ' ' [two spaces])
  • DENT_LEVEL - The current indent level (default: 0)