diff options
Diffstat (limited to 'sinksh/syntax_modules/sink_list.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_list.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sinksh/syntax_modules/sink_list.cpp b/sinksh/syntax_modules/sink_list.cpp index a609463..f9cda1a 100644 --- a/sinksh/syntax_modules/sink_list.cpp +++ b/sinksh/syntax_modules/sink_list.cpp | |||
@@ -74,16 +74,11 @@ bool list(const QStringList &args_, State &state) | |||
74 | 74 | ||
75 | auto type = options.positionalArguments.isEmpty() ? QString{} : options.positionalArguments.first(); | 75 | auto type = options.positionalArguments.isEmpty() ? QString{} : options.positionalArguments.first(); |
76 | 76 | ||
77 | if (type.isEmpty() || !SinkshUtils::isValidStoreType(type)) { | ||
78 | state.printError(QObject::tr("Unknown type: %1").arg(type)); | ||
79 | return false; | ||
80 | } | ||
81 | |||
82 | Sink::Query query; | 77 | Sink::Query query; |
83 | query.setId("list"); | 78 | query.setId("list"); |
84 | 79 | if (!SinkshUtils::applyFilter(query, options)) { | |
85 | if (options.options.contains("resource")) { | 80 | state.printError(QObject::tr("Options: $type [--resource $resource] [--compact] [--filter $property=$value] [--showall|--show $property]")); |
86 | query.resourceFilter(baIfAvailable(options.options.value("resource"))); | 81 | return false; |
87 | } | 82 | } |
88 | if (options.options.contains("filter")) { | 83 | if (options.options.contains("filter")) { |
89 | for (const auto &f : options.options.value("filter")) { | 84 | for (const auto &f : options.options.value("filter")) { |