Created
June 1, 2012 13:53
-
-
Save momo-lab/2852325 to your computer and use it in GitHub Desktop.
コマンドを打つときにコロンを付け忘れる派の人のためのearthquake.gem用プラグイン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# earthquake.gem plugin | |
# execute command even if you forgot colon | |
Earthquake.init do | |
input_filter do |text| | |
if (command = command(":#{text}")) and confirm("execute :#{text}", :y) | |
input(":#{text}") | |
return nil | |
end | |
text | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment