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 9849 invoked from network); 16 Apr 2023 14:54:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Apr 2023 14:54:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1681656868; b=i28AXTyJPk6R5A51kkcidi+XF5ang0QS0VmbpOoAhPJXBe4IS4jtXQwmsFCxphVGKk4tySdARo YfvFxPI1bKuX9+Atnu6FPH1A6vinzWxFnXd/zI+zBFd91NJH+RNYe9WT8qL7a+EfNWgBMHA85L wLPfqiboNJL2+JWZ70ESSrQ42nEws9b2Wnx15F5NKautdCJY6NfM3jFpJT/nU1OzUEodcnI+NJ ah1ZalZgoKKFMEuyOiD6Di9H/SO5E+iR/l6o3ydUzfMkyMiXha0oFb6TzoTaSNJumAjlCvAN4j 27hNtgyOr3Wsr/Hk+tyVzp+SrN0x9/HjO09uPulvBnuNtQ==; 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-20210803; t=1681656868; bh=2dDwikdGwDrhLC8oJy83WMzT6PYO3ALj0m4/prk8nYA=; 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=lpH+goWcsICaybI743h5gooO2tH1/MEei1YNB880DqNF796axhSWBrBFT6XjQbAvrwfbWd1Uec z8jIeHwRhGrpF9/61Ylr32B7PWYTztQGCjZCGRNbwbawDsmg9M6xpFHQM09BBCU17K28Mh1nsZ h/xQHh+UCFj9jddyk5YxK4ZgCDMGF4LUvVyXOWaZoEq6MplPRGuZNY/NMiu0EOXIxNwtxAO+XR LWwOvLAfG7jN+xs3xWkma808rp5HFZzB7LbA2jJ9sx28Hn1KrGJV/p/AY3SqGmFpwZhjhkpXZ2 lkhHPbgeJLYxgJRYMbOT4gGkCCy4aOofMu0xsxzF0G5WZQ==; 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=H3GkW4/OTbqnzBdwlujxclTPVUQ8Y0VMVzRJ+dwjtDw=; b=Po67pZHWt/fC2/TAmn+eriXFt1 FmW1lYHdX0W6S8AOxLAMHOcb3TtUBV7NO2KOo0xPdktTYO43U2i1XVUGL4PvxfwFSd2NmvOfaZcfr Lv5ulJqcaF7PiZy9aJ9SN74QYJuTyivXKM3UfC7BtXvugsbJ+DhGsadhoJDP1cxnVjD2+FFL+LFEV lLpQuz7l0VSjfxR2yT26hT+cgFhr9ckQu/GToQnzSeReW6iZeaZFk7l64aE8kaLTGBAHsxYQSUbCm y4LdvroKyV57WrmZ5FpkJlquCrt8vG9n2J2ZlvA39mcosRwEGbk+OISe0DKpXOEsZBfuj1ZZ8+yPm k62/jH6g==; Received: by zero.zsh.org with local id 1po3lq-00038P-Bk; Sun, 16 Apr 2023 14:54:26 +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]:39416) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1po3ky-0002SM-Rb; Sun, 16 Apr 2023 14:53:35 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta03.eastlink.ca ([24.224.136.9]) with ESMTPS id <0RT700GP2OSF5A40@mta03.eastlink.ca> for zsh-users@zsh.org; Sun, 16 Apr 2023 11:53:31 -0300 (ADT) Received: from [192.168.0.4] (host-24-207-18-108.public.eastlink.ca [24.207.18.108]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id o3kwp9rntS9Eko3kwpj0Rt (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sun, 16 Apr 2023 11:53:30 -0300 X-Authority-Analysis: v=2.4 cv=BY8ekJh2 c=1 sm=1 tr=0 ts=643c0bea a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=gir0-LH0AAAA:8 a=9gBWe5MEuQywe_FfLVEA:9 a=QEXdDO2ut3YA:10 a=aLewGyoHDmJ4ULJHWpSz:22 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelgedgfeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <1decbc88-2df8-8aff-3e2c-72e66fbae5de@eastlink.ca> Date: Sun, 16 Apr 2023 07:53:30 -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: .zsh_history To: zsh-users@zsh.org References: <81609CF4-42DA-4E0F-A6E5-C5D58578B4F7@easesoftware.com> <9a1f77ea-ee4e-95ff-a571-5cd3ddce6cb2@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: 29029 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-16 00:38, Roman Perepelitsa wrote: > On Sat, Apr 15, 2023 at 5:31 PM Ray Andrews wrote: >> $ my_function $path $(eval 'ls *') one two three ! < > ``.."" &>^! >> >> my tail, exactly as typed, is: $path $(eval 'ls *') one two three ! < > >> ``.."" &>^! > What would this do? > > % list=(my_function arg) > % $list > > What I typed is `$list`, but what is "tail"? > > Roman. I don't understand.  You're assigning a variable no?  In that case 'arg' .... hmmmm .... good question.  In practice the problem wouldn't arise, I'm concerned with newly typed keystrokes.  In theory tho that's  quite mind stretching.  Is there a logical necessity or are options available?  My first stab at it would be that any syntax enclosing 'my_function' must needs be executed as normal since there's no way of 'pre-knowing' that my_function wants special access to its tail as raw keystrokes.  Or, not? Naively the tail is just 'arg'.  Dunno, whatever history does is what I want.  History stores commands as typed and that's what I want.  There's just that: "% echo one; echo two; echo three" problem -- I'd like the middle 'echo' to know that it's tail is 'two' and nothing more or nothing less but of course recall from history gives all three commands in one serving.  % my_function one; my_function $PATH; my_function three > filename my tail, exactly as typed, is: one my tail, exactly as typed, is: $PATH my tail, exactly as typed, is: three > filename ... I guess the semicolon is the character that must logically end the tail and can't be part of the tail for obvious reasons. Or in practice the ENTER key cuz I'm never actually going to chain these commands which is why in practice just writing to history and recalling from history works fine (along with 'noglob') ... but it's laborious.  And one intuitively sees that zle will be a good candidate for a solution because once ENTER is pressed, what it has in it's buffer must needs be a sequence of raw keystrokes. Give me those keystrokes!  Raw.  On the half-shell.  But, broken by semicolons so that chained commands know where their own tail ends.  Thing is that the shell obviously does all this internally -- chained commands are obviously broken down into their individual units at the semicolon.  The information is obviously there I just want to see it prior to expansion. I'm not communicating any of this well.  If I wasn't me I'd not be understanding these posts myself, they are not clear.