lib/hammer_cli/shell.rb in hammer_cli-0.1.3 vs lib/hammer_cli/shell.rb in hammer_cli-0.1.4
- old
+ new
@@ -80,17 +80,13 @@
DEFAULT_HISTORY_FILE = "~/.hammer_history"
def execute
ShellMainCommand.load_commands(HammerCLI::MainCommand)
- if RUBY_VERSION >= "1.9"
- Readline.completion_append_character = ''
- Readline.completer_word_break_characters = ' ='
- Readline.completion_proc = complete_proc
- else
- Readline.completion_proc = lambda {}
- end
+ Readline.completion_append_character = ''
+ Readline.completer_word_break_characters = ' ='
+ Readline.completion_proc = complete_proc
stty_save = `stty -g`.chomp
history = ShellHistory.new(Settings.get(:ui, :history_file) || DEFAULT_HISTORY_FILE)
@@ -117,10 +113,9 @@
end
def print_welcome_message
print_message(_("Welcome to the hammer interactive shell"))
print_message(_("Type 'help' for usage information"))
- print_message(_("Command completion is disabled on ruby < 1.9 due to compatibility problems.")) if RUBY_VERSION < "1.9"
end
def common_prefix(results)
results.delete_if{ |r| !r[0].start_with?(results[0][0][0]) }.length == results.length
end