Open willianrampazzo opened 5 months ago
It's not expected - it's probably something to do with your local config of bash.
This script from pexpect tries to reset bash to a predictable state for bash_kernel & similar programs to use, while still picking up things you probably want like custom aliases:
https://github.com/pexpect/pexpect/blob/master/pexpect/bashrc.sh
But bash is pretty flexible, so it's probably missing something.
Thanks for the quick reply!
I've spawned a fresh Fedora 40 virtual machine and tested the bash kernel. The output is still the same. The script you mentioned did not help.
I'll investigate deeper when I have some spare time.
Ah, I think it's something Fedora is setting in /etc/bash_profile.d/vte.sh
. We/Pexpect might want to reset PS0
as well as PS1, and/or unset VTE_VERSION
so the vte (GTK terminal library) customisations don't get used.
The script you mentioned did not help.
Sorry, I wasn't very clear: bash_kernel already uses that script to set up bash. I wouldn't expect running it again to fix it.
That was it!
Without investigating the cause, I've just removed the /etc/profile.d/vte.sh
file and commands that succeed now show correctly using the bash kernel. Commands that return anything other than 0
still show the return code with a red line at the bottom of the output.
Feel free to close this issue as a "user-side problem" or use it to track the change you suggested in the previous comment.
Thanks again for your quick replies and help!
FYI, as a workaround on my side, I added "VTE_VERSION": ""
to https://github.com/takluyver/bash_kernel/blob/master/bash_kernel/install.py#L16, and it did the trick.
I have just installed bash_kernel for some testing and all my cell outputs have
]777;preexec\
before and: 1
after the output. The: 1
output is show on a red line. Is it expected?Example:
Software versions: