https://github.com/morgant/dent
Indent the output of a command
https://github.com/morgant/dent
bash bash-script indent indentation indenter
Last synced: 2 months ago
JSON representation
Indent the output of a command
- Host: GitHub
- URL: https://github.com/morgant/dent
- Owner: morgant
- License: mit
- Created: 2019-02-24T23:34:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T11:10:20.000Z (over 7 years ago)
- Last Synced: 2025-10-28T00:07:57.759Z (8 months ago)
- Topics: bash, bash-script, indent, indentation, indenter
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dent
By Morgan Aldridge
[](https://www.openhub.net/p/dent) [](https://travis-ci.com/morgant/dent) [](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=DBY3R8ARLDELE¤cy_code=USD&source=url)
## 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`)