@wilfredh The underlined one jumps out most clearly to me without generating too much noise
Eskild Hustvedt@zerodogg@fosstodon.org
@wilfredh italic for me, maybe backtick as a fallback for a dumb terminal. Underline is busy, colors may be hard to read if the defaults are bad.
Eric@ambihelical@hachyderm.io
@wilfredh If you believe that color and formatting should only be additive (accessibility principle) and that console output should survive copy/paste into a text editor and should work in basic terminal environments, I think backticks is the only valid option of what you showed. (But what’s wrong with double or single quotes?)
David Anson@DavidAnson@mastodon.social
Hyperlinking to the source code in e.g. GitHub? That's an option for checked-in code I suppose.
That said, I've only seen one Rust tool use hyperlinks in CLI output, and that's it. Have you see other tools use links in the wild? Did you like it?
Why do so few CLI tools use colour inside their error messages? For example, rustc uses colour well in the error display, but there's no special styling of the content in backticks.
By contrast, markdown website almost always style backtick text differently from prose.
E.g. `field` is not specially styled here.
I've been using "Expected Int, but got String" for my type error messages, but I've been wondering if I could do better.
"Expected Int here, but this value has type String" or "This expression requires Int, but the value is String".
Do you have a favourite?
Signify, OpenBSD's alternative to GPG, is really elegant: https://www.openbsd.org/papers/bsdcan-signify.html
No key servers, a simple CLI, a crypto algorithm without random inputs that you can screw up, and readable keys!