I'm using xfce4-terminal in XFCE and each tab by default shows the user/host/path name of that tab, which is what I want.
However, once I change $prompt (to customize it), this no longer happens. New tabs now actually come up with the name "Untitled".
Before I made the change, this was the content of $prompt:
echo $prompt %%[%n@%m %c]%#
But even if I do this, I never get the tab name to get updated again: set prompt = '%%[%n@%m %c]%#'
In fact, I know something is wrong here because when I set $path to that value, I actually pick up another "%" sign in the front of the prompt that wasn't there before.
Could someone please help me explain this and tell me how to fix it?
I'm not sure if I understand the codes you are using, but, assuming you're using Bash, I think maybe you're trying to do something like this:
If you are using Bash, here's info on Bash in general, and the prompt in particular.
Also, the Arch Wiki contains a bit more prompt snacks :-)