From owner-svn-src-stable@freebsd.org Tue May 23 08:09:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DF06D7AA30; Tue, 23 May 2017 08:09:06 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9B351069; Tue, 23 May 2017 08:09:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4N894Qn095511; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4N8940P095510; Tue, 23 May 2017 08:09:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201705230809.v4N8940P095510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 23 May 2017 08:09:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318730 - stable/11/usr.bin/resizewin X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 08:09:06 -0000 Author: trasz Date: Tue May 23 08:09:04 2017 New Revision: 318730 URL: https://svnweb.freebsd.org/changeset/base/318730 Log: MFC r318116: Random updates to resizewin(1) man page. Modified: stable/11/usr.bin/resizewin/resizewin.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/resizewin/resizewin.1 ============================================================================== --- stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:08:23 2017 (r318729) +++ stable/11/usr.bin/resizewin/resizewin.1 Tue May 23 08:09:04 2017 (r318730) @@ -27,27 +27,38 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2017 +.Dd May 9, 2017 .Dt RESIZEWIN 1 .Os .Sh NAME .Nm resizewin -.Nd update the kernel window size for the current TTY +.Nd update terminal size .Sh SYNOPSIS .Nm .Op Fl z .Sh DESCRIPTION -Query the terminal emulator window size with the +The +.Nm +utility +queries the terminal emulator for the current window size and updates +the size known to the kernel using the .Dv TIOCSWINSZ -ioctl and set the window size known by the kernel to the new values. -The terminal is assumed to be VT100/ANSI compatible. +ioctl. .Pp The following options are available: .Bl -tag -width ".Fl z" .It Fl z Do nothing unless the current kernel terminal size is zero. +This is useful when run from user's profile (shell startup) scripts: +querying the window size is required for serial lines, but not when +logging in over the network, as protocols like TELNET or SSH already +handle the terminal size by themselves. .El .Pp +After a terminal window has been resized, running +.Nm +updates the kernel's window size to match the new size. +.Pp .Nm is functionally similar to .Xr resize 1 , @@ -56,21 +67,18 @@ which is part of the distribution. However, .Nm -only works with VT100/ANSI-compatible terminals and does -not emit commands to set environment variables. +only works with VT100/ANSI-compatible terminals and directly sets +the terminal size instead of emitting commands to set environment variables. .Pp -After a terminal window has been resized, running -.Nm -updates the kernel's window size to match the new size. -.Pp -Note that virtually all modern terninals support VT100/ANSI escape -sequences, including xterm, konsole, gnome-terminal iTerm, +The terminal is assumed to be VT100/ANSI compatible. +The VT100/ANSI escape sequences are supported by virtually all modern +terminals; this include xterm, konsole, gnome-terminal, iTerm, Terminal.app, and PuTTY. .Sh SEE ALSO -.Xr resize 1 , -.Xr stty 1 +.Xr stty 1 , +.Xr tty 4 .Sh HISTORY The .Nm command first appeared in -.Fx 11 . +.Fx 11.0 .