X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 699D9385703B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1598272599;
	bh=Mhvza1QfZ389VB6g2gjHcpZywJmNZSphwE2MrfGJnjY=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=T3czRVRcJNeT1Ee554zNwH+MhueE1jF/fA5PCNY0D41Cq85IXSWolAEHk38GigoVH
	 zHvRohHcY8qwDhRtGpUEFJm83UadqL6BDpA8Zc4RfZ44iVRkyY0RsQsXqbKjWHsmAz
	 OdG+UmF/wKdRoBUAK115hWYU/RzHmpWvDOXsrZek=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0368F3857C53
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:content-transfer-encoding;
 bh=gShg6D+9PdQ/PUfzxPHEfcwlNvdUrHRk5gVSZDowy+4=;
 b=GbajrXRiTPadI0b4IWeOzmylDhmVSabvkEqW459T5V5vDeDQpWNN0lzlyIZABChsao
 JdpbJ45jLsTliTMfDOQYIODgRHBBxQJ+Ey7tw7ZspVTUneEfQc+gbhye4U/nefTxCFtr
 IQjpajnnDEmGVD8y+WeNLAVrFQs9fgRud22+1NtTQjIbNaNDRZxwvKre7WP9BlpX3kyX
 ymqIliYeFMaBGSiautyPVGZGMmUykfF+fFV2hdx58e3/6rR9L5vVBdP2uGHK9HyrPWl8
 hT/rfJqF1Wkaql0rlWrDoPbgSh2RUrWrEx+T5k/Xyd1cpSnYBRv1iKiehnpA2p+b6+7u
 CbCw==
X-Gm-Message-State: AOAM532h7smPTcepRPq8UOaVhxYGzvBdqUS/yDCs3qY3oZiKOtjq2Wzb
 q30IVMHPBUKLD25W50aaX1gS7nEhm5coGcwrj/8orOFIagI=
X-Google-Smtp-Source: ABdhPJwvNiOPaf3AEiBVKENDJA2MSVnVXVERJBOillawv0gQUK/ls1iBa6iVRPFTLKBwek7aVt0YvGofAwYj82A1exQ=
X-Received: by 2002:a17:906:8416:: with SMTP id
 n22mr5521049ejx.128.1598272595877; 
 Mon, 24 Aug 2020 05:36:35 -0700 (PDT)
MIME-Version: 1.0
References: <CA+7cx1r9uoLyyMifA5=rBVm5zfQZFdOfYd9dMMs6dPz-w9wHEw@mail.gmail.com>
 <83c5ffc2-02ac-e38e-6e8c-9963ac15b62d@towo.net>
In-Reply-To: <83c5ffc2-02ac-e38e-6e8c-9963ac15b62d@towo.net>
Date: Mon, 24 Aug 2020 14:36:25 +0200
Message-ID: <CA+7cx1o0-GqrYcrwK3A6AFajxmOSFKwD8TosQqTVi9HKsUwCzg@mail.gmail.com>
Subject: Re: Wrong expansion of ~/
To: cygwin@cygwin.com
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: =?utf-8?q?Morten_Kj=C3=A6rulff_via_Cygwin?= <cygwin@cygwin.com>
Reply-To: =?UTF-8?Q?Morten_Kj=C3=A6rulff?= <mortenkjarulff@gmail.com>
Content-Type: text/plain; charset="utf-8"
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 07OCb8qX026633

On Mon, Aug 24, 2020 at 11:52 AM Thomas Wolff wrote:
>
> Am 24.08.2020 um 10:05 schrieb Morten Kjærulff via Cygwin:
> > Hi,
> >
> > I have a script that starts several tmux panes with my favorite commands.
> > In some (*some* and only *sometimes*) of the panes I see:
> >
> > -bash: /home/xxxxxP/.git-completion.bash: No such file or directory
> > -bash: /home/xxxxxP/.git-prompt.sh: No such file or directory
> >
> > My .bashrc has:
> >
> > $ grep git .bashrc
> > . ~/.git-completion.bash
> > . ~/.git-prompt.sh
> >
> > My userid is xxxxxf (and not xxxxxP).
> >
> > Is this known?
> What if you trace `echo $HOME; echo ~` after the `.`? I have occasional
> cases where $HOME and ~ start to be different in my shell, which is
> quite weird and should not happen according to bash documentation.

Ok,

My userid is xx00mkf.


If I add:

. ~/.git-completion.bash
if [ ! $? = 0 ] ; then
  echo "HOME=" $HOME
  echo "~=" ~
fi

I see:

-bash: /home/xx00m/.git-completion.bash: No such file or directory
HOME= /home/xx00mkf
~= /home/xx00m


If I add:

. ~/.git-completion.bash
if [ ! $? = 0 ] ; then
  echo "HOME=" $HOME
  echo "~=" ~
  echo "~/.git-completion.bash=" ~/.git-completion.bash
fi

-bash: /home/xx00m/.git-completion.bash: No such file or directory
HOME= /home/xx00mkf
~= /home/xx00mkf
~/.git-completion.bash= /home/xx00mkf/.git-completion.bash


If I add:

. ~/.git-completion.bash
if [ ! $? = 0 ] ; then
  echo "HOME=" $HOME
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
  echo "~=" ~
fi

I cannot reproduce the issue.

Weird.

/Morten
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

