lib/eco/cli/scripting/args_helpers.rb in eco-helpers-3.0.4 vs lib/eco/cli/scripting/args_helpers.rb in eco-helpers-3.0.5

- old
+ new

@@ -28,18 +28,19 @@ args = { exclude: exclude, all_available: all_available } unknown = arguments.unknown(**args) do |key, correct| - suggestions[key] = correct unless correct.empty? + next suggestions[key] = correct unless correct.empty? + suggstions[key] = '-- not known similar options! --' end unknown = unknown.select {|arg| is_modifier?(arg)} if only_options return if unknown.empty? suggestions_str = suggestions.slice(*unknown).map do |key, correct| str = "Unknown option '#{key}'." - str_corr = correct.map {|key| "'#{key}'"} + str_corr = correct.map {|ky| "'#{ky}'"} str << " Did you mean: #{str_corr.join(', ')}" unless correct.empty? str end.join("\n * ") msg = "\nThere are UNKNOWN OPTIONS in your command line arguments !!"