clgrep
clgrepを呼び出すマクロです。changelogを表示しているときに呼び出してください。
入力ダイアログで検索文字列(正規表現)を入れ、OKを押すと検索結果が表示されます。検索エラーがあった場合、結果がない場合と同じ何もない画面が表示されます。
clgrep.rb*1とrubyの実行環境*2が必要です。clgrep.txtは結果出力用ファイルです。
oedit.scm
(app-set-key "Ctrl+5" (lambda() (chlog-clgrep))) ;clgrep呼び出し (define (chlog-clgrep) (begin ;*.rbが関連付けされていること (define clgrep-module-path (string-append (app-get-tool-dir) "clgrep.rb")) (define clgrep-result-path (string-append (app-get-tool-dir) "clgrep.txt")) (define clgrep-viewer-path (string-append (app-get-tool-dir) "oedit.exe")) (app-status-bar-msg "") (define edit-file (editor-get-filename)) (if (not edit-file) (app-status-bar-msg "ファイル名取得失敗") (if (equal? edit-file "") (app-status-bar-msg "ファイルがありません") (let() (win-exec "cmd" "/c" "del" clgrep-result-path) (define clgrep-input (app-input-box "clgrep")) (if clgrep-input (if (not (equal? clgrep-input "")) (begin (app-status-bar-msg (string-append "clgrep: \"" clgrep-input "\"")) (win-exec "cmd" "/c" clgrep-module-path (string-append "\"" clgrep-input "\"") edit-file ">" clgrep-result-path) (win-exec clgrep-viewer-path clgrep-result-path "/m txt")))))))))
ちらちら見える黒い画面はコマンドプロンプトです。見えないようにする方法はわかりませんでした…
検索元画面のステータスバーに入力された検索文字列を表示しているので、検索結果があやしい場合などの参考に。