views:

583

answers:

1

Background

Lately I've become a fanatic that everything I type while working on a computer should be compatible with "DRY". If there's anything I have to type more than once in any context, I want some kind of user-aware auto-complete option to do some of the work for me -- always -- no exceptions.

Having to work under Windows, I've looked at GUI solutions to make this insane goal a reality.

The (almost) optimal solution

If you have a moment, open up Firefox 3.0 and type a few keystrokes into the address bar. You will notice that it performs a kind of (Incremental)[http://en.wikipedia.org/wiki/Incremental_find] (Autocomplete)[http://en.wikipedia.org/wiki/Autocomplete] based on space-separated sub-strings of whatever you type. Another place in Firefox that does something similar is the about:config URL.

This is sub-optimal, because I don't want this in Firefox only. I want to use this everywhere.

The Question

Does anyone out there know of a widget or app that does nothing but insanely good incremental auto-complete that can be used as a general purpose "run everywhere" tool? Something that allows the user to: 1) maintain one or more "completion candidate files"; 2) pick one of those files as the source for Firefox 3.0 style completion; 3) return the result (or blank if the user canceled), and do those three things only?

Details

Here's how it should work:

  • STEP1: user saves or more csv file(s) (or other easy-edit format) somewhere in his hard-drive
  • STEP2: user creates a Windows Script Host script or a batch file (or whatever) instantiates the FilterAsYouType GUI
  • STEP3: user runs the script file, and the script file instantiates the GUI, telling it which CSV file to use as the source of all potential completions
  • STEP4: the user either chooses one of the completions, supplies his own text that is not in the list, or cancels out without supplying anything
  • STEP5: when the user is done the script saves the result to a variable and does something with it

Here is some pseudo-code for the script:

include "GenericTypeaheadWidget";

var gengui = new GenericTypaheadWidget('c:\docs\favorite_foods.csv');
var fave_food = gengui.get_user_input();
if(fave_food != ''){
    alert('you chose '+fave_food+'!');
}

The rationale

The goal is to just have a way to always be able to do auto-completions from a list of arbitrary items, even if the list is a couple thousand items, and not have to rely on it being built into some IDE or standalone application that only accepts certain kinds of input or has a complex API.

CSV (or text or sqlite database) would provide a way for me to self-generate "candidate lists" or "history logs" and then just use those logs as the source of the possible completions.

The disclaimer

I've tried several GUI "launcher" programs, command-line engines like power-shell and scripting shells, the regular plain old command-line history with varying degrees of satisfaction. The problem with these is they all do extra superfluous stuff like searching directories or built-in commands. I just want nothing but whatever is in the CSV file I happen to be pointing at.

I'm wondering if there is any simple tool that does nothing but what I'm describing above.

UPDATE: It looks like this question is very closely related to Graphical Command Shell, which captures the essential idea presented here.

A: 

You should really try Launchy - it's exactly what you're looking for, a "run anything" with intelligent autocompletion. It completely changes the way you interact with a Windows PC.

And it has open source-code, so you can borrow its autocompletion code if you want to roll your own interface.

Eli Bendersky
The tool comes highly recommended, however, some argue that it's CPU intensive http://stackoverflow.com/questions/107383/what-is-the-best-windows-program-launcher
Saif Khan
@eliben: Yup. I've been there, done that. I gave Launchy some attention a few months ago and abandoned it. The latest one I am using is called Find and Run Robot (FARR). The reason: FARR is extensible through scripting in javascript, ruby, python etc.
dreftymac