noun-first cheating

なにもいれずにキーワードを入力してEnterおすと
twitterになるのをgoogleに変えたいんだが・・

http://pc11.2ch.net/test/read.cgi/esite/1220259106/257

を実現するための yak shaving

用語解説
Verb
動詞。コマンドを特定する文字列。
Noun
名詞。コマンドの引数。種類によって一致する文字列が異なる。
noun_arb_text
任意入力を表す名詞。rankLast フラグが true
Frequency Score
コマンドの実行頻度。プレビューはカウントされない。
Noun-First Suggestion
入力がどの Verb にも一致しない場合,Noun と見なされてこれに適合するコマンドが Frequency Score 順に並ぶ。但し rankLast 付きは除外優先度が下がる

詳しくは Labs/Ubiquity/Parser Documentation - MozillaWiki へ。

手順
  1. #586 のパッチを当てる
    そもそも Noun-First Suggestion が壊れてるので直す。
  2. noun_arb_text を使わない「 google 」を用意
    例えば http://gist.github.com/60561
  3. Frequency Score を上げる
    地道に実行しまくってもいいが,アホらしいので
    sqlite3 ubiquity_suggestion_memory.sqlite ^
    "update ubiquity_suggestion_memory set score = 9999 where input = '' and suggestion = 'google'"
    するとか,このためだけに作った http://gist.github.com/73453 をどうぞ。
+

オフにしてるはずなのにそうなった

http://pc11.2ch.net/test/read.cgi/esite/1220259106/260

ついでに直したつもりが直ってなかった。#586 に付けたパッチを更新した。