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 14262 invoked from network); 4 Feb 2021 21:56:04 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Feb 2021 21:56:04 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612475764; b=dauflHyDqv+XAjywOPIWTjLxg1j7rP/3V+5KUQKEO0ntbNjDFzUCbN0ck67/dI3yFURTALSXkW 8tb9mq5Nj9V7cqf2aRwqBGAZ6e5dDCW3Ai6JqjNLGZEVl3VwOEdb3UN8E7CEbCmedaQiDGhpUw ZMgrLllNiJDshlUmxrUEoI6Mxpj4aUL7QvxxDxgP7DnY08q011lQTOk0ovLtO3PvoPhbbOmE21 CH5vCD6QiQhuAHx4kpyCPE7rZxc+jdArnClM3L0H4R7IGZzS1QCSgbCuVlTKUKkJ+0/xSQPh9A nY1eMy7G0xt4+7Bj9Qd35YZ8kKt5BNxr5DHi9kx72Ca8Xg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; 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=1612475764; bh=7jDqOz8K96HHnfo9woyyfWV8nY+yv8GTdVuc4cTyhdE=; 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=SZboqdhGMO64xku9/Zh/lrRzsCLYAzbEzm0LJK4W9ef0RtnAlfI6+jpxqAen0m4JmND8gC1KJL roZtLFf2J+0LXc6sTAOVu0nOVafE5aEqj3/phyrRpY3nUH4z64Ra513NYR2aGNEUdP0DL4DCP9 8ztiRn3ijHTjBh7J/wP8gWcPPryO/DWJ3yEFKH3oKMPM/cAPS8XZsEAmNd/nNbWPylAOv1JasA H3PZdiOWktc1xgL49/eC4YVc4uUvnEJ7ohVixbR48gnI/LHhF7av5QEC55UiIrYH/tQYcdnyPG 5Dyg9rIVty2pBMoNvWGITq5JCsWER6wh7RJndom13a6c0g==; 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=XjbvhIHLvric8L7exHxB83qyFj2YfHt+3dXZjJYx2oA=; b=q5ogryjlRaRAk4gU65UaPhqnvx 7rDnpHvVKEIyYHy0rVlGum1f3D2Fln6SCVhW7AIdkLo8BVjsGW07W6TIKXkZMLgwIRzq8PGfXjQCe vqaDduEbVA+9nP4lFB45cFgh/WYjODkAPNpvH/zEe+I18teJAkbu3CcS2p7LR0kAfJTXrZGPtGd3R PIwM29rTVbvR2a0ie5UshzCmVUEwdg991AoHRraIJmO19SddSe1ekfeVYQEkJ6nsrVLEjK9xKcSvE yr0woom8YYm3AWrl3N5xp/QyYjE3QlNVpOkaFQMxCmPOBvtSr8eHglkalHi+qd4QDD7Ce38mustyt TMncJafw==; Received: from authenticated user by zero.zsh.org with local id 1l7mbY-000MLy-W1; Thu, 04 Feb 2021 21:56:01 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:35008) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1l7mb4-000Lzi-EO; Thu, 04 Feb 2021 21:55:31 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QO00088OVRRUUF0@mta02.eastlink.ca> for zsh-users@zsh.org; Thu, 04 Feb 2021 17:55:27 -0400 (AST) Received: from [192.168.0.3] ([24.207.90.194]) by Eastlink with ESMTP id 7mb1l6oLHnkRC7mb1lVWiB; Thu, 04 Feb 2021 17:55:27 -0400 X-Authority-Analysis: v=2.4 cv=B+J8bMhM c=1 sm=1 tr=0 ts=601c6d4f a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=N9n0FRapkwU_8PaTxOUA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeeggddugeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepkedvueeuffefhfdvueeiteffvddtvdejgeeujeekieduheeiteeiheegtedvhfefnecukfhppedvgedrvddtjedrledtrdduleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrdeltddrudelgedphhgvlhhopegludelvddrudeikedrtddrfegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv 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 13:55:27 -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: 26458 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-03 1:19 p.m., Bart Schaefer wrote:  print -rv REPLY ... > or whatever other variable you want (it will be a string, not an array). > > The phrase "its tail" still leaves me slightly doubtful. > Isn't 'tail' the normal term for whatever follows a command? I learned it as 'command tail' back in the day. Anyway, more fiddling: I added " print -lr $@ " to my 'preexec()' and, mirabile dictu, it seems to capture input exactly as typed: 3 /aWorking/Zsh/Source/Wk 3 $ g '*$1*' g '*$1*' noglob _g '*$1*'  # 'g' is the alias that calls '_g' so that's understandable. noglob _g '*$1*'  # Why the duplication? ... various tests show nothing expanded.  One thing tho, why the duplicate line?  In one case: 3 /aWorking/Zsh/Source/Wk 3 $ s g tiny bug 'grep -' line 88 s g tiny bug 'grep -' line 88 s g tiny bug 'grep -' line 88 s g tiny bug 'grep -' line 88 ... three times?   And 's' is not an alias, that function goes straight in.  But here is my capture point for the literal command as it is typed, it seems.  "print ,lrv LAST_COMMAND $1  " and I'm good, the first line seems always correct.