项目作者: morgant

项目描述 :
Indent the output of a command
高级语言: Shell
项目地址: git://github.com/morgant/dent.git
创建时间: 2019-02-24T23:34:35Z
项目社区:https://github.com/morgant/dent

开源协议:MIT License

下载


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:

  1. dent echo "Hello world"

Output:

  1. 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:

  1. dent dent echo "Hello world"

Output:

  1. Hello world

ENVIRONMENT VARIABLES

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