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 28507 invoked from network); 13 Sep 2023 15:17:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2023 15:17:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694618233; b=exsfSizn2gvd/6DhDTtTRRd0dGtFzP0UxcJL+xvIprj17gtqhw+afjhqyfvhpMOKhwVke95yZg knE2Bw/nUP2n3zXRE/sVyiGRwrKqTyzSmbY7E3b+0VzXni1ySoxyfcehA7nVvrZng84c+sIvMe VkFp4Klj4JCx7ZlEoc9/0b9YFzu/cTwdHyoRvveP26RX06d+5jry3HxQXGIK6hhyDWwpMPHfkh H+ot4IKs28Ttsw9rEYr/SWMPhvMDyAX5C4H2DGPgwFHVEbHq6n9U/wOtqOqoFFN/9rmU9i8b6o avd8xuoFKqeZsgfohUDHGdVikEBu8iamelOYBNWYxryNtg==; 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=1694618233; bh=/IRbUZhPjHDOF61xSrkCFQ0BjtftqJvlGTg5nXvAGWA=; 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=mBrcpAtlsSf88upnoqrsO5xWxyJOdR7mIojgE+wBlQmUVfJAj2PqAvQqVCkTLRwC8AdYrNA1zt Lcf/ibYCiHZ2bhCrIh8vWFQGcEVHQnAYvdemAGDzDrqkxrg0rHKEW1bFEloOUBWcXgml7O3Hfh K6coV7G5M0wKwUGcvW72tT6Dztnu64bSdwDRnPwv32ksbVEKzaC1nbJBKW4HIURP81r7+K8CHe TRJhPQapI43PgMz8SWdD5cqo75XBvb2k9KH4IgojVCix5eD+Z3IOyms9cKUIABp2IxY7y5MqRj B/GWVhNvORo5mhgneAYhT2QQE4xWSev82Fi9ZRuaxfQOJA==; 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=omJpe+Ay6pmK/FP82C7sRM+AYkl/Iv356EH8bQE80IM=; b=W20ktu8FW8BLYJ0YHbbYrYE7Ua aH9mfyflOE1X57++QSJ+W/GO1CiHMOHPE7s8uFHypAm5orI6PVx4WiASG6i3KSDqC9swq9rhwh5Lp i1XOkE1ykML3fWhB+N5VApLorr1acLUglAvGJvHiJUVBaiis7CGTuf2jdnSMvAl06c1y1h7uBULru /0goH8PaLNc3RjgLXlB6arwRSomCcxhZ/uGiISVcEH1az16F1tdI0zQ/bhwwkauZ0Ta1qIolt0GJk 7Q4hb5eOdl1Zxn6jhbAKUDXS1C0TxLklz3c1I2r9xSxtWGoHSQwhnRPJls7KVOJQYGEsQYu8GHGto t2FGF37g==; Received: by zero.zsh.org with local id 1qgRc6-0001uu-GS; Wed, 13 Sep 2023 15:17:10 +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]:48784) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1qgRZf-000158-LP; Wed, 13 Sep 2023 15:14:47 +0000 Received: from Contact-TNet-Consulting-Abuse-for-assistance by tncsrv06.tnetconsulting.net (8.15.2/8.15.2/Debian-3) with ESMTPSA id 38DFEcTX030984 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 13 Sep 2023 10:14:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tnetconsulting.net; s=2019; t=1694618078; bh=omJpe+Ay6pmK/FP82C7sRM+AYkl/Iv356EH8bQE80IM=; 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=yuttDPjCTMWVPSRPnjLe+tAEqYdyxI/dWtkf4Nh929nWLImnH56UIRfcYMuDm+Wwj Gq0RbLkC1adAUbK4rTcYhsUG0PM1vFr79IDpRyFlYoU/IgJDiQj6XJWyK7yASm8YeP NFwb4SPBPMIo84NhMiMn1SMmPfwH5etDpOVTfEOE= Message-ID: Date: Wed, 13 Sep 2023 10:14:29 -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: From: Grant Taylor In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Seq: 29249 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: Pre-Script: As others have said, this probably isn't a Zsh question. On 9/13/23 2:48 AM, Sebastian Gniazdowski wrote: > Hi, Hi, > Is there a way to somehow read screen-text I'm not aware of one. But my ignorance doesn't preclude it from existing. > I've have had hopes for it when reading xtermctl and promptnl (this > function reads cursor position, so I've thought that maybe it could > read the character at given position…), but no success at the end. I'd suggest skimming / reading the XTerm Control Sequences page. Link - ctlseqs(ms) - XTerm Control Sequences - https://www.invisible-island.net/xterm/ctlseqs/ctlseqs.html N.B. the ctlseqs page is the most complete that I've found for XTerm -- which makes sense given the source. The only other thing beyond that is to delve into the manuals for various other terminals. XTerm should implement everything on it's ctlseqs page. I've found that most of the control sequences that XTerm and fancier DEC terminals support aren't even a glimmer in the eye of most terminal emulator programmers. Finally, I find the idea of allowing programs to read existing text on the screen to be a potential security violation. -- Grant. . . . unix || die