Update README.md
This commit is contained in:
parent
44e7b99a1d
commit
ca3f3152bb
1 changed files with 11 additions and 4 deletions
13
README.md
13
README.md
|
@ -4,15 +4,17 @@ This is **work in progress** and probably quite horrible.
|
||||||
|
|
||||||
## What?
|
## What?
|
||||||
|
|
||||||
|
This is a [lexer][lexer] for [Pygments][pygments] that can lex the output of [BIND 9's `dig` command][dig] to provide colorful syntax highlighting for `dig`:
|
||||||
|
|
||||||
![Screenshot of colorful dig output][screenshot]
|
![Screenshot of colorful dig output][screenshot]
|
||||||
|
|
||||||
## Why?
|
## Why?
|
||||||
|
|
||||||
`dig` output can be hard to read, especially with `+trace`.
|
`dig` output can be hard to read, especially with `+trace`. Having some colors in the output helps a lot when reading large dig responses.
|
||||||
|
|
||||||
## How to use?
|
## How to use?
|
||||||
|
|
||||||
Put something like this in your .bashrc, .zshrc, or whatever:
|
Put something like this in your shell's config, e.g. `.bashrc`, `.zshrc`, or whatever your shell uses:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function dig() {
|
function dig() {
|
||||||
|
@ -20,6 +22,11 @@ function dig() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Then rehash your shell config.
|
Then rehash your shell config or start a new session. Now calling `dig` will call this function instead, passing the arguments to the original `dig` command, e.g. in `/usr/bin/dig`, and pipe the output through `pygmentize`.
|
||||||
|
|
||||||
|
If necessary, you can still call the original dig by its full path, e.g. `/usr/bin/dig` instead of just `dig`.
|
||||||
|
|
||||||
[screenshot]: https://gitlab.com/s3lph/pygments-dig-lexer/-/raw/master/screenshot.png
|
[screenshot]: https://gitlab.com/s3lph/pygments-dig-lexer/-/raw/master/screenshot.png
|
||||||
|
[lexer]: https://en.wikipedia.org/wiki/Lexical_analysis
|
||||||
|
[pygments]: https://pygments.org/
|
||||||
|
[dig]: https://en.wikipedia.org/wiki/Dig_(command)
|
Loading…
Reference in a new issue