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.4 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 17864 invoked from network); 15 Apr 2023 15:31:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Apr 2023 15:31:49 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1681572709; b=Ep4FLgHAb+1Dx8FSS3upmT3A6LFvi1sBxOztW/kAms4dSqIQ+7kwHZRJmLtSCyxm0Cg3/QT+QX eEXV7qALhOXAA0UYId9F45INSWeWZk3lnkOmCz/t5i2DzKDpV2FwHdIx2ZP9F6qTclZ3MY4UCz NSihcxyOImJTYchmZ2zOzgmtuFYiF4jb7HCibzc9loRHZfp/jxuj6XlYNtbtwBGaXAM4eujEyP aE6Xk7ek185wHWaAZJVS/uzf4meDYtNbHMuzaL0QTjg+6y3Huu165KRtkb8/1w7g9/6SZmTPhV RPydpQtgw4phWN+1uUnXIWwP1jKrUCnBYmyz0uwmX5V+xA==; 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=1681572709; bh=YnZFof1CpdG+whz8zn0kIbU0Awou9HiVEpu8Cn2A9kE=; 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=PGAz4p13Kdh9lo3qy/d2i4lP3+KNzMKZJtaw38VrLCgq3NUuh+FrMt+kvMwj2GttFg2nawewhK lw57M8CdAvjynixuGJDz2H1SCiIolJfa8NhSv/fDBQ381ZUQmsk5aveaiWl6RS0jnLJmqX51Mq RYvqsGYvu3tBTvSqtnfZ6lpgxwwn3CVTrTAlJG895OO2NU2D7ClUJ5y78bbzCn1SMWS2cYIy1A /MawSaFuP/m11EBqD8YTqTEJRZMlOuxVKQh1VF3XZ0IzN61Gw8csWfGI2WYL9kb1DTuTLBajkW GyNdE5HJKod+ZcqjxVIHf9DWA5v9q2VwLsr4u2CyI8gaEQ==; 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=Y7ugZdnc85b42ri341CnAWJ9jJVdMFBycFYI3EhriAU=; b=jUXZT1QL+GtAVMpI1EorNvnS8O EzusTz5fT7kmvVU5faf8FfaFJInNSVlIyy5CFdcI2w+cHft7Op5RCwWLJS8Qe26qOeb6Oa0SyiA0C 6yMS5xMj7OuiQv0CS5OipQFY0adichZea7SQS3qOaPfDKAsjiY5pD5yBTUjxQGEdqH8WKVlYjTzwb FxlV3wzlbO140BXmgXwZIaev00+Zkg0pKbn+8+yMKMz1lbyUfz019PPqKcfq7jLRyt+ED4PMnQNLB vXHhJB4wPvojOa9r1mO74q7TCjDddiwt3CRcAV2QXbL9zCILcqko9z02KfHsgnEsgFkUpHxk0UpGi KINZxl9w==; Received: by zero.zsh.org with local id 1pnhsS-000CV5-79; Sat, 15 Apr 2023 15:31:48 +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]:41141) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1pnhqj-000Bmt-7T; Sat, 15 Apr 2023 15:30:03 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta04.eastlink.ca ([24.224.136.10]) with ESMTPS id <0RT500HG5W6G2MN1@mta04.eastlink.ca> for zsh-users@zsh.org; Sat, 15 Apr 2023 12:29:59 -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 nhqhp7NwOS9EknhqhpigSh (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 15 Apr 2023 12:29:59 -0300 X-Authority-Analysis: v=2.4 cv=BY8ekJh2 c=1 sm=1 tr=0 ts=643ac2f7 a=xN66ZtSbq5jdJYpBp7G/jQ==:117 a=xN66ZtSbq5jdJYpBp7G/jQ==:17 a=IkcTkHD0fZMA:10 a=q7sHmmUeAPQhYpyYWgsA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelvddgkeejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecugfetuffvnffkpffmpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepiedtjeffvefgtdehgefgteekueeggeeitedutddvvdduteetffdvveelgfeukedunecukfhppedvgedrvddtjedrudekrddutdeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdegrddvtdejrddukedruddtkedphhgvlhhopegludelvddrudeikedrtddrgegnpdhmrghilhhfrhhomheprhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepreerpdhrtghpthhtohepiihshhdquhhsvghrshesiihshhdrohhrghdpghgvthdqkghiphfrrghsshifugepthhruhgv X-Vade-Score: 0 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: Date: Sat, 15 Apr 2023 08:29:58 -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: 29024 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-14 21:49, Felipe Contreras wrote: > *But* that doesn't mean everyone understands all the configurations. That's for sure.  Like anything that grew by accretion, not design, as new features were tacked on, the documentation became more and more incoherent.  I don't even attempt to understand completion now, I threw myself at it a couple of times and failed miserably.  complete completer completion completed completable ... only Satan really understands it. > So I think a more accurate statement would be that the configuration > is unidirectional: everyone understands their own configuration, > because they had an idea of what made sense, looked for a way to > achieve it, and found it. But other people have other ideas, and their > configuration isn't necessarily understood by others. Yup.  Write-only configuration. I'm 100% certain you can do that, but not with history expansion, you'll > need to use zle for that. I'd sure like to know how!  Back in the day nobody seemed to know how to do it, not even Bart.  I came pretty close using 'noglob' and my functions work OK, but it would be vastly simpler if I could recover unexpanded command tails in some direct way.   As it is I run the function as an alias preceded by 'noglob' then save the literal text of the command tail as needed then 'eval' it.  Quite dumb, but it's the only way that I've found. > So you can write zle widgets to do anything you want to do with the > current line, but that's significantly different from history > substitution (e.g. !!0). Never played with that.  Don't know anything about it.  All I want is to be able to recover a command tail *exactly* as it was typed. my_function () { grab_tail # writes tail to 'my_tail'. echo "my tail, exactly as typed, is: $my_tail" } $ my_function $path $(eval 'ls *') one two three ! < > ``.."" &>^! my tail, exactly as typed, is: $path $(eval 'ls *') one two three ! < > ``.."" &>^! ... no simple thing, since it is the nature of shells to expand and process command lines, not save them as typed.  But history does almost do it. > > Cheers. >