mach try fuzzy search is too fuzzy

RESOLVED FIXED in Firefox 67

Status

enhancement
RESOLVED FIXED
2 years ago
5 months ago

People

(Reporter: sfink, Assigned: ahal)

Tracking

unspecified
mozilla67

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

2 years ago
For example, say I want to select all spidermonkey builds. If I type "spider", I get things like

  test-android-4.3-arm7-api-16/debug-reftest-33
    ^                    ^^    ^^    ^

This is clearly not what I intended. I'm not sure what the best way to search is. Maybe any \w+ tokens in the input should have to be uninterrupted in the job names? Or maybe \w+ tokens in the job names should only match at their beginnings?

(For the record, "spidermo" is enough to get what I want.)

Updated

Last year
Product: TaskCluster → Firefox Build System

Updated

11 months ago
Component: Task Configuration → Try
Assignee

Comment 1

5 months ago

Sorry I missed this. There's a decent chance you figured this out already, but for others who stumble upon this..

You can prefix a term with ' to make it an exact match. So for example:

asdf 'spider

The first term (asdf) will be a regular fuzzy match. The second one will only match tasks that have the substring "spider". You can reverse the behaviour of ' by setting FZF_DEFAULT_OPTS=--exact. In this mode, the first term (asdf) will be an exact match, and the second one (spider) will be fuzzy.

I know :jgraham wants --exact to be the default behaviour. I'm a bit on the fence about it though (mostly due to disrupting people's workflows and saved queries).

Reporter

Comment 2

5 months ago

Yeah, thanks. I did figure it out, though I didn't know about the FZF_DEFAULT_OPTS=--exact trick. I definitely would have preferred that default, but at this point I think I agree that the current behavior is too entrenched and it would be too confusing to change. I'm resigned to train myself to use ' especially if there are going to be other things using this fzf thing that are going to use the default default.

I'm a bit on the fence about it though (mostly due to disrupting people's workflows and saved queries).

Do you really expect people to be relying on "asdf" currently matching fuzzily?

Assignee

Comment 4

5 months ago

(In reply to Steve Fink [:sfink] [:s:] from comment #2)

Yeah, thanks. I did figure it out, though I didn't know about the FZF_DEFAULT_OPTS=--exact trick. I definitely would have preferred that default, but at this point I think I agree that the current behavior is too entrenched and it would be too confusing to change. I'm resigned to train myself to use ' especially if there are going to be other things using this fzf thing that are going to use the default default.

We should at least make --exact a top-level argument to mach try fuzzy so that people can set up an alias more easily without knowing the magic incantation.

(In reply to Mike Hommey [:glandium] from comment #3)

Do you really expect people to be relying on "asdf" currently matching fuzzily?

The breaking workflows statement is more in reference to the fact that 'term will become the new fuzzy match. This will definitely break saved queries and confuse people who have gotten used to typing 'term. It would also make try fuzzy inconsistent with fzf in other areas where fuzzy matching is more appropriate (e.g file system searching).

But to answer your question, I use fuzzy matching all the time (though I understand that it isn't the common use case).

Assignee

Comment 5

5 months ago
Passing in --exact reverses the behaviour of the ' operator. For example,
take the query "foo 'bar".

By default: foo is a fuzzy match and bar is an exact match.
With --exact: foo is an exact match and bar is a fuzzy match
Assignee

Updated

5 months ago
Assignee: nobody → ahal
Status: NEW → ASSIGNED

Comment 6

5 months ago
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ba052addf07
[try] Add --exact argument to |mach try fuzzy|, r=jgraham

Comment 7

5 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.