o When "-n" is used with watch, it disables the use of <control-X> to
change terminals being watched. This change makes watch pass the <control-X> through to the terminal if it's not being intercepted-- previously, the keypress would simply be dropped.
This commit is contained in:
parent
e46aa4cdf0
commit
2fa4234089
@ -54,6 +54,7 @@ would be displayed,
|
||||
.Nm
|
||||
will exit. The reconnect flags are unaffected by
|
||||
this option.
|
||||
When this flag is used, <control-X> is passed through to the terminal.
|
||||
.It Fl W
|
||||
Allow write access to observed tty.
|
||||
.It Ar tty
|
||||
@ -72,7 +73,8 @@ Exit
|
||||
.It Sy "<control-W>"
|
||||
Clear screen.
|
||||
.It Sy "<control-X>"
|
||||
Change attached tty.
|
||||
Change attached tty, unless this feature is disabled, in which case
|
||||
control-X is passed to the terminal as with other control characters.
|
||||
.El
|
||||
.Sh RESTRICTIONS
|
||||
Only the superuser can run
|
||||
|
@ -371,12 +371,12 @@ main(ac, av)
|
||||
clear();
|
||||
break;
|
||||
case CHR_SWITCH:
|
||||
if (opt_no_switch)
|
||||
if (!opt_no_switch) {
|
||||
detach_snp();
|
||||
ask_dev(dev_name, MSG_CHANGE);
|
||||
set_dev(dev_name);
|
||||
break;
|
||||
detach_snp();
|
||||
ask_dev(dev_name, MSG_CHANGE);
|
||||
set_dev(dev_name);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (opt_write) {
|
||||
rv = write(snp_io, chb, nread);
|
||||
|
Loading…
Reference in New Issue
Block a user