From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2761 invoked from network); 13 Sep 2023 19:01:20 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2023 19:01:20 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694631680; b=cpKSUj81PFSF1DTGMTqWEVn/z1AXkVrzNSjq/FVxLyoZ2n/CFaI0zMxoiSoZDfLUr67VX3UFMK a8w9G7KowFVuia/DwNPT3q+qY4UExPNHhghJod0EcgDmbGkNUCrN2rETaNXH01dxxySpYayuag EUPsaM5mOeqnhMha+ZdYZ4glhkTr2UldX0L8TOgAMHJw0QcjKblTvf1MeAnsg/XiHVXKxk1Qjm /u2XQXNzQ1MNnGuQjUCAFQpjJdE4WU7jyU1iPuRgodhGNM5iroCyTW1yPzLsZKJ76gEzNhn1ZK l5fR4epcFptXiJC/M+QVT9YUYOXYPL3xnmBh/+Mg5fmJWw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (tncsrv06.tnetconsulting.net) smtp.remote-ip=45.33.28.24; dkim=pass header.d=tnetconsulting.net header.s=2019 header.a=rsa-sha256; dmarc=pass header.from=tnetconsulting.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1694631680; bh=aUuJ5VI1qStIYN5EHRq+wBkmDv80MzUkP9/u+jsvps0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature; b=rzPSnQNuRi3L0SU8BShzHrXG60Ud7Hpa7wkXg0GSx2N1KY4Z+QGQy8tT2jtSjbYDO+omstpyCL 7sc22rZg2gjqQyhN37OFAt/7O4kvIHMvT5FjNwGQcx+wE5HezKEo5zt1SN52+BzDoug1G/GF8Z ifbxsTdsS4DOlYCzPLKKbc8QqoYPYc5xB2yeOzhi6dFJ28yRunhPNUYmluJa/Sfh1ZcEHhs6mw rPlI8IdAOZcnjnFTv3NhAKrmLBi9LXnPzOp73ajsGTxyXlLePPZ1chTtGwUsqYDyjEWuFxpLoh m71vGYi5uPe2JC9sUTqLLKgA6acVnvUxxhKUXDt8mswsFg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=jhCDpBqZROCdyEt9yyrX42rMgC/CZbuH0FXtiOROjX0=; b=BBv5MldwHGG6z1aZTeOG7y/dj/ bJwiva4kEoo5Nkg9lKxg6hY/ULs3cYWqb3FDPJaluI5jKgXGoEwdCBPnILRIrQJ6vMAbh34591iUx shDWKdZEFIpmsLW5RnatFHuKeldyLoX6KW1kgKnKQ4vo9JS8sBhztcQ83e0+GOPZjoC4UsXwc8GCi 2t/SbgIMHl0KaJwR3PRsOqaVIKTU80gkjOzUnbF7wIu/Ot8/X4cy7PiEbBGefvq9nfZAcHSvExejV ZS6Y5qZra2Dz6iD49NfyUAx+7PB8ufgLkzV2C4NmDDOO507WVKkalUTOaCyjLXV6XdleffwlnrdA4 V7GPa1Lg==; Received: by zero.zsh.org with local id 1qgV71-000FyR-J1; Wed, 13 Sep 2023 19:01:19 +0000 Authentication-Results: zsh.org; iprev=pass (tncsrv06.tnetconsulting.net) smtp.remote-ip=45.33.28.24; dkim=pass header.d=tnetconsulting.net header.s=2019 header.a=rsa-sha256; dmarc=pass header.from=tnetconsulting.net; arc=none Received: from tncsrv06.tnetconsulting.net ([45.33.28.24]:55808) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1qgV5T-000FFF-5W; Wed, 13 Sep 2023 18:59:48 +0000 Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 38DIxfN0006854 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 13 Sep 2023 13:59:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tnetconsulting.net; s=2019; t=1694631582; bh=jhCDpBqZROCdyEt9yyrX42rMgC/CZbuH0FXtiOROjX0=; h=Message-ID:Date:MIME-Version:User-Agent:Subject:Content-Language: To:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:Cc:Content-Disposition:Content-Language: Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To: Message-ID:MIME-Version:References:Reply-To:Resent-Date: Resent-From:Resent-To:Resent-Cc:Sender:Subject:To:User-Agent; b=uPkzFUQKlqZUSlgyaOX6Om1ri3N7tXxFGI2TUkm9ZrgZOqu5IIM1R/YYLWdJa5H8j AM4aSVJgZB84am0dNNg3GzIxUZVfkktASk3/+SUscDRzLfFxWUWc2h+tbmkxopd4jy NwIqACmsOqcsonRpaGu2xIEu00vzib/n7psoJzbA= Message-ID: <4e08010c-b452-a807-ab0a-d40af8983203@tnetconsulting.net> Date: Wed, 13 Sep 2023 13:59:33 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Is there a way of getting current xterm buffer? Content-Language: en-US To: zsh-users@zsh.org References: <34003-1694620880.833890@ywcd.55nf.YL_G> From: Grant Taylor In-Reply-To: <34003-1694620880.833890@ywcd.55nf.YL_G> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 29256 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 9/13/23 11:01 AM, Oliver Kiddle wrote: > Within limits, it's possible with rxvt-unicode. I may be wrong, or have misunderstood what the OP is wanting to do. But I disagree. > The escape sequence \e[0i is equivalent to pressing Shift-Print_Screen > which is for sending the scrollback buffer to a printer. To actually > capture the output you need to send it to a file instead of a printer > which is configured from .Xresources, e.g. as > > Rxvt.print-pipe: umask 077;cat >/tmp/XXX XTerm supports DEC's "Media Copy" feature. > Same basic concept may work with other terminals but the data is > being dumped to a file rather than sent down the tty line. So given > ssh connections or permission changes the zsh completion widget at > the other end won't be able to read it. My understanding is that the OP wanted the data to go back to the host sending the control sequences, not a local file / printer. Ergo why I say that rxvt's feature you're talking about and XTerm's Media Copy feature won't do what I understand the OP to want to do. My understanding is that the OP wanted the host to be able to scrape the screen so that it could intelligently modify something on the screen, ostensibly something like command completion or such such handy behavior. > And I'd agree with Grant that the entire concept is questionable from > a security perspective. Many terminals removed even the feature for > retrieving the title bar text. I'm okay with the idea of having the terminal switch it's output to a local AUXiliary port -- ostensibly connected to a printer -- redirect /future/ output to said AUX port & printer. At least until the terminal is directed to start sending things to the screen again. > Aside from tmux, screen also has the feature with screen -X hardcopy Sending existing screen contents back to the host is considerably different than sending new content to an alternate location. -- Grant. . . . unix || die