Skip to content

Commit faa0a0b

Browse files
committed
[tests] sort unknown command listing
1 parent 1726eee commit faa0a0b

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/command_executor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ execute_command(exec_context& ec, const std::string& cmdline)
155155
= lnav_commands | lnav::itertools::map([](const auto& pair) {
156156
return pair.first.to_string();
157157
});
158-
auto similar = cmd_names | lnav::itertools::similar_to(args[0]);
158+
auto similar = cmd_names | lnav::itertools::similar_to(args[0])
159+
| lnav::itertools::sorted();
159160
auto um = lnav::console::user_message::error(
160161
attr_line_t("unknown command: ").append_quoted(args[0]));
161162
if (!similar.empty()) {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
✘ error: unknown command: “writ-to”
22
 = note: did you mean one of the following:
3+
write-cols-to - Write SQL results to the given file in a tabular format
4+
write-csv-to - Write SQL results to the given file in CSV format
5+
write-raw-to - In the log view, write the original log file content of the marked messages to the file. In the DB view, the contents of the cells are written to the output file.
36
write-table-to - Write SQL results to the given file in a tabular format
47
write-to - Overwrite the given file with any marked lines in the current view
5-
write-raw-to - In the log view, write the original log file content of the marked messages to the file. In the DB view, the contents of the cells are written to the output file.
6-
write-csv-to - Write SQL results to the given file in CSV format
7-
write-cols-to - Write SQL results to the given file in a tabular format

0 commit comments

Comments
 (0)