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=-5.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16030 invoked from network); 22 Apr 2023 00:57:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Apr 2023 00:57:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1682125022; b=HLIJLSW6ERbEck+sAMHt46VmdgdWClZffcvj50ZRVsJPp/wOvZI8hLWtxFh4lC+Ovl9qqxm5sl 4sr94ikJ08GsPCzDLmLCD97sO0B4svAz8sdUGIhajBYsRIFSu7zOrUhC3WLkL3zeJCKNnRSxYL ftQBptQTDxQ9xX8gRzFdpIVDjawD1GjO0B9STbjirqEsTkEuV98LUMkBcc713uxq4Iqi0yW/Ry aCZGArVhJZI/D6jB8aC0nH9uE+nhYUVvmQS8xp4pbH6ngozzeZR5Hoqu3hY9vuxkx2yS6eepE7 anQz2fvs1790j07bqp2R008JXvJ1HsO1tqPcwcr/DGox7A==; 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=1682125022; bh=7BC8ufSldBgg644B4Q8qJF/bAHE3VOeR3tr6s57hsEE=; 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=YB/jOsT2BFxh774+H6HeVc4/agv6iqwJsWhP7o+zPCgtwa4URhgjmHVGdEMsAqC00b2HXO+dXL +EUCOYxgh1Tynf2DN55prLRWs8NVfSzU2rMpjep112e4yftsgmnUzm3M7Leneq8WtUr+3qBaI1 yhTonIK/3Ek988gNCabDuN8x6eROl/pizpRzIh1pR1s5G+06iYxzlzXsiZi0hQl2q1E3mEr/Rr vtRXy4BOSBO3KO+tYNDqE0WKTuS+1hPKp2J7mPUMRWJIl+pAXWtJFkpkDM5ufQPWvuPVAIozeb 2H86OsxN8J2JGiZCoTABbv/9XbvM7byjQH97sYJlhTFovQ==; 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=B7qp2mRUwh/nE1V/L0Bs8ZXVqGj2ATgBdDO5DFkn5Cg=; b=cKpQ9jJ2TdFebbOvykAMVbTrsX s2GfBJMetJzIH9mAhXdt+RKOCHNBkSj6+8jjEuCn+Zln0LyFBK3MCsCdBNC7WDsroq5lg+c+t+vv3 D1WRZoCAn1mFYii+UJkTEZ7WnuTy9aRqdIXgz/tmpumhk4+SBwYw8HU5TdtoO4tD5F5qvMsEQH78b fFC+x/9tEAbhD0fMTTZWzXv8Fu46+VYVS0r5n5cDOT+ZWcqBXktCWOZ6CBSHZN9smX3+sS1fZdJ+d Mf2xLshWsc+tEbOAuDXkvehOashtAPVo25JAw5O4fLIwO1KLgsHnknMiVU8WHMhEEqzhVseiURaSF 7J5FWLWw==; Received: by zero.zsh.org with local id 1pq1Yi-0009m1-Ni; Sat, 22 Apr 2023 00:57:00 +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]:50797) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pq1Xy-00093l-6M; Sat, 22 Apr 2023 00:56:15 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0RTH00KQXRXC9S31@mta04.eastlink.ca> for zsh-users@zsh.org; Fri, 21 Apr 2023 21:56:12 -0300 (ADT) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp01.eastlink.ca ([71.7.199.166]) with ESMTPSA id q1XvpodHNAdZxq1XwpOjoI (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Fri, 21 Apr 2023 21:56:12 -0300 X-Authority-Analysis: v=2.4 cv=UPUbXgTy c=1 sm=1 tr=0 ts=644330ac a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=NEAV23lmAAAA:8 a=y4Snv7ZKLJY9BTaW5EkA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedthedggedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepkeeggeefkeehffffheegvdeugfelvdfggfdtueefffdvteegveeuveevveeitdeinecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvdegrddvtdejrddukedruddtkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudekrddutdekpdhhvghloheplgduledvrdduieekrddtrdegngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <3f316bb9-63d6-7e08-16af-0730a4102d21@eastlink.ca> Date: Fri, 21 Apr 2023 17:56:11 -0700 MIME-version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: permission denied Content-language: en-US To: zsh-users@zsh.org References: <5e16ada3-6968-78e9-7347-44b6181c29b1@eastlink.ca> <97340853-a204-e2f8-e85f-e1fbea4b2c31@eastlink.ca> <3f180a94-37a0-670e-f5e6-9122411ad416@eastlink.ca> <35874ea1-74f0-d733-7fc9-5b0ab51cc8f3@eastlink.ca> <5d46f8e2-27a5-9476-6198-d36335f78c32@eastlink.ca> <651b32eb-7cec-8667-27b1-e0efe56deb57@eastlink.ca> <1483562526.2152027.1682086378095@mail.virginmedia.com> <171aa87a-f52e-6fc0-d8c1-8ad6be9c9838@eastlink.ca> From: Ray Andrews In-reply-to: Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29066 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 2023-04-21 14:58, Bart Schaefer wrote: > > In this circumstance using eval would be much closer to correct. That's how my system currently works, and it works fine, but I'm tinkering with any possible improvements, namely being able to use $chain1 instead of history. > But > --- why are you even bothering to split it at all if the intention is > to run it? I thought the point was to put it in the history or some > other editable place as separate commands. Yeah, it's all just experimentation.  Sometimes, indeed % chain1 ... cooks off and does something useful, other times 'eval' seems needed.  I don't think I've ever explained it well, but the only purpose is to be able to tinker with one of my functions in two steps: 1) what do I want? 2) how do I get it?  By writing and retrieving from history -- or a variable, I can do stage one tinkering very easily: 0 /aWorking/Zsh/Source/Wk 1 % l ,H h*     # ',H' switch saves to history LISTING of "h*": All file types, INsensitive. Sorting upside down by: Mod. Time:   640 [2022-12-22--07:12] highlight.css  3307 [2023-01-19--16:17] h,1,light edits, old code removed  3279 [2023-01-19--17:41] h,2,got n_list working  3279 [2023-01-19--17:41] h Items found: 4 Total bytes in directory "/aWorking/Zsh/Source/Wk": 1.5M Total including subdirs: 25M ... press the up arrow (retrieve last command) and I get the 'real' command executed above: 0 /aWorking/Zsh/Source/Wk 1 % ls --time-style='+[%F--%H:%M]' --group-directories-first -AFrGgdt --color=always (#i)h* 2> /dev/null | sed -r "s/^(.{10} {1,3}[[:digit:]]{1,3} )/ /" | egrep -v '^total' | sed '/;34m\.\x1b\[0m\/$/d' | perl -pe "s|\] (.*?)(h)|\] \1^[[31;1m\2^[[0m|i"   640 [2022-12-22--07:12] highlight.css  3307 [2023-01-19--16:17] h,1,light edits, old code removed  3279 [2023-01-19--17:41] h,2,got n_list working  3279 [2023-01-19--17:41] h ... so if I want to tinker, I can edit the above 'real' command, and then, once I know what I want to change, I go to my own code, which constructs the above, and make it construct it with the desired modification.  Two steps.  So, in practice, I'll never need to worry about multi-command command lines.  It's all a bit involved but as I do it now 'eval' is always used. If you ever have a morbid curiosity about what I've been doing all these years: https://github.com/RayAndrews56/zsh-wrappers ... I'd be most interested in a review!  'c' and 'h' really are genuinely useful. >