mirror of https://github.com/djcb/mu.git
parent
d2a3a13242
commit
4d1352ec56
|
@ -159,6 +159,8 @@ struct Field {
|
|||
constexpr bool is_searchable() const { return is_indexable_term() ||
|
||||
is_boolean_term() ||
|
||||
is_normal_term(); }
|
||||
constexpr bool is_sortable() const { return is_value(); }
|
||||
|
||||
|
||||
constexpr bool is_value() const { return any_of(Flag::Value); }
|
||||
constexpr bool is_internal() const { return any_of(Flag::Internal); }
|
||||
|
|
|
@ -309,7 +309,7 @@ sub_find(CLI::App& sub, Options& opts)
|
|||
std::unordered_map<std::string, Field::Id> smap;
|
||||
std::string sopts;
|
||||
field_for_each([&](auto&& field){
|
||||
if (field.is_searchable()) {
|
||||
if (field.is_sortable()) {
|
||||
smap.emplace(std::string(field.name), field.id);
|
||||
if (!sopts.empty())
|
||||
sopts += ", ";
|
||||
|
|
Loading…
Reference in New Issue