diff options
author | Craig Small <csmall@dropbear.xyz> | 2023-01-17 16:59:00 +1100 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2023-01-17 16:59:00 +1100 |
commit | 5f4074a250a58ca53da42faf485072730d2fe9cf (patch) | |
tree | 6980e31de58d79f2ac986b9b0cc99d11e8aeac60 | |
parent | aa461df0a7727309ef2f7ce6f0336d1ba00fe414 (diff) | |
download | procps-ng-5f4074a250a58ca53da42faf485072730d2fe9cf.tar.gz |
watch: Pass through bell
Based upon merge request 104, closes #174
References:
procps-ng/procps!104
procps-ng/procps#174
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/watch.c | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -8,6 +8,7 @@ procps-ng-NEXT * top: E/P-core toggle ('5' key) added to help * vmstat: Referesh memory statistics Debian #1027963 * w: Add --pids option merge #159 + * watch: Pass through beep issue #104 procps-ng-4.0.2 --------------- diff --git a/src/watch.c b/src/watch.c index a69a402..c65f69b 100644 --- a/src/watch.c +++ b/src/watch.c @@ -647,6 +647,7 @@ static int run_command(char *restrict command, char **restrict command_argv) } while (c != WEOF && !iswprint(c) && c < 128 && wcwidth(c) == 0 + && c != L'\a' && c != L'\n' && c != L'\t' && (c != L'\033' @@ -655,6 +656,7 @@ static int run_command(char *restrict command, char **restrict command_argv) do c = getc(p); while (c != EOF && !isprint(c) + && c != '\a' && c != '\n' && c != '\t' && (c != L'\033' @@ -673,6 +675,10 @@ static int run_command(char *restrict command, char **restrict command_argv) eolseen = 1; else if (c == L'\t') tabpending = 1; + else if (c == L'\a') { + beep(); + continue; + } #ifdef WITH_WATCH8BIT if (x == width - 1 && wcwidth(c) == 2) { y++; |