diff options
author | 2006-03-28 20:16:24 +0000 | |
---|---|---|
committer | 2006-03-28 20:16:24 +0000 | |
commit | 9c992faff6f76e1ec47a2b240c5e9150809cd6c5 (patch) | |
tree | e944609357853a78bc4b1ee5f1121021679b59d2 | |
parent | merge in perl 5.8.8 (diff) | |
download | wireguard-openbsd-9c992faff6f76e1ec47a2b240c5e9150809cd6c5.tar.xz wireguard-openbsd-9c992faff6f76e1ec47a2b240c5e9150809cd6c5.zip |
Use <sp> and <cr> as shortcuts for y/n (like emacs)
requested by Han Boetes.
-rw-r--r-- | usr.bin/mg/echo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mg/echo.c b/usr.bin/mg/echo.c index 8a39b1bceeb..fcc9beb1a2a 100644 --- a/usr.bin/mg/echo.c +++ b/usr.bin/mg/echo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.43 2005/12/20 06:17:36 kjell Exp $ */ +/* $OpenBSD: echo.c,v 1.44 2006/03/28 20:16:24 kjell Exp $ */ /* This file is in the public domain. */ @@ -63,9 +63,9 @@ eyorn(const char *sp) ewprintf("%s? (y or n) ", sp); for (;;) { s = getkey(FALSE); - if (s == 'y' || s == 'Y') + if (s == 'y' || s == 'Y' || s == ' ') return (TRUE); - if (s == 'n' || s == 'N') + if (s == 'n' || s == 'N' || s == CCHR('M')) return (FALSE); if (s == CCHR('G')) return (ctrlg(FFRAND, 1)); |