From de42b9be67767ee58fb4e9190bad1d13bf54dc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Tue, 23 Jul 2013 15:29:48 +0200 Subject: [PATCH] cli: editor: show current configuration for 'nmcli' command without arguments --- cli/src/connections.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cli/src/connections.c b/cli/src/connections.c index 38ac879283..eda7e21899 100644 --- a/cli/src/connections.c +++ b/cli/src/connections.c @@ -3932,7 +3932,7 @@ editor_main_help (const char *command) printf (_("help/? [] :: help for the nmcli commands\n\n")); break; case NMC_EDITOR_MAIN_CMD_NMCLI: - printf (_("nmcli :: nmcli configuration\n\n" + printf (_("nmcli [ ] :: nmcli configuration\n\n" "Configures nmcli. The following options are available:\n" "status-line yes | no [default: no]\n" "save-confirmation yes | no [default: yes]\n" @@ -4945,6 +4945,14 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t menu_ctx.main_prompt = nmc_colorize (nmc->editor_prompt_color, "nmcli %s> ", nm_setting_get_name (menu_ctx.curr_setting)); } + } else if (!cmd_arg_p) { + printf (_("Current nmcli configuration:\n")); + printf ("status-line: %s\n" + "save-confirmation: %s\n" + "prompt-color: %d\n", + nmc->editor_status_line ? "yes" : "no", + nmc->editor_save_confirmation ? "yes" : "no", + nmc->editor_prompt_color); } else printf (_("Invalid configuration option '%s'; allowed [%s]\n"), cmd_arg_v ? cmd_arg_v : "", "status-line, save-confirmation, prompt-color");