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=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29908 invoked from network); 13 Sep 2023 16:02:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2023 16:02:11 -0000 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:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=sINiKhcH33DYtqT71v5GePFKWf2E+uu/h/XUBHVjwvQ=; b=pEzeCsyh8L8Q+BFhTO9RVU/dsD yxN68qXRhlLWPG0xJQDfos7t+FeMxZhYmLcKmBqQJVUwliu6nntBVUTBsEtw1l8dsKiZ8PF1vlmSw 7md/IW3WGwQAIgxv93jju6KvE0iSJx2gsc0pDHaK2gx9AOb6f5BZXt+L8dWU+zC78nP+O3Ta6b0d4 22GsCd55uZ0uCI76OLLNp7EpxL8d1tGff2snqmUVa4ghjqKkb/GqkBzPYV3He60ESPAQTX7zBQVXt S2UrCK7xiDNvP0qxaW6T5mhutU4T9h/n7GUVpQX4ZrvGOewrt+3HeZp6Qc4G5d50CuNNUwUFWcC++ NdMwdRDw==; Received: by zero.zsh.org with local id 1qgSJe-0006ie-KX; Wed, 13 Sep 2023 16:02:10 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qgSIr-000608-Bs; Wed, 13 Sep 2023 16:01:21 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1qgSIq-0008qS-R8; Wed, 13 Sep 2023 18:01:20 +0200 cc: Grant Taylor , zsh-users@zsh.org In-reply-to: From: Oliver Kiddle References: To: Roman Perepelitsa Subject: Re: Is there a way of getting current xterm buffer? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <34002.1694620880.1@hydra> Date: Wed, 13 Sep 2023 18:01:20 +0200 Message-ID: <34003-1694620880.833890@ywcd.55nf.YL_G> X-Seq: 29252 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: Roman Perepelitsa wrote: > xterm does not have this capability and neither do any of the most > popular 10 terminals. The only exception among popular terminals is > tmux. I don't know of any other terminal with this capability but if > it exists it's not a popular one. Within limits, it's possible with rxvt-unicode. 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 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. 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. Aside from tmux, screen also has the feature with screen -X hardcopy Oliver