diff options
author | Franck Bui <fbui@suse.com> | 2016-11-17 18:22:43 +0100 |
---|---|---|
committer | Franck Bui <fbui@suse.com> | 2016-11-17 18:23:32 +0100 |
commit | 539622bd8c0b425626cab8562c85a5b0e1dda502 (patch) | |
tree | e79fbf5467d0f98288d889f27455af6c53e100f2 /src/core | |
parent | c891efaf8a37aa13d91835fb8d194f6dd750a78f (diff) |
core: in confirm spawn, suggest 'f' when user selects 'n' choice
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/execute.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 53aed1f287..084eca334c 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -746,7 +746,7 @@ static int ask_for_confirmation(const char *vc, Unit *u, const char *cmdline) { } for (;;) { - r = ask_char(&c, "yfshiDjc", "Execute %s? [y, f, s – h for help] ", e); + r = ask_char(&c, "yfshiDjcn", "Execute %s? [y, f, s – h for help] ", e); if (r < 0) { write_confirm_error_fd(r, STDOUT_FILENO, u); r = CONFIRM_EXECUTE; @@ -785,6 +785,10 @@ static int ask_for_confirmation(const char *vc, Unit *u, const char *cmdline) { case 'j': manager_dump_jobs(u->manager, stdout, " "); continue; /* ask again */ + case 'n': + /* 'n' was removed in favor of 'f'. */ + printf("Didn't understand 'n', did you mean 'f'?\n"); + continue; /* ask again */ case 's': printf("Skipping execution.\n"); r = CONFIRM_PRETEND_SUCCESS; |