def select_from(list, text = 'Select the index', default_idx = 0, raw_list = list)
      error "list and raw_list differs in size" if list.size != raw_list.size
      l     = list
      raw_l = raw_list
      if list.is_a?(Array)
        l = raw_l = { 0 => 'Exit' }
        list.each_with_index do |e, idx|
          l[idx + 1] = e
          raw_l[idx + 1] = raw_list[idx]
        end
      end
      puts l.to_yaml
      answer = ask("=> #{text}", default_idx.to_s)
      raise SystemExit, 'exiting selection' if answer == '0'
      raise RangeError, 'Undefined index'   if Integer(answer) >= l.length
      raw_l[Integer(answer)]
    end
def select_from(list, text = 'Select the index', default_idx = 0, raw_list = list)
      error "list and raw_list differs in size" if list.size != raw_list.size
      l     = list
      raw_l = raw_list
      if list.is_a?(Array)
        l = raw_l = { 0 => 'Exit' }
        list.each_with_index do |e, idx|
          l[idx + 1] = e
          raw_l[idx + 1] = raw_list[idx]
        end
      end
      puts l.to_yaml
      answer = ask("=> #{text}", default_idx.to_s)
      raise SystemExit, 'exiting selection' if answer == '0'
      raise RangeError, 'Undefined index'   if Integer(answer) >= l.length
      raw_l[Integer(answer)]
    end
Display a indexed list to select an i