* bash prompt evaporates in subdirectories @ 2024-10-22 15:02 Matěj Cepl 2024-10-22 15:53 ` Taylor Blau 0 siblings, 1 reply; 10+ messages in thread From: Matěj Cepl @ 2024-10-22 15:02 UTC (permalink / raw) To: git [-- Attachment #1.1.1: Type: text/plain, Size: 1335 bytes --] Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) cd subdirectory/ What did you expect to happen? (Expected behavior) bash prompt would be still active and showing the status of my checkout (possibly even limited to the current subdirectory, but it is not necessary) What happened instead? (Actual behavior) Part of the bash prompt related to git (e.g., current branch) evaporates What's different between what you expected and what actually happened? I would like to have current branch and status even in subdirectories Anything else you want to add: Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.47.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh libcurl: 8.10.1 OpenSSL: OpenSSL 3.1.4 24 Oct 2023 zlib: 1.3.1 uname: Linux 6.11.3-1-default #1 SMP PREEMPT_DYNAMIC Fri Oct 11 06:48:36 UTC 2024 (7881e90) x86_64 compiler info: gnuc: 14.2 libc info: glibc: 2.40 $SHELL (typically, interactive shell): /usr/bin/bash Bash version: GNU bash, version 5.2.37(1)-release (x86_64-suse-linux) [Enabled Hooks] [-- Attachment #1.2: E09FEF25D96484AC.asc --] [-- Type: application/pgp-keys, Size: 3102 bytes --] -----BEGIN PGP PUBLIC KEY BLOCK----- mQGiBD2g5T0RBACZdnG/9T4JS2mlxsHeFbex1KWweKPuYTpnbu8Fe7rNYMWZ/AKc 9Vm+RuoVErm4HGsb0pL5ZPnncA+m80W8EzQm2rs8PD2mHNsUhDOGnk+0fm+25WSU 6YLzd8lttxPia75A5OqBEAmJlyJUSmoWKjAK/q1Tj5HW3+/7XqWYYCJzAwCgjR2D irw8QP8GCoUUXxeNpIOTqzMD/j66VTln+rxYT12U4jxLlsOs5Y0LVQfUbpDFEYy9 mkWX8iNTUZsx+m6uhylamm3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BwsJCAcDAgEGFQgCCQoLBBYCAwEC HgECF4AACgkQ4J/vJdlkhKyKtQCdHDpolHg/1qDaw/4CQyUzAfNvHk0AniEYL6BF rdyonhgQf/ZXzXjnKzSeuQENBD2g5UEQBACfxoz2nmzGJz6ueKHkTeXcQZvK4WzK TN/uJJhEmSuQmOKymbIkGL6vBQb+W4KxvLl2lAbNlfIgLGDLCs1YAwfSpJ4vS4mt liPgA2OtZ5j1WSOqpxedQPGVba5gVo7HNSOMUtZKTz7VsCvR94v05comhO1Gok75 ZxHtYyVHuk5V8wADBQP/ft+W4F0tccwslzz8O/c9/Mj8KZDYmfMyNb7ielT2WeQ3 iFF9AxMT6OvOxAQbDJvurfKeYlydcXLs6cy4lKce1hFaJ4i+MOFLVV1ZnZDDChRP pQ6KrRCHLb+mLY+SYD37O7p0spQA+9gsEE/tmn+5sW7LE8hqSOoPVdf7Y5yUDj6I RgQYEQIABgUCPaDlQQAKCRDgn+8l2WSErEUSAJ42T1l/2TFykbULBqqAtnbC6kR0 wwCdEnRlCGlvnO78R0FgKXlt3RyzGuE= =sxoW -----END PGP PUBLIC KEY BLOCK----- [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 216 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-22 15:02 bash prompt evaporates in subdirectories Matěj Cepl @ 2024-10-22 15:53 ` Taylor Blau 2024-10-24 10:17 ` Matěj Cepl 0 siblings, 1 reply; 10+ messages in thread From: Taylor Blau @ 2024-10-22 15:53 UTC (permalink / raw) To: Matěj Cepl; +Cc: SZEDER Gábor, Avi Halachmi, git On Tue, Oct 22, 2024 at 05:02:55PM +0200, Matěj Cepl wrote: > What did you expect to happen? (Expected behavior) > > bash prompt would be still active and showing the status of my > checkout (possibly even limited to the current subdirectory, but it is > not necessary) 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. Thanks, Taylor ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-22 15:53 ` Taylor Blau @ 2024-10-24 10:17 ` Matěj Cepl 2024-10-24 11:46 ` avih 0 siblings, 1 reply; 10+ messages in thread From: Matěj Cepl @ 2024-10-24 10:17 UTC (permalink / raw) To: Taylor Blau; +Cc: SZEDER Gábor, Avi Halachmi, git [-- Attachment #1.1.1: Type: text/plain, Size: 959 bytes --] 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’t know when exactly the break happened. 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. Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Ty zlý dávaj’ ty hodný pryč. // Those evil ones put away those good ones. -- Magda Ceplová [-- Attachment #1.2: E09FEF25D96484AC.asc --] [-- Type: application/pgp-keys, Size: 3102 bytes --] -----BEGIN PGP PUBLIC KEY BLOCK----- mQGiBD2g5T0RBACZdnG/9T4JS2mlxsHeFbex1KWweKPuYTpnbu8Fe7rNYMWZ/AKc 9Vm+RuoVErm4HGsb0pL5ZPnncA+m80W8EzQm2rs8PD2mHNsUhDOGnk+0fm+25WSU 6YLzd8lttxPia75A5OqBEAmJlyJUSmoWKjAK/q1Tj5HW3+/7XqWYYCJzAwCgjR2D irw8QP8GCoUUXxeNpIOTqzMD/j66VTln+rxYT12U4jxLlsOs5Y0LVQfUbpDFEYy9 mkWX8iNTUZsx+m6uhylamm3EkN/dW0b2sQ4D3ocZekriLPDR/X0P1XPUdcy28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kQ4J/vJdlkhKyKtQCdHDpolHg/1qDaw/4CQyUzAfNvHk0AniEYL6BF rdyonhgQf/ZXzXjnKzSeuQENBD2g5UEQBACfxoz2nmzGJz6ueKHkTeXcQZvK4WzK TN/uJJhEmSuQmOKymbIkGL6vBQb+W4KxvLl2lAbNlfIgLGDLCs1YAwfSpJ4vS4mt liPgA2OtZ5j1WSOqpxedQPGVba5gVo7HNSOMUtZKTz7VsCvR94v05comhO1Gok75 ZxHtYyVHuk5V8wADBQP/ft+W4F0tccwslzz8O/c9/Mj8KZDYmfMyNb7ielT2WeQ3 iFF9AxMT6OvOxAQbDJvurfKeYlydcXLs6cy4lKce1hFaJ4i+MOFLVV1ZnZDDChRP pQ6KrRCHLb+mLY+SYD37O7p0spQA+9gsEE/tmn+5sW7LE8hqSOoPVdf7Y5yUDj6I RgQYEQIABgUCPaDlQQAKCRDgn+8l2WSErEUSAJ42T1l/2TFykbULBqqAtnbC6kR0 wwCdEnRlCGlvnO78R0FgKXlt3RyzGuE= =sxoW -----END PGP PUBLIC KEY BLOCK----- [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 216 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-24 10:17 ` Matěj Cepl @ 2024-10-24 11:46 ` avih 2024-10-24 12:35 ` avih 2024-10-24 13:33 ` Matěj Cepl 0 siblings, 2 replies; 10+ messages in thread From: avih @ 2024-10-24 11:46 UTC (permalink / raw) To: Taylor Blau, Matěj Cepl; +Cc: SZEDER Gábor, git@vger.kernel.org > 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’t know when exactly the break happened. > > 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? 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, or ~/.profile, etc). If you don't know exactly, then can you please attach your shell startup files? - Can you provide a sample repository to clone which reproduces the issue? for instance, you can pick a small repo from github. - What are the steps to reproduce the issue? is it enough to "cd" into an existing sub-dir at the git dir? or is it only broken when creating an unrelated sub-dir and "cd" into it? better yet, provide a 1:... 2:... 3:... steps which reproduce the issue for you, and which others can try to follow. I tried the following: 1. Download the latest Thumbleweed snapshot and boot in a VM: https://download.opensuse.org/tumbleweed/iso/openSUSE-Tumbleweed-XFCE-Live-x86_64-Snapshot20241022-Media.iso 2. In a terminal (default shell is bash 5.2.37(1)): sudo zypper install git # 2.47.0-1.1 sudo zypper install bash-git-prompt 3. The above does NOT install git-prompt.sh which is maintained together with git at the contrib dir. In its README.md: This prompt is a port of the "Informative git prompt for zsh" which you can find https://github.com/olivierverdier/zsh-git-prompt so I did not try to set it up. If you have an issue with that package then you should report it to the package maintainer. 4. Download git-prompt.sh from the git contrib dir: curl -o ~/git-prompt.sh https://raw.githubusercontent.com/git/git/refs/tags/v2.47.0/contrib/completion/git-prompt.sh chmod +x ~/git-prompt.sh 5. Add the following lines at the end of ~/.bashrc : . ~/git-prompt.sh PS1='\w$(__git_ps1)\n\$ ' 6. Start a new bash shell or new terminal. 7. Clone a sample repo (/shameless plug) and "cd" into it: git clone https://github.com/avih/shlolcat cd shlolcat # the prompt correctly includes "(master)" 9. "cd" into a subdir: cd c-lolcat # the prompt still correctly includes "(master)" 9. Create an arbitrary additional sub-dir and "cd" into it: mkdir xxx cd xxx # 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-24 11:46 ` avih @ 2024-10-24 12:35 ` avih 2024-10-24 13:33 ` Matěj Cepl 1 sibling, 0 replies; 10+ messages in thread From: avih @ 2024-10-24 12:35 UTC (permalink / raw) To: Taylor Blau, Matěj Cepl; +Cc: SZEDER Gábor, git@vger.kernel.org On Thursday, October 24, 2024 at 02:46:21 PM GMT+3, avih <avihpit@yahoo.com> wrote: > ... > > I tried the following: > > ... > > 2. In a terminal (default shell is bash 5.2.37(1)): > sudo zypper install git # 2.47.0-1.1 > sudo zypper install bash-git-prompt > > 3. The above does NOT install git-prompt.sh which is maintained > together with git at the contrib dir. In its README.md: > ... > > 4. Download git-prompt.sh from the git contrib dir: > curl -o ~/git-prompt.sh https://raw.githubusercontent.com/git/git/refs/tags/v2.47.0/contrib/completion/git-prompt.sh > chmod +x ~/git-prompt.sh > 5. Add the following lines at the end of ~/.bashrc : > . ~/git-prompt.sh > PS1='\w$(__git_ps1)\n\$ ' Actually, "sudo zypper install git" does install the correct script at /usr/share/bash-completion/completions/git-prompt.sh Additionally, that "git" package adds /etc/bash-completion.d/git-prompt which does source this script automatically on shell startup, therefore step 4 (the curl thing) is not required, and git-prompt.sh is already loaded automatically, and so only one line instead of two should be added to ~/.bashrc (as a minimal example): PS1='\w$(__git_ps1)\n\$ ' The rest is the same. Still can't reproduce it with this script. avih ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-24 11:46 ` avih 2024-10-24 12:35 ` avih @ 2024-10-24 13:33 ` Matěj Cepl 2024-10-24 14:19 ` avih 2024-10-24 14:26 ` RESOLVED [Was: Re: bash prompt evaporates in subdirectories] Matěj Cepl 1 sibling, 2 replies; 10+ messages in thread From: Matěj Cepl @ 2024-10-24 13:33 UTC (permalink / raw) To: avih, Taylor Blau; +Cc: SZEDER Gábor, git@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 3670 bytes --] On Thu Oct 24, 2024 at 1:46 PM CEST, avih wrote: > - What is the "innermost" distro where this happens? Thumbleweed? > which version? Yes, Tumbleweed (actually MicroOS uses Tumbleweed packages as well), which is a rolling distro and I updated (almost) daily, so it is hard to say which version. > - Which git version do you have installed? How did you install it? mitmanek:~ $ rpm -qf "$(which git)" git-core-2.47.0-1.1.x86_64 mitmanek:~ $ > - How did you install the git-prompt support? Using the git-prompt.sh from the package, but it seems to be the same as the upstream one in contrib/ mitmanek:~ $ rpm -qf /bin/bash bash-5.2.37-14.2.x86_64 mitmanek:~ $ rpm -qf /usr/share/bash-completion/completions/git-prompt.sh git-core-2.47.0-1.1.x86_64 mitmanek:~ $ diff -u \ /usr/share/bash-completion/completions/git-prompt.sh \ <(curl -L -s https://github.com/git/git/raw/refs/heads/master/contrib/completion/git-prompt.sh) mitmanek:~ $ > - Which shell do you use? (bash? zsh? something else?) bash with ble.sh (freshly updated, but the problem can be reproduced even without it) > - How is the (git) prompt set in your shell startup file? (~/.bashrc, > or ~/.profile, etc). If you don't know exactly, then can you please > attach your shell startup files? * /etc/bash.bashrc is https://mcepl.fedorapeople.org/tmp/bash.bashrc (the standard openSUSE one with the addition of loading /etc/profile.d/distrobox_profile.sh) * /etc/profile is https://mcepl.fedorapeople.org/tmp/profile (git is not mentioned anywhere in /etc/profile.d) * /etc/bash_completion.d/git-prompt is https://mcepl.fedorapeople.org/tmp/git-prompt (so, yes git-prompt may be attempted to be loaded twice) * /etc/profile.d/distrobox_profile.sh is https://mcepl.fedorapeople.org/tmp/distrobox_profile.sh * ~/.bashrc is https://mcepl.fedorapeople.org/tmp/bashrc * ~/.config/blesh/init.sh is https://mcepl.fedorapeople.org/tmp/init.sh > - Can you provide a sample repository to clone which reproduces the > issue? for instance, you can pick a small repo from github. Basically any git repository which has more than one level of directories, I spent most of my time in https://git.sr.ht/~mcepl/m2crypto, so when I do `cd src` the git status evaporates. > - What are the steps to reproduce the issue? is it enough to "cd" > into an existing sub-dir at the git dir? or is it only broken > when creating an unrelated sub-dir and "cd" into it? better yet, > provide a 1:... 2:... 3:... steps which reproduce the issue for > you, and which others can try to follow. Yes, just run `cat <(curl -L -s https://mcepl.fedorapeople.org/tmp/typescript)` > sudo zypper install bash-git-prompt I don’t have this package installed at all, using the script from git-core. > . ~/git-prompt.sh > PS1='\w$(__git_ps1)\n\$ ' Yes, that works: mitmanek:~ $ export PS1='\w$(__git_ps1)\n\$ ' ~ $ ~/repos/m2crypto cd -- /home/matej/repos/m2crypto ~/repos/m2crypto (master $) $ cd src ~/repos/m2crypto/src (master $) $ So, the problem is somewhere in my too complicated configuration. Any idea, where? Thank you for your help so far! Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Books aren’t written - they’re rewritten. Including your own. It is one of the hardest things to accept, especially after the seventh rewrite hasn’t quite done it. -- Michael Crichton, alluding to Steele MacKaye (1889) article where he said this about theater plays. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 216 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bash prompt evaporates in subdirectories 2024-10-24 13:33 ` Matěj Cepl @ 2024-10-24 14:19 ` avih 2024-10-24 14:26 ` RESOLVED [Was: Re: bash prompt evaporates in subdirectories] Matěj Cepl 1 sibling, 0 replies; 10+ messages in thread From: avih @ 2024-10-24 14:19 UTC (permalink / raw) To: Taylor Blau, Matěj Cepl; +Cc: SZEDER Gábor, git@vger.kernel.org On Thursday, October 24, 2024 at 04:33:14 PM GMT+3, Matěj Cepl <mcepl@cepl.eu> wrote: > On Thu Oct 24, 2024 at 1:46 PM CEST, avih wrote: > > ... > > - How did you install the git-prompt support? > > Using the git-prompt.sh from the package, but it seems to be the same as the upstream one in contrib/ Good. > ... using the script from git-core. > > . ~/git-prompt.sh > > PS1='\w$(__git_ps1)\n\$ ' > > Yes, that works: > ... Good. So this probably means there's no issue with that script, unless you can isolate a specific minimal example (with some config vars, PS1/PROMPT_COMMAND, etc) which behaves badly. > > - Which shell do you use? (bash? zsh? something else?) > > bash with ble.sh (freshly updated, but the problem can be reproduced even without it) ble.sh looks pretty not-small, and I'm not familiar with it. > > - How is the (git) prompt set in your shell startup file? (~/.bashrc, > > or ~/.profile, etc). If you don't know exactly, then can you please > > attach your shell startup files? > > * /etc/bash.bashrc is > ... (generally default distro files) > > * ~/.bashrc is https://mcepl.fedorapeople.org/tmp/bashrc > * ~/.config/blesh/init.sh is > https://mcepl.fedorapeople.org/tmp/init.sh > > ... > > So, the problem is somewhere in my too complicated configuration. Any idea, where? These files load/use ~/.config/dotfiles/osc/osc-prompt.sh which is not linked or provided, and I'm guessing is either the culprit, or the issue is how you use it together with __git_ps1, which I can't help you with. You may link it in a reply, but I likely don't have the bandwidth to look into it, though maybe someone else would be able to help. Or, even better, you should look into it and bisect your config. For what it's worth, if, with that same Tumbleweed live DVD, with git installed, I add your ~/.bashrc content to mine (default), and add this final line: PS1='\n\w$(__git_ps1)\n\$ ' then it does work correctly (with your GIT_PS1_* config vars etc). But your PS1 is: export PS1='\h:\W$(__osc_prompt) \$ ' So I'm guessing things go wrong somewhere between __osc_prompt and __git_ps1 invocation, but I can't tell where. Anyway, good luck. avih ^ permalink raw reply [flat|nested] 10+ messages in thread
* RESOLVED [Was: Re: bash prompt evaporates in subdirectories] 2024-10-24 13:33 ` Matěj Cepl 2024-10-24 14:19 ` avih @ 2024-10-24 14:26 ` Matěj Cepl 2024-10-24 15:50 ` Taylor Blau 2024-10-24 20:03 ` avih 1 sibling, 2 replies; 10+ messages in thread From: Matěj Cepl @ 2024-10-24 14:26 UTC (permalink / raw) To: avih, Taylor Blau; +Cc: SZEDER Gábor, git@vger.kernel.org [-- Attachment #1.1.1: Type: text/plain, Size: 574 bytes --] On Thu Oct 24, 2024 at 3:33 PM CEST, Matěj Cepl wrote: > On Thu Oct 24, 2024 at 1:46 PM CEST, avih wrote: >> - What is the "innermost" distro where this happens? Thumbleweed? >> which version? It was a bug in one of my scripts, https://github.com/openSUSE/osc/pull/1632/commits/294001c46ea2 Sorry for bothering you. Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 One reason that life is complex is that it has a real part and an imaginary part. -- Andrew König [-- Attachment #1.2: E09FEF25D96484AC.asc --] [-- Type: application/pgp-keys, Size: 3102 bytes --] -----BEGIN PGP PUBLIC KEY BLOCK----- mQGiBD2g5T0RBACZdnG/9T4JS2mlxsHeFbex1KWweKPuYTpnbu8Fe7rNYMWZ/AKc 9Vm+RuoVErm4HGsb0pL5ZPnncA+m80W8EzQm2rs8PD2mHNsUhDOGnk+0fm+25WSU 6YLzd8lttxPia75A5OqBEAmJlyJUSmoWKjAK/q1Tj5HW3+/7XqWYYCJzAwCgjR2D irw8QP8GCoUUXxeNpIOTqzMD/j66VTln+rxYT12U4jxLlsOs5Y0LVQfUbpDFEYy9 mkWX8iNTUZsx+m6uhylamm3EkN/dW0b2sQ4D3ocZekriLPDR/X0P1XPUdcy28a6o WZoVAKN26X+PwxSq3JCiQEJgPJeKxiLiExh3lDitNyAS0WUD/xQOqryEFb9ksGxL R9UCA/9WUQMwgQvEUhuVB7qSnREo3+ks34Kltp71uUjuMjLk3ykSptyn8oV+XZgx rxPAD+WOJn51yFxbo+OPNdH6wG2ZaXFj47rX6GQ9W6wI7K0QhdyQTps8KNlsJuDQ pz7XME98ob8SszsvkPPm/gX0oWdOIqHipHnMlL684jRHCWHVjrQdTWF0ZWogQ2Vw bCA8bWF0ZWpAY2VwbG92aS5jej6IYAQTEQIAIAIeAQIXgAIZAQUCRSoWAgYLCQgH AwIEFQIIAwQWAgMBAAoJEOCf7yXZZISsr5sAoIAqsNcs1Sl9jrmqv7vJzL4QG68V AJ9+30NmBClQwpmqnA26nCa4+WS5abQbTWF0ZWogQ2VwbCA8Y2VwbC5tQG5ldS5l ZHU+iGAEExECACACGwMCHgECF4AFAkUqFgkGCwkIBwMCBBUCCAMEFgIDAQAKCRDg n+8l2WSErAULAJo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lt3RyzGuE= =sxoW -----END PGP PUBLIC KEY BLOCK----- [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 216 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RESOLVED [Was: Re: bash prompt evaporates in subdirectories] 2024-10-24 14:26 ` RESOLVED [Was: Re: bash prompt evaporates in subdirectories] Matěj Cepl @ 2024-10-24 15:50 ` Taylor Blau 2024-10-24 20:03 ` avih 1 sibling, 0 replies; 10+ messages in thread From: Taylor Blau @ 2024-10-24 15:50 UTC (permalink / raw) To: Matěj Cepl; +Cc: avih, SZEDER Gábor, git@vger.kernel.org On Thu, Oct 24, 2024 at 04:26:59PM +0200, Matěj Cepl wrote: > On Thu Oct 24, 2024 at 3:33 PM CEST, Matěj Cepl wrote: > > On Thu Oct 24, 2024 at 1:46 PM CEST, avih wrote: > >> - What is the "innermost" distro where this happens? Thumbleweed? > >> which version? > > It was a bug in one of my scripts, https://github.com/openSUSE/osc/pull/1632/commits/294001c46ea2 > > Sorry for bothering you. Ah, makes sense. Nice find, and not a bother at all. Thanks, Taylor ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: RESOLVED [Was: Re: bash prompt evaporates in subdirectories] 2024-10-24 14:26 ` RESOLVED [Was: Re: bash prompt evaporates in subdirectories] Matěj Cepl 2024-10-24 15:50 ` Taylor Blau @ 2024-10-24 20:03 ` avih 1 sibling, 0 replies; 10+ messages in thread From: avih @ 2024-10-24 20:03 UTC (permalink / raw) To: Taylor Blau, Matěj Cepl; +Cc: SZEDER Gábor, git@vger.kernel.org On Thursday, October 24, 2024 at 05:19:46 PM GMT+3, avih <avihpit@yahoo.com> wrote: > So I'm guessing things go wrong somewhere between __osc_prompt > and __git_ps1 invocation, but I can't tell where. On Thursday, October 24, 2024 at 05:27:02 PM GMT+3, Matěj Cepl <mcepl@cepl.eu> wrote: > It was a bug in one of my scripts, https://github.com/openSUSE/osc/pull/1632/commits/294001c46ea2 Good catch. That's literally an issue in the one line which exists between __osc_prompt and the __git_ps1 invocation ! Do let us know if you encounter an actual issue in the future. avih ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-10-24 20:23 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-10-22 15:02 bash prompt evaporates in subdirectories Matěj Cepl 2024-10-22 15:53 ` Taylor Blau 2024-10-24 10:17 ` Matěj Cepl 2024-10-24 11:46 ` avih 2024-10-24 12:35 ` avih 2024-10-24 13:33 ` Matěj Cepl 2024-10-24 14:19 ` avih 2024-10-24 14:26 ` RESOLVED [Was: Re: bash prompt evaporates in subdirectories] Matěj Cepl 2024-10-24 15:50 ` Taylor Blau 2024-10-24 20:03 ` avih
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).