Repository navigation
v0.2.7: mount table and gcc/clang diagnostics
parse now formats mount and adds gcc/clang compiler diagnostics. Same rule as the other tools: make hard-to-read output readable, and leave everything else byte for byte.
What's new
mount formatter
- Plain
mountoutput lined up as a table: DEVICE, MOUNTPOINT, FSTYPE, OPTIONS, with a LABEL column only when some row has one - Each column as wide as its widest cell, two spaces between columns, no trailing padding
- Filesystem types colored by where they live (disk types cyan, kernel plumbing dim)
- Options quietened; a read-only mount marked yellow
mount -llabels preserved in their own column
gcc / clang diagnostics
- Diagnostics grouped under one bold file path instead of repeating it
- Count summary up front ("2 errors", zero counts omitted) instead of buried at the end
- line:col bold, severity colored (error red, warning yellow, note cyan), message plain
- Source snippets, carets, and expansion lines dimmed underneath each diagnostic
In functioncontext lines dropped — file:line:col is enough to find the problem
Usage
mount | parse
mount -l | parse
gcc file.c 2>&1 | parse
clang -Wall file.c | parse
parse gcc file.c
parse clang -Wall file.c
Color is off automatically when output is piped, and NO_COLOR is respected.
Safety
- Lines that are not mount rows or diagnostic headers pass through untouched
- A
mount:error mixed into stdout is never lined up as though it were a mount - Linker output and command echoes mixed with diagnostics pass through unchanged
- Exit codes are the tool's own, and stderr stays on stderr
Not yet
mount -vverbose output is not specially formatted- There is no
--rawflag. To see the original output, run the command without| parse
Install
go install github.com/atif-1402/parse@v0.2.7
Full Changelog: v0.2.6...v0.2.7