Fun idea Graham!
It should be an interesting way to discover new commands-an urgent
problem, I'd think. And not only would autocomplete increase
serendipity, it could also work as a more immediate ls.
I liked that parameters are stored together with the command but I'm
not so sure about storing actual queries. Not only does it feel like a
privacy breech but it doesn't feel very helpful, cluttering the list
to boot.
An intriguing variation would be to autocomplete with a list showing
commands and their man pages' first line. Then, when selecting a
command, it, together with man-page-obtained parameters, would be
inserted; you'd be placed directly next to the first parameter; and
tabbing would take you across parameters. OK, the tabbing part would
be hard, but it would be cool. For example, when selecting the xe
command ""xe -amount -from -to " would be inserted, you'd be placed
right after -amount, and tabbing would cycle to -from and -to.
In the interest of speed (I'm known to exaggerate so brace yourself)
you could make the script-submitting through an AJAX call that awaits
no confirmation (after all, calls almost never fail and failures are
not at all critical in this case). You'd be thus replacing sequence
with synchrony and two small chains are stabler and faster than one
long one. :)
Anyway, thanks for giving back! Hope this keeps evolving.
-elzr.com
On Sep 30, 8:48 am, Graham <grahamedgeco...@gmail.com> wrote:
> I really like this, and I thought it was time to give something back.
> So I decided to program an auto complete function for YubNub:
http://www.grahamedgecombe.com/yubnub/.
> When you use it, it will save the command and parameters you use and
> how many times it has been used in that way.
> Then, when you type in a command, it will automatically "guess" what
> you are typing. Like Google Suggest.
> It stores everyones results in a database, so the more people use it,
> the bigger the database becomes. It will submit the request to a
> script that adds your command in the database, then it will redirect
> it to the YubNub parser.
> I'm pleased with the way it works :).
> Please try it out, I will be interested in people's opinions on it.