From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic318-28.consmr.mail.bf2.yahoo.com (sonic318-28.consmr.mail.bf2.yahoo.com [74.6.135.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20C981D63C9 for ; Thu, 24 Oct 2024 12:26:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.6.135.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729772812; cv=none; b=FdO6/NItO1DC7VsDlqkZAU/XN5xRNtz6FtWjuxblACTcPFGwDcYdtgeLG8M8ql4Whs3BDEiSBfhL+lvdu9ipOLLM9AVS8uT9UwpWIhRgv9L6PXaY7tDFuwUSjiUh7H56+JFAJc+WPtIrLBZMSpx77DiBlFM03gU2pafxcCYAE3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729772812; c=relaxed/simple; bh=Q2CdjybicLhoRwDP9h8Zx/+TOtsm4qDqk45yzpfwNjo=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=S/ODiB8MpTOZDMUx6uyVE9VJ5ltvrTr3D0cz0HuzY4zJQrl0OzWrSGKjUThqk9erF2qlQ6AVC9yC930LadJXda/GXup/rRk+tUWLgaJndV0yG8YHGvNt7Jauq/Z+r5X+DvDPCOyTopUIySOtdhgYmmdFeSMF9zeBJ6k4snprUPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=Mt4EmS0M; arc=none smtp.client-ip=74.6.135.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="Mt4EmS0M" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729772809; bh=Q2CdjybicLhoRwDP9h8Zx/+TOtsm4qDqk45yzpfwNjo=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=Mt4EmS0M+D0xK8beEefK3o2n8rdmYrwI7XR5foPcXcIvJvjefIGMm4H7jUSm68H9H1O16sgD7GUESozs4CKYgfqVqaUV5LEFbT3yF2318UfQ9hDxHTRv1uRq4gf7Gd46z8gnAgjUPuSEQReBG5NwuRW6ljqKRHTtGf9ltCufs8rVzs70W6yigOOktXbhfOe2WFdWvKUNwLMzRTQBCS/HgiNSBWlJvwZpW6lwFR15XkhC4WWzBeXIJOi8kcrmlXBA0l6priTLDG3UQB+rnmnX9eL6aptnN5jxd5zTM5pgklP8RkE+j3REDczSvXjb6Z7SoR2sPvRBd1x6laXsRQT1jg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1729772809; bh=cu/GBfY9lvfP1d1uA7DWTIj+YX5lGZmaJwH/+C2Cto3=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=qod4zHPpJpNIRVtFvweQUQtxfg8+x4dAAYbzA1wBstuxmXQKRnK/d+4XCUGVYciLUejDdT47OsWiI/CfgSQEszkWCGjATKY+IQQS6bgIdPPLf9GdanXu9d6v9eIrL+NHOMLvhBwnzx+SCt8ZWOKjG/ieMbRSQjaKN2ph2mkXvrsO02uq+4UIr9l4HO7qyJfRXa/V26eU1qVAjflA2uMKLuhSjLcgu3OjMRhTzC4po/ZYImAd45fMuPfyS4w0pK6CnV79fDgiATBBk4R7HoTB/vR+OMT6yPyb5bVwOgJhReYCSRsShtI1kwtxtdx/KMt3IMyaSVjk3lLE9KKS4s9P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8weiTlmMGhlPEfzu.afO0kiITgGlXUYd9.t80VfQfSK0GCAS4P3IW6UL 7Fj3THu5_9C17Y1E49twftpOyA6yfn6ghTJA6fYPX8YFztklQZ8oyNyuqJfwo.DE_4bOUPjKx_1T kB0r5XhEqbE8mIOlS9BkQQ5RnLGHv3dG8SWSZkjcES9z69Sh1oGDiVVibFAZQ X-Sonic-MF: X-Sonic-ID: c2deaa48-6935-4db0-b9e6-7d413f7eab71 Received: from sonic.gate.mail.ne1.yahoo.com by sonic318.consmr.mail.bf2.yahoo.com with HTTP; Thu, 24 Oct 2024 12:26:49 +0000 Date: Thu, 24 Oct 2024 11:46:20 +0000 (UTC) From: avih To: Taylor Blau , =?UTF-8?Q?Mat=C4=9Bj_Cepl?= Cc: =?UTF-8?Q?SZEDER_G=C3=A1bor?= , "git@vger.kernel.org" Message-ID: <1101848017.3146876.1729770380522@mail.yahoo.com> In-Reply-To: References: Subject: Re: bash prompt evaporates in subdirectories Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.22806 YMailNorrin > On Tue Oct 22, 2024 at 5:53 PM CEST, Taylor Blau wrote: > > Are you using the prompt from contrib/completion/git-prompt.sh? If so, = I > > CC'd a couple of folks who have worked recently on that script. > > > > I assume they may find it helpful to know a little more about your > > setup, including possibly if you have a bisection where the prompt > > stopped working for you when in sub-directories. > > Unfortunately, I have recently switched from fish (where > everything works right), so I don=E2=80=99t know when exactly the break h= appened. > > Using openSUSE/MicroOS-based system with all the work done in > distrobox containers (with openSUSE/Tumbleweed inside). > > Not sure, what else I can say, or how to better debug. You can help by providing the following: - What is the "innermost" distro where this happens? Thumbleweed? =C2=A0 which version? - Which git version do you have installed? How did you install it? - How did you install the git-prompt support? - Which shell do you use? (bash? zsh? something else?) - How is the (git) prompt set in your shell startup file? (~/.bashrc, =C2=A0 or ~/.profile, etc). If you don't know exactly, then can you please =C2=A0 attach your shell startup files? - Can you provide a sample repository to clone which reproduces the =C2=A0 issue? for instance, you can pick a small repo from github. - What are the steps to reproduce the issue? is it enough to "cd" =C2=A0 into an existing sub-dir at the git dir? or is it only broken =C2=A0 when creating an unrelated sub-dir and "cd" into it? better yet, =C2=A0 provide a 1:... 2:... 3:... steps which reproduce the issue for =C2=A0 you, and which others can try to follow. I tried the following: 1. Download the latest Thumbleweed snapshot and boot in a VM: =C2=A0=C2=A0 https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumblewe= ed-XFCE-Live-x86_64-Snapshot20241022-Media.iso 2. In a terminal (default shell is bash 5.2.37(1)): =C2=A0=C2=A0 sudo zypper install git=C2=A0 # 2.47.0-1.1 =C2=A0=C2=A0 sudo zypper install bash-git-prompt 3. The above does NOT install git-prompt.sh which is maintained =C2=A0=C2=A0 together with git at the contrib dir. In its README.md: =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 This prompt is a port of the "Informative git prom= pt for zsh" =C2=A0=C2=A0=C2=A0=C2=A0 which you can find https://github.com/olivierverdi= er/zsh-git-prompt =C2=A0=C2=A0=C2=A0 so I did not try to set it up. If you have an issue with= that =C2=A0=C2=A0=C2=A0 package then you should report it to the package maintai= ner. 4.=C2=A0 Download git-prompt.sh from the git contrib dir: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 curl -o ~/git-prompt.sh https://raw.githubus= ercontent.com/git/git/refs/tags/v2.47.0/contrib/completion/git-prompt.sh =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chmod +x ~/git-prompt.sh 5. Add the following lines at the end of ~/.bashrc : =C2=A0 =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 . ~/git-prompt.sh =C2=A0=C2=A0=C2=A0=C2=A0 PS1=3D'\w$(__git_ps1)\n\$ ' 6. Start a new bash shell or new terminal. 7. Clone a sample repo (/shameless plug) and "cd" into it: =C2=A0=C2=A0=C2=A0=C2=A0 git clone https://github.com/avih/shlolcat =C2=A0=C2=A0=C2=A0=C2=A0 cd shlolcat=C2=A0 # the prompt correctly includes = "(master)" 9. "cd" into a subdir: =C2=A0=C2=A0=C2=A0=C2=A0 cd c-lolcat=C2=A0 # the prompt still correctly inc= ludes "(master)" 9. Create an arbitrary additional sub-dir and "cd" into it: =C2=A0=C2=A0=C2=A0=C2=A0 mkdir xxx =C2=A0=C2=A0=C2=A0=C2=A0 cd xxx=C2=A0 # the prompt still correctly includes= "(master)" So I can't reproduce such issue with git-prompt.sh which is part of the "git" repo at contrib/completion/git-prompt.sh . Cheers, avih =C2=A0=C2=A0=C2=A0=C2=A0