Closed Bug 795847 Opened 13 years ago Closed 10 years ago

GCLI should use CTRL-TAB to complete unambiguous-prefixes

Categories

(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jwalker, Assigned: tyronekc)

Details

TAB could remain for ambiguous-best-guesses. It seems to me that unambiguous-prefix completion is a sweet spot of simplicity and usability in cases like file-systems to allow people to navigate using TAB as a 'fill-in-what-you-can' key. On the other hand with more completion smarts, it is likely that we can provide faster completion (i.e with less key presses) using a combination of fuzzy matching, and historical learning. i.e. awesome-complete. Also I want to avoid the zsh problem of death by a million options. Currently we don't have awesome-complete and also unambiguous-prefix completion is both useful in some cases, and desirable from a muscle memory pov. So I suggest we use SHIFT-TAB for unambiguous-prefix completion.
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Component: Developer Tools: Console → Developer Tools: Graphic Commandline and Toolbar
Hey Joe Walker, Can I take on this task? So I can use this for my school project. We need to submit a fix and get approved to get full credit. Is there also an active developer for guidance?
Thanks Tyrone, I'll assign it to you, and I can help you make progress. You'll need to checkout GCLI from its repo [1]. The files in Firefox are built from there. It's worth reading the documentation which is mostly on Github [2], but there are also docs on MDN [3]. GCLI is in the process of adding asynchronous types, which changes how the internals work a bit. So I suggest working off the asynctypes-685526 branch [4]. inputter.js [5] and specifically onKeyUp() on line 491 are responsible for handling TAB, so we'll need to alter this code to call requisition.complete(), line 517 with a flag to indicate use of CTRL. BTW: I think we should be using CTRL+TAB for this key sequence to get as far away from TAB (and SHIFT+TAB) being used for focus control, and I've changed the title of this bug to reflect that. cli.js [6] contains the definition of requisition.complete() - line 741. We'll need to check to see if the flag is set and work out an unambiguous-prefix to use for completion rather than the first match. I hope that helps. [1] https://github.com/joewalker/gcli/ [2] https://github.com/joewalker/gcli/blob/master/docs/index.md [3] https://developer.mozilla.org/en-US/docs/Tools/GCLI [4] https://github.com/joewalker/gcli/tree/asynctypes-685526 [5] https://github.com/joewalker/gcli/blob/asynctypes-685526/lib/gcli/ui/inputter.js#L491 [6] https://github.com/joewalker/gcli/blob/asynctypes-685526/lib/gcli/cli.js
Assignee: nobody → tyronekc
Status: NEW → ASSIGNED
Summary: GCLI should use SHIFT-TAB to complete unambiguous-prefixes → GCLI should use CTRL-TAB to complete unambiguous-prefixes
Ok sounds good I switched to 'asynctypes-685526' branch. is there any process you want me to follow? or just do a regular add, commit, and push?
I'm getting this error when trying to run the gcli js for node to run it. Master is working fine. did someone check in bad code? Error: Calling node's require("util/legacy") failed with error: Error: Cannot find module 'util/legacy' at requirejsVars.nodeLoad.req.load (/repo/gcli/scripts/r.js:2285:27) at req.execCb (/repo/gcli/scripts/r.js:1873:25) at execManager (/repo/gcli/scripts/r.js:541:27) at main (/repo/gcli/scripts/r.js:944:17) at callDefMain (/repo/gcli/scripts/r.js:955:18) at Object.context.completeLoad (/repo/gcli/scripts/r.js:1530:21) at requirejsVars.nodeLoad.req.load (/repo/gcli/scripts/r.js:2295:17) at resume (/repo/gcli/scripts/r.js:1281:65) at Object.context.completeLoad (/repo/gcli/scripts/r.js:1550:17) at Function.requirejsVars.nodeLoad.req.load (/repo/gcli/scripts/r.js:2295:17)
Ah, sorry. Fix pushed.
(In reply to Tyrone Chong from comment #4) > Ok sounds good I switched to 'asynctypes-685526' branch. is there any > process you want me to follow? or just do a regular add, commit, and push? There are some notes at https://github.com/joewalker/gcli/blob/master/docs/developing-gcli.md on creating commits. Thanks.
Thanks Joe. I was able to build that branch i'll be working on this. I'll let you know if i run into any issues
Triage. Filter on Lobster Thermidor. Nice idea, but no need to keep on file.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.