$PS1 is an environment variable in bash that defines how bash prompt looks like. It can be customized in .bashrc or .bash_profile
For details see:
http://www.thegeekstuff.com/2008/09/bas ... ina-jolie/
I thought that my recent customizations to this variable caused this problem in Files. But I found out it's something else.
The issue is being caused by iTerm2 shell integration introduced in iTerm2.9 beta (
https://www.iterm2.com/version3.html).
Here is the customization file itself (a shell script that gets included in .bash_profile and provides some cool stuff in iTerm2)
https://gist.github.com/achekulaev/c1e15a1ed39e60905a6a
You can test it by saving file from Gist as ~/.iterm2_shell_integration.bash and then including in your .bash_profile like this:
Code: Select all
test -e ${HOME}/.iterm2_shell_integration.bash && source ${HOME}/.iterm2_shell_integration.bash
You'll notice it doesn't cause problems in regular Terminal.app.
If I comment out this integration in my .bash_profile then terminal in Files doesn't show that weird stuff.
I see warnings at the beginning of that script.
Maybe they will give you some clues why this integration is causing problems in Files but not anywhere else
I'm guessing you might be overriding either "DEBUG" trap or "PROMPT_COMMAND" variable
Code: Select all
# Note: this module requires 2 bash features which you must not otherwise be
# using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. iterm2_preexec_install
# will override these and if you override one or the other this _will_ break.
# This is known to support bash3, as well as *mostly* support bash2.05b. It
# has been tested with the default shells on MacOS X 10.4 "Tiger", Ubuntu 5.10
# "Breezy Badger", Ubuntu 6.06 "Dapper Drake", and Ubuntu 6.10 "Edgy Eft".
p.s. I have changed topic name to reflect my investigations