-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback: Output UX #72
Comments
|
Thanks for the fabulously detailed feedback! v0.19.0 brings some changes:
|
Brilliant! Thanks for tackling the concerns raised ❤️ I'm not able to give it a spin right now but I look forward to it! 😁 |
Closing for lack of activity, feel free to reopen if needed. |
q
is a great DNS utility although the UX has a little bit of friction. I'm not sure how much of these you can address easily while keeping the same size advantage over alternatives likedoggo
.Column Alignment
Readability could be improved if the record values were column aligned? The TTL and record types otherwise make that less pleasant to scan through.
You can kind of workaround it by requesting a specific record type, or using
--short
, but for multiple records where alignment is useful, it can be helpful to have the context of the record type.Here's how it looks from
doggo
:Column Headers
Not too important, and definitely should be optional (opt-in is fine), this seems to compliment the column alignment feature as shown in the
doggo
example above.Likewise, I don't think you can filter columns (eg: If I'm interested in the equivalent of
--short
but additionally with the record type).doggo
doesn't appear to support disabling the headers line, or columns displayed. Just a feature I've seen in some other CLI tools when presenting results.Default opt-out flags (
+[no]
)I wanted to try disable the default
--pretty-ttls
feature early on, and saw the help mention of dig notation, but that wasn't immediately obvious to me to figure out and I failed a few times until landing on this issue comment to realize the option replaces--
with+
or+no
.--pretty-ttls false
or--no-pretty-ttls
would seem a bit more natural? This particular setting could be a preference as a default, but there is no config or generic ENV support, I suppose you could use a shell alias 🤷♂️Those are nice to haves, but I think just having an example on your README with the
+no
syntax would be sufficient,--pretty-ttls
is probably a good example.Pretty TTL
In my case for 60s, the pretty TTL renders as
1m0s
, and the README example 1 day is24h0m0s
. The 0 units could maybe be truncated as they're added noise?--format json
This differs from
doggo
which actually outputs a JSON document array of records.Your JSON output is technically JSONL (JSON Lines), which can be useful too. Just thought I'd point out that difference from what I was expecting to see.
Tools like
yq
could convert the YAML format into JSON easily enough. Whilejq
can convert JSONL to a pretty printed JSON array withq example.test NS MX TXT A --format json | jq --slurp '.'
:Q JSONL output
Q JSONL => JSON output (via jq)
doggo
output is a bit nicer with all lowercase field names and more predictable layout (answers.address
provides the record value, andanswers.type
the record type, I don't need to have a mapping ofAnswers.Hdr.Rrtype
value toAnswers[$RECORD_TYPE]
), so it's a bit easier to process:Doggo JSON output
That's not an issue specific to JSON format though, YAML is affected by that too and I guess changing that would be a breaking change for anyone relying on the current output 😅
q
does at least have some improvement with howMX
record splits out thepreference
field. Fordoggo
splitting a string by the space char as a delimiter isn't difficult if separating the preference was required.JSON vs YAML format inconsistency with field names
JSONL aside, the JSON output is using PascalCase convention for fields, while YAML output is using flatcase.
Additionally, the YAML output has each result split by a blank line, which isn't valid YAML?
---
can be used to specify multiple YAML docs.The text was updated successfully, but these errors were encountered: