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,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26852 invoked from network); 27 Aug 2022 15:41:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2022 15:41:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1661614875; b=NdvCBAh0I0mzpa+weG2Psz/vIHV0uzwOF/cimq3mG/WQP0kKfzr68oQzsOTiksyE+w4csw+Mcf fFq+JIAKCqxEfxq506wV+ExVgTUtzWxa53UAAC72CHuwvfN7OnbtrxM8e3mQ7MJ1Qau1KbI68y CulHD5T/gLBioDE+tLiOKHkZr6Y/vmoOY6moffdmLbDLR5Pk9Y60FXnyd+MVj69baVm+fOOTqY Lj2zk4WANMd8MDwNyVWNSovxc4E8ySuYyTVBUWkP+C5agClsDCNWqmleKGg3rMNQVhjq1/RUjX Xaqxi0jb+ajzEnPZgXB6SsLzzjgqJR24L5MPSHZCUx2Ldw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1661614875; bh=rBfM2GqggxVJKSBW61KMI2ETuUYJyWQQe8YKrPEsDFY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:To:From:Date: References:In-Reply-To:Message-ID:MIME-Version:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=fZ/j3nyU7jeb7Usn252miIlanw0g+iDXS0/Yej4eChKqN6fR383MNwM0pf9OIx/rtJSX2Yhi6y F1sm4DEnFJd6U+TjlfGA+XocTCdgDxsJGR6cuMsaX2KQ/TFCxThLid7gvEgzAmV+xk0KJAjqSX X5y4ukZz7wbwGlHIHjPyoSsvNxKoAcV+PFjbTCIg5jMNFaiNtUl0Ek20Oq+Xbd9ClBxppTZbhs zjj33bGCCsJxap+gAo5L2iH+B4MOBmo8G9vpPWJbkMb4LG4oiDq/DPFg+Y/L3SWhy/Y/m9Sueh ZH5pcaAp9NSWDAg3Y4QY/uFZjKcUf2yZdF7P8GdpvsKHXg==; 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:Subject:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=sw+LGdTCBlT0kmDpvZnqTjIteNGKznf+1w4qNCY+nWg=; b=KF3whFXTfSYR/QW2hXpQtTKDBs YV1Q+px6c9SiekafPzDo9X3DVZWOqWPCvtj9wKNI4YCDJ6ss2hXtuF9Pl8vmdzQRQQKbyRQLsYwHE flzoXMJXxeg2dqT8qWzsr5a9a4Q+kvKCGjdGkT9/Q6Pr9np9IxF3A0dmMeSVEkmuUem2o0vd1j54m c9dmJpFjUCoMEToKZIOjp80DydxRnSMjU78N0Ia3zGj+0/X5TuJzfYMQO4lCxFoIUx5y4CbVGIeuZ VKO5/jLbH3zQYBlcRoXbqCrZCM62rOrp2Rj7IQ4B/dkWISAtmTq6HNiHaXfN21U9NUSnexYAjbqlF CsGu53mw==; Received: from authenticated user by zero.zsh.org with local id 1oRxvu-0003p2-MA; Sat, 27 Aug 2022 15:41:14 +0000 Authentication-Results: zsh.org; iprev=pass (wout5-smtp.messagingengine.com) smtp.remote-ip=64.147.123.21; dkim=pass header.d=daniel.shahaf.name header.s=fm3 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:39005) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oRxvd-0003UM-U8; Sat, 27 Aug 2022 15:40:59 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 0167732001BB for ; Sat, 27 Aug 2022 11:40:55 -0400 (EDT) Received: from imap46 ([10.202.2.96]) by compute2.internal (MEProxy); Sat, 27 Aug 2022 11:40:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1661614855; x=1661701255; bh=sw+LGdTCBlT0kmDpvZnqTjIte NGKznf+1w4qNCY+nWg=; b=SHfQrN4N0W3ysIyukgdEbwYYGDBZvlWR6+z8oaKK6 pxjAWGxCCPsYy2z/Y5jDmE+VeJ4UVtxlTD7fjDReWi+SislWzJTWVobYSpRxyUbJ 8ookHE7nrTzmP5xzEnnU5UlyMhJtyR+z6v07v3Fo4witcZpdYQjB+UJbgVDfDFET uAbxyOoiSNViFRHqUDSmNTNOCsCrrXWSkmFWRiU7ViQEomTsB0ZRLVhEa8Qev0hQ PkO1O+nL9KCQisc2nZCIXKwk57CkrCOAVvQmjBLQ3nxicnYnRjIMJCNWe0BQjFRn kq1ZpvMQe1+MTTSEABrmZgS1jsshD4H2jSr891eYik3RQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1661614855; x=1661701255; bh=s w+LGdTCBlT0kmDpvZnqTjIteNGKznf+1w4qNCY+nWg=; b=rVWPtWZpPkE6fHzwP itaP4ZzrESbYzVD2zdLz3DFR+lDcz1BgAhL9qG2QRG06PS/GE6yPgyHou8Hqx4oK tqnMPT/DwGA2wKsMVIanGvwV8YdoqAEqbNQQiDYQTyhU22dBF2bfSG2EQHcNKjzx 5nLC7AHEQMut/a+EAsDxJ66WlHflcH57lS7Q3dgpPkwwcPLjz1s8lqte9ezSANS3 x/9RPWST4U3hxdITnbYN3rMuGwa1ytF3bS6YSv8WvMjwkO0V7qM1lk/LA3EDVXTh mNJPj+U2+4R/wqDCqhC4tsMVQnt6l20QjVaCXIp/bD7zavzvL55PzyRVeiA8xAH4 OQvQw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdejjedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtgfesth hqredtreerjeenucfhrhhomhepfdffrghnihgvlhcuufhhrghhrghffdcuoegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvgeqnecuggftrfgrthhtvghrnhepfefhkeefve eileelheeiffdtkedujeelvdfhtdejtdeggedvuefffeelhefhvdfgnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrd hshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 479392A20075; Sat, 27 Aug 2022 11:40:55 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: <5e85657b-a7c6-45a1-98a2-3e7289402429@www.fastmail.com> In-Reply-To: References: <20220824043145.165779-1-felipe.contreras@gmail.com> <20220824043145.165779-4-felipe.contreras@gmail.com> <7779ec6b-10d5-410a-97da-5ec545cd6e1c@www.fastmail.com> <764a967b-86df-42bf-9242-22e9aeedfac6@www.fastmail.com> Date: Sat, 27 Aug 2022 15:40:14 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: [RFC PATCH 3/3] FAQ: sync newuser-install Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 50539 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Bart Schaefer wrote on Sat, 27 Aug 2022 02:24 +00:00: > On Thu, Aug 25, 2022 at 10:27 PM Daniel Shahaf wrote: >> >> Bart Schaefer wrote on Thu, 25 Aug 2022 23:08 +00:00: >> > >> > Unless there's an important behavior that it's simply not possible = to >> > accomplish with the existing configuration controls, >> >> Does "enable saving of history without specifying the history file's = name" qualify? > > Has anyone other than Felipe asserted that this behavior is important? > IMO it qualifies on the second clause but not on the first. > It's one fewer thing for the user to care about. I wouldn't go so far as to call it "important" but I do think it would be nice to have. >From a more theoretical perspective, removing the need to set HISTFILE would allow us to one day move the history storage to something other than files without requiring all users of history to change their dotfiles. (I'm thinking of, say, someone putting their history in redis.) Then again, saving history in files "ought to be enough for anybody" :-) >> What I had in mind was a new option, HIST_RECORD, and have it implici= tly >> setopt'd by assignment to $HISTFILE and implicitly unsetopt'd by =C2=AB= unset >> HISTFILE=C2=AB=C2=BB; > > I am not sanguine about the idea of linking an option and a parameter > together that way. OK, then how about a new special variable? It's precedented for variables to be magical (e.g., path/PATH, functrace). We could have a HIST_RECORD variable with the following semantics: - getter: returns 1 (mathematical true) if HISTFILE is not empty and 0 (mathematical false) if HISTFILE is unset. (If HISTFILE is empty, then .) - setter: If set to zero, unsets HISTFILE (again, that's like the connection between path and PATH). If set to a true value, set HISTFILE to... Hmm, I'm not sure. To a well-known value specified at configure time, probably? Felipe, WDYT? Net result: HIST_RECORD=3D1 DTRT's. Of course, at this point we might as well make it a (possibly module- provided) builtin, so it's less surprising and more extensible. >> If that's nevertheless undersirable, then we could go the deprecation >> route: leave $HISTFILE as is; add an entirely new way to specify the >> history file's name and whether writing to it is enabled (perhaps a >> couple of zstyles); > > Also not excited about deprecating the current settings nor about > tying built-in shell behavior to zstyle. Currently zstyles only > affect operations that are provided via scripts or shell functions. > And moreover, zstyle itself is a module whereas history is not. Good point. >> Any other alternatives? > > I haven't worked through all the details yet, but perhaps a zmodload > module? The boot routine could assign to the three variables and then > (I think) even unload the module again. Felipe's zshrc would do > "zmodload zsh/default_history" (or whatever). The module could be > compiled for all but the most ancient of older versions of zsh if a > packager wanted to do so. If it's just this, then, s/zmodload module/$fpath function/, surely, since this /can/ be implemented as a function? The function could unfunction itself, too. Or if we do a special parameter or a new builtin, that could be done in a module. Cheers, Daniel