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, DKIM_VALID_AU,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 30002 invoked from network); 18 May 2023 21:53:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 May 2023 21:53:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1684446832; b=f2M7LY5asqk+gb7a8k3c5DP0h73d/EUgJl3vPqrqFReRzF+gxiQJ+qAZNDTH3goeP1DKyynkKa tz7jcldCMxiP6TvfLODSlH9Yd0MBJcCeNmo4UWgO4WLpFUy959emWd1BE1xhAt2Be5sVTEKX7w 2658TTqdrZQOPPTJOuZ7UjcwUbdPhyD3vFPkENEhIyxdMrQiy7cfJB7BAGD65y+miliABsJ3zH oJcvJ6z7BKTS6D2XEtdC9Z0reEWZFlavDaCB4mH85hOHNykQRNdsX24tDlVi/4SgM3b5ahp3Ul r+5ydiRI8PJH8kbtMtRmVtf07pBd2ALDTrekiBVINgJEEw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202305e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202305 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1684446832; bh=DoZXH7dfS5000DtYmsFDs9nP1h1kqJcW8O6Qb8f5xVo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=kUAEda1yJu8YRX1aumfNHoZBrQ06Of5+Lu9xYSIJu/Z9/M2mMDCyBHOjaA7Yl3iSW/DgZoMG/b dBKjkR7fsWDUT5Jm0ulo5gZG3rMtOwcINHPij6hKBB2odteg5r0heS2XIrcfine3YiFHMUHI1A KsWrjFh+GSMr9zSL5IWmpdCFdDMDKvMHjvO0ATFpAhI+TAPqAf1p4JyaqTmth9lO7qD5E14dQn kFj/zoE6+hWV1Ue9pMm0G4nw4ys55xwwtwQjURHx+cO2EmyBsIPGi/Z3EOxIHRzS23rVqKIddP fPaOg3gwK+pxEf6ex/f8NHnunWSOwpWfmwKnv/xO/vbeJQ==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=wgeHnBvLMHw2EAdyK0h/iE13r/PycbZAMIi2InHETso=; b=gPnW0YjMY5Vd5SxE54F8ocvQ4I 04gLCiM8qGyK2AgwnpIzgkQrjjzFkaFaf0XcMKE9twy3Fl8K+zCRsY4uBALXPIpo1m+Jc6fsTOpzi o03m+SeAIZaLHg65b2xfpbtVD1hYQXlr4qeUAHfskuQnjEk0jWgVBMJy6UROMk1gjDJR5nMhbiJEw T/ouyIcPg+IFvXUJceX5mvv4ofhR1iiClrvWzr0AVa9cDH2jsloiuW24f8uDIo8Tn0UUrA1aJoa14 gMqL3JHFtLTataS2YL1C6gyCwccRldE1LXCHkIrJDEVEFIexfYQVZa2589xFbYZcEOGe1QGLCovZY D2Yux7pQ==; Received: by zero.zsh.org with local id 1pzlZH-0001aK-P8; Thu, 18 May 2023 21:53:51 +0000 Authentication-Results: zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202305e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202305 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none Received: from mx.spodhuis.org ([94.142.241.89]:39133) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pzlJq-0000d9-UU; Thu, 18 May 2023 21:37:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202305; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=wgeHnBvLMHw2EAdyK0h/iE13r/PycbZAMIi2InHETso=; t=1684445874; x=1685655474; b=SEMrm0uk3oaBXIyrS3gN92IiRxE/zCIxG5tdgslGZ/90AV8 PAilvaptSh44wH7Im3Doau9h1O7tT3/LIpFHq9pDKjIT5QPJSB8FGhqrsj76R4/FUE8aNRk/NVU1E eSJA05u/SrOOHbiQd2ficq6/X7YLGOu4ZttVGt2j54kMjS7xVJJ2whfAYn0AN+7AaGXzBs3/WjbOz eh3pQ6RwpyIDtCaS66mhgA7NJ17sTjCgibHBTKi7bUPwjB3nSN96HFnofWpceD0qOyxk+EV8DZKXE iogyHChHrU+IbyIoquK9vbURK/zNn7MQFR7MpNaGK1cTliaTmQSazIE6dLao7uWA==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202305e2; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=wgeHnBvLMHw2EAdyK0h/iE13r/PycbZAMIi2InHETso=; t=1684445874; x=1685655474; b=HKxkGUUltyF8z5WgJGZeXtG+emJ7+BdTl6IehbLMCVSU0mj qe09YH6Stm+lHDfplU3jvrpyaaoms11MS7mtHBg==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pzlJq-0000d3-Fe; Thu, 18 May 2023 21:37:54 +0000 Date: Thu, 18 May 2023 17:37:51 -0400 From: Phil Pennock To: Tom Vaughan Cc: zsh-workers@zsh.org Subject: Re: Literal `~` directory created? Message-ID: Mail-Followup-To: Tom Vaughan , zsh-workers@zsh.org References: <92F7C23E-37C1-4204-95E1-6B8050F9CAB0@gmail.com> <74770309-94CB-4C2B-8FC4-C89A8064B293@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74770309-94CB-4C2B-8FC4-C89A8064B293@gmail.com> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 51762 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: On 2023-05-18 at 14:48 -0400, Tom Vaughan wrote: > > On May 18, 2023, at 13:59, Phil Pennock wrote: > > You should have things like: > > > > zstyle ':completion:*' urls ~/.urls > > zstyle ':completion:*' cache-path ~/.cache/zsh/${HOST%%.*} > > Sorry, I'm a bit confused. The previous link is to the zsh source code mirror on GitHub, specifically the definition for _store_cache which is what calls zstyle and mkdir. zstyle is used in two ways: 1. To set a style 2. To query a style The _store_cache function queries the style: zstyle -s ":completion:${curcontext}:" cache-path _cache_dir : ${_cache_dir:=${ZDOTDIR:-$HOME}/.zcompcache} This is a lookup, for a string (-s); see zshmodules(1) for the documentation. Then it supplies a default to use if that resulted in an empty string (`:`/`true` command, invoked for side-effect of argv evaluations, and ${param:=default} assignment to populate the variable). So this does not put a '~' into the cache-path. Something else has put that tilde in there. The _setting_ of the zstyle is done either with nothing between the `zstyle` and the pattern, or a `-e` for deferred evaluation. Or a '-' or '--', pedantically. The doc entry is: zstyle [ - | -- | -e ] pattern style string ... Somewhere, something in startup files or otherwise is populating some style settings with a literal tilde in there. Run: zstyle -L | grep '~' for a first approximation (might include other tildes) of which entries might have issues. Try this, to find likely candidates: grep "zstyle.*'~" ${ZDOTDIR:-$HOME}/.z* Now, should zsh have more guards against common misuse like this? Perhaps, but it's likely to be a quixotic quest.