Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Literal `~` directory created?
- X-seq: zsh-workers 51754
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: thomas.david.vaughan@xxxxxxxxx
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Literal `~` directory created?
- Date: Thu, 18 May 2023 12:52:42 -0400
- Archived-at: <https://zsh.org/workers/51754>
- In-reply-to: <sympa.1684417389.285442.38224.688@zsh.org>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: thomas.david.vaughan@xxxxxxxxx, zsh-workers@xxxxxxx
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc
- References: <sympa.1684417389.285442.38224.688@zsh.org>
On 2023-05-18 at 13:59 +0000, thomas.david.vaughan@xxxxxxxxx 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:
> 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?
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.
Similarly, if you have something which wants to use `~` as the default
value for a flag, then that's going to be ... "iffy".
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. :^)
There's nothing zsh-specific or zsh-involved here: the problem is
arising _because the shell is not being involved_.
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author