From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id CE8C7216AA for ; Mon, 20 May 2024 15:17:54 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1716211074; b=roL2NtLEJyI78DE4GqD64rSWplvTVqiY2Ho2Kp5gSvFncaMgLHRrIBVRcjgwUsQ61jziVeElAx 8RlCR9Nw5k4nYUZtl9NTbb6IT3JHfRTzSvfWohNsC7ObpNvxmsWb7FWX8derLBzSe30MfYZPLG l5TLBrg/vWkNOO2kbyKO79pe+6JtQWIbccXaJkT/FWA9eQzSptfOhAnFXYhmNogFTR+lT4e8KV bOcxFSH4lRA/K7p872T5rHJX+VrU5QXUp5bYx10Uann5wdSWQFnZe+n++5qE5FL3U8zHgT49BT XO7Ar/B++Xd+v2otCuY3A0QF6V+x+5+1OOgoqC9Uptsbqw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (csmtpq1-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.35; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1716211074; bh=CU48QL68O/D2XebINCoGDnAkipvgWEGUtWMjdC13CrM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=mEkYUtAfyhYYfemJDJavx92QcYcAtjE6DhN5QQadew6q4AXPD5jB/uqRjv2ZE2nwVtUQqnmUij 5FXrLjKwpYHmKewM9iz8fr6RHDDd8C5/FT06qSUIkzNCSeKa/4MRKEGPbkyOtEQKjTVV2fZ8dJ sWIguT1WONIgDsN9oi/4G35q4Bw8BatSsP3SeH53oBbRJIqG+x7iV1SDmDYg2XC5zCS56/shuu fOiRveoLTgjygD/Vnpn1/DqrrWOqr0jTli9sBXUVybY3EPH0sS6w75aAVMSPoE/tAjM+sXmyJw PuIAQgpl/IeFyMR27l32vJ7UIXiLMKKmwm+ZVR47OtuTxA==; 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:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=IutstX+0eJPViDdu9MHYcDS6/wj80DV8j6iOEazXbCQ=; b=nJLFseVlpkYVCxQBd7duhIYSv2 LAkiad5RM2QIh7idt8Yr8xGEz795PwGrqsLa0jp9t08MHsPb0jLDhEcn/3ylw2lx22JYrV5HdDeXH 8LbwJzSS0PrGfdhKTb/EJ7ur/b2m9cASYrYiIZQDhgnM3uGVaEY130vViyaUDEX88K/T9O/IAwIiy F9XPEBoc/VE+ji62zNXgcZe6reybHGxjY4ZX2xaBqi99/ilOdoLjrL6yCkhAmAcl0zWPbFjeM+27I uyOpxfHU9DLP4Zee1Az9UKJ1rwaPoLRBswrsMFm6FweXbf8ZEjf/0DtP3Xwh4bAk7jcQeQtUKbseS IUjoIlnQ==; Received: by zero.zsh.org with local id 1s92tm-0007q5-3f; Mon, 20 May 2024 13:17:54 +0000 Authentication-Results: zsh.org; iprev=pass (csmtpq1-prd-nl1-vmo.edge.unified.services) smtp.remote-ip=84.116.50.35; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from csmtpq1-prd-nl1-vmo.edge.unified.services ([84.116.50.35]:32009) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1s92t4-00076F-SD; Mon, 20 May 2024 13:17:12 +0000 Received: from oxsmtp4-prd-nl1-vmo.nl1.unified.services ([100.107.83.44]) by csmtpq1-prd-nl1-vmo.edge.unified.services with esmtp (Exim 4.93) (envelope-from ) id 1s92t1-001DQl-06 for zsh-users@zsh.org; Mon, 20 May 2024 15:17:07 +0200 Received: from oxbe23-prd-nl1-vmo.nl1.unified.services ([100.107.83.145]) by oxsmtp4-prd-nl1-vmo.nl1.unified.services with ESMTP id 92t0s4G1YlJX592t0sOekL; Mon, 20 May 2024 15:17:06 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-users@zsh.org X-SourceIP: 100.107.83.145 X-CNFS-Analysis: v=2.4 cv=f9saB/yM c=1 sm=1 tr=0 ts=664b4d52 cx=a_exe a=4EV+90gyzQY6HQuWV9fjcA==:117 a=IvlwODmuRu4A:10 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=Lq3jn0s5CtOIPLaXI7MA:9 a=QEXdDO2ut3YA:10 a=HbQOABYz3jhqdZF7JfnK:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1716211026; bh=CU48QL68O/D2XebINCoGDnAkipvgWEGUtWMjdC13CrM=; h=Date:From:To:In-Reply-To:References:Subject; b=nRpjrpDS5n4gp49Dd8XD27wC9A95bkGBgH+l+tsqzBk+xtiAJgydLfbWsjCUQsLB+ uK07WfR7PZlXDbnp8iF28ZAbgi1l8801OoUZuecF6gbRpYneTiYw1SYQA0Hs/8sSqY RVLsl1VfZDCfwSxtCXH4XGFJmaUapjgILToAlytsnyC+XR4YyMz5IBXyivjgr772Im zpohyWYZDft8hknDTzMJOTVYxnztfvq6gj4HMsG+QixOXn0LVjgpygZQepcKX4mDpk JrhbCjp0o+VrqDrQaAJ99ob6PiXJXWxgecDwU+KIQ7NRyPe4qZx3IgkZADgeHCIy6l BIalUlc8rLBGA== Date: Mon, 20 May 2024 14:17:06 +0100 (BST) From: Peter Stephenson To: Zsh Users Message-ID: <576626392.1946457.1716211026926@mail.virginmedia.com> In-Reply-To: References: Subject: Re: Yank index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.196 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfLAjnVpd71yN+56zdaJyPSOsQCst6t3HcxqK715XHzh/FTfrmph6H+0c3aJGxM0BR8nM8jySSHPW1q4UDs5sVWspp3y+7wxQ3Qg1DootzxewcZypi3i/ IBUQX8xyxGsavyBtM3cnrVKruo1RR0xx1K5SGDzPP8cMUvezTeGfD0uJQMBVDJ1niMh7g83Zj6bHvMRkj6TaslT8nY1VxpFHvNwbBf57y1kRhIT72/vnmbDP X-Seq: 29952 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 20/05/2024 12:31 BST Marlon Richert wrote: > Inside a ZLE widget, is there a way to get the kill ring index of> the > active yank? Is it possible to move this index? Looking at the code, I think it works in such a way that when you use the special array $killring, available via the zsh/zleparameter module, the first entry is the one most recently yanked, i.e. the killring you see in the variable effectively cycles by itself. (There is some relationship between $killring and $CUTBUFFER --- I'm reading the code as saying they can be manipulated independently, however.) You can set killring=(...) and that similarly becomes the ring with the first entry as if you'd just yanked it, so you can cycle through it just by assigning the array in a different order. However, I haven't tried this out, so I may be missing subtleties --- I doubt this ever got thought through to the level of detail you're now investigating. pws