Closed Bug 1726966 Opened 4 years ago Closed 4 years ago

In ChatZilla make /commands return all matches starting with pattern

Categories

(SeaMonkey :: Chat, defect)

defect

Tracking

(seamonkey2.53+ fixed)

RESOLVED FIXED
seamonkey 2.92
Tracking Status
seamonkey2.53 + fixed

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

Details

(Whiteboard: SM2.53.10)

Attachments

(2 files, 2 obsolete files)

At the moment /commands <pattern> returns either the command if it is an exact match or a list of commands if a partial match. It is probably better to return all matches whether exact or partial.

[Approval Request Comment]
Regression caused by (bug #): n/a
User impact if declined: Incomplete list of commands
Testing completed (on m-c, etc.): 2.53.10
Risk to taking this patch (and alternatives if risky): low
String changes made by this patch: none

Whilst here removed an old Mozilla 1.0 workaround.

Attachment #9237378 - Flags: review?(frgrahl)
Attachment #9237378 - Flags: approval-comm-release?
Attachment #9237378 - Flags: approval-comm-esr60?

Comment on attachment 9237378 [details] [diff] [review]
1726966-irc-commands-match-25310.patch

This unfortunately seems to break the join command. See screenshot

Attachment #9237378 - Flags: review?(frgrahl)
Attachment #9237378 - Flags: review-
Attachment #9237378 - Flags: approval-comm-release?
Attachment #9237378 - Flags: approval-comm-esr60?

Now function is passed a boolean for whether it should do exact matches or not.
/commands passes false
at the moment /help passes true but I am open to it being changed to false
dispatch passes true so that matched commands now work again

Attachment #9237378 - Attachment is obsolete: true
Attachment #9237786 - Flags: review?(frgrahl)
Attachment #9237786 - Flags: approval-comm-release?
Attachment #9237786 - Flags: approval-comm-esr60?

Comment on attachment 9237786 [details] [diff] [review]
1726966-irc-commands-match-v1_1-25310.patch

LGTM

NIT: /extensions/irc/js/lib/command-manager.js

  •            /* exact match */
    
  •            return [command];
    
  •        }
    
  •        else
    
  •        {
    
  •            ary.push(command);
           }
    

Else is not needed because the return is always executed in the if block. Fixing it for check-in.

Attachment #9237786 - Flags: review?(frgrahl)
Attachment #9237786 - Flags: review+
Attachment #9237786 - Flags: approval-comm-release?
Attachment #9237786 - Flags: approval-comm-release+
Attachment #9237786 - Flags: approval-comm-esr60?
Attachment #9237786 - Flags: approval-comm-esr60+

[Triage Comment]
Carrying forward r/a+

Attachment #9237786 - Attachment is obsolete: true
Attachment #9245099 - Flags: review+
Attachment #9245099 - Flags: approval-comm-release+
Attachment #9245099 - Flags: approval-comm-esr60+

Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/b28a9d38e31c
In ChatZilla make /commands return all matches starting with pattern. r=frg

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Whiteboard: SM2.53.10
Target Milestone: --- → seamonkey 2.92
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: