Closed AlbertoFabbri93 closed 9 months ago
Thanks for the report.
echo "$PS1" | cat -v
?
- What is the output of
echo "$PS1" | cat -v
?
I do not think this makes any sense but the output is:
\[^[[0m\]\[^[[0;40m\] albi@\h \[^[[30;44m\]M-nM-^BM-0\[^[[0;44;30m\] \w \[^[[0;34m\]M-nM-^BM-0 \[^[[0m\]
- What is your terminal?
Gnome Terminal
- What is your operating system or distribution?
OpenSuse Aeon
Thanks.
- What is the output of
echo "$PS1" | cat -v
?I do not think this makes any sense but the output is:
\[^[[0m\]\[^[[0;40m\] albi@\h \[^[[30;44m\]M-nM-^BM-0\[^[[0;44;30m\] \w \[^[[0;34m\]M-nM-^BM-0 \[^[[0m\]
What is the result when the problem arises, i.e., could you try echo "$PS1" | cat -v
in a working tree of any git repository?
- What is your operating system or distribution?
OpenSuse Aeon
Ah, OK. Thanks! I hadn't noticed that you are an identical user as in #413.
What is the result when the problem arises, i.e., could you try
echo "$PS1" | cat -v
in a working tree of any git repository?
\[^[[0m\]\[^[[0;40m\] albi@\h \[^[[30;44m\]M-nM-^BM-0\[^[[0;44;30m\] \w \[^[[34;42m\]M-nM-^BM-0\[^[[0;42;30m\] M-nM-^BM- main^M \[^[[0;32m\]M-nM-^BM-0 \[^[[0m\]
Ah, OK. Thanks! I hadn't noticed that you are an identical user as in #413.
No problem :)
... M-nM-^BM- main^M \[^[[0;32m\]M-nM-^BM-0 \[^[[0m\]
OK, ^M
(CR, Carriage Return) after main
is the issue.
git symbolic-ref HEAD | cat -v
in a working tree of any git repository?OK,
^M
(CR, Carriage Return) aftermain
is the issue.
Makes sense :)
What is the output of the command
git symbolic-ref HEAD | cat -v
in a working tree of any git repository?
refs/heads/main^M
I guess this is again a Distrobox matter related to the TTY settings. The TTY converts the newlines between LF <-> CR LF
for terminals. The terminal basically accepts CR LF
so the TTY sitting between the terminal and the application converts LF -> CR LF
in the application-to-terminal stream. However, this time the recipient is not a terminal but another command, so the conversion shouldn't take place. This could also be reported to Distrobox later.
Ah ok, thank you for the explanation, very interesting! It seems like distrobox introduces a lot of issue when it comes to customizing bash.
It is really a pity :( and I will probably stop using oh-my-bash until this is fixed but it should definitely be reported. I will have a look if anybody already reported something similar.
Thank you very much!
I was thinking that I do not really need to disable oh-my-bash completely, I only have problems when executing binaries through distrobox so disabling the git plugin should fix the problem for me. I will lose those functionality but I should be able to keep using the rest of oh-my-bash.
Better than nothing :)
The problem has been fixed in the upstream Distrobox https://github.com/89luca89/distrobox/issues/965. It should be applied to the next release of Distrobox. Let me close the issue. Thank you for your report.
As written in the title I am using Agnoster and it breaks when I enter a folder with a git repo and it shows the various git info. This is an example:
I am using a Powerline font.