X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 985C13857822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1598339742; bh=fbwJI8cYJbB2wRpLbtSC9HXQ80lKFN8kg4hpLVHB/Ts=; 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=sZwioF8KvvdFQcBjyuybQTo4SbMIitwS42njJ6anfKvCsM8ct7+jzPeKuv1pNLC4g viwa7hV5hMMsayYaUqWKGX4fzzdKu7L6jtXkYIb/Apf9//FF3RBiYkB4jPljgdBSOf FtDNlPSPR5gyppnYvZj6eUC4xwueZnhT4Wo3p/JY= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 842313858D37 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 AT towo DOT net> <6b79f1aa-04ef-99ce-443e-08fe475f5948 AT SystematicSw DOT ab DOT ca> In-Reply-To: <6b79f1aa-04ef-99ce-443e-08fe475f5948@SystematicSw.ab.ca> Date: Tue, 25 Aug 2020 09:15:28 +0200 Message-ID: Subject: Re: Wrong expansion of ~/ To: cygwin AT cygwin DOT com 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 AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Morten_Kj=C3=A6rulff_via_Cygwin?= Reply-To: =?UTF-8?Q?Morten_Kj=C3=A6rulff?= Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 07P7GCiH007676 On Mon, Aug 24, 2020 at 10:41 PM Brian Inglis wrote: > > On 2020-08-24 06:36, Morten Kjærulff 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ærulff via Cygwin: > >>> 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 > > 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 debug > 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 [ ! $? = 0 ] ; then echo "HOME=" $HOME echo "~=" ~ echo "~/.git-completion.bash=" ~/.git-completion.bash fi I see (*sometimes*): -bash: /home/xx00m/.git-completion.bash: No such file or directory <<