Skip to content

Commit

Permalink
modules: Print hint for the module list table
Browse files Browse the repository at this point in the history
  • Loading branch information
pkratoch authored and jan-kolarik committed Oct 9, 2023
1 parent b8979df commit 7232188
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions dnf5/commands/module/module_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void ModuleListCommand::run() {
}

output::print_modulelist_table(query.list());
output::print_modulelist_table_hint();
}

} // namespace dnf5
8 changes: 8 additions & 0 deletions include/libdnf5-cli/output/modulelist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ namespace libdnf5::cli::output {
enum { COL_MODULE_NAME, COL_MODULE_STREAM, COL_MODULE_PROFILES, COL_MODULE_SUMMARY };


const std::string MODULELIST_TABLE_HINT = _("\nHint: [d]efault, [e]nabled, [x]disabled, [i]nstalled");


static struct libscols_table * create_modulelist_table() {
struct libscols_table * table = scols_new_table();
if (libdnf5::cli::tty::is_interactive()) {
Expand Down Expand Up @@ -111,6 +114,11 @@ void print_modulelist_table(Query & module_list) {
}


void print_modulelist_table_hint() {
std::cout << MODULELIST_TABLE_HINT << std::endl;
}


} // namespace libdnf5::cli::output

#endif // LIBDNF_CLI_OUTPUT_MODULELIST_HPP

0 comments on commit 7232188

Please sign in to comment.