Repository navigation
fix(ui): /url: Print usage error on bad number of arguments consistently - #2224
Closed
shan995-cell wants to merge 1 commit into
Closed
shan995-cell wants to merge 1 commit into
shan995-cell wants to merge 1 commit into
Conversation
/url save and /url open checked if they are called in the right window before checking that the number of arguments passed is correct, making the resulting error message focused on the less important problem in invocation. Signed-off-by: onf <onf@disroot.org>
shan995-cell
force-pushed
the
url-usage-error
branch
from
October 17, 2026 10:16
75b7b77 to
5ba2947
Compare
Author
|
Updated to v2 -- adds the missing |
jubalh
reviewed
Oct 19, 2026
| { | ||
| if (window->type != WIN_CHAT && window->type != WIN_MUC && window->type != WIN_PRIVATE) { | ||
| cons_show_error("`/url save` is not supported in this window."); | ||
| if (args[1] == NULL) { |
Member
There was a problem hiding this comment.
min_args = 2 in _cmd_execute. So this is already caught.
jubalh
requested changes
Oct 19, 2026
jubalh
left a comment
Member
There was a problem hiding this comment.
Something is wrong here, you need to check src/command/cmd_defs.c.
Grep for cmd_url. The CMD_PREAMBLE part is relevant.
In cmd_url_open the if (url == NULL) needs to be adjusted And in cmd_url_save the arg check as well.
Author
|
Closing; onf says this was his fault. Min args was reduced to 1 by his own changes in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR on behalf of "onf".