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,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20049 invoked from network); 18 May 2023 17:56:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 May 2023 17:56:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1684432576; b=rG0wQEoGsWVCVKRxzwMZKnld9C3pE+IlTL595u4td4zws9i7dELqeQt0yrIxw36l0ffkPP/wUw HsEMxFrqHGv39X6cHEU+0PAhM6wpi1WEDM9H3kHzKpFbpbv+Fn4HHPOaJjxvDK+9nihHCOTCcy McVzghTT37Eyo6axXHZMGDufV6XUEyaMZ7Bzbrqc2ASE1DwV3yOXFRxEShvEtfer+9IYvqxMc6 T4DKX8GhmUbji/zfvB/3mSdRGX8yAg7nA+pjvyXCBAttt451Ru3jUtmKC8Op+oFa1Uq56jS0Do WbMSyGyxMwb/pvPdMJP/KxXeTxaxGRctvlU47BOm9H8LyQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f54.google.com) smtp.remote-ip=209.85.210.54; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1684432576; bh=AUhBol7zRhtdgIghM60zdX8/8Xt7b5xd5itIP45O9Tw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature; b=DA3aNYiCI+OXEC+5zHmslSXNEL2+gwbxTgy7rDw/tPRW8oAsHHFbl8sIWdoqsW8WIWkbGi+DRj d4yVFDBAwwSAjiqLpF9k62LWrOqBjvCK7nLm2ib0oV+Wo8r651EsykFnULqx6SbdhO2QDNIDBX T+12HwLDMl5Ybu/KTo/N4xrhYEeDhS5GPLMNf/ZufXfBnfW1Mk0H9FwIpvDHRbdredMMzG2rka HT0z1irNWgNLzuAcdRV4aCvqS26WJIUMeQ6PFzDqYiJ4Adywrsb0WdMGyQNxrZWMLyho52DJmF RcHeE9MhNLDx9tpPa7vrE8yYFKjkfwml7WK42A9U5uICKQ==; 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:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=bZDsOcA8JDiJRVQ9VLAzTSbTbdzGVKKsBOnA9K6YnLs=; b=VDIq8CfM5lMb8qOYCQcTBixjZF f7u2+c973Va1DVlofPUIkGKBWBW1yoIwHqFVHhRdGOzwLoWdXf8sYsUtumBimjJXkbgnLwJXeWrs4 eyoMvPvuzRZ0apMULm4BVI6NX9AXNqeiX3sgAypcWImUdFdj1ZAIR7Fs6UIvZKpdNDkukPBh5yj8k RghJthhwFQfzqzqEb8b5l8S69CliYrqz6z60KlqaDi08Qm7bcQsAneVQnbUFcCA8ANSqkSTSUaZ8x 6TmSopaRgRxoFwHJ5mxnDVeJ9O0AzKpW/LEjDZERPLVGKpbSuOoDNNNCK8dRdfEiWXDAeUa3WzS4E 5wDNcwiw==; Received: by zero.zsh.org with local id 1pzhrK-000Hm6-EV; Thu, 18 May 2023 17:56:14 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f54.google.com) smtp.remote-ip=209.85.210.54; dkim=pass header.d=gmail.com header.s=20221208 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ot1-f54.google.com ([209.85.210.54]:47158) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pzhm3-000HLM-9x; Thu, 18 May 2023 17:50:49 +0000 Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6a984993740so1041124a34.2 for ; Thu, 18 May 2023 10:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684432246; x=1687024246; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bZDsOcA8JDiJRVQ9VLAzTSbTbdzGVKKsBOnA9K6YnLs=; b=BIcPTAeFSYWT4AFi4jXFM1zYDU/OWNLsUxyUcQ2F0jbG7n/PvwukQZCzdk+tqkLsa9 CPyB6X3Ll9/uh5DIYr+CAHSR/4N/fmb+Yt3xCRPafuPGc763WbW8Rx/D+AjBp2+TShsk ABUg2MDdotABsQY3A6eNKhxDH1GMYCYP50NP5Ael43FaWvc65eT38QyDHFlTzod4NAz1 8S86G+EgeAe3oeWR6+ucOZIK3tyaGJkO3IiVCxucItIMIbMK9KcfzTKoKADxphfjsObB 03PMhuXBSFA9Ppkjctj8zjpFRasSZKqvxiRXm36KAUrXn7k8XZi2bvSTWEWvmF1EM7WI b0DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684432246; x=1687024246; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bZDsOcA8JDiJRVQ9VLAzTSbTbdzGVKKsBOnA9K6YnLs=; b=gE87BVZT05vvul76ojggEmkQBMNb8bkM7buslGDQNtS6+lWR2ymGobNDlVyaV3P2Il nTFmjwLpWcgilNjzCV56o5VdVgRsYltRVTlUQi7A13YFtT5ogy7GFAJl11rGk3WWvlAH w8SZaeO3suGGK4+qCuULqEcEgfD16EE92AwiruNNmhRX2kNd77WsbDJukLLezHU7LOYN HRxWRQ1Zp+ddExfkZk34BhsPYOl+pwaS4D0pZw8RCcmJlp0mWvFVTQNvmIQoj4juNi/s nxDAD2wJJtJGt7rj+lEy/J+88783IPs8lnur4Lx7E3MgIw3IHTiVIgRzNwarbSIMushN QjYw== X-Gm-Message-State: AC+VfDy5bsIfL/JaepWL9jh/q84Nt45Tc6S+XxuC3yn3ol6UX4G+EOfD F4sanZson9vJTJa5trDVttgTZ1MwI0g= X-Google-Smtp-Source: ACHHUZ4GgAB8gq7hYMgWi55PgdvZ3maE862CKjnMEGBABWE17mb0eNp4ZOE9zp40HO9C/GPDjwA7jQ== X-Received: by 2002:a05:6830:18a:b0:6a6:5a4a:a678 with SMTP id q10-20020a056830018a00b006a65a4aa678mr1635993ota.29.1684432245873; Thu, 18 May 2023 10:50:45 -0700 (PDT) Received: from smtpclient.apple ([138.84.33.139]) by smtp.gmail.com with ESMTPSA id s13-20020a056830148d00b006ab32e46485sm859394otq.79.2023.05.18.10.50.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2023 10:50:45 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: Literal `~` directory created? From: Tom Vaughan In-Reply-To: Date: Thu, 18 May 2023 13:50:42 -0400 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <92F7C23E-37C1-4204-95E1-6B8050F9CAB0@gmail.com> References: To: Phil Pennock X-Mailer: Apple Mail (2.3731.500.231) X-Seq: 51755 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 May 18, 2023, at 12:52, Phil Pennock = wrote: >=20 > On 2023-05-18 at 13:59 +0000, thomas.david.vaughan@gmail.com wrote: >> I ran `brew bundle install` in a newly created directory which = contained only >> a Brewfile, and noticed that afterwards a directory named `~` had = been >> created: >=20 >> I have noticed this before perhaps as far back as three months ago, = but I >> never could narrow it down enough to understand what might be causing = this. I >> would see this after I ran some homemade scripts I wrote to maintain = the >> software installed on my laptop. These scripts always ran brew so = maybe it's >> the culprit? >=20 > The expansion of `~` is something which the shell does when invoking a > command, but if the command is getting a value from a configuration = file > then it needs to be supported on a per-app basis, because then the = shell > isn't involved doing some of the work for it. >=20 > Similarly, if you have something which wants to use `~` as the default > value for a flag, then that's going to be ... "iffy". >=20 > So grep for '~' in your config files and try replacing it with $HOME > instead, see if the command does env-var expansion or if you end up = with > a directory named '$HOME' in your home-dir. :^) >=20 > There's nothing zsh-specific or zsh-involved here: the problem is > arising _because the shell is not being involved_. Thanks, Phil. Based on this it seems like the problem is due to: mkdir -m 0700 -p "$_cache_dir" at = https://github.com/zsh-users/zsh/blob/master/Completion/Base/Utility/_stor= e_cache#L19 Tilde is not expanded when quoted, right? _cache_dir is set a little = higher up at = https://github.com/zsh-users/zsh/blob/master/Completion/Base/Utility/_stor= e_cache#L10: $ echo $_cache_dir $ zstyle -s ":completion:${curcontext}:" cache-path _cache_dir $ echo $_cache_dir ~/.cache/zsh/compcache Perhaps this tilde should be expanded? Running the mkdir command above = creates a literal '~' directory in the current working directory. -Tom