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,T_SCC_BODY_TEXT_LINE 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 871BE267F8 for ; Fri, 16 Feb 2024 19:04:08 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1708106648; b=kAx/aqVXY7XX73mEwmzIoaPV176Ig7gqhU958b5QjQqSHdOwlqMCeQf59fCKdP1UUqXG/m7vx9 zqbzpvCpdKYyzl7YtD+4fM07HLAHqN+AW9tBHtJcmHpCfLsZP5wCxOEHkQjaPcw70Ep+NhQY3S kKPkwBm3DaHTJvajJ3Paz8NWdBJlC/ZNmrZf92EoQahtiTOOh02Wp93ntT3Is+GHwO1liNsNV6 cpUPIHNjKpMozDNGX5k8lCRhpYtKosDZgVKojOJTbE6uaP+W2HIGPizj91l2VpiZ/1B68qaMCC Zf66lo9u2KDX+ppmhuVE8JCerm6t3bos0mAmV64RLN0G0A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-lf1-f46.google.com) smtp.remote-ip=209.85.167.46; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1708106648; bh=g2VBhQM0Hvl14ZMKS1mbjP3ErKFzhG8Q/DLwIzUB/QY=; 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=VDXUjdU10/Mst51nCC2nE0YlqZPsvwOy+pf8b83z3ZUVlWEJwhBZE6qNL1SC8u1WB10T4QNCtJ rLIQirCwHeGtAIH0Vda2JOGO65FW0R9i43F2rd/c4+Ytq0+iHJ4mJqKVwX6Pt/nyfYy6dLe/vP rxNQ56re90YdK7LUlrg/6d4dV3Vm8IGy1UHjPSqqKybn3Q45bsANp9/KOINLDiQQfF4Qh3WKt0 Q6L5mfmXRMrPv8PuWsjGCrQ+nq5qbiitwh0f/4RWS1xn2Tp33HWLlEY9iyDgr2Y182jaEZtOxR 04HVYWzrh0M8I2xYHFGIOJkF3IDU9MLq3I48RcyfIVbKQA==; 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=szpa46JiIUiKX/Sl16V6BixH2NVvKufdj99aYdW1v5o=; b=OuopB/LC807M+BAM5bx4+Pxm61 Lcezk+pWce+cdVsdTeaUxsecjx+dmEr3asHQkicNjTDyXKGKGY4pL5FY0NhblAVC0NM+FW+C85YLk HuwSOxw1zEIsnBon+Rxvlrk5yiMc7X1QIJOQl1uSQHTJ4oeICjPXMkWh4OVlEgTr8iHX3JOX08ZfU v5aely6tlPwvhsLdmtKalD2dqk4g4l67IzzMUMYI1utgFMoTqC4c73k0PIGDw+bsw8q26XfMq8N/z AxWzDhciXIQ/mHECp8yVwXkU2f0UWJUXTcWE5JrG1GgY7V+/IBBnBJV4GzQgUiN6piJiivQnaC5kd GmbD9vWQ==; Received: by zero.zsh.org with local id 1rb2ZE-000IDh-Er; Fri, 16 Feb 2024 18:04:08 +0000 Authentication-Results: zsh.org; iprev=pass (mail-lf1-f46.google.com) smtp.remote-ip=209.85.167.46; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-lf1-f46.google.com ([209.85.167.46]:50242) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rb2YT-000HXk-Pl; Fri, 16 Feb 2024 18:03:23 +0000 Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-5128812662eso1458698e87.0 for ; Fri, 16 Feb 2024 10:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1708106601; x=1708711401; 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=szpa46JiIUiKX/Sl16V6BixH2NVvKufdj99aYdW1v5o=; b=hb0OrgqGhisJQtkmcR+HfFvuGVlh5BaIhllTCqOMUC9TmVtD4LeljTiJfaR6qKZftk BEjwyDZdldK/wnImnOhWHJLwZfYdsmNzlQVutmBoYzDEm09Co6m7W2gNSqZZNEsE20aA 6oK26YUqLf2o/B3yWVbmhGjQeZ1vOUs1r9XtJ/GjSTE6fAvk5Bb+pT1lTmBgNj4ofK2y SporcUiHowNN/RbHd48juevqRNye+scVB9ePrbY1XAnnUe7mER56NSyW51CzkFJB0jFS IfSbAxauEcfX6baZIb70Q4Uc0kJbyd++cXVsxw2lFureCZe5+E7RQPXfpEPCt4qt+SX2 Rw0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708106601; x=1708711401; 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=szpa46JiIUiKX/Sl16V6BixH2NVvKufdj99aYdW1v5o=; b=QQp21w6Tjcmu7NcDKIEY4y1SqNjb6ZDUxCAlKDs7U7k+ckbn9aSr3LeHg0/CAa6aXY L/ThqRlHomOE3RewuDDZZnAfUTw6nWLHqRQG5xojmQGjB97RO4k1xLLXpFk27q2ir/gi Vqjl35+XtEEdZ0pt2m1Zhd55cY4k0Y3bmGFB5wsrbspAjDtxMm6A79T937xgurIElPK3 7MP6vHF06K6cOXqXZDlh9EEG6rPUYK/0I0ZCfB4kbEH2DgURplD2vQPfiJnMEPtt1im4 pMd4KQh+X34GMNMr6TFr+WMudhactktnZC523JTe2NB+vbjAOWHYwKu03fAvMH20AIsR 9Zug== X-Gm-Message-State: AOJu0YwfZf2HTqrv5Gf0qfBPyGy91rQpwmXd9uGcIHcUHjio1jVZt+VO /rBEyLM/FuaANkLJZJJ6b1YsYVfxF01wIYGXTJEpkxKfclB2RxbpGqeSP9/nkbNvFa/6pd/g2js GporGyTQw0F+wGwOJPNlhmnUUHUZrHEAObWbiilq36gEhyM8= X-Google-Smtp-Source: AGHT+IEAUxzwC/eU8VvbHNXHHe2IS3vzDOA2djx8ZBLhIRl9aNZ3iEpgkFcsZ92y7SJSEWQbUgtLEZB0ad84QNCjwc4= X-Received: by 2002:ac2:5626:0:b0:511:ee5f:5c6 with SMTP id b6-20020ac25626000000b00511ee5f05c6mr4361853lff.53.1708106600900; Fri, 16 Feb 2024 10:03:20 -0800 (PST) MIME-Version: 1.0 References: <8fc8b27a-9f1b-4d7f-8865-cbf41cc7374e@app.fastmail.com> In-Reply-To: <8fc8b27a-9f1b-4d7f-8865-cbf41cc7374e@app.fastmail.com> From: Bart Schaefer Date: Fri, 16 Feb 2024 10:03:09 -0800 Message-ID: Subject: Re: Counting characters in command output? To: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 29683 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 Thu, Feb 15, 2024 at 8:55=E2=80=AFPM Lawrence Vel=C3=A1zquez wrote: > > + Unless enclosed in double quotes, the expansion of mytt($(command)) is > + split on mytt(IFS). In contrast, and contrary to bash and ksh, unquot= ed > + mytt(${ command }) and its variants are not split unless the > + mytt(SH_WORD_SPLIT) option is set. That's not quite accurate, though. % print -l ${|reply| reply=3D(a b c)} a b c It's only ${| REPLY=3D...} and ${ command } that always behave like scalars= . Even ${| REPLY=3D(a b c)} behaves like a scalar (joins the array), which I suppose is also worth mentioning. Will consider wording over the weekend when I have more time.