Repository navigation
v0.2.6
v0.2.6: curl and volume inspect
parse now formats curl and adds docker volume inspect. Same rule as the
other tools: make hard-to-read output readable, and leave everything else
byte for byte.
What's new
curl formatter
curl -I/curl -i: status line colored by code (2xx green, 3xx
yellow, 4xx/5xx red), header keys cyan, body left untouched- A redirect chain colors every hop
curl -v ... 2>&1: the*,>and<noise dimmed, failures red,
the response status still colored, curl's{ ... bytes data]chunk
markers dimmed- A bare
curl: (n)failure, with no-varound it, painted bold red - The progress meter is dropped from piped output
parse curlruns curl with your own arguments and returns curl's exit
code
docker volume inspect (also docker inspect <volume>)
- Name, driver and scope as a header
- Mountpoint, created date, labels and options under it
Usage
curl -I https://example.com | parse
curl -v https://example.com 2>&1 | parse
parse curl -I https://example.com
docker volume inspect <volume> | parse
Color is off automatically when output is piped, and NO_COLOR is respected.
Safety
- Bodies, JSON,
-wwrite-outs,--traceand--versionpass through
byte for byte, so scripts keep working - The detectors only claim real curl output, so git logs and other tools
are left alone - Exit codes are the tool's own, and stderr stays on stderr
Not yet ( working on it )
curl -Zparallel output is not formatted specially- The progress meter is only dropped where parse claims the stream; on
unclaimed text it comes through as curl printed it - There is no
--rawflag. To see the original output, run the command
without| parse
Install
go install github.com/atif-1402/parse@v0.2.6
Full Changelog: v0.2.5...v0.2.6