git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Theodor Negrescu <theodor.negrescu@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Eric Sunshine <sunshine@sunshineco.com>, Git List <git@vger.kernel.org>
Subject: Re: BUG: Git path --config doesn't work with ~ symbol
Date: Wed, 5 May 2021 21:59:58 +0300	[thread overview]
Message-ID: <CAEumJaA7NBm9Kdx7aCD1gavGguLmGcnvFcA52YvUk7g_FPzHZw@mail.gmail.com> (raw)
In-Reply-To: <YJLla4gNEMS2yxCv@coredump.intra.peff.net>

You're right, "notepad ~/test.txt" doesn't work either.
I figured out a workaround:
[alias]
    cfg = "!git config --file $(echo ~)/git-settings/.gitconfig "
However what confuses me is that I also have
[core]
    hooksPath = ~/git-settings/hooks
and that ~ works. So why doesn't it work in config --file?

On Wed, May 5, 2021 at 9:35 PM Jeff King <peff@peff.net> wrote:
>
> On Wed, May 05, 2021 at 09:30:21PM +0300, Theodor Negrescu wrote:
>
> > I'm using powershell, but usually ~ works there. Typing "cd ~" would
> > work for example.
> > Also I tried using the command as an alias and it still didn't work.
>
> I don't know anything about powershell, but generally "cd" is a builtin
> to the shell (because it is impacting the shell's environment). So it
> may be that powershell "cd" expands "~" itself, but that the shell
> doesn't expand it for executed commands.
>
> There are some Windows folks who hang out on this list, so you may get a
> better response. But you might also ask in the Git for Windows mailing
> list:
>
>   https://groups.google.com/g/git-for-windows
>
> -Peff

  reply	other threads:[~2021-05-05 19:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 18:06 Theodor Negrescu
2021-05-05 18:13 ` Theodor Negrescu
2021-05-05 18:14 ` Jeff King
2021-05-05 18:21   ` Eric Sunshine
2021-05-05 18:30     ` Theodor Negrescu
2021-05-05 18:35       ` Jeff King
2021-05-05 18:59         ` Theodor Negrescu [this message]
2021-05-05 19:01           ` Jeff King
2021-05-05 18:32     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEumJaA7NBm9Kdx7aCD1gavGguLmGcnvFcA52YvUk7g_FPzHZw@mail.gmail.com \
    --to=theodor.negrescu@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.com \
    --subject='Re: BUG: Git path --config doesn'\''t work with ~ symbol' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).