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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 97853252B4 for ; Tue, 7 May 2024 01:04:40 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1715036680; b=mkVECdiw5H0AvzjRQpSZmYfJgB8+xyIM6VtMFkSjgZ9625TyRMdRDK4MYuS36po7/NI1oR8O0h IRerrljQT5Lo6nkY6k8gOpk10kKMluhmwV7QwLV5mCWV6LkrCEqNbD408oiomo8rTiS2Ppa40m TWWm0pYHoEN8Nwx44UQu6/BQrAycASrY3J20zuk1Usg2Ql8ahp9GjUC94j0px5Bxl8pkjgKdV7 2gxZLLJOjzdKeYwxd+vxVMlzDukK1+ezPnB5w5ryCxs52k6T0mHRWLDz9V00Qfn9ajxkOj8fEo jX2m26Ig249xXMy0KmJtmSztftXuVEdwS9LayoWpwK+l8Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1715036680; bh=aF4PvGBTWBJQdTXIj3azcNwzXf6hn4kUNGHGemTmaAg=; 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; b=WoBYM9KpIGV+3s0Gxb6AuX8CQFH77zge1MCf1/EA9UYzxHmkeXoFz5Cat3R70m+gdoB3KVCf+0 jGBK53Nb5dhSykg8Gnn7R5rKAlGXdl+6HYxF+V9CkQtUcd9hKD+hI5GLpq7z5tfcpEXcp8JZEZ EFEmI0fC5I1BqYVR3YJi6+SzjENuQpO5FKMHuxv/20jIJHgeCdMkc4Mc3aWlBmZysxpMI8E/U9 85snKG1jBTIjSKTQpzMuexUH5p4XbQfOGHCENBIYG6i9DXeEUvi9NohDXTqLWi91hw0/BloM8L aDaRF1BMk0FR9skVP3iRZfu3IwSgP1SMUXvB2j1tw0W3xQ==; 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=gR+I88CvKPAwVqooAZDT15vA3kYQ+nvvo4T5sYy5/pI=; b=U6QtCmHrofcstPRj/dXsxR61Bk +aT8HuozyiEsOnua75sbrdTmA2DyrGvZ7zrBhyFVC6wJ8U8Eb/JV79Taiu0AB0HakbyMmtXUIERmU tl9biVHAY/28nVmP2a/ifkgZbCZm8Xwp8Olip6Emq1xfSBB9lr6FTQDC6CkAVp4JHh+d/PkSqxmG/ q1gJlgrzw8y/kpxjp8y45sUfXzdUcIudd1tpvqowQp1wbp4xxvwMEGsk4+n6S0xPJPbmZ2SDh1pgX xg8RrqgqbH5ZDiNoelsvdta32f0/XbO0RzEObVY8EyHi6QKOPKw0D6dCeAMisL1Dea/srOZSEEyqp hho63SKA==; Received: by zero.zsh.org with local id 1s47Nw-000Hhc-Eh; Mon, 06 May 2024 23:04:40 +0000 Authentication-Results: zsh.org; iprev=pass (mta04.eastlink.ca) smtp.remote-ip=24.224.136.10; dmarc=none header.from=eastlink.ca; arc=none Received: from mta04.eastlink.ca ([24.224.136.10]:50775) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1s47Lx-000Gwf-GH; Mon, 06 May 2024 23:02:39 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0SD30X2ZF6NYYE41@mta04.eastlink.ca> for zsh-users@zsh.org; Mon, 06 May 2024 20:02:36 -0300 (ADT) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id 47Ltsr8bO98ni47LuspTux (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Mon, 06 May 2024 20:02:34 -0300 X-Authority-Analysis: v=2.4 cv=C75KyhP+ c=1 sm=1 tr=0 ts=6639618a a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=IkcTkHD0fZMA:10 a=jtNJTbS6jvK6mbEN16YA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvjedgudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepteffhffgvdeffeelveelhfegudevkeduhfehheevhfekhfevieehjeejheefvefgnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddruddungdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <9022e6cd-74a0-4438-a858-c0cf2f747d8e@eastlink.ca> Date: Mon, 6 May 2024 16:02:33 -0700 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: create variable with calculated number of spaces. To: zsh-users@zsh.org References: <8809e9e7-2389-4bb7-ba67-95222d302594@eastlink.ca> Content-language: en-US From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29916 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 2024-05-06 15:38, Mark J. Reed wrote: > or, more efficiently: > >     printf -v spacer "%${diff}s" '' Nice and compact.  One thing tho, I'm not sure this is the correct way to think, but I have an instinct to stay away from 'fancy' commands like printf and to rely on native zsh code where possible.  Legit?  Or false frugality?  What I half-remember is some loop that has an iteration counter.  Mind, there was one of Roman's speed tests where he used an external command and had a huge performance improvement, so thereyago.