def get_input(*options)
puts "Choose one:"
options.each do |option|
puts "#{option}"
end
choice = gets.chomp.to_s
options.each do |option|
if choice.include?(option.to_s)
return choice
end
end
puts "Command not found..."
get_input(options)
end
if a user enters an invalid command it puts the available commands again but with the current value including [,]. How would I avoid this.
[,]. I don't understand what "current value" refers to or what you mean by "including[,]".