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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27173 invoked from network); 13 Sep 2023 14:37:06 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Sep 2023 14:37:06 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1694615826; b=XZ6SfBRi2iUTgJppsh/TTu12gTUk5vt2NR8uGCqK6UPzE++nzprxaXvxrWfQGuelQDoNKntCC1 qr/EV7E+B/4KRlnRe7/jKktqHoXVjktU2lWd4z6UybJyLonobsSHOSfomDTgmcT1glhFlWrruN dQjxE0/p+us6vQDS+c6PDbV1Yz1q1p3r5sdRd9+hyp6iHvi0DAzozDEAfEk4NOPoh/janZxRHo y3HTUF4+OD9mjdR+0BQ8vzf4MnFWc0nzn7GQuk8FaoTmft8QPzLy6RaHp6SU9gz/S9AY0DrPCk D+IAsZL3HOnJ907k4YXwKFedHvEVhGmdD6Vi1zi29nSGQQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1694615826; bh=K8ELHAZN1KPUZlxSHA0vfYUOeeA5UlzlWTLCAF4COfY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=X49xJqjxHL78xXbqmC5hpVH9QjaOtAlDgcR+eaaD33bLdStvWJP2i+thFPwT3xhmiIVowNO4sV d94nIq0PQeTjqmmuNcR47TwTq0KVMyeCf/1P2qWwVK9piG5OZ0WOvVvLD2MBhVAHzWR2Cx2FFB SC6BlZKjUGi89MkTHI+vhLYAottmZscdE44PVrEUALd+39ZeYjHnpKWVepfJZENDCHmnfMsmeQ mGSncNY1JUufRoWd800+34yTdufFV5mbQVQIBolyMBCZA3F/SvMMWCZB0t8wshw1woBhtNnjXl 343nQZ1engfVXwp10GuwbYuvEidJKjcwOTQRKI8b5+0CAw==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4MA6v2+TVeqJUol/unO/48jr/4Xb3C/rxzPVilPdvd0=; b=krsQfRNRGhxr9h6hhoe6yvu1WL zUMXQm4PIWs78QaNWMDrEfL1CNpcFqS2D0HEzc3ltQXmVUL+nwJRGuKRGR2HANBKnG1GFTjN/4sqq CGfMeh+vrdoLdYr6jrtzHpfkHgxyMusxZJ4SB3+/D0CKEwE35p9zAi0m0xkQ52XjxbqkG84yhVrC5 PxO2KV5VdJQF4h9Z3nZXjvgzw4SsAjSudExU/LE6hIDfUDO0UH1Xxqmvd6Nn1Lo9tDx9KvYm2awhX KgK9Z+DAQB/+UApIRQ7vWiHUKWyKZmdXQkjHUk+1ewI0H5aC+bGx6pfQBfS+gRvHLKyjhdYSZEaX/ gbIzhb3Q==; Received: by zero.zsh.org with local id 1qgQzI-000MPU-2v; Wed, 13 Sep 2023 14:37:04 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f43.google.com) smtp.remote-ip=209.85.167.43; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-lf1-f43.google.com ([209.85.167.43]:59696) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qgQyH-000LfL-Ar; Wed, 13 Sep 2023 14:36:02 +0000 Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-502d9ce31cbso1756767e87.3 for ; Wed, 13 Sep 2023 07:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694615760; x=1695220560; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4MA6v2+TVeqJUol/unO/48jr/4Xb3C/rxzPVilPdvd0=; b=de540rocH23Zd4H+zghqM5ncNg6SWx7Ds4pEIxdHW+7vuJpVrAq869zFkJX3AcKHxZ lETf/RRkIBw3lfcfEtDoE3rPJAFuNRGvaeOjv0+XsAemRdgteEg2q/GpaF/nq1GWSr/D 0tw4yMgTIDCGx0dh6t3K5bONF8SHvW/6cPh8rOcu/w3W2cmDJcBnnTVwFJxv02+81Zo+ CZoJNdM1C6D3soQGplLZTGqjUEQq9CgPNIrc/wKd6y5kBTdjohI4otqNSTM4bCYpKDXH KfzE/XRYaPst/PVGkQrFruJ4KAXdhPidWOudU/jpF3whYwyKk5skCPUFELlkV0dvFVzj Ak9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694615760; x=1695220560; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4MA6v2+TVeqJUol/unO/48jr/4Xb3C/rxzPVilPdvd0=; b=mQAKgSu8lV1ahBDAxeA0x3vBA1bywsXadpdaZ7GZ9TknIoNM7nSd6HITSEERwdXdIg gZ1D9baJZrqCKRD8MohEH9fODiQRkFi+CBmEvi12ObfSzrHaE3B4wr82Kht1FF+yIXNf bMP9kDmQ9GX2zx3KdrssZM13Y8EakzL/ka1zFlD/cjTSZToHOixwijGuFetEFtBh/HZ9 NJf/mO+5uMyUbD60vSGvHAvTtllKTrOJkUhI4pDb8i1j5oU+VMEbtlkWq+G2eTaSW6ic hZ/V7Du8HgLxU7DkFrlx/oLPmrmVbR7PQ11VOZKvVLwkLLaZt6LaRjKNnGn1OmBXVomV xsbg== X-Gm-Message-State: AOJu0Yxxn7icdCqaKg4IdRzsh0x99W0lkSL7Vvzu8qIa5Tuz1UYIKsEZ H1LWvTQ8th3zVbY0y2WNQjjL5bKwslIh6YCEH8Q= X-Google-Smtp-Source: AGHT+IEiYvd1Xi8mzVzbl5sby8U+lMrPENkHelFKccrfriNQiBX8u7Ad+CdQEveNjO/A44mvviv756V80eMK++sNdwU= X-Received: by 2002:a05:6512:2509:b0:500:9b7d:ee3c with SMTP id be9-20020a056512250900b005009b7dee3cmr3036418lfb.7.1694615760227; Wed, 13 Sep 2023 07:36:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "A. Wik" Date: Wed, 13 Sep 2023 14:35:48 +0000 Message-ID: Subject: Re: Is there a way of getting current xterm buffer? To: Roman Perepelitsa Cc: Sebastian Gniazdowski , Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29245 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 Wed, 13 Sept 2023 at 09:16, Roman Perepelitsa wrote: > > On Wed, Sep 13, 2023 at 9:48=E2=80=AFAM Sebastian Gniazdowski > wrote: > > > > Hi, > > I would like to implement a from-screen-words completion. For this, > > I need the current screen text. People have already used tmux for > > this, however I don't use it. Is there a way to somehow read > > screen-text/ 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=E2=80=A6), but no > > success at the end. > > In general, terminals don't have this capability. The only terminal I > know that does is tmux. This isn't really a zsh question. > > Roman. > I think by looking into the termcap, terminfo, curses, and/or ncurses libraries, you could find out about the capabilities of different terminal types. Note that I'm no expert on this, I come from a DOS background, where you'd typically read/write directly to the video memory. -Albert.