Last Comment Bug 666593 - GCLI should only do the '-> completion' thing when the completion isn't a strict extension
: GCLI should only do the '-> completion' thing when the completion isn't a str...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks: GCLI-ENABLE
  Show dependency treegraph
 
Reported: 2011-06-23 08:01 PDT by Joe Walker [:jwalker] (needinfo me or ping on irc)
Modified: 2011-06-30 05:24 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-06-23 08:01:52 PDT

    
Comment 1 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-27 12:07:06 PDT
First go here: https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97

Not sure exactly what is meant by "strict extension", so feedback on that part of the patch would be appreciated (see https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97#L0R399).

Also, on the web version, there is a little bit of extra space between the completion and the stuff typed so far; on the embedded version, there is a little bit of space missing. Not sure where this issue is coming from; we have a ton of spans that maybe aren't needed and are getting in the way?
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-06-27 12:16:44 PDT
I've not read the code yet, but to explain what I meant by strict extension:

> ls *<TAB>
> ls bin etc lib usr

In this case the completion is not an extension because pressing tab deletes character from the command line.

There was some discussion the other day about using soundex for extensions, which could come into play as well.
Comment 3 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-28 11:04:19 PDT
Ok, in that case, my implementation should be correct. I test if something is a strict completion by seeing if the stuff that is currently typed is the start of the completion: https://github.com/fitzgen/gcli/commit/b126929139116c3ddfb67910947b008b2614cb97#L0R399

(Or at least it will soon, I'm going to s/> -1/== 0/).
Comment 4 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-28 13:16:04 PDT
Fixed above issue: https://github.com/fitzgen/gcli/commit/a04eb52adad9c02b88c94897009d6b899f3f0d64

Note You need to log in before you can comment on or make changes to this bug.