From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 842313858D37 for ; Tue, 25 Aug 2020 07:15:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 842313858D37 Received: by mail-ej1-x632.google.com with SMTP id dp2so9862944ejc.4 for ; Tue, 25 Aug 2020 00:15:40 -0700 (PDT) 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=XX2/gUxoQF5JoID6XOQZZ5ohNe3U09G81K80OpPYoPQ=; b=MeqfrZH1f8mtLUIJDhvu43B9ChRCtPoFvwdjKHHsYToVOlePR6LCzPwxS8jN3ruC+R 8a87VEOk1mKCaqmSqZ8VhXnAc8sZqqvQ7LwN1T97T5Kif3IsCDpH+O1esF4WH0kOdcKN Uo47As0c1cTI6y90YLLMCIjkIW5c82NG2l8WXJS69ouPdIht+U2cx8665NnBqU40Rc/6 Mi2+B7b0UkWpfBoeE/fayR/vNLxMbPw5qJrKOraRkC0CT4xWkXKR2w94dXDZD7BC+IRM cvADNXpc2GCzf+sExqLR6y9zfBm+NB6VOr9oQvZJf6ZDixOebQVzu06+ByZ/6HTgbwQF GVFg== X-Gm-Message-State: AOAM533fQ4LVqrMbaiSArhaKxnduEjFiEF7+E3Cx7ffjdwDCxWbwNVS8 cN+CIjVRWqTNcVopZN2oNUVvcSx8omRzk1pRFIDrLRmt1BU= X-Google-Smtp-Source: ABdhPJwmBNtIYt8beD5nCRIoj5QBe/IY0AjdBu1PtTkW1jNKHW9/pYZ2uDm9NAlp5i1JhwPtXgc2QmHj3aIXMpkU2M8= X-Received: by 2002:a17:906:2353:: with SMTP id m19mr8193101eja.16.1598339739396; Tue, 25 Aug 2020 00:15:39 -0700 (PDT) MIME-Version: 1.0 References: <83c5ffc2-02ac-e38e-6e8c-9963ac15b62d@towo.net> <6b79f1aa-04ef-99ce-443e-08fe475f5948@SystematicSw.ab.ca> In-Reply-To: <6b79f1aa-04ef-99ce-443e-08fe475f5948@SystematicSw.ab.ca> From: =?UTF-8?Q?Morten_Kj=C3=A6rulff?= Date: Tue, 25 Aug 2020 09:15:28 +0200 Message-ID: Subject: Re: Wrong expansion of ~/ To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2020 07:15:41 -0000 On Mon, Aug 24, 2020 at 10:41 PM Brian Inglis wrote: > > On 2020-08-24 06:36, Morten Kj=C3=A6rulff via Cygwin wrote: > > On Mon, Aug 24, 2020 at 11:52 AM Thomas Wolff wrote: > >> Am 24.08.2020 um 10:05 schrieb Morten Kj=C3=A6rulff via Cygwin: > >>> I have a script that starts several tmux panes with my favorite comma= nds. > >>> 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 occasiona= l > >> 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 [ ! $? =3D 0 ] ; then > > echo "HOME=3D" $HOME > > echo "~=3D" ~ > > fi > > > > I see: > > > > -bash: /home/xx00m/.git-completion.bash: No such file or directory > > HOME=3D /home/xx00mkf > > ~=3D /home/xx00m > > > > > > If I add: > > > > . ~/.git-completion.bash > > if [ ! $? =3D 0 ] ; then > > echo "HOME=3D" $HOME > > echo "~=3D" ~ > > echo "~/.git-completion.bash=3D" ~/.git-completion.bash > > fi > > > > -bash: /home/xx00m/.git-completion.bash: No such file or directory > > HOME=3D /home/xx00mkf > > ~=3D /home/xx00mkf > > ~/.git-completion.bash=3D /home/xx00mkf/.git-completion.bash > > HOME dir depends on entries in: > > /etc/nsswitch.conf > > whether you have /etc/passwd and/or /etc/group files and their entries; > > your SAM and/or AD entry contents including e.g. > > $ net user $USER | grep '^Comment' > Comment > > You can check if any of these are in effect by running: > > $ getent passwd $USER > > If you think they are relevant, you might also want to try to trace and d= ebug > your bash-completion setup scripts: > > $ set -vx > $ . /etc/profile.d/bash_completion.sh |& tee /tmp/completion.log = | less > > to see what they are doing that might affect other settings. Thanks, but ~ changes from xx01m to xx01mkf (which is correct) between a few commands in .bashrc: If I add: . ~/.git-completion.bash if [ ! $? =3D 0 ] ; then echo "HOME=3D" $HOME echo "~=3D" ~ echo "~/.git-completion.bash=3D" ~/.git-completion.bash fi I see (*sometimes*): -bash: /home/xx00m/.git-completion.bash: No such file or directory <<