Wrong expansion of ~/
Morten Kjærulff
mortenkjarulff@gmail.com
Mon Aug 24 12:36:25 GMT 2020
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
More information about the Cygwin
mailing list