improve-command-error-messages #195
No reviewers
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#195
Loading…
Reference in New Issue
No description provided.
Delete Branch "improve-command-error-messages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds to the existing help improvements so that you can type things like
:help add
and get the correct syntax for the command. I believe asdf, or maybe myself (?), already fixed things up so that if you type in a mangled command you will be given a message with the correct command syntax. This just cleans that up a bit to allow for using help in the same way.Typing just
:help
will stillnavigate you to the bombadillo gopher page.This should complete the stopgap measures until a full integrated help manual can be released (not happening as a part of 2.3.3).
@asdf , since this involves code you were working with do you mind trying it out?
@ -358,1 +358,4 @@
c.DrawMessage()
case "HELP", "?":
if val, ok := ERRS[values[0]]; ok {
c.SetMessage(val, false)
To ensure the help message is shown in context, we should prefix the message with "Usage: " or something?
Really elegant and a good outcome. Apart from the comment I've made, I pushed a small correction to the help text which I missed when implementing it initially. Should be good to go!
Awesome :-D I have added the
Usage: [...]
prefix for help output per your comment. Let me know if that is what you had in mind. If so, I think this is probably ready to merge in.