Retain prompt's path orthography in new tabs
Example use-case
Assumptions:
- a gnome-terminal window is running and in focus;
- GNU Bash is the default shell
Press Ctrl+Shift+t to open a new tab, and enter the following:
# Go to user's home directory
cd
# Check that $PROMPT_DIRTRIM is unset.
# This command should return "OK" (without quote marks).
echo "${PROMPT_DIRTRIM:-OK}"
# Set the default Bash prompt to show the current working directory.
echo 'PS1='"'"'\w\$ '"'" >> ~/.bashrc
# Apply the new bashrc to this terminal
source ~/.bashrc
# Create a new directory that is outside the user's home directory.
mkdir /tmp/new-tab-path-bug
# Create a symlink (symbolic link) to that directory from the home directory.
ln -s /tmp/new-tab-path-bug
# Go to that directory, via the symlink.
cd new-tab-path-bug
The Bash prompt should now be ~/new-tab-path-bug$
.
Now, press Ctrl+Shift+t to open a new tab.
Expected behaviour
The new tab's Bash prompt should be ~/new-tab-path-bug$
.
Actual behaviour
The new tab's Bash prompt is /tmp/new-tab-path-bug$
.
Edited by Ghost User