You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I investigated it and got the idea to suppress this.
Currently, below sequence is resulted to "Command not found".
⚡ : :update $id
Command not found
The patch below makes ⚡ : (start with colon + space) as a signal not to expand the typable id.
⚡ : :update $id
update'$id'[Yn]n
However, with this patch, we cannot use :reply, (quoted) :retweet, and more perhaps.
Those require the $id to determine the target tweet. One more thing, some commands
are using input() internally, then the input_filter will be applied twice.
Any idea?
diff --git a/lib/earthquake/input.rb b/lib/earthquake/input.rb
index 870cefc..9469c25 100644
--- a/lib/earthquake/input.rb+++ b/lib/earthquake/input.rb@@ -141,6 +141,7 @@ module Earthquake
end
input_filter do |text|
+ next text if text.sub!(/\A: /, "")
if text =~ %r|^(:\w+)|
if target = command_aliases[$1]
text = text.sub(%r|^:\w+|, target)
I don't want to introduce any escape sequences, though ;-).
The text was updated successfully, but these errors were encountered:
How can I tweet $id, instead of for instance 187363363188248580?
I investigated it and got the idea to suppress this.
Currently, below sequence is resulted to "Command not found".
The patch below makes
⚡ :
(start with colon + space) as a signal not to expand the typable id.However, with this patch, we cannot use :reply, (quoted) :retweet, and more perhaps.
Those require the $id to determine the target tweet. One more thing, some commands
are using input() internally, then the input_filter will be applied twice.
Any idea?
Also available: https://gist.github.com/2237938
I don't want to introduce any escape sequences, though ;-).
The text was updated successfully, but these errors were encountered: