Skip to content

Commit

Permalink
Fix stdout frontend not being available
Browse files Browse the repository at this point in the history
The iota view is already exclusive in respect to the end value, so since
stdout was the first item it would unintentionally be skipped in the zip
operation.
  • Loading branch information
vimpostor committed Oct 3, 2024
1 parent 5cb10be commit 6a723de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/getopts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool parse(const QStringList &args) {

if (p.isSet(frontend_opt)) {
// find frontend, even if only a prefix matches
auto frontend_selection = std::views::zip(frontend_opts, std::views::iota(0UZ, frontend_opts.size() - 1)) | std::views::filter([&](const auto &i) { return std::string(std::get<0>(i)).starts_with(p.value(frontend_opt).toStdString()); });
auto frontend_selection = std::views::zip(frontend_opts, std::views::iota(0UZ, frontend_opts.size())) | std::views::filter([&](const auto &i) { return std::string(std::get<0>(i)).starts_with(p.value(frontend_opt).toStdString()); });
if (frontend_selection.empty()) {
// match must be unique
std::cerr << "frontend needs to be one of the following:" << frontends_descr << std::endl;
Expand Down

0 comments on commit 6a723de

Please sign in to comment.