Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Added a config.async option."

This reverts commit 10924b1.
  • Loading branch information...
commit 935745e5a873ac1528c07bb0c81d4dd2b93f5c30 1 parent 10924b1
jugyo authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 lib/termtter/client.rb
7 lib/termtter/client.rb
View
@@ -21,7 +21,6 @@ module Client
config.set_default(:update_interval, 300)
config.set_default(:prompt, '> ')
config.set_default(:devel, false)
- config.set_default(:async, false)
Thread.abort_on_exception = true
@@ -192,14 +191,13 @@ def call_hooks(point, *args)
end
def call_commands(text)
- invoke_method = config.async ? :invoke_later : :invoke_and_wait
- @task_manager.send(invoke_method) do
+ @task_manager.invoke_and_wait do
# FIXME: This block can become Maybe Monad
get_hooks("pre_command").each {|hook|
break if text == nil # interrupt if hook returns nil
text = hook.call(text)
}
- next if text.empty?
+ return if text.empty?
commands = find_commands(text)
raise CommandNotFound, text if commands.empty?
@@ -222,7 +220,6 @@ def call_commands(text)
end
end
call_hooks("post_command", text)
- Readline.refresh_line if config.async
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.