ls-files: convert show_ru_info to take an index