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
Feat+error meaning #745
Feat+error meaning #745
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general, just a few issues.
Do I squash all commits into one ? (i.e. do you want to keep the extended error meaning setup?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
I missed that question the first time, sorry. I do not have much of an opinion. Clearly you intended for both bits to be part of the feature, so it would be fine in once commit. But if you want it as separate, I'm fine with that.
But no matter what, squash away the extra commits from the fixes and docs.
The two commits were only there to make it easy to just have a single config, if you're OK with the "extended" config, I'll squash everything. |
a66a6d1
to
44bf1a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, squash down to 1.
- Displays the (guessed) meaning of the last error code (feature request #729). - Use a set of reasonably common error codes on POSIX systems (but is LP used out of a POSIX env?). - Use the color than lp_error (namely LP_COLOR_ERR). - Put in the default theme right after the error code. - Code would be very much simpler/configurable with Bash 4's associative arrays, but here use a case switch with non-configurable error meanings. - Use a separated LP_ENABLE_ERROR_MEANING. - Adds LP_ENABLE_ERROR_MEANING_EXTENDED to allow for a larger set of error codes (let the user decide the level of guess for error meaning). - doc: update prompt comparison with error meaning
44bf1a4
to
c0b2b0f
Compare
Basically displays the (guessed) meaning of the last error code (feature request #729).
Separated in two commits, so that you may allow a more or less granular level of details.
First commit: adds the core feature.
(but is LP used out of a POSIX env?).
but here use a case switch with non-configurable error meanings.
Second commit: let the user decide the level of guess for error meaning.