1
0
Fork 0
forked from glenux/mfm

feat: sort by fs.name instead of fs.type

This commit is contained in:
Glenn Y. Rolland 2023-11-24 10:49:32 +01:00
parent 211419ea02
commit 84230a6828

View file

@ -173,7 +173,9 @@ module GX
} }
end end
result_filesystem_name = Fzf.run(names_display.values.map(&.[:ansi_name]).sort).strip ## FIXME: feat: allow to sort by name or by filesystem
sorted_values = names_display.values.sort_by { |item| item[:filesystem].name }
result_filesystem_name = Fzf.run(sorted_values.map(&.[:ansi_name])).strip
selected_filesystem = names_display[result_filesystem_name][:filesystem] selected_filesystem = names_display[result_filesystem_name][:filesystem]
puts ">> #{selected_filesystem.name}".colorize(:yellow) puts ">> #{selected_filesystem.name}".colorize(:yellow)