I did some updating on my Mac and seem to have broken some of my settings. I have the following set in my .bash_profile
export PS1="\W $"
This is working in my normal bash session to show just the current directory instead of the whole path. However, when I switch into tmux, it again displays the whole path. Other changes to the PS1 in the bash profile such as color or other characters work fine and are reflected in tmux. I have emptied out my .tmux.conf to see if that was causing conflict but there was no change to this behavior.
I did create a new user on the system and tried the same PS1 and it worked perfectly in both a normal session and tmux.
I am mostly confused because I know I had it working and can't figure out what would have changed in the update. What files besides .bash_profile and .tmux.conf could be at play here? Is there a way to tell where tmux is pulling it's settings from?
Additional info: This behavior is the same in both iTerm2 and Terminal Tmux version 1.8 Mac OSX 10.9.1
PS1 is a primary prompt variable which holds \u@\h \W\\$ special bash characters. This is the default structure of the bash prompt and is displayed every time a user logs in using a terminal. These default values are set in the /etc/bashrc file.
To enter command mode, type prefix>: followed by list-sessions or ls to view a list of currently active Tmux sessions. By default, list-sessions are bound to the prefix> s key combination. With j and k, you may explore the session list and activate one by hitting enter.
This one works for me: In tmux/terminal:
tmux set-option -g default-command bash
Or simply put into ~/.tmux.conf
:
set-option -g default-command bash
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With