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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26128 invoked from network); 5 Feb 2021 04:18:22 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Feb 2021 04:18:22 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612498702; b=hg9UYudRpy6j6bqSX+TSFU7+Sb6dzRmEFYWsCpiczFV1pVLJIgwZQ1Haj9OO4jbsB1W+G/xIzU jxZlvYR4R1tZuDInNyYbAz1jTZUYx32Nx/NGJpXaJxs9yK4XzaGSGkDGPccvPRZE+l6xI8UsKS BwhsliXYG/IfikaB0QkpGlrOpOKrxk48r2pjEsxHcS07K9k56YZZcS38+9h9CxQNX/R02oXXJI VN5VujdEilWYCIUDEYqnnYCMr4lsQEfx34l0KgpHaUuTXeDQox4SapBCCA9VjiZti30fdYwExk CboeIV9lpiGOy4HUmShNl5+T+cYnVQ59EIoAACKfivXOBg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1612498702; bh=orIIo3tfDyQwIxqkKgDSMGUfb6/kNRAm8+LB5ozUPnM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=dCVCxJ0ykc3im/8spc3I3ghmnzpMEGNtncr9i2e7vmszRS7NmtyOP1E87VCIbOtdrCBFSjeUFC kWjeSwW4xxuw0RJ6RiPJBer7VwKL9ZFFUHgsBKEZtSeW62qDQJZN7xe7glCB6N6GiVQ0xEl4Ew v+mapf/9Wn0qTY0sjWiqc24VX42o3iMA8kVsq0H+XN2Cklluc+hdNeNwT4QzKI14vJY6SV6gsS x1KK0wOv3YLL1ppRvQCjf9XywZGs05gJJKmcSPe3YGNhLOZWuEKlcp/a9eDfecq/i8ZDyMsPDC vrW/30uqG+G+blPY9nmqGax83YS54T4+B9qimggxjzTfXA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=epljYR0wlDZJkLcSZFF19FlYII9S+YSQ7EApfYCMcQs=; b=sJZgbHxQZMnKDWVNBwtvv14OYc wey+dFmcCbiL8FYyMLccv5jrmoZeNZfxL2D1d35rx79+wm7Ak7u/5qkb64FNxMlz+FDxQYJsRX4Bf rx0CHtxlGDi710TQMmJBZ0TgMh0zVN3hsSjRn5Sqf0RxU+ZwHs7bhgkw4WYmnGkaeHsI+n4lL4x88 AGWab1215t0n232O+GheU34kJg8fmvB9u3bLuFNzl0WmOpDjZt3fWXK3p0gQOO8Zj4HxhnIhWPfXE 5389XUPgmA9MwDEDZ/mPinZCo3qVRvx6H5Ka27xmtDjZhaF/OztAv4jx9+H2aSCQIN9BXtW3CQ56t 8YtvbR7Q==; Received: from authenticated user by zero.zsh.org with local id 1l7sZY-0007Xx-Vi; Fri, 05 Feb 2021 04:18:21 +0000 Authentication-Results: zsh.org; iprev=pass (mta03.eastlink.ca) smtp.remote-ip=24.224.136.9; dmarc=none header.from=eastlink.ca; arc=none Received: from mta03.eastlink.ca ([24.224.136.9]:47201) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l7sZ2-0007Av-3a; Fri, 05 Feb 2021 04:17:49 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QO10032IFA4F3E0@mta03.eastlink.ca> for zsh-users@zsh.org; Fri, 05 Feb 2021 00:17:46 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id 7sYzl7rrwnkRC7sYzlViTL; Fri, 05 Feb 2021 00:17:46 -0400 X-Authority-Analysis: v=2.4 cv=B+J8bMhM c=1 sm=1 tr=0 ts=601cc6ea a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=ppGkFsYVr0OL8Zn9TpUA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeehgdeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpeekvdeuuefffefhvdeuieetffdvtddvjeegueejkeeiudehieetieehgeetvdfhfeenucfkphepvdegrddvtdejrdeltddrudelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrledtrdduleegpdhhvghloheplgduledvrdduieekrddtrdefngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: array with newlines preserved as literal text To: zsh-users@zsh.org References: <52dba8e4-2538-7c96-ecd5-66e017ab2b8e@eastlink.ca> <36596ab3-14b6-da57-e40b-3e66d9ffbb5a@eastlink.ca> From: Ray Andrews Message-id: Date: Thu, 4 Feb 2021 20:17:45 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 8bit Content-language: en-US X-Seq: 26461 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: Archived-At: On 2021-02-04 7:22 p.m., Bart Schaefer wrote: > I've never called what I think you mean anything but the "arguments" > or "argument list". Unless "tail" means more than that. Maybe just obsolete culture.  I learned that the tail was switches followed by arguments.  But if that's not how we speak now then that's not how we speak. >> Anyway, more fiddling: I added " print -lr $@ " to my 'preexec()' and, >> mirabile dictu, it seems to capture input exactly as typed: > "Exactly as typed" is going to include the entire (possibly > multi-line, pipelined, etc.) command input, not just one command. How > much of that is the "tail"? Good question.  I'll have to wait for the variable to contain something monstrous and then I'll know what can go wrong.  It sure looks good right now tho. > noglob _g '*$1*' # Why the duplication? > RTM? God no!  Seriously I'm reading Peter's introduction finally, then I might have enough Latin to attempt the manual.  You guys don't know how baffling it is for someone who doesn't already understand it. Worst thing is just knowing where to look. > Preexec gets three strings in $@. > > $1 is the string seen by the history mechanism > $2 is is a single-line summary of the command > $3 contains the full text that is being executed Excellent, thanks. That's quite marvelous, that level of finesse.  I remember beating my head against that wall when I first got involved.  Turns out to be that simple. Or more than three: 7 /aWorking/Zsh/Source 3 $ echo $PREV_COMMAND l g; l f; l s noglob _l g; noglob _l f; noglob _l s noglob _l g noglob _l f noglob _l s ... very nice.